{"TotalCount":95,"Files":[{"Ident":"xaz.gooui","Path":"Animation/SmoothVector2.cs","FileName":"SmoothVector2.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\nusing Sandbox;\n\nnamespace Goo.Animation;\n\npublic record struct SmoothVector2\n{\n    public Vector2 Current;\n    public Vector2 Target;\n    public Vector2 Velocity;\n    public float SmoothTime;\n\n    public SmoothVector2(Vector2 initial, float smoothTime)\n    {\n        Current = initial;\n        Target = initial;\n        Velocity = default;\n        SmoothTime = smoothTime;\n    }\n\n    public void Update(float dt)\n    {\n        float vx = Velocity.x, vy = Velocity.y;\n        Current = new Vector2(\n            MathX.SmoothDamp(Current.x, Target.x, ref vx, SmoothTime, dt),\n            MathX.SmoothDamp(Current.y, Target.y, ref vy, SmoothTime, dt));\n        Velocity = new Vector2(vx, vy);\n    }\n\n    public bool IsSettled =\u003E\n        MathF.Abs(Target.x - Current.x) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Target.y - Current.y) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.x) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.y) \u003C 0.0001f;\n\n    /// \u003Csummary\u003EAdvances by dt and returns true while still moving; chain calls with | (not ||) so every damper advances each frame.\u003C/summary\u003E\n    public bool Tick(float dt) { Update(dt); return !IsSettled; }\n}\n"},{"Ident":"xaz.gooui","Path":"Animation/Tween.cs","FileName":"Tween.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\r\n\r\nnamespace Goo.Animation;\r\n\r\npublic readonly record struct Tween\r\n{\r\n    public Sandbox.Utility.Easing.Function Easing { get; init; }\r\n    public float Duration   { get; init; }\r\n    public float Delay      { get; init; }\r\n    public float SpeedScale { get; init; }\r\n    public int   Iterations { get; init; }\r\n    public bool  PingPong   { get; init; }\r\n    public bool  Reversed   { get; init; }\r\n\r\n    public Tween(Sandbox.Utility.Easing.Function easing, float duration, float delay = 0f)\r\n    {\r\n        Easing     = easing;\r\n        Duration   = duration;\r\n        Delay      = delay;\r\n        SpeedScale = 1f;\r\n        Iterations = 1;\r\n        PingPong   = false;\r\n        Reversed   = false;\r\n    }\r\n\r\n    /// \u003Csummary\u003E\r\n    /// Bridge a designer-authored Sandbox.Curve (authored over [0, 1]) into a Tween.\r\n    /// Allocates one delegate per call; cache the result in a static readonly field.\r\n    /// \u003C/summary\u003E\r\n    public static Tween FromCurve(Sandbox.Curve curve, float duration, float delay = 0f)\r\n        =\u003E new Tween(curve.Evaluate, duration, delay);\r\n\r\n    public float Eval(float elapsedSec)\r\n    {\r\n        if (Duration \u003C= 0f) return Reversed ? 0f : 1f;\r\n\r\n        float t = (elapsedSec - Delay) * SpeedScale;\r\n        if (t \u003C= 0f) return Reversed ? 1f : 0f;\r\n\r\n        float cycleDuration = PingPong ? 2f * Duration : Duration;\r\n\r\n        if (Iterations \u003E 0 \u0026\u0026 t \u003E= cycleDuration * Iterations)\r\n        {\r\n            float endLocal = PingPong ? 0f : 1f;\r\n            if (Reversed) endLocal = 1f - endLocal;\r\n            return Easing(endLocal);\r\n        }\r\n\r\n        float cycleT = t % cycleDuration;\r\n        float local = PingPong\r\n            ? (cycleT \u003C Duration ? cycleT / Duration : 1f - (cycleT - Duration) / Duration)\r\n            : cycleT / Duration;\r\n\r\n        if (Reversed) local = 1f - local;\r\n        return Easing(local);\r\n    }\r\n}\r\n\r\npublic static class TweenExtensions\r\n{\r\n    public static Tween Loop(this Tween t)               =\u003E t with { Iterations = -1 };\r\n    public static Tween Times(this Tween t, int n)       =\u003E t with { Iterations = n };\r\n    public static Tween PingPong(this Tween t)           =\u003E t with { PingPong = true };\r\n    public static Tween Scale(this Tween t, float speed) =\u003E t with { SpeedScale = speed };\r\n    public static Tween WithDelay(this Tween t, float s) =\u003E t with { Delay = s };\r\n    public static Tween Reverse(this Tween t)            =\u003E t with { Reversed = true };\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Core/Children.cs","FileName":"Children.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\nusing System.Collections;\n\nnamespace Goo;\n\npublic sealed class Children : IEnumerable\n{\n    internal FrameList? _list;\n    internal int _buildId;\n    internal Children() { }\n    internal int Count { get { EnsureValid(); return _list!.Count; } }\n    internal ref Frame this[int i] { get { EnsureValid(); return ref _list![i]; } }\n\n    public void Add\u003CT\u003E(in T child) where T : struct, IBlob\n    {\n        EnsureValid();\n        ref Frame slot = ref _list!.Reserve();\n        child.WriteTo(ref slot);\n    }\n\n    void EnsureValid()\n    {\n        var ctx = BuildContext._current;\n        if (ctx == null || _list == null || _buildId != ctx._currentBuildId)\n            throw new InvalidOperationException(\n                \u0022Container reused across rebuilds. The same Container instance cannot survive \u0022 \u002B\n                \u0022past the Build() it was created in. Build a new one inside Build(), or extract \u0022 \u002B\n                \u0022a helper function that returns a fresh Container each call.\u0022);\n    }\n\n    // IEnumerable is required by C# collection-initializer syntax; iteration is not a\n    // use case for Children, so this returns an empty enumerator.\n    IEnumerator IEnumerable.GetEnumerator() =\u003E Array.Empty\u003Cobject\u003E().GetEnumerator();\n}\n"},{"Ident":"xaz.gooui","Path":"Core/IBlob.cs","FileName":"IBlob.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"\r\nnamespace Goo;\r\n\r\n/// \u003Csummary\u003ECompile-time constraint for blob struct types. Never use as storage, return, or parameter type (boxes the struct, destroys per-Rebuild allocation profile); only valid in where T : struct, IBlob.\u003C/summary\u003E\r\npublic interface IBlob\r\n{\r\n    static abstract BlobKind Kind { get; }\r\n    string? Key { get; }\r\n    internal void WriteTo(ref Frame frame);\r\n}\r\n\r\n/// \u003Csummary\u003EReturns the single root Blob for a GooView build. A named delegate rather than\r\n/// Func\u0026lt;IBlob\u0026gt; because IBlob has a static-abstract member (Kind) and C# bars such interfaces\r\n/// as generic type arguments (CS8920). Consequence for Razor markup: a bare method group cannot\r\n/// bind (its natural type is the illegal Func\u0026lt;IBlob\u0026gt;), so write\r\n/// \u003Cc\u003EBuild=@(new BlobBuilder(MyBuild))\u003C/c\u003E. See docs/site/docs/gotchas.md.\u003C/summary\u003E\r\npublic delegate IBlob BlobBuilder();\r\n"},{"Ident":"xaz.gooui","Path":"Core/Text.Style.g.cs","FileName":"Text.Style.g.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"// \u003Cauto-generated /\u003E\r\n// Generated by tools/StyleFacadeEmit. Do not edit by hand.\r\n// Source of truth: tools/StyleFacadeEmit/style-manifest.json\r\nusing Sandbox;\r\nusing Sandbox.Rendering;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\npublic readonly partial record struct Text\r\n{\r\n    public Length? Width { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Width, value); }\r\n    public Length? Height { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Height, value); }\r\n    public Length? Margin { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Margin, value); }\r\n    public Length? MarginLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginLeft, value); }\r\n    public Length? MarginTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginTop, value); }\r\n    public Length? MarginRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginRight, value); }\r\n    public Length? MarginBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginBottom, value); }\r\n    public Color? BackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? BackgroundTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundTint, value, StyleValue.FromColor); }\r\n    public Length? FlexBasis { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexBasis, value); }\r\n    public float? FlexGrow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexGrow, value); }\r\n    public float? FlexShrink { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexShrink, value); }\r\n    public Color? FontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontColor, value, StyleValue.FromColor); }\r\n    public string? FontFamily { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontFamily, value); }\r\n    public Length? FontSize { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontSize, value); }\r\n    public FontSmooth? FontSmooth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontSmooth, value, StyleValue.FromFontSmooth); }\r\n    public FontStyle? FontStyle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontStyle, value, StyleValue.FromFontStyle); }\r\n    public FontVariantNumeric? FontVariantNumeric { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontVariantNumeric, value, StyleValue.FromFontVariantNumeric); }\r\n    public int? FontWeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontWeight, value); }\r\n    public Length? LetterSpacing { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.LetterSpacing, value); }\r\n    public Length? LineHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.LineHeight, value); }\r\n    public Length? MaxHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxHeight, value); }\r\n    public Length? MaxWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxWidth, value); }\r\n    public Length? MinHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinHeight, value); }\r\n    public Length? MinWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinWidth, value); }\r\n    public float? Opacity { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Opacity, value); }\r\n    public TextAlign? TextAlign { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextAlign, value, StyleValue.FromTextAlign); }\r\n    public Length? TextBackgroundAngle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextBackgroundAngle, value); }\r\n    public Color? TextDecorationColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationColor, value, StyleValue.FromColor); }\r\n    public TextDecoration? TextDecorationLine { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationLine, value, StyleValue.FromTextDecoration); }\r\n    public TextSkipInk? TextDecorationSkipInk { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationSkipInk, value, StyleValue.FromTextSkipInk); }\r\n    public TextDecorationStyle? TextDecorationStyle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationStyle, value, StyleValue.FromTextDecorationStyle); }\r\n    public Length? TextDecorationThickness { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationThickness, value); }\r\n    public FilterMode? TextFilter { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextFilter, value, StyleValue.FromFilterMode); }\r\n    public Length? TextLineThroughOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextLineThroughOffset, value); }\r\n    public TextOverflow? TextOverflow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextOverflow, value, StyleValue.FromTextOverflow); }\r\n    public Length? TextOverlineOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextOverlineOffset, value); }\r\n    public Color? TextStrokeColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextStrokeColor, value, StyleValue.FromColor); }\r\n    public Length? TextStrokeWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextStrokeWidth, value); }\r\n    public TextTransform? TextTransform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextTransform, value, StyleValue.FromTextTransform); }\r\n    public Length? TextUnderlineOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextUnderlineOffset, value); }\r\n    public Goo.PanelTransform? Transform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Transform, value, StyleValue.FromPanelTransform); }\r\n    public WhiteSpace? WhiteSpace { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WhiteSpace, value, StyleValue.FromWhiteSpace); }\r\n    public WordBreak? WordBreak { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WordBreak, value, StyleValue.FromWordBreak); }\r\n    public Length? WordSpacing { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WordSpacing, value); }\r\n    public Color? HoverBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.HoverBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? ActiveBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ActiveBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? FocusBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FocusBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? HoverFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.HoverFontColor, value, StyleValue.FromColor); }\r\n    public Color? ActiveFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ActiveFontColor, value, StyleValue.FromColor); }\r\n    public Color? FocusFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FocusFontColor, value, StyleValue.FromColor); }\r\n    public int? TransitionMs { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TransitionMs, value); }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Core/TextEntry.Style.g.cs","FileName":"TextEntry.Style.g.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"// \u003Cauto-generated /\u003E\r\n// Generated by tools/StyleFacadeEmit. Do not edit by hand.\r\n// Source of truth: tools/StyleFacadeEmit/style-manifest.json\r\nusing Sandbox;\r\nusing Sandbox.Rendering;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\npublic readonly partial record struct TextEntry\r\n{\r\n    public FlexDirection? FlexDirection { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexDirection, value, StyleValue.FromFlexDirection); }\r\n    public Justify? JustifyContent { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.JustifyContent, value, StyleValue.FromJustify); }\r\n    public Align? AlignItems { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.AlignItems, value, StyleValue.FromAlign); }\r\n    public DisplayMode? Display { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Display, value, StyleValue.FromDisplay); }\r\n    public Length? Width { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Width, value); }\r\n    public Length? Height { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Height, value); }\r\n    public Length? Padding { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Padding, value); }\r\n    public Length? PaddingLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PaddingLeft, value); }\r\n    public Length? PaddingTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PaddingTop, value); }\r\n    public Length? PaddingRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PaddingRight, value); }\r\n    public Length? PaddingBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PaddingBottom, value); }\r\n    public Length? Margin { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Margin, value); }\r\n    public Length? MarginLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginLeft, value); }\r\n    public Length? MarginTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginTop, value); }\r\n    public Length? MarginRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginRight, value); }\r\n    public Length? MarginBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginBottom, value); }\r\n    public Length? Gap { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Gap, value); }\r\n    public Length? RowGap { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.RowGap, value); }\r\n    public Length? ColumnGap { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ColumnGap, value); }\r\n    public Color? BackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundColor, value, StyleValue.FromColor); }\r\n    public Length? BorderRadius { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderRadius, value); }\r\n    public Length? BorderTopLeftRadius { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderTopLeftRadius, value); }\r\n    public Length? BorderTopRightRadius { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderTopRightRadius, value); }\r\n    public Length? BorderBottomRightRadius { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderBottomRightRadius, value); }\r\n    public Length? BorderBottomLeftRadius { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderBottomLeftRadius, value); }\r\n    public Align? AlignContent { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.AlignContent, value, StyleValue.FromAlign); }\r\n    public Align? AlignSelf { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.AlignSelf, value, StyleValue.FromAlign); }\r\n    public float? AspectRatio { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.AspectRatio, value); }\r\n    public Length? BackdropFilterBlur { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterBlur, value); }\r\n    public Length? BackdropFilterBrightness { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterBrightness, value); }\r\n    public Length? BackdropFilterContrast { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterContrast, value); }\r\n    public Length? BackdropFilterHueRotate { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterHueRotate, value); }\r\n    public Length? BackdropFilterInvert { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterInvert, value); }\r\n    public Length? BackdropFilterSaturate { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterSaturate, value); }\r\n    public Length? BackdropFilterSepia { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackdropFilterSepia, value); }\r\n    public Length? BackgroundAngle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundAngle, value); }\r\n    public string? BackgroundBlendMode { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundBlendMode, value); }\r\n    public Texture? BackgroundImage { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundImage, value); }\r\n    public bool? BackgroundPlaybackPaused { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundPlaybackPaused, value); }\r\n    public Length? BackgroundPositionX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundPositionX, value); }\r\n    public Length? BackgroundPositionY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundPositionY, value); }\r\n    public BackgroundRepeat? BackgroundRepeat { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundRepeat, value, StyleValue.FromBackgroundRepeat); }\r\n    public Length? BackgroundSizeX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundSizeX, value); }\r\n    public Length? BackgroundSizeY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundSizeY, value); }\r\n    public Color? BackgroundTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundTint, value, StyleValue.FromColor); }\r\n    public Color? BorderBottomColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderBottomColor, value, StyleValue.FromColor); }\r\n    public Color? BorderColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderColor, value, StyleValue.FromColor); }\r\n    public Color? BorderLeftColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderLeftColor, value, StyleValue.FromColor); }\r\n    public Color? BorderRightColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderRightColor, value, StyleValue.FromColor); }\r\n    public Color? BorderTopColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderTopColor, value, StyleValue.FromColor); }\r\n    public BorderImageFill? BorderImageFill { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageFill, value, StyleValue.FromBorderImageFill); }\r\n    public BorderImageRepeat? BorderImageRepeat { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageRepeat, value, StyleValue.FromBorderImageRepeat); }\r\n    public Texture? BorderImageSource { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageSource, value); }\r\n    public Color? BorderImageTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageTint, value, StyleValue.FromColor); }\r\n    public Length? BorderImageWidthBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageWidthBottom, value); }\r\n    public Length? BorderImageWidthLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageWidthLeft, value); }\r\n    public Length? BorderImageWidthRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageWidthRight, value); }\r\n    public Length? BorderImageWidthTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderImageWidthTop, value); }\r\n    public Length? BorderBottomWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderBottomWidth, value); }\r\n    public Length? BorderLeftWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderLeftWidth, value); }\r\n    public Length? BorderRightWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderRightWidth, value); }\r\n    public Length? BorderTopWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderTopWidth, value); }\r\n    public Length? BorderWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BorderWidth, value); }\r\n    public Length? Bottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Bottom, value); }\r\n    public Length? Left { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Left, value); }\r\n    public Length? Right { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Right, value); }\r\n    public Length? Top { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Top, value); }\r\n    public Color? CaretColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.CaretColor, value, StyleValue.FromColor); }\r\n    public string? Cursor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Cursor, value); }\r\n    public Length? FilterBlur { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterBlur, value); }\r\n    public Color? FilterBorderColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterBorderColor, value, StyleValue.FromColor); }\r\n    public Length? FilterBorderWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterBorderWidth, value); }\r\n    public Length? FilterBrightness { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterBrightness, value); }\r\n    public Length? FilterContrast { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterContrast, value); }\r\n    public Length? FilterHueRotate { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterHueRotate, value); }\r\n    public Length? FilterInvert { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterInvert, value); }\r\n    public Length? FilterSaturate { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterSaturate, value); }\r\n    public Length? FilterSepia { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterSepia, value); }\r\n    public Color? FilterTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FilterTint, value, StyleValue.FromColor); }\r\n    public Length? FlexBasis { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexBasis, value); }\r\n    public float? FlexGrow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexGrow, value); }\r\n    public float? FlexShrink { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexShrink, value); }\r\n    public Wrap? FlexWrap { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexWrap, value, StyleValue.FromWrap); }\r\n    public Color? FontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontColor, value, StyleValue.FromColor); }\r\n    public string? FontFamily { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontFamily, value); }\r\n    public Length? FontSize { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontSize, value); }\r\n    public FontSmooth? FontSmooth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontSmooth, value, StyleValue.FromFontSmooth); }\r\n    public FontStyle? FontStyle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontStyle, value, StyleValue.FromFontStyle); }\r\n    public FontVariantNumeric? FontVariantNumeric { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontVariantNumeric, value, StyleValue.FromFontVariantNumeric); }\r\n    public int? FontWeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FontWeight, value); }\r\n    public ImageRendering? ImageRendering { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ImageRendering, value, StyleValue.FromImageRendering); }\r\n    public Length? LetterSpacing { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.LetterSpacing, value); }\r\n    public Length? LineHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.LineHeight, value); }\r\n    public Length? MaskAngle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskAngle, value); }\r\n    public Texture? MaskImage { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskImage, value); }\r\n    public MaskMode? MaskMode { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskMode, value, StyleValue.FromMaskMode); }\r\n    public Length? MaskPositionX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskPositionX, value); }\r\n    public Length? MaskPositionY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskPositionY, value); }\r\n    public BackgroundRepeat? MaskRepeat { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskRepeat, value, StyleValue.FromBackgroundRepeat); }\r\n    public MaskScope? MaskScope { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskScope, value, StyleValue.FromMaskScope); }\r\n    public Length? MaskSizeX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskSizeX, value); }\r\n    public Length? MaskSizeY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaskSizeY, value); }\r\n    public Length? MaxHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxHeight, value); }\r\n    public Length? MaxWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxWidth, value); }\r\n    public Length? MinHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinHeight, value); }\r\n    public Length? MinWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinWidth, value); }\r\n    public string? MixBlendMode { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MixBlendMode, value); }\r\n    public float? Opacity { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Opacity, value); }\r\n    public int? Order { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Order, value); }\r\n    public Color? OutlineColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.OutlineColor, value, StyleValue.FromColor); }\r\n    public Length? OutlineOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.OutlineOffset, value); }\r\n    public Length? OutlineWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.OutlineWidth, value); }\r\n    public OverflowMode? Overflow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Overflow, value, StyleValue.FromOverflowMode); }\r\n    public OverflowMode? OverflowX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.OverflowX, value, StyleValue.FromOverflowMode); }\r\n    public OverflowMode? OverflowY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.OverflowY, value, StyleValue.FromOverflowMode); }\r\n    public Length? PerspectiveOriginX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PerspectiveOriginX, value); }\r\n    public Length? PerspectiveOriginY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PerspectiveOriginY, value); }\r\n    public PointerEvents? PointerEvents { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PointerEvents, value, StyleValue.FromPointerEvents); }\r\n    public PositionMode? Position { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Position, value, StyleValue.FromPositionMode); }\r\n    public string? SoundIn { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.SoundIn, value); }\r\n    public string? SoundOut { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.SoundOut, value); }\r\n    public TextAlign? TextAlign { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextAlign, value, StyleValue.FromTextAlign); }\r\n    public Length? TextBackgroundAngle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextBackgroundAngle, value); }\r\n    public Color? TextDecorationColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationColor, value, StyleValue.FromColor); }\r\n    public TextDecoration? TextDecorationLine { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationLine, value, StyleValue.FromTextDecoration); }\r\n    public TextSkipInk? TextDecorationSkipInk { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationSkipInk, value, StyleValue.FromTextSkipInk); }\r\n    public TextDecorationStyle? TextDecorationStyle { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationStyle, value, StyleValue.FromTextDecorationStyle); }\r\n    public Length? TextDecorationThickness { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextDecorationThickness, value); }\r\n    public FilterMode? TextFilter { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextFilter, value, StyleValue.FromFilterMode); }\r\n    public Length? TextLineThroughOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextLineThroughOffset, value); }\r\n    public TextOverflow? TextOverflow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextOverflow, value, StyleValue.FromTextOverflow); }\r\n    public Length? TextOverlineOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextOverlineOffset, value); }\r\n    public Color? TextStrokeColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextStrokeColor, value, StyleValue.FromColor); }\r\n    public Length? TextStrokeWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextStrokeWidth, value); }\r\n    public TextTransform? TextTransform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextTransform, value, StyleValue.FromTextTransform); }\r\n    public Length? TextUnderlineOffset { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TextUnderlineOffset, value); }\r\n    public Goo.PanelTransform? Transform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Transform, value, StyleValue.FromPanelTransform); }\r\n    public Length? TransformOriginX { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TransformOriginX, value); }\r\n    public Length? TransformOriginY { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TransformOriginY, value); }\r\n    public WhiteSpace? WhiteSpace { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WhiteSpace, value, StyleValue.FromWhiteSpace); }\r\n    public WordBreak? WordBreak { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WordBreak, value, StyleValue.FromWordBreak); }\r\n    public Length? WordSpacing { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.WordSpacing, value); }\r\n    public int? ZIndex { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ZIndex, value); }\r\n    public Color? HoverBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.HoverBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? ActiveBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ActiveBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? FocusBackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FocusBackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? HoverFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.HoverFontColor, value, StyleValue.FromColor); }\r\n    public Color? ActiveFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.ActiveFontColor, value, StyleValue.FromColor); }\r\n    public Color? FocusFontColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FocusFontColor, value, StyleValue.FromColor); }\r\n    public int? TransitionMs { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.TransitionMs, value); }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Dependency.cs","FileName":"Dependency.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using Goo;\nusing Sandbox.UI;\n\nnamespace Sandbox;\n\npublic class CounterUI : GooPanel\u003CContainer\u003E\n{\n\tprivate int _count;\n\n\tprotected override Container Build() =\u003E new Container\n\t{\n\t\tPadding = 16,\n\t\tWidth = 128,\n\t\tHeight = 128,\n\t\tBackgroundColor = Color.White,\n\t\tBorderRadius = 12,\n\t\tFlexDirection = FlexDirection.Row,\n\t\tGap = 12,\n\t\tAlignItems = Align.Center,\n\t\tChildren =\n\t\t{\n\t\t\tnew Text(_count.ToString()),\n\t\t\tnew Container\n\t\t\t{\n\t\t\t\tPadding = 8,\n\t\t\t\tBackgroundColor = Color.Orange,\n\t\t\t\tHoverBackgroundColor = Color.Cyan,\n\t\t\t\tBorderRadius = 6,\n\t\t\t\tOnClick = e =\u003E { _count\u002B\u002B; Rebuild(); },\n\t\t\t\tChildren = { new Text(\u0022\u002B\u0022) },\n\t\t\t},\n\t\t},\n\t};\n}"},{"Ident":"xaz.gooui","Path":"Input/KeyTracker.cs","FileName":"KeyTracker.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\nusing System.Collections.Generic;\nusing Sandbox;\n\nnamespace Goo.Input;\n\n// Polls a curated key catalog once per frame for rising-edge presses \u002B modifier state. ReemitHeldOnModifierRise re-emits a held key when a modifier rises (so \u0022hold W, press Ctrl\u0022 reads as a chord).\npublic sealed class KeyTracker\n{\n    public bool ReemitHeldOnModifierRise { get; set; } = false;\n\n    public ModifierState Modifiers { get; private set; }\n    public IReadOnlyList\u003CKeyDescriptor\u003E JustPressed =\u003E _justPressed;\n\n    readonly IReadOnlyList\u003CKeyDescriptor\u003E _catalog;\n    readonly HashSet\u003Cstring\u003E     _downLastFrame = new();\n    readonly List\u003CKeyDescriptor\u003E _justPressed   = new();\n\n    public KeyTracker() : this( KnownKeys.All ) { }\n\n    public KeyTracker( IReadOnlyList\u003CKeyDescriptor\u003E catalog )\n    {\n        _catalog = catalog;\n    }\n\n    public void Reset()\n    {\n        _downLastFrame.Clear();\n        _justPressed.Clear();\n        Modifiers = default;\n    }\n\n    static readonly Func\u003Cstring, bool\u003E s_engineDown = Sandbox.Input.Keyboard.Down;\n\n    public void Poll() =\u003E Poll( s_engineDown );\n\n    // isDown seam exists because engine Input statics throw outside a running engine process.\n    public void Poll( Func\u003Cstring, bool\u003E isDown )\n    {\n        _justPressed.Clear();\n        var prev = Modifiers;\n\n        for ( int i = 0; i \u003C _catalog.Count; i\u002B\u002B )\n        {\n            var  d    = _catalog[i];\n            bool down = isDown( d.EngineName );\n            if ( down \u0026\u0026 !_downLastFrame.Contains( d.EngineName ) )\n                _justPressed.Add( d );\n            if ( down ) _downLastFrame.Add( d.EngineName );\n            else        _downLastFrame.Remove( d.EngineName );\n        }\n\n        Modifiers = new ModifierState(\n            _downLastFrame.Contains( \u0022ctrl\u0022  ),\n            _downLastFrame.Contains( \u0022shift\u0022 ),\n            _downLastFrame.Contains( \u0022alt\u0022   ),\n            _downLastFrame.Contains( \u0022win\u0022   ) );\n\n        if ( !ReemitHeldOnModifierRise ) return;\n\n        bool modRose = ( Modifiers.Ctrl  \u0026\u0026 !prev.Ctrl  ) || ( Modifiers.Shift \u0026\u0026 !prev.Shift )\n                    || ( Modifiers.Alt   \u0026\u0026 !prev.Alt   ) || ( Modifiers.Meta  \u0026\u0026 !prev.Meta  );\n        if ( !modRose ) return;\n\n        for ( int i = 0; i \u003C _catalog.Count; i\u002B\u002B )\n        {\n            var d = _catalog[i];\n            if ( d.Class == KeyClass.Modifier ) continue;\n            if ( !_downLastFrame.Contains( d.EngineName ) ) continue;\n            if ( _justPressed.Contains( d ) ) continue;\n            _justPressed.Add( d );\n        }\n    }\n\n    /// \u003Csummary\u003ETrue if the named key had a rising edge (just-pressed, not held) this frame; call Poll first.\u003C/summary\u003E\n    public bool Pressed( string engineName )\n    {\n        for ( int i = 0; i \u003C _justPressed.Count; i\u002B\u002B )\n            if ( _justPressed[i].EngineName == engineName ) return true;\n        return false;\n    }\n}\n"},{"Ident":"xaz.gooui","Path":"Internal/StatefulLabel.cs","FileName":"StatefulLabel.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo.Internal;\r\n\r\ninternal sealed class StatefulLabel : Label, IStatefulHost, IStatefulEventHost\r\n{\r\n    StateController? _state;\r\n\r\n    internal Action\u003CMousePanelEvent\u003E? _onClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onRightClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMiddleClick;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseEnter;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseLeave;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseDown;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseUp;\r\n    internal Action\u003CMousePanelEvent\u003E? _onMouseMove;\r\n    internal bool    _userSetPointerEvents;\r\n    internal Action? _requestRebuild;\r\n    public Action? RequestRebuild { set =\u003E _requestRebuild = value; }\r\n\r\n    public void ApplyStateVariants(\r\n        Color? baseBg,  Color? baseFg,\r\n        Color? hoverBg, Color? activeBg, Color? focusBg,\r\n        Color? hoverFg, Color? activeFg, Color? focusFg,\r\n        int? transitionMs)\r\n    {\r\n        _state ??= new StateController(this);\r\n        _state.ApplyVariants(\r\n            baseBg, baseFg,\r\n            hoverBg, activeBg, focusBg,\r\n            hoverFg, activeFg, focusFg,\r\n            transitionMs);\r\n    }\r\n\r\n    public void ClearStateVariants() =\u003E _state?.ClearVariants();\r\n\r\n    public bool HasActiveStateVariants =\u003E _state?.HasActiveVariants ?? false;\r\n\r\n    public void ApplyEvents(in BlobEvents events)\r\n    {\r\n        _onClick      = events.OnClick;\r\n        _onRightClick = events.OnRightClick;\r\n        _onMiddleClick = events.OnMiddleClick;\r\n        _onMouseEnter = events.OnMouseEnter;\r\n        _onMouseLeave = events.OnMouseLeave;\r\n        _onMouseDown  = events.OnMouseDown;\r\n        _onMouseUp    = events.OnMouseUp;\r\n        _onMouseMove  = events.OnMouseMove;\r\n    }\r\n\r\n    public bool HasEventHandlers =\u003E\r\n        _onClick != null || _onRightClick != null || _onMiddleClick != null || _onMouseEnter != null || _onMouseLeave != null ||\r\n        _onMouseDown != null || _onMouseUp != null || _onMouseMove != null;\r\n\r\n    public bool UserSetPointerEvents\r\n    {\r\n        get =\u003E _userSetPointerEvents;\r\n        set =\u003E _userSetPointerEvents = value;\r\n    }\r\n\r\n    protected override void OnClick(MousePanelEvent e)\r\n    {\r\n        base.OnClick(e);\r\n        EventDispatch.Fire(_onClick, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnRightClick(MousePanelEvent e)\r\n    {\r\n        base.OnRightClick(e);\r\n        EventDispatch.Fire(_onRightClick, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMiddleClick(MousePanelEvent e)\r\n    {\r\n        base.OnMiddleClick(e);\r\n        EventDispatch.Fire(_onMiddleClick, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMouseOver(MousePanelEvent e)\r\n    {\r\n        base.OnMouseOver(e);\r\n        EventDispatch.Fire(_onMouseEnter, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMouseOut(MousePanelEvent e)\r\n    {\r\n        base.OnMouseOut(e);\r\n        EventDispatch.Fire(_onMouseLeave, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMouseDown(MousePanelEvent e)\r\n    {\r\n        base.OnMouseDown(e);\r\n        EventDispatch.Fire(_onMouseDown, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMouseUp(MousePanelEvent e)\r\n    {\r\n        base.OnMouseUp(e);\r\n        EventDispatch.Fire(_onMouseUp, e, _requestRebuild);\r\n    }\r\n\r\n    protected override void OnMouseMove(MousePanelEvent e)\r\n    {\r\n        base.OnMouseMove(e);\r\n        EventDispatch.Fire(_onMouseMove, e, _requestRebuild);\r\n    }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"ShaderEffect.cs","FileName":"ShaderEffect.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\r\nusing System.Collections.Generic;\r\nusing Sandbox;\r\nusing Sandbox.Rendering;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\n/// \u003Csummary\u003E\r\n/// A custom shader applied to a Blob. Point it at a compiled .shader; it parses the shader\r\n/// source\u0027s Attribute() declarations to validate uniform names and to reset uniforms other\r\n/// panels have set (panels share one CommandList attribute namespace), and pushes the uniform\r\n/// bag every frame. Set uniforms with the collection initializer (\u003Cc\u003E[\u0022Name\u0022] = value\u003C/c\u003E);\r\n/// a value may be a literal or a per-frame Func. Subclass and override \u003Csee cref=\u0022Apply\u0022/\u003E\r\n/// only for bespoke per-frame CPU logic.\r\n/// \u003C/summary\u003E\r\npublic record ShaderEffect\r\n{\r\n    static readonly Dictionary\u003Cobject, Material\u003E _materialCache = new();\r\n    static readonly Dictionary\u003Cobject, ShaderSchemaInfo?\u003E _schemaCache = new();\r\n\r\n    // Every uniform name any ShaderEffect has pushed this session, with the last value pushed\r\n    // (its runtime type drives the reset conversion). Panels share one CommandList attribute\r\n    // namespace, so a uniform set by one panel persists into every later panel\u0027s draw; an\r\n    // effect that does not set a seen uniform must reset it to its shader\u0027s declared default\r\n    // or it inherits the other panel\u0027s value (view-5u5m). Touched only from Apply (render thread).\r\n    static readonly Dictionary\u003Cstring, object\u003E _seenUniforms = new();\r\n\r\n    internal sealed class ShaderSchemaInfo\r\n    {\r\n        public required HashSet\u003Cstring\u003E Names;                       // declared attribute names\r\n        public required Dictionary\u003Cstring, (Vector4 Floats, Vector4 Ints)\u003E Defaults;\r\n    }\r\n\r\n    readonly string? _path;\r\n    readonly Shader? _shader;\r\n    readonly GrabMode _grab;\r\n    readonly Dictionary\u003Cstring, UniformValue\u003E _bag = new();\r\n    bool _validated;\r\n\r\n    /// \u003Csummary\u003EFor subclasses that supply their own \u003Csee cref=\u0022Material\u0022/\u003E and \u003Csee cref=\u0022Apply\u0022/\u003E.\u003C/summary\u003E\r\n    protected ShaderEffect() { }\r\n\r\n    /// \u003Csummary\u003EApply the shader at \u003Cparamref name=\u0022shaderPath\u0022/\u003E (e.g. \u0022shaders/ui_dither.shader\u0022).\u003C/summary\u003E\r\n    public ShaderEffect( string shaderPath, GrabMode grab = GrabMode.None )\r\n    {\r\n        _path = shaderPath;\r\n        _grab = grab;\r\n    }\r\n\r\n    /// \u003Csummary\u003EApply a shader resource (drag-droppable in the inspector).\u003C/summary\u003E\r\n    public ShaderEffect( Shader shader, GrabMode grab = GrabMode.None )\r\n    {\r\n        _shader = shader;\r\n        _grab = grab;\r\n    }\r\n\r\n    /// \u003Csummary\u003EThe shader asset path, or null when constructed from a \u003Csee cref=\u0022T:Sandbox.Shader\u0022/\u003E resource.\u003C/summary\u003E\r\n    public string? ShaderPath =\u003E _path;\r\n\r\n    /// \u003Csummary\u003EHow this effect grabs the framebuffer behind its panel.\u003C/summary\u003E\r\n    public GrabMode Grab =\u003E _grab;\r\n\r\n    /// \u003Csummary\u003EGet or set a uniform by its shader attribute name.\u003C/summary\u003E\r\n    public UniformValue this[string name]\r\n    {\r\n        get =\u003E _bag[name];\r\n        set =\u003E _bag[name] = value;\r\n    }\r\n\r\n    object CacheKey =\u003E (object?)_path ?? _shader!;\r\n\r\n    /// \u003Csummary\u003EThe material this effect draws with, cached so it is excluded from record equality.\u003C/summary\u003E\r\n    public virtual Material Material\r\n    {\r\n        get\r\n        {\r\n            var key = CacheKey;\r\n            if ( !_materialCache.TryGetValue( key, out var mat ) )\r\n            {\r\n                mat = _path is not null ? Material.FromShader( _path ) : Material.FromShader( _shader! );\r\n                _materialCache[key] = mat;\r\n            }\r\n            return mat;\r\n        }\r\n    }\r\n\r\n    /// \u003Csummary\u003ECreate the Material now, on the calling thread. Call on the main thread; Draw runs on the render thread and must only read the cache.\u003C/summary\u003E\r\n    public void Warm() =\u003E _ = Material;\r\n\r\n    /// \u003Csummary\u003ESet this effect\u0027s shader attributes for the frame, then grab the framebuffer per \u003Csee cref=\u0022Grab\u0022/\u003E.\u003C/summary\u003E\r\n    protected internal virtual void Apply( CommandList cl, Rect rect )\r\n    {\r\n        cl.Attributes.Set( \u0022BoxSize\u0022, new Vector2( rect.Width, rect.Height ) );\r\n\r\n        // Subclass escape hatch: a derived effect calling base.Apply gets only BoxSize.\r\n        if ( _path is null \u0026\u0026 _shader is null ) return;\r\n\r\n        Validate();\r\n\r\n        // Reset seen-but-unset uniforms to this shader\u0027s declared defaults so another panel\u0027s\r\n        // attribute writes do not bleed into this draw (view-5u5m).\r\n        var schema = SchemaFor( CacheKey );\r\n        if ( schema is not null )\r\n        {\r\n            foreach ( var (name, sample) in _seenUniforms )\r\n            {\r\n                if ( _bag.ContainsKey( name ) ) continue;\r\n                if ( !schema.Defaults.TryGetValue( name, out var def ) ) continue;\r\n                if ( ResetValue( sample, def.Floats, def.Ints ) is { } reset )\r\n                    SetAttribute( cl, name, reset );\r\n            }\r\n        }\r\n\r\n        foreach ( var (name, value) in _bag )\r\n        {\r\n            var resolved = value.Resolve();\r\n            SetAttribute( cl, name, resolved );\r\n            if ( resolved is not Texture )\r\n                _seenUniforms[name] = resolved;\r\n        }\r\n\r\n        switch ( _grab )\r\n        {\r\n            case GrabMode.Sharp:\r\n                cl.Attributes.GrabFrameTexture( \u0022FrameBufferCopyTexture\u0022 );\r\n                break;\r\n            case GrabMode.Blurred:\r\n                cl.Attributes.GrabFrameTexture( \u0022FrameBufferCopyTexture\u0022, Graphics.DownsampleMethod.GaussianBlur );\r\n                break;\r\n        }\r\n    }\r\n\r\n    static void SetAttribute( CommandList cl, string name, object value )\r\n    {\r\n        switch ( value )\r\n        {\r\n            case float f:   cl.Attributes.Set( name, f ); break;\r\n            case bool b:    cl.Attributes.Set( name, b ); break;\r\n            case Vector2 v: cl.Attributes.Set( name, v ); break;\r\n            case Vector3 v: cl.Attributes.Set( name, v ); break;\r\n            case Vector4 v: cl.Attributes.Set( name, v ); break;\r\n            case Color c:   cl.Attributes.Set( name, c ); break;\r\n            case Texture t: cl.Attributes.Set( name, t ); break;\r\n        }\r\n    }\r\n\r\n    // Reads the shader\u0027s declared attribute names once per instance and warns on uniform names\r\n    // the shader does not declare. Skipped silently when the source is unavailable.\r\n    void Validate()\r\n    {\r\n        if ( _validated ) return;\r\n        _validated = true;\r\n\r\n        var valid = SchemaFor( CacheKey )?.Names;\r\n        if ( valid is null || valid.Count == 0 ) return;\r\n\r\n        foreach ( var name in _bag.Keys )\r\n            if ( !valid.Contains( name ) )\r\n                Sandbox.Internal.GlobalSystemNamespace.Log.Warning(\r\n                    $\u0022ShaderEffect for \\\u0022{_path ?? _shader?.ResourcePath}\\\u0022: uniform \\\u0022{name}\\\u0022 is not declared by the shader \u0022 \u002B\r\n                    $\u0022(valid: {string.Join( \u0022, \u0022, valid )}). Ignored.\u0022 );\r\n    }\r\n\r\n    // Names \u002B defaults come from parsing the .shader SOURCE, which ships with the project and\r\n    // declares every Attribute() with its Default(). The engine\u0027s Shader.Schema is editor-only\r\n    // plumbing: at game runtime it throws (\u0022Load must be called on the main thread!\u0022 \u2014 Apply\r\n    // runs on the render thread) so it is not consulted at all (view-5u5m probe, 2026-06-11).\r\n    // Null when the source is unreadable (e.g. unit tests, published build without raw\r\n    // .shader files); reset and validation both skip then.\r\n    static ShaderSchemaInfo? SchemaFor( object key )\r\n    {\r\n        if ( _schemaCache.TryGetValue( key, out var info ) ) return info;\r\n\r\n        info = null;\r\n        if ( (key as string ?? (key as Shader)?.ResourcePath) is { } srcPath )\r\n        {\r\n            try\r\n            {\r\n                info = ParseShaderSource( FileSystem.Mounted.ReadAllText( srcPath ) );\r\n            }\r\n            catch\r\n            {\r\n                info = null;\r\n            }\r\n        }\r\n\r\n        _schemaCache[key] = info;\r\n        return info;\r\n    }\r\n\r\n    static readonly System.Text.RegularExpressions.Regex _declRegex = new(\r\n        @\u0022\\b(?\u003Ctype\u003Efloat[234]?|bool|int|Texture2D)\\s\u002B\\w\u002B\\s*\u003C(?\u003Cblock\u003E[^\u003E]*)\u003E\u0022,\r\n        System.Text.RegularExpressions.RegexOptions.Compiled );\r\n    static readonly System.Text.RegularExpressions.Regex _attrRegex = new(\r\n        @\u0022Attribute\\s*\\(\\s*\u0022\u0022(?\u003Cname\u003E[^\u0022\u0022]\u002B)\u0022\u0022\\s*\\)\u0022,\r\n        System.Text.RegularExpressions.RegexOptions.Compiled );\r\n    static readonly System.Text.RegularExpressions.Regex _defaultRegex = new(\r\n        @\u0022Default[234]?\\s*\\(\\s*(?\u003Cargs\u003E[^)]*)\\)\u0022,\r\n        System.Text.RegularExpressions.RegexOptions.Compiled );\r\n\r\n    // Pure: extracts Attribute()-bound uniform declarations and their Default() values from\r\n    // .shader source. Defaults are stored in both vector slots so ResetValue can convert by the\r\n    // bled value\u0027s runtime type. Texture declarations contribute a name (for validation) but no\r\n    // default. Only the main file is scanned; #include\u0027d uniforms (BoxSize, DpiScale) are\r\n    // framework-managed and excluded anyway. Missing Default() = zeros, matching the engine\u0027s\r\n    // unset-attribute behavior.\r\n    internal static ShaderSchemaInfo? ParseShaderSource( string source )\r\n    {\r\n        var names    = new HashSet\u003Cstring\u003E();\r\n        var defaults = new Dictionary\u003Cstring, (Vector4 Floats, Vector4 Ints)\u003E();\r\n\r\n        foreach ( System.Text.RegularExpressions.Match m in _declRegex.Matches( source ) )\r\n        {\r\n            var block = m.Groups[\u0022block\u0022].Value;\r\n            var attr  = _attrRegex.Match( block );\r\n            if ( !attr.Success ) continue;\r\n\r\n            var name = attr.Groups[\u0022name\u0022].Value;\r\n            names.Add( name );\r\n\r\n            if ( name is \u0022BoxSize\u0022 or \u0022DpiScale\u0022 ) continue;     // framework-managed per draw\r\n            if ( m.Groups[\u0022type\u0022].Value == \u0022Texture2D\u0022 ) continue; // no resettable default\r\n\r\n            Vector4 v = default;\r\n            var def = _defaultRegex.Match( block );\r\n            if ( def.Success )\r\n            {\r\n                var parts = def.Groups[\u0022args\u0022].Value.Split( \u0027,\u0027 );\r\n                for ( int i = 0; i \u003C parts.Length \u0026\u0026 i \u003C 4; i\u002B\u002B )\r\n                {\r\n                    if ( !float.TryParse( parts[i].Trim(), System.Globalization.NumberStyles.Float,\r\n                             System.Globalization.CultureInfo.InvariantCulture, out var f ) ) continue;\r\n                    switch ( i )\r\n                    {\r\n                        case 0: v.x = f; break;\r\n                        case 1: v.y = f; break;\r\n                        case 2: v.z = f; break;\r\n                        case 3: v.w = f; break;\r\n                    }\r\n                }\r\n            }\r\n            defaults[name] = (v, v);\r\n        }\r\n\r\n        return names.Count \u003E 0 ? new ShaderSchemaInfo { Names = names, Defaults = defaults } : null;\r\n    }\r\n\r\n    // Pure: converts a shader\u0027s declared default (schema FloatDefault/IntDefault vectors) to the\r\n    // runtime type of the value that bled in, so the reset lands in the same attribute slot type.\r\n    // Null = no safe reset (unsupported type; textures are never recorded so never reach this).\r\n    internal static object? ResetValue( object sample, Vector4 floats, Vector4 ints ) =\u003E sample switch\r\n    {\r\n        float   =\u003E floats.x,\r\n        bool    =\u003E ints.x != 0f,\r\n        Vector2 =\u003E new Vector2( floats.x, floats.y ),\r\n        Vector3 =\u003E new Vector3( floats.x, floats.y, floats.z ),\r\n        Color   =\u003E new Color( floats.x, floats.y, floats.z, floats.w ),\r\n        Vector4 =\u003E floats,\r\n        _       =\u003E null,\r\n    };\r\n\r\n    public virtual bool Equals( ShaderEffect? other )\r\n    {\r\n        if ( other is null ) return false;\r\n        if ( ReferenceEquals( this, other ) ) return true;\r\n        if ( EqualityContract != other.EqualityContract ) return false;\r\n        return _path == other._path\r\n            \u0026\u0026 ReferenceEquals( _shader, other._shader )\r\n            \u0026\u0026 _grab == other._grab\r\n            \u0026\u0026 BagEquals( _bag, other._bag );\r\n    }\r\n\r\n    public override int GetHashCode()\r\n    {\r\n        var hc = new HashCode();\r\n        hc.Add( EqualityContract );\r\n        hc.Add( _path );\r\n        hc.Add( _grab );\r\n        hc.Add( _bag.Count );\r\n        return hc.ToHashCode();\r\n    }\r\n\r\n    static bool BagEquals( Dictionary\u003Cstring, UniformValue\u003E a, Dictionary\u003Cstring, UniformValue\u003E b )\r\n    {\r\n        if ( a.Count != b.Count ) return false;\r\n        foreach ( var (k, v) in a )\r\n            if ( !b.TryGetValue( k, out var bv ) || !v.Equals( bv ) ) return false;\r\n        return true;\r\n    }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Core/StyleAccumulator.cs","FileName":"StyleAccumulator.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using Sandbox;\nusing Sandbox.Rendering;\nusing Sandbox.UI;\n\nnamespace Goo;\n\n// Style helpers hoisted so generated Blob facades share them. Keep the early-return form: an engine-type ternary that resolves bare null via an implicit string operator silently produces magenta (Color.Parse fallback) instead of the intended absent-property. See engine-fact memories.\n\ninternal static class StyleAccumulator\n{\n    static StyleList Rent(StyleList current)\n        =\u003E ReferenceEquals(current, StyleList.Empty)\n            ? BuildContext.Current.RentStyleList()\n            : current;\n\n    public static StyleList Add(StyleList current, StyleField field, Length? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromLength(value.Value));\n        return list;\n    }\n\n    public static StyleList Add\u003CTEnum\u003E(StyleList current, StyleField field, TEnum? value, System.Func\u003CTEnum, StyleValue\u003E wrap) where TEnum : struct\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, wrap(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, Color? value, System.Func\u003CColor, StyleValue\u003E wrap)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, wrap(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, string? value)\n    {\n        if (value is null) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromString(value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, float? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromSingle(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, bool? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromBoolean(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, int? value)\n    {\n        if (!value.HasValue) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromInt32(value.Value));\n        return list;\n    }\n\n    public static StyleList Add(StyleList current, StyleField field, Texture? value)\n    {\n        if (value is null) return current;\n        var list = Rent(current);\n        list.Add(field, StyleValue.FromTexture(value));\n        return list;\n    }\n}\n"},{"Ident":"xaz.gooui","Path":"Dnd/DragSource.cs","FileName":"DragSource.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\r\nusing Sandbox;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\n// Cell: a draggable carrying a typed payload. Owns its own being-dragged visual flag so the\r\n// original can dim while in flight. Wires engine drag events into the shared DragContext.\r\npublic sealed class DragSource\u003CT\u003E : Cell\u003CContainer\u003E\r\n{\r\n    public DragContext\u003CT\u003E Context = null!;     // set via Cell.Mount configure\r\n    public T Payload = default!;               // set via configure\r\n    public Func\u003Cbool, Container\u003E Content = null!;  // receives isDragging; renders the tile\r\n    public Func\u003CContainer\u003E? Ghost;             // optional ghost; defaults to Content(false)\r\n\r\n    bool _dragging;\r\n\r\n    protected override Container Build() =\u003E new Container\r\n    {\r\n        PointerEvents = PointerEvents.All,\r\n        OnDragStart = e =\u003E\r\n        {\r\n            _dragging = true;\r\n            // ScreenPosition is rendered px; the ghost layer consumes Context.Pos as CSS-px Left/Top.\r\n            // Convert via the source panel\u0027s ScaleFromScreen (=1/ScaleToScreen) so the ghost tracks\r\n            // the cursor under UI scaling (engine-fact-panel-screen-position-helpers). No-op at 1.0.\r\n            Context.Begin(Payload, Ghost ?? (() =\u003E Content(false)),\r\n                e.ScreenPosition * (e.This?.ScaleFromScreen ?? 1f));\r\n            Rebuild();\r\n        },\r\n        OnDrag = e =\u003E\r\n        {\r\n            Context.Move(e.ScreenPosition * (e.This?.ScaleFromScreen ?? 1f));\r\n            Rebuild();\r\n        },\r\n        OnDragEnd = _ =\u003E\r\n        {\r\n            _dragging = false;\r\n            Context.Release();\r\n            Rebuild();\r\n        },\r\n        Children = { Content(_dragging) },\r\n    };\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Internal/IStatefulHost.cs","FileName":"IStatefulHost.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using Sandbox;\r\n\r\nnamespace Goo.Internal;\r\n\r\ninternal interface IStatefulHost\r\n{\r\n    void ApplyStateVariants(\r\n        Color? baseBg,  Color? baseFg,\r\n        Color? hoverBg, Color? activeBg, Color? focusBg,\r\n        Color? hoverFg, Color? activeFg, Color? focusFg,\r\n        int? transitionMs);\r\n\r\n    // Shed any previously-applied variant sheet when the host (possibly recycled by\r\n    // the reconciler) declares no variants this pass. No-op if none were applied.\r\n    void ClearStateVariants();\r\n\r\n    // True while a variant sheet is attached; such panels must keep capturing pointer events.\r\n    bool HasActiveStateVariants { get; }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":".obj/__compiler_extra.cs","FileName":"__compiler_extra.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"global using static Sandbox.Internal.GlobalGameNamespace;\r\nglobal using Microsoft.AspNetCore.Components;\r\nglobal using Microsoft.AspNetCore.Components.Rendering;\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonTitle\u0022, \u0022Goo UI\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022AddonIdent\u0022, \u0022gooui\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022OrgIdent\u0022, \u0022xaz\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022Ident\u0022, \u0022xaz.gooui\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineVersion\u0022, \u002226\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022EngineMinorVersion\u0022, \u00221\u0022 )]\r\n\r\n[assembly: System.Runtime.Versioning.TargetFramework( \u0022.NETCoreApp,Version=v9.0\u0022, FrameworkDisplayName = \u0022.NET 9.0\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyMetadata( \u0022CompileTime\u0022, \u00222026-06-26T02:54:14.8168981Z\u0022 )]\r\n[assembly: global::System.Reflection.AssemblyVersion(\u00220.0.120.0\u0022)]\r\n[assembly: global::System.Reflection.AssemblyFileVersion(\u00220.0.120.0\u0022)]"},{"Ident":"xaz.gooui","Path":"Animation/SpringColor.cs","FileName":"SpringColor.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\nusing Sandbox;\n\nnamespace Goo.Animation;\n\npublic record struct SpringColor\n{\n    public Color Current;\n    public Color Target;\n    public Color Velocity;\n    public float Frequency;\n    public float Damping;\n\n    public SpringColor(Color initial, float frequency, float damping)\n    {\n        Current = initial;\n        Target = initial;\n        Velocity = default;\n        Frequency = frequency;\n        Damping = damping;\n    }\n\n    public void Update(float dt)\n    {\n        float vr = Velocity.r, vg = Velocity.g, vb = Velocity.b, va = Velocity.a;\n        Current = new Color(\n            MathX.SpringDamp(Current.r, Target.r, ref vr, dt, Frequency, Damping),\n            MathX.SpringDamp(Current.g, Target.g, ref vg, dt, Frequency, Damping),\n            MathX.SpringDamp(Current.b, Target.b, ref vb, dt, Frequency, Damping),\n            MathX.SpringDamp(Current.a, Target.a, ref va, dt, Frequency, Damping));\n        Velocity = new Color(vr, vg, vb, va);\n    }\n\n    public bool IsSettled =\u003E\n        MathF.Abs(Target.r - Current.r) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Target.g - Current.g) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Target.b - Current.b) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Target.a - Current.a) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.r) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.g) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.b) \u003C 0.0001f \u0026\u0026\n        MathF.Abs(Velocity.a) \u003C 0.0001f;\n\n    /// \u003Csummary\u003EAdvances by dt and returns true while still moving; chain calls with | (not ||) so every damper advances each frame.\u003C/summary\u003E\n    public bool Tick(float dt) { Update(dt); return !IsSettled; }\n}\n"},{"Ident":"xaz.gooui","Path":"Animation/SpringFloat.cs","FileName":"SpringFloat.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\nusing Sandbox;\n\nnamespace Goo.Animation;\n\npublic record struct SpringFloat\n{\n    public float Current;\n    public float Target;\n    public float Velocity;\n    public float Frequency;\n    public float Damping;\n\n    public SpringFloat(float initial, float frequency, float damping)\n    {\n        Current = initial;\n        Target = initial;\n        Velocity = 0f;\n        Frequency = frequency;\n        Damping = damping;\n    }\n\n    public void Update(float dt) =\u003E\n        Current = MathX.SpringDamp(Current, Target, ref Velocity, dt, Frequency, Damping);\n\n    public bool IsSettled =\u003E\n        MathF.Abs(Target - Current) \u003C 0.0001f \u0026\u0026 MathF.Abs(Velocity) \u003C 0.0001f;\n\n    /// \u003Csummary\u003EAdvances by dt and returns true while still moving; chain calls with | (not ||) so every damper advances each frame.\u003C/summary\u003E\n    public bool Tick(float dt) { Update(dt); return !IsSettled; }\n}\n"},{"Ident":"xaz.gooui","Path":"Code/Dependency.cs","FileName":"Dependency.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using Goo;\nusing Sandbox.UI;\n\nnamespace Sandbox;\n\npublic class CounterUI : GooPanel\u003CContainer\u003E\n{\n\tprivate int _count;\n\n\tprotected override Container Build() =\u003E new Container\n\t{\n\t\tPadding = 16,\n\t\tWidth = 128,\n\t\tHeight = 128,\n\t\tBackgroundColor = Color.White,\n\t\tBorderRadius = 12,\n\t\tFlexDirection = FlexDirection.Row,\n\t\tGap = 12,\n\t\tAlignItems = Align.Center,\n\t\tChildren =\n\t\t{\n\t\t\tnew Text(_count.ToString()),\n\t\t\tnew Container\n\t\t\t{\n\t\t\t\tPadding = 8,\n\t\t\t\tBackgroundColor = Color.Orange,\n\t\t\t\tHoverBackgroundColor = Color.Cyan,\n\t\t\t\tBorderRadius = 6,\n\t\t\t\tOnClick = e =\u003E { _count\u002B\u002B; Rebuild(); },\n\t\t\t\tChildren = { new Text(\u0022\u002B\u0022) },\n\t\t\t},\n\t\t},\n\t};\n}"},{"Ident":"xaz.gooui","Path":"Core/Arc.Style.g.cs","FileName":"Arc.Style.g.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"// \u003Cauto-generated /\u003E\r\n// Generated by tools/StyleFacadeEmit. Do not edit by hand.\r\n// Source of truth: tools/StyleFacadeEmit/style-manifest.json\r\nusing Sandbox;\r\nusing Sandbox.Rendering;\r\nusing Sandbox.UI;\r\n\r\nnamespace Goo;\r\n\r\npublic readonly partial record struct Arc\r\n{\r\n    public Length? Width { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Width, value); }\r\n    public Length? Height { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Height, value); }\r\n    public Length? Margin { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Margin, value); }\r\n    public Length? MarginLeft { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginLeft, value); }\r\n    public Length? MarginTop { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginTop, value); }\r\n    public Length? MarginRight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginRight, value); }\r\n    public Length? MarginBottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MarginBottom, value); }\r\n    public Color? BackgroundColor { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundColor, value, StyleValue.FromColor); }\r\n    public Color? BackgroundTint { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.BackgroundTint, value, StyleValue.FromColor); }\r\n    public Length? Bottom { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Bottom, value); }\r\n    public Length? Left { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Left, value); }\r\n    public Length? Right { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Right, value); }\r\n    public Length? Top { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Top, value); }\r\n    public Length? FlexBasis { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexBasis, value); }\r\n    public float? FlexGrow { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexGrow, value); }\r\n    public float? FlexShrink { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.FlexShrink, value); }\r\n    public Length? MaxHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxHeight, value); }\r\n    public Length? MaxWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MaxWidth, value); }\r\n    public Length? MinHeight { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinHeight, value); }\r\n    public Length? MinWidth { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.MinWidth, value); }\r\n    public float? Opacity { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Opacity, value); }\r\n    public PointerEvents? PointerEvents { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.PointerEvents, value, StyleValue.FromPointerEvents); }\r\n    public PositionMode? Position { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Position, value, StyleValue.FromPositionMode); }\r\n    public Goo.PanelTransform? Transform { init =\u003E _style = StyleAccumulator.Add(_style, StyleField.Transform, value, StyleValue.FromPanelTransform); }\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Core/Fiber.cs","FileName":"Fiber.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Immutable;\r\nusing Sandbox;\r\n\r\nnamespace Goo;\r\n\r\ninternal sealed class Fiber\r\n{\r\n    public BlobKind Kind;\r\n    public string? Key;\r\n    public string Content = \u0022\u0022;\r\n    public StyleList Style = StyleList.Empty;\r\n    public List\u003CFiber\u003E? Children;\r\n    public Texture? Texture;\r\n    public string? Path;          // Image (texture path), ScenePanel (.scene path), SvgPanel (svg path), or WebPanel (URL)\r\n    public Scene? Scene;\r\n    public bool RenderOnce;\r\n    public bool Paused;             // WebPanel only\r\n    public string? Color;\r\n    // TextEntry-only carry-fields. Path slot is reused for the text value.\r\n    public string? Placeholder;\r\n    public int?    MaxLength;\r\n    public bool    Disabled;\r\n    public bool    Numeric;\r\n    public float?  MinValue;\r\n    public float?  MaxValue;\r\n    public string? NumberFormat;\r\n    public bool    Multiline;\r\n    public int?    MinLength;\r\n    public string? CharacterRegex;\r\n    public string? StringRegex;\r\n    public Func\u003Cchar, bool\u003E?   CanEnterChar;\r\n    public Func\u003Cstring, bool\u003E? Validate;\r\n    public Action\u003Cbool\u003E?       OnValidationChanged;\r\n    public Action\u003Cstring\u003E? OnChange;\r\n    public Action\u003Cstring\u003E? OnSubmit;\r\n    public Action?         OnFocus;\r\n    public Action\u003Cstring\u003E? OnBlur;\r\n    public Action?         OnCancel;\r\n    public bool    IsControlled;\r\n    public BlobEvents PrevEvents;\r\n    public ShapeParams Shape;       // Sector / Arc only\r\n    public Vector2[]? Points;       // Polygon only\r\n    // Custom-shader channel (Container only). Previous-render snapshot for delta comparison.\r\n    public ShaderEffect? Effect;\r\n    // Custom-draw callback (Container only). Previous-render snapshot for delta comparison.\r\n    public DrawCallback? Draw;\r\n    // Declared layout-move transition (Container only). Previous-render snapshot for delta comparison.\r\n    public LayoutTransition? LayoutTransition;\r\n    public object? Instance;        // Cell only: the persistent self-owning state instance\r\n}\r\n"},{"Ident":"xaz.gooui","Path":"Core/PanelTransformExtensions.cs","FileName":"PanelTransformExtensions.cs","PackageType":"library","CodeKind":"Game","AssetVersionId":301556,"IsPrivate":false,"Code":"using Sandbox;\nusing Sandbox.UI;\nusing EngineEntry = Sandbox.UI.PanelTransform.Entry;\nusing EngineEntryType = Sandbox.UI.PanelTransform.EntryType;\n\nnamespace Goo;\n\n/// \u003Csummary\u003EInstance fluent chain methods for \u003Csee cref=\u0022PanelTransform\u0022/\u003E, each returning a new value with the entry appended (extensions because C# forbids same-name static and instance methods on one type).\u003C/summary\u003E\npublic static class PanelTransformExtensions\n{\n    public static PanelTransform Translate(this PanelTransform t, Length x, Length y)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Translate, X = x, Y = y });\n\n    public static PanelTransform Translate(this PanelTransform t, Length x, Length y, Length z)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Translate, X = x, Y = y, Z = z });\n\n    public static PanelTransform TranslateX(this PanelTransform t, Length x)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Translate, X = x });\n\n    public static PanelTransform TranslateY(this PanelTransform t, Length y)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Translate, Y = y });\n\n    public static PanelTransform TranslateZ(this PanelTransform t, Length z)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Translate, Z = z });\n\n    public static PanelTransform Rotate(this PanelTransform t, float zDegrees)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Rotation, Data = new Vector3(0f, 0f, zDegrees) });\n\n    public static PanelTransform Rotate(this PanelTransform t, float xDeg, float yDeg, float zDeg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Rotation, Data = new Vector3(xDeg, yDeg, zDeg) });\n\n    public static PanelTransform RotateX(this PanelTransform t, float deg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Rotation, Data = new Vector3(deg, 0f, 0f) });\n\n    public static PanelTransform RotateY(this PanelTransform t, float deg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Rotation, Data = new Vector3(0f, deg, 0f) });\n\n    public static PanelTransform RotateZ(this PanelTransform t, float deg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Rotation, Data = new Vector3(0f, 0f, deg) });\n\n    public static PanelTransform Scale(this PanelTransform t, float uniform)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Scale, Data = new Vector3(uniform, uniform, uniform) });\n\n    public static PanelTransform Scale(this PanelTransform t, Vector3 scale)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Scale, Data = scale });\n\n    public static PanelTransform ScaleX(this PanelTransform t, float s)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Scale, Data = new Vector3(s, 1f, 1f) });\n\n    public static PanelTransform ScaleY(this PanelTransform t, float s)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Scale, Data = new Vector3(1f, s, 1f) });\n\n    public static PanelTransform ScaleZ(this PanelTransform t, float s)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Scale, Data = new Vector3(1f, 1f, s) });\n\n    public static PanelTransform Skew(this PanelTransform t, float xDeg, float yDeg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Skew, Data = new Vector3(xDeg, yDeg, 0f) });\n\n    public static PanelTransform SkewX(this PanelTransform t, float deg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Skew, Data = new Vector3(deg, 0f, 0f) });\n\n    public static PanelTransform SkewY(this PanelTransform t, float deg)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Skew, Data = new Vector3(0f, deg, 0f) });\n\n    public static PanelTransform Perspective(this PanelTransform t, Length d)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Perspective, X = d });\n\n    public static PanelTransform Matrix3D(this PanelTransform t, Matrix m)\n        =\u003E t.Append(new EngineEntry { Type = EngineEntryType.Matrix, Matrix = m });\n}\n"}]}