drawnui-react 0.1.0-preview.2 → 0.1.0-preview.20

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.
Files changed (87) hide show
  1. package/README.md +17 -4
  2. package/SKIPPED.md +31 -25
  3. package/dist/controls/AnimatedFramesRenderer.d.ts +7 -0
  4. package/dist/controls/AnimatedFramesRenderer.js +16 -1
  5. package/dist/controls/DrawnGame.d.ts +40 -0
  6. package/dist/controls/DrawnGame.js +64 -0
  7. package/dist/controls/GridStructure.d.ts +16 -2
  8. package/dist/controls/GridStructure.js +40 -4
  9. package/dist/controls/SkiaBackdrop.d.ts +2 -0
  10. package/dist/controls/SkiaBackdrop.js +2 -0
  11. package/dist/controls/SkiaButton.d.ts +19 -2
  12. package/dist/controls/SkiaButton.js +41 -11
  13. package/dist/controls/SkiaCarousel.d.ts +9 -1
  14. package/dist/controls/SkiaCarousel.js +16 -3
  15. package/dist/controls/SkiaCheckbox.d.ts +0 -1
  16. package/dist/controls/SkiaCheckbox.js +0 -6
  17. package/dist/controls/SkiaDrawer.d.ts +2 -0
  18. package/dist/controls/SkiaDrawer.js +2 -0
  19. package/dist/controls/SkiaEditor.d.ts +12 -1
  20. package/dist/controls/SkiaEditor.js +46 -19
  21. package/dist/controls/SkiaGif.d.ts +3 -0
  22. package/dist/controls/SkiaGif.js +12 -2
  23. package/dist/controls/SkiaImage.js +15 -10
  24. package/dist/controls/SkiaLabel.d.ts +54 -3
  25. package/dist/controls/SkiaLabel.js +235 -52
  26. package/dist/controls/SkiaLabelFps.d.ts +16 -0
  27. package/dist/controls/SkiaLabelFps.js +41 -0
  28. package/dist/controls/SkiaLayout.d.ts +64 -7
  29. package/dist/controls/SkiaLayout.js +316 -19
  30. package/dist/controls/SkiaLottie.js +4 -2
  31. package/dist/controls/SkiaProgress.d.ts +2 -1
  32. package/dist/controls/SkiaProgress.js +6 -3
  33. package/dist/controls/SkiaRadioButton.js +4 -3
  34. package/dist/controls/SkiaScroll.d.ts +35 -5
  35. package/dist/controls/SkiaScroll.js +233 -23
  36. package/dist/controls/SkiaScrollBar.d.ts +27 -0
  37. package/dist/controls/SkiaScrollBar.js +51 -2
  38. package/dist/controls/SkiaShaderCarousel.d.ts +5 -0
  39. package/dist/controls/SkiaShaderCarousel.js +5 -0
  40. package/dist/controls/SkiaShape.d.ts +13 -2
  41. package/dist/controls/SkiaShape.js +50 -10
  42. package/dist/controls/SkiaSlider.d.ts +20 -2
  43. package/dist/controls/SkiaSlider.js +59 -5
  44. package/dist/controls/SkiaSprite.d.ts +1 -0
  45. package/dist/controls/SkiaSprite.js +4 -0
  46. package/dist/controls/SkiaSvg.js +1 -1
  47. package/dist/controls/SkiaSwitch.d.ts +0 -1
  48. package/dist/controls/SkiaSwitch.js +0 -6
  49. package/dist/controls/SkiaToggle.d.ts +25 -5
  50. package/dist/controls/SkiaToggle.js +58 -5
  51. package/dist/controls/SnappingLayout.d.ts +12 -1
  52. package/dist/controls/SnappingLayout.js +19 -1
  53. package/dist/core/Accessibility.d.ts +80 -0
  54. package/dist/core/Accessibility.js +365 -8
  55. package/dist/core/Animators.d.ts +37 -1
  56. package/dist/core/Animators.js +102 -9
  57. package/dist/core/Canvas.d.ts +108 -7
  58. package/dist/core/Canvas.js +363 -35
  59. package/dist/core/Easing.d.ts +12 -1
  60. package/dist/core/Easing.js +25 -1
  61. package/dist/core/Gestures.d.ts +48 -2
  62. package/dist/core/Gestures.js +95 -3
  63. package/dist/core/Hover.d.ts +47 -0
  64. package/dist/core/Hover.js +134 -0
  65. package/dist/core/KeyboardManager.d.ts +13 -0
  66. package/dist/core/KeyboardManager.js +18 -0
  67. package/dist/core/ScrollAnimators.js +9 -0
  68. package/dist/core/SkiaControl.d.ts +202 -7
  69. package/dist/core/SkiaControl.js +467 -55
  70. package/dist/core/SkiaEffect.d.ts +7 -0
  71. package/dist/core/SkiaEffect.js +25 -6
  72. package/dist/core/SkiaImageManager.js +1 -1
  73. package/dist/core/Styles.d.ts +51 -0
  74. package/dist/core/Styles.js +92 -0
  75. package/dist/core/Super.d.ts +17 -1
  76. package/dist/core/Super.js +35 -4
  77. package/dist/core/ViewsAdapter.d.ts +7 -2
  78. package/dist/core/ViewsAdapter.js +10 -3
  79. package/dist/index.d.ts +4 -0
  80. package/dist/index.js +4 -0
  81. package/dist/react/SkiaShell.js +33 -14
  82. package/dist/react/index.d.ts +15 -4
  83. package/dist/react/index.js +102 -15
  84. package/dist/react/reconciler.js +34 -12
  85. package/dist/vite/index.d.ts +9 -0
  86. package/dist/vite/index.js +36 -3
  87. package/package.json +29 -3
@@ -1,8 +1,9 @@
1
1
  import type { Canvas as SkCanvas, Image, Path, SkPicture, Surface } from "canvaskit-wasm";
2
2
  import { type Color, type LayoutOptions, SKRect, ScaledSize, type SkiaCacheType, type SkiaGradient, type SkiaTouchAnimation, Thickness } from "./Types";
3
- import { type IOverlayEffect } from "./Animators";
3
+ import { type AnimatorBase, type IOverlayEffect } from "./Animators";
4
4
  import { Easing } from "./Easing";
5
5
  import type { Canvas } from "./Canvas";
6
+ import type { InputKey } from "./KeyboardManager";
6
7
  import { ContextMenuEventArgs, ControlTappedEventArgs, GestureEventProcessingInfo, type LockTouch, SKPoint, SkiaGesturesInfo, SkiaGesturesParameters } from "./Gestures";
7
8
  import { type CachedTexture, type IPostRendererEffect, type SkiaEffect } from "./SkiaEffect";
8
9
  /** Mirrors DrawnUi DrawingContext: ctx.Context.Canvas / Surface, ctx.Destination (pixels), ctx.Scale. */
@@ -20,6 +21,10 @@ export interface DrawingContext {
20
21
  Y: number;
21
22
  };
22
23
  Recording?: boolean;
24
+ /** The picture being recorded is drawn scaled, turned, skewed or projected: images blitted into it sample smoothly (C#). */
25
+ PlaybackDistorted?: boolean;
26
+ /** An image cache (or a picture holding one) was blitted here (C#): the picture is recorded again when its playback distortion changes. */
27
+ HasImageBlits?: boolean;
23
28
  };
24
29
  Destination: SKRect;
25
30
  Scale: number;
@@ -35,8 +40,18 @@ export declare class CachedObject {
35
40
  constructor(Type: SkiaCacheType,
36
41
  /** Rect the content was recorded for, canvas pixels at recording time. */
37
42
  Bounds: SKRect, Scale: number, Picture?: SkPicture | undefined, Image?: Image | undefined);
38
- /** Replays the cache with its top-left moved to (left, top). */
39
- Draw(canvas: SkCanvas, left: number, top: number): void;
43
+ /** Canvas.GpuEpoch it was made in: after a WebGL context restore it is remade (a picture may replay old GPU images). */
44
+ Epoch: number;
45
+ /** A picture recorded to be drawn distorted: the images in it sample smoothly (C# CachedObject.PlaybackDistorted). */
46
+ PlaybackDistorted: boolean;
47
+ /** A picture holding image blits, whose sampling was fixed when it was recorded (C# CachedObject.HasImageBlits). */
48
+ HasImageBlits: boolean;
49
+ /** C# PaintRenderObject: the blit paint is antialiased (else a turned bitmap keeps stair steps along its own border), dithered when distorted. */
50
+ private static blitPaint?;
51
+ private static blitPaintDithered?;
52
+ private static BlitPaint;
53
+ /** Replays the cache with its top-left moved to (left, top); `smooth` = an image drawn distorted (linear + mipmaps). */
54
+ Draw(canvas: SkCanvas, left: number, top: number, smooth?: boolean): void;
40
55
  Dispose(): void;
41
56
  }
42
57
  /**
@@ -83,6 +98,14 @@ export declare class SkiaControl {
83
98
  /** Degrees. */
84
99
  SkewX: number;
85
100
  SkewY: number;
101
+ /** Degrees, a 3D turn around the horizontal axis through the pivot, seen with perspective (C# RotationX). */
102
+ RotationX: number;
103
+ /** Degrees, a 3D turn around the vertical axis through the pivot (C# RotationY). */
104
+ RotationY: number;
105
+ /** Degrees, a 3D turn around the axis facing the viewer, after RotationX and RotationY (C# RotationZ). */
106
+ RotationZ: number;
107
+ /** Depth: toward the viewer (+, bigger) or away (−, smaller), turned or flat; draws at 576 / (576 − TranslationZ) (C# TranslationZ). */
108
+ TranslationZ: number;
86
109
  /** Pivot for Rotation/Scale/Skew as a fraction of the box (MAUI default 0.5). */
87
110
  AnchorX: number;
88
111
  AnchorY: number;
@@ -106,6 +129,7 @@ export declare class SkiaControl {
106
129
  get Scale(): number;
107
130
  set Scale(v: number);
108
131
  get HasTransform(): boolean;
132
+ private get Has3d();
109
133
  /** Matrix applied at the last render (canvas space), undefined when none; gestures map through its inverse. */
110
134
  RenderTransformMatrix?: number[];
111
135
  /** Generic numeric parameters (DrawnUi Value1/Value2): SkiaShape Arc uses start angle / sweep angle in degrees. */
@@ -135,18 +159,43 @@ export declare class SkiaControl {
135
159
  private compositeSurface?;
136
160
  /** Own content or structure changed: the next composite record is a full one. */
137
161
  private compositeFull;
162
+ /** Where the kept composite surface starts relative to DrawingRect (the effects margin it was laid out with). */
163
+ private compositeInsetX;
164
+ private compositeInsetY;
138
165
  /** Canvas-pixel bounds this control covered when its parent last recorded it (composite erase region). */
139
166
  private lastCompositeBounds?;
140
- /** What the last composite record did (diagnostics): "full" or "partial", the number of children re-recorded and which ones. */
167
+ /**
168
+ * What the last composite record did (diagnostics): "full" or "partial", the number of children re-recorded and which
169
+ * ones; Areas: the pixels erased and drawn again for changes deeper than a child (C# Areas), Changed: the controls
170
+ * those areas belong to (C# Changed).
171
+ */
141
172
  LastCompositeRecord: {
142
173
  Mode: "full" | "partial";
143
174
  Children: number;
144
175
  Dirty: readonly SkiaControl[];
176
+ Areas: readonly SKRect[];
177
+ Changed: readonly SkiaControl[];
145
178
  };
179
+ /** C# MaxCompositionAreas: more areas than this in one composite record draw it whole instead. */
180
+ static MaxCompositionAreas: number;
181
+ /** C# MaxCompositionShare: areas covering more than this share of a composite draw it whole instead. */
182
+ static MaxCompositionShare: number;
183
+ /**
184
+ * Changes deeper than a direct child since the last composite record (drawnui-cross 6m): the control, the direct child
185
+ * it is in, where it was drawn before the change (its own drawn bounds, as drawn) and its rect then.
186
+ */
187
+ private compositeDeep?;
188
+ /** Set while an UpdateDraw climbs: the ancestors re-measure but an ImageComposite among them keeps its partial record. */
189
+ private static drawOrigin;
146
190
  /** The children a composite record can re-record individually; layouts return their views. */
147
191
  protected GetCompositeChildren(): readonly SkiaControl[];
148
192
  /** C# TrackChildAsDirty (DirtyChildrenTracker): the child changed without a remeasure of this control. */
149
193
  TrackChildAsDirty(child: SkiaControl): void;
194
+ private static readonly rejectRect;
195
+ /** Its cache must be recorded before it can be drawn (none, dirty, another type, scale, size or GPU context). */
196
+ private CacheStale;
197
+ /** Its rect grown by its effects margin, through the matrix it is drawn with, lies outside the canvas clip. */
198
+ private OutsideClip;
150
199
  /** Drawn bounds in canvas pixels including transforms and effects margins (C# GetTransformedDirtyBounds). */
151
200
  GetTransformedDirtyBounds(): SKRect;
152
201
  /** Current cache, if any. */
@@ -157,6 +206,36 @@ export declare class SkiaControl {
157
206
  /** Consume every gesture that lands on this control so nothing below (z-order) receives it. */
158
207
  BlockGesturesBelow: boolean;
159
208
  LockChildrenGestures: LockTouch;
209
+ private receivesHover?;
210
+ /**
211
+ * Whether this control takes mouse hover: the canvas sets IsHovered while the mouse is over it. Opt-in: false by
212
+ * default, true by default only in the controls that always had hover (SkiaButton, SkiaSlider, the toggles,
213
+ * SkiaRadioButton, SkiaCarousel, SkiaDrawer), never because a control has a tap handler. A HoverChanged handler turns
214
+ * it on (C# fluent OnHovered) unless it is set.
215
+ */
216
+ get ReceivesHover(): boolean;
217
+ set ReceivesHover(value: boolean);
218
+ /** The value of ReceivesHover until it is set. */
219
+ protected ReceivesHoverByDefault(): boolean;
220
+ private isHovered;
221
+ /**
222
+ * True while the mouse is over this control and it takes hover. Every such control under the pointer is hovered at
223
+ * once (a card and the button inside it, as CSS :hover); it stays as it is while content moves under the pointer and
224
+ * is checked again when that stops. Touch never hovers.
225
+ */
226
+ get IsHovered(): boolean;
227
+ /** IsHovered changed: true when the mouse came over this control, false when it left (C# HoverChanged / OnHovered). */
228
+ HoverChanged?: (sender: SkiaControl, hovered: boolean) => void;
229
+ /** Set by the canvas's HoverManager. */
230
+ ApplyHover(on: boolean): void;
231
+ /** A scroll, carousel or drawer moving its content right now: hover waits until it stops (C# IsScrolling / InTransition). */
232
+ MovesContent(): boolean;
233
+ /**
234
+ * Hover hit path (HoverManager): this control is under the point (in its own space), its children under it follow,
235
+ * top-most first, by the routing rules of ProcessGestures. True when this subtree blocks gestures below it, so the
236
+ * controls under it get no hover (a popup over a list).
237
+ */
238
+ CollectHovered(point: SKPoint, into: SkiaControl[], xs?: number[], ys?: number[]): boolean;
160
239
  TouchEffectColor: Color;
161
240
  /** Plays a ripple (from the tap point) when Tapped fires. */
162
241
  AnimationTapped: SkiaTouchAnimation;
@@ -164,6 +243,11 @@ export declare class SkiaControl {
164
243
  AnimationTappedSpeed: number;
165
244
  /** Overlay effects drawn above this control's content every frame (ripple etc). */
166
245
  readonly PostAnimators: IOverlayEffect[];
246
+ /**
247
+ * C# PendingUnattachedAnimators: animators started while no Canvas was above this control yet (e.g. a game loop
248
+ * started in a constructor). They start on the control's first arrange, where C# starts them in SuperViewChanged.
249
+ */
250
+ PendingUnattachedAnimators?: AnimatorBase[];
167
251
  private visualEffects;
168
252
  /** Post-renderer effects among VisualEffects (C# EffectPostRenderers). */
169
253
  EffectPostRenderers: (SkiaEffect & IPostRendererEffect)[];
@@ -175,7 +259,12 @@ export declare class SkiaControl {
175
259
  protected OnVisualEffectsChanged(): void;
176
260
  /** Post renderers that can render this frame (compiled shaders); an unready effect leaves the control drawn plainly. */
177
261
  private ActivePostRenderers;
178
- /** C# CachedImage: the cached texture and the canvas rect it was rasterized over (Image caches only). */
262
+ /**
263
+ * C# CachedImage: the cached texture (Image caches only) and the canvas rect it covers NOW. Scrolled content is
264
+ * re-arranged here, not drawn through a translated canvas, so a cache recorded before its control moved is blitted
265
+ * at the control's current aligned rect (RenderContent) and its record-time Bounds are stale: an effect sampling it
266
+ * there (the slides of a SkiaShaderCarousel after the page scrolled) was off by the scroll amount.
267
+ */
179
268
  get CachedImage(): CachedTexture | undefined;
180
269
  /** Clip overlay effects to the control's shape (CreateClip). */
181
270
  ClipEffects: boolean;
@@ -191,6 +280,18 @@ export declare class SkiaControl {
191
280
  ConsumeGestures?: (sender: SkiaControl, e: SkiaGesturesInfo) => void;
192
281
  Parent?: SkiaControl;
193
282
  /** Containers override; a leaf control cannot host children. */
283
+ private styledInitially;
284
+ /**
285
+ * C# ApplyInitialStyles: takes the property defaults registered with `ConfigureStyles` for this control's class.
286
+ * The reconciler calls it with `atConstruction` right after `new`, before the JSX props, so props win; a control
287
+ * built in code-behind is styled on its first measure and keeps whatever the code already set.
288
+ */
289
+ ApplyInitialStyles(atConstruction?: boolean): void;
290
+ /**
291
+ * C# IsChildrenItem: added by the app (JSX children or the `Children` list), not a part the control made itself. A new
292
+ * `Children` list drops only these, so a control's own parts keep their place.
293
+ */
294
+ IsChildrenItem: boolean;
194
295
  AddSubView(_control: SkiaControl): void;
195
296
  InsertSubView(_index: number, control: SkiaControl): void;
196
297
  RemoveSubView(_control: SkiaControl): void;
@@ -213,6 +314,14 @@ export declare class SkiaControl {
213
314
  protected MeasureAbsolute(_widthConstraint: number, _heightConstraint: number, scale: number): ScaledSize;
214
315
  /** Places MeasuredSize inside destination per Margin + Horizontal/VerticalOptions -> DrawingRect. */
215
316
  Arrange(destination: SKRect, _widthRequest: number, _heightRequest: number, scale: number): void;
317
+ /**
318
+ * A cached ancestor replays its picture where a re-arrange moved it (a scroll) without rendering this control again,
319
+ * so the matrix made at its last Render moves with its rect: taps, hover and the accessibility rect stay on what is
320
+ * drawn (C# offsets the cached render tree instead). A control that renders again gets a fresh matrix there.
321
+ */
322
+ private FollowMatrix;
323
+ /** C# SuperViewChanged: starts the animators queued before this control was attached. */
324
+ private StartPendingAnimators;
216
325
  private static nextAccessibilityId;
217
326
  /** Stable identity for the DOM overlay. */
218
327
  readonly AccessibilityId: number;
@@ -237,7 +346,11 @@ export declare class SkiaControl {
237
346
  protected DefaultAccessibilityLabel(): string | undefined;
238
347
  get AccessibilityHint(): string | undefined;
239
348
  set AccessibilityHint(v: string | undefined);
240
- /** Tab stop + activation; unset = true when the control handles Tapped. */
349
+ /**
350
+ * Whether keyboard navigation and assistive technology may focus and use this node: the explicit value, else the class
351
+ * default (true when the control handles Tapped), and in both cases only while a tap could reach the control
352
+ * (CanReceiveGesture), so Tab, Enter / Space and screen-reader activation never use a control the pointer cannot.
353
+ */
241
354
  get AccessibilityCanInteract(): boolean;
242
355
  set AccessibilityCanInteract(v: boolean);
243
356
  protected DefaultAccessibilityCanInteract(): boolean;
@@ -246,6 +359,8 @@ export declare class SkiaControl {
246
359
  * host's pointer cursor. Default: the control as a whole (AccessibilityCanInteract); SkiaLabel adds its tappable spans.
247
360
  */
248
361
  WantsPointerCursor(_x: number, _y: number): boolean;
362
+ /** A range control's value for screen readers (slider, progress); undefined for everything else (drawnui-cross 6c). */
363
+ get AccessibilityValue(): import("./Accessibility").AccessibilityValue | undefined;
249
364
  /** aria-pressed for toggles; undefined = not a toggle. */
250
365
  get AccessibilityIsPressed(): boolean | undefined;
251
366
  set AccessibilityIsPressed(v: boolean | undefined);
@@ -274,6 +389,30 @@ export declare class SkiaControl {
274
389
  OnAccessibilityActivated(): void;
275
390
  /** Overlay focus arrives on / leaves this node (inputs may activate their sink here). */
276
391
  OnAccessibilityFocused(_focused: boolean): void;
392
+ /**
393
+ * Keyboard navigation hands this control the keys it may use while it holds keyboard focus (ArrowLeft / Right / Up /
394
+ * Down, Home, End, PageUp, PageDown, DOM `event.code` names). Return true when the key was used; the default uses none,
395
+ * so the key moves focus inside the arrow-key group around the control.
396
+ */
397
+ OnAccessibilityKey(_key: InputKey): boolean;
398
+ /**
399
+ * Whether a pointer gesture of this kind would reach this control, by the rules the gesture dispatch applies: the
400
+ * control and every ancestor draw, none of them is InputTransparent, no ancestor keeps this gesture from its children
401
+ * (LockChildrenGestures, PassNone included) and the control accepts input (AcceptsInput). Opacity does not count, as
402
+ * for the pointer. Keyboard navigation uses it: Tapped for Tab and Enter / Space, Panning for the arrow keys.
403
+ */
404
+ CanReceiveGesture(gesture: SkiaGesturesParameters["Type"]): boolean;
405
+ /**
406
+ * False while the control ignores input itself: RespondsToGestures = false on a button, toggle, slider, scroll...
407
+ * Taps, keyboard and the accessibility state (reported disabled) all follow it (drawnui-cross 6w). Default true.
408
+ */
409
+ protected AcceptsInput(): boolean;
410
+ /**
411
+ * What a control that takes no input returns for a gesture that reached it (C# BlockedGestureResult): it keeps a
412
+ * press, tap or long press, so nothing under it reacts to them, and lets moves and wheel go on to the controls around
413
+ * it (a scroll behind it still scrolls).
414
+ */
415
+ protected BlockedGestureResult(args: SkiaGesturesParameters): SkiaControl | null;
277
416
  NotifyAccessibilityFocused(focused: boolean): void;
278
417
  /** DrawnUi SmartMax: larger of two sizes, an infinite one loses. */
279
418
  protected static SmartMax(a: number, b: number): number;
@@ -296,8 +435,22 @@ export declare class SkiaControl {
296
435
  /** DrawingRect grown by the effects margin, in pixels — the rect a cache is recorded for. */
297
436
  protected ExpandedCacheRect(scale: number): SKRect;
298
437
  Render(ctx: DrawingContext): void;
299
- /** Port of DrawnUi ApplyTransforms: T(-pivot) · rotation · scale/skew · T(pivot) · translation, in canvas pixels. */
438
+ /** Port of DrawnUi ApplyTransforms: T(-pivot) · rotation · scale/skew · 3D · T(pivot) · translation, in canvas pixels. */
300
439
  protected CreateRenderTransformMatrix(destination: SKRect, scale: number): number[];
440
+ /** C# camera distance of the 3D transforms (Sk3dView.CameraDistance): 8 inches at 72 dpi, in canvas pixels. */
441
+ static readonly CameraDistance = 576;
442
+ /**
443
+ * C# Create3dMatrix (Sk3dView): RotationX, then RotationY, then RotationZ (negated) around the pivot, projected from
444
+ * the camera; TranslationZ is depth, a flat control at depth z draws at camera / (camera − z).
445
+ */
446
+ static Create3dMatrix(rotationX: number, rotationY: number, rotationZ: number, translationZ: number): number[];
447
+ /** C# SkiaSamplingOptions.IsMoveOnly: the matrix only moves (or mirrors), so a bitmap keeps its pixels 1:1. */
448
+ static IsMoveOnly(m: ArrayLike<number>): boolean;
449
+ /**
450
+ * C# WillDrawDistorted: what this control draws here ends up scaled, turned, skewed or projected, by its own transforms
451
+ * or a live ancestor's (both in the canvas matrix) or by the picture it is recorded into. Images then sample smoothly.
452
+ */
453
+ protected WillDrawDistorted(ctx: DrawingContext): boolean;
301
454
  /** Maps a point given in the parent's space into this control's untransformed space (DrawnUi TransformPointToLocalSpace). */
302
455
  TransformPointToLocalSpace(point: SKPoint): SKPoint;
303
456
  /**
@@ -307,6 +460,8 @@ export declare class SkiaControl {
307
460
  private AlignedCacheRect;
308
461
  /** Cache blit or live paint, then post animators — the part a transform/opacity layer wraps. */
309
462
  private RenderContent;
463
+ /** Blits a cache: an image samples smoothly when drawn distorted; a picture being recorded learns it holds image blits. */
464
+ private DrawCache;
310
465
  /** Background + Paint(): the part of the control that a cache captures. */
311
466
  protected PaintContent(ctx: DrawingContext): void;
312
467
  /** Subclasses whose PaintBackground has something to draw without a BackgroundColor (shape shadows). */
@@ -370,11 +525,51 @@ export declare class SkiaControl {
370
525
  Update(): void;
371
526
  /** Redraw without remeasure and WITHOUT dropping caches (position/overlay changes). */
372
527
  Repaint(): void;
528
+ /**
529
+ * A parent (not the control itself) is hidden: a change here asks for no frame and the latest state shows when the
530
+ * parent is shown again (C# 329f6c44 HiddenUpdateTests, DrawnUi.Rust hidden_updates). The control's own visibility
531
+ * change still draws: it is the one that hides or shows it.
532
+ */
533
+ UnderHiddenParent(): boolean;
534
+ /** The control or a parent is hidden: its animators pause until it shows again. */
535
+ HiddenInTree(): boolean;
536
+ /** The control an invalidation started at while it climbs (InvalidateMeasure): a hidden parent of it wakes no frame. */
537
+ private static invalidateOrigin;
373
538
  /**
374
539
  * Transform / Opacity changed: this control's own cache is still valid (content unchanged) but every ancestor
375
540
  * cache holds its composited output, so those are staled before redrawing (DrawnUi RedrawCanvas + parent invalidation).
376
541
  */
377
542
  RepaintComposition(): void;
543
+ /**
544
+ * Update() for a change of how this control looks, not of its size (a color set through props, C# NeedDraw): the same
545
+ * re-measure and cache invalidation, but an ImageComposite above redraws only this control's area instead of
546
+ * recording whole (drawnui-cross 6m). The record still goes whole when the control's rect changed after all.
547
+ */
548
+ UpdateDraw(): void;
549
+ /**
550
+ * A change of this control that keeps its layout, to every ImageComposite above: a direct child is drawn again whole
551
+ * (C# TrackChildAsDirty), a deeper control by its area, read now as it was drawn (its last matrix and effects margin).
552
+ */
553
+ private ReportToComposites;
554
+ /** The matrix this control will be drawn with (Render), from its current properties; undefined when none. */
555
+ private CurrentMatrix;
556
+ /** Where this control will be drawn: its rect grown by its effects margin, through its current matrix. */
557
+ private DrawnBoundsNow;
558
+ private static MapRect;
559
+ /** Its output depends on all of its content (a visual effect; a backdrop samples below): a change inside redraws it whole. */
560
+ protected get SamplesContent(): boolean;
561
+ /**
562
+ * Where a deep change shows inside the composite (drawnui-cross 6m rule b): the control as drawn before and as drawn
563
+ * now, then through the transform of every ancestor up to the composite. undefined: draw the child whole (an effect
564
+ * or a backdrop on the way, the control gone from the child); null: the layout changed, record whole.
565
+ */
566
+ private static DeepArea;
567
+ /**
568
+ * DrawnUi IsParentIndependent: this control's size never changes the layout around it, so its own invalidation
569
+ * stops here (ancestors composite again, nothing above re-measures). The parent re-measures it on draw when
570
+ * NeedMeasure is set. Used by SkiaScroll for its scroll bars.
571
+ */
572
+ IsParentIndependent: boolean;
378
573
  /** Size or content may have changed: this control and all ancestors remeasure and re-record. */
379
574
  InvalidateMeasure(): void;
380
575
  /** Hit rect in pixels (no transforms in this port, so it is DrawingRect). */