drawnui-react 0.1.0-preview.17 → 0.1.0-preview.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SKIPPED.md CHANGED
@@ -73,7 +73,7 @@ DrawnUi name and semantics; nothing here is a redesign, only an omission.
73
73
  | `SkiaLayout` Grid (static children) + `SkiaGrid` alias | ported | Port of `SkiaGridStructure` (MAUI grid manager): `ColumnDefinitions`/`RowDefinitions` as `"*, 2*, Auto, 100"` or arrays, `DefaultColumnDefinition`/`DefaultRowDefinition` (Auto, like C#), `ColumnSpacing`/`RowSpacing`, child `Column`/`Row`/`ColumnSpan`/`RowSpan` (plain props instead of attached properties), implicit tracks, unknown/known measure passes, span resolution, star compression, Fill-child minimums, last-track stretch when the grid fills, remeasure at final cells. Not ported: `Split`/`Invert` (templated grids), `UseDynamicColumns`, `SkiaDecoratedGrid`, `GetOrderedSubviews` ZIndex ordering. |
74
74
  | `SkiaLabel` | partial | Word wrap (+ character break for long words), `MaxLines` with tail ellipsis, `LineBreakMode` (NoWrap / wraps / Tail; Head/Middle behave as Tail), `HorizontalTextAlignment` Start/Center/End (Fill* accepted, align Start), `VerticalTextAlignment`, `LineSpacing`, `LineHeight`, `FontWeight` + `FontAttributes` via faces registered per weight (`AddFont(src, alias, weight)`, nearest weight wins, synthetic bold (`setEmbolden`) when the nearest face is lighter than 600 — C# `Font.Embolden`; italic = synthetic skew when no italic face; empty `FontFamily` = the first registered family, weights included), `TextTransform`, `Padding`, `LinesCount`; defaults as C# (`FontSize` 12, `TextColor` GreenYellow). `FontFamilyFallback` ported and extended: comma-separated chain (`"FontSymbols,FontSymbols2"`), per-codepoint run segmentation, spaces always stay on the main font; `fonts.AddSymbols()` (`FontSymbols` = Noto Sans Math subset, `FontSymbols2` = Noto Sans Symbols 2 subset) and `fonts.AddEmojis()` (`FontEmoji` = Noto Color Emoji faces+hands subset) ship the same subsets as DrawnUi.Blazor. `Spans` ported as `<TextSpan>` children: `Text`, `TextColor`/`FontSize`/`FontFamily` (unset = inherit from the label, like C# HasSetColor/HasSetSize/HasSetFont), `FontWeight`, `IsBold`, `IsItalic`, `Underline`/`UnderlineWidth`, `Strikeout`/`StrikeoutWidth`/`StrikeoutColor` (Red default), `BackgroundColor`, `Tapped` + `ForceCaptureInput` (hit-tested through per-fragment `Rects`, ripple on the label, `OnSpanTapped` overridable), mixed sizes on one line share a baseline. TextSpan not ported: `ParagraphColor`, `CommandTapped`, per-span `LineSpacing`/`LineHeight`, `AutoFindFont`, `DrawingOffset`, `Shape`/glyph shaping. `CharacterSpacing` (C#: (value - 1) points after every glyph, measured, wrapped and cut at the drawn width), Chinese / Japanese line breaks between characters with kinsoku (C# FitAtBreak, `CanBreakInsideWord`). Not ported: `AutoFont`, `AutoSize`/`AutoSizeText`, `DropShadow*`, text `StrokeColor`/`StrokeWidth`/`StrokeGradient`, `GradientByLines`, `MonoForDigits`, `KeepSpacesOnLineBreaks`, `Format`, RTL/bidi, hyphenation, `SkiaRichLabel`/markdown. |
75
75
  | `SkiaHotspot` | ported | Fill/Fill, `Tapped`, `Down`, `Up`, `LockPanning`, `TouchDown`; consumes only Tapped like the C# one. No `AnimationTapped`/ripple/shimmer. |
76
- | `SkiaButton` | partial | Default look only: rounded frame radius 8 (hardcoded like the C# default content), centered label, `Text`/`TextColor`/`FontSize`/`FontFamily`/`BackgroundColor`/`IsPressed`/`IsDisabled`/`LockPanning`, `Tapped`/`Down`/`Up`. `IsPressed` is tracked but has no visual; press feedback = `ApplyEffect="Ripple"`. No `ButtonStyle` platform looks, icons, `TextCase`, elevation, shimmer, `BtnText`/`BtnShape` templating. |
76
+ | `SkiaButton` | partial | Default look only: rounded frame radius 8 (hardcoded like the C# default content), centered label, `Text`/`TextColor`/`FontSize`/`FontFamily`/`BackgroundColor`/`IsPressed`/`RespondsToGestures` (`IsDisabled` = its obsolete opposite)/`LockPanning`, `Tapped`/`Down`/`Up`. `RespondsToGestures = false`: no press, no `Tapped`/`Down`/`Up`, a press or tap on it stops there, keyboard skips it, reported disabled (drawnui-cross 6w). `IsPressed` is tracked but has no visual; press feedback = `ApplyEffect="Ripple"`. No `ButtonStyle` platform looks, icons, `TextCase`, elevation, shimmer, `BtnText`/`BtnShape` templating. |
77
77
  | `SkiaImage` | partial | Effects ported: `AddEffect` (BlackAndWhite/Grayscale, Pastel, Sepia, InvertColors, Tint + `ColorTint`/`EffectBlendMode`, Darken, Lighten, Contrast, Saturation, Brightness, TSL, Gamma ≈ linear fit — CanvasKit has no table color filter), `Blur` (image filter, mirror tile), `ZoomX/ZoomY`, `HorizontalOffset/VerticalOffset`; C# color matrices use 0..255 translations, CanvasKit 0..1 — converted. `HSL` (hue from `Gamma`, `Saturation`, `Brightness`, tint blend), `Custom` = your own `PaintColorFilter` (C# public fields `PaintColorFilter` / `PaintImageFilter`, the latter replaces `Blur`), `ImageBitmap` (decoded image shared, not owned), `LoadPriority` of the queued `Source` load. Not ported: `UseGradient`/`StartColor`/`EndColor`, sprites, `InflateAmount`, `EraseChangedContent`, `RescaleSource`/`RescalingQuality`. `Source` (URL), `Aspect` (all `TransformAspect` values; `Tile` is a no-op like C#, tiling is `SkiaImageTiles`, same `RescaleAspect` math), `HorizontalAlignment`/`VerticalAlignment`, `Success`/`Error`, `IsLoading`, `LoadedSource`, `DisplayRect`, `AspectScale`; overflow clipped to the box. Not ported: `LoadSourceOnFirstDraw`, `PreviewBase64`, `ImageBitmap`/`LoadedImageSource`, `RescaleSource`/`CacheRescaledSource`/`RescalingQuality`, all adjustments (`Brightness`…`Blur`, `ColorTint`, gradient, `Zoom*`, offsets), sprites, `DrawWhenEmpty`, `EraseChangedContent`, `UseAssembly`. Measure: bounded box taken as is, unbounded axis from source aspect; no `NeedAutoWidth/Height` from Start alignment. |
78
78
  | `SkiaImageManager` | partial | `Instance.LoadImageAsync(url, signal)` (direct), `LoadImageManagedAsync(url, signal, priority)` through the priority queue (High > Normal > Low, `MaxParallelLoads` 5 in flight like the C# semaphore, one fetch per url serves every requester), `PreloadImage` / `PreloadImages(urls, priority)`, `CancelAll`, `GetFromCache`, `CanReload` callback on failure, `QueuedCount` / `RunningCount`, `ReuseBitmaps`, `Clear()`; in-memory cache of decoded images only. No `CacheLongevitySecs` eviction, no platform loaders, no `LoadImageOnlineAsync` retry policy, no `ImageSource` types (urls only). |
79
79
  | `SkiaImageTiles` | ported | `TileWidth` / `TileHeight` (points, nothing drawn until set), `TileAspect` (AspectCover), `TileOffsetX` / `TileOffsetY` (wrap), `TileCacheType` (Image) for the inner tile `SkiaImage` sharing the decoded source, clipped to bounds. |
@@ -103,7 +103,7 @@ DrawnUi name and semantics; nothing here is a redesign, only an omission.
103
103
  | Area | Status | Notes |
104
104
  |---|---|---|
105
105
  | Custom `react-reconciler` renderer, PascalCase props mapped 1:1 to control properties | ported | |
106
- | `SkiaToggle` / `SkiaSwitch` / `SkiaCheckbox` / `SkiaRadioButton` | ported | Same names: `IsToggled`, `Toggled`, `DefaultValue`, `IsAnimated`, `RespondsToGestures`, `ColorThumbOn/Off`, `ColorFrameOn/Off` (+ `ColorCheckOn`), `ControlStyle` with the Default / Cupertino / Material / Material3 / Windows looks and geometry of the C# style builders (changing it after the first measure rebuilds the content and re-pins only the sizes the style set, C# `RebuildDefaultContent`) (`Frame`/`Thumb`, `FrameOff`/`FrameOn`/`ViewCheckOn`, `On` ring + `Text`), thumb animated with `TranslateToAsync` (`AnimationSpeed` 200 ms), radio groups by `GroupName` or parent. Not ported: `CommandToggled`/`CommandTapped`, hover (`CheckHovered`), `TransformView` hotspot (the toggle itself takes the tap), `Platform` style resolves from the browser UA. |
106
+ | `SkiaToggle` / `SkiaSwitch` / `SkiaCheckbox` / `SkiaRadioButton` | ported | Same names: `IsToggled`, `Toggled`, `DefaultValue`, `IsAnimated`, `RespondsToGestures` (false: a tap does not toggle it and stops there, keyboard skips it, reported disabled), `ColorThumbOn/Off`, `ColorFrameOn/Off` (+ `ColorCheckOn`), `ControlStyle` with the Default / Cupertino / Material / Material3 / Windows looks and geometry of the C# style builders (changing it after the first measure rebuilds the content and re-pins only the sizes the style set, C# `RebuildDefaultContent`) (`Frame`/`Thumb`, `FrameOff`/`FrameOn`/`ViewCheckOn`, `On` ring + `Text`), thumb animated with `TranslateToAsync` (`AnimationSpeed` 200 ms), radio groups by `GroupName` or parent. Not ported: `CommandToggled`/`CommandTapped`, hover (`CheckHovered`), `TransformView` hotspot (the toggle itself takes the tap), `Platform` style resolves from the browser UA. |
107
107
  | `SkiaControl.ExecuteAfterCreated` / fluent `.Initialize(...)` | skipped | C# runs it once when the control gets its parent so code-behind can reach `.Assign`'d refs; in React the element tree is declarative and `ref` / `useEffect` cover it. |
108
108
  | `SkiaProgress` / `SkiaSlider` | ported (painted, not composed) | Screen readers: `AccessibilityValue` (aria-valuenow / min / max, valuetext "65%" or "20 – 80", a slider horizontal), the name only from `AccessibilityLabel` (drawnui-cross 6c). `Value`/`Min`/`Max`, `TrackColor`/`ProgressColor`; slider `Min`/`Max`/`Step`/`Start`/`End`/`EnableRange`/`RangeMin`/`SliderHeight`/`ThumbColor`/`TrackColor`/`TrackSelectedColor`/`ClickOnTrailEnabled`/`StartChanged`/`EndChanged`, `StartThumbX`/`EndThumbX`, the C# position<->value math (`SliderHeight` = thumb box, `Step` rounding, `RangeMin` clamps), drag + click-on-trail + per-style looks (track heights, thumb sizes, palettes, Material3 gap + stop dot). Track/trail/thumbs are painted directly instead of child shapes (`SliderTrail`/`SliderThumb` not exposed). Not ported: `Orientation` Vertical, `Invert`, `ValueStringFormat`/`MinMaxStringFormat` + `StartDesc`/`EndDesc`, `IgnoreWrongDirection`, `AvailableWidthAdjustment`, `Trail*Offset`, `Cupertino*` sizing props, hover. |
109
109
  | `SkiaButton.ControlStyle` | ported | Cupertino / Material / Material3 / Windows accent, corner radius, font size/weight and minimum content size from the C# style builders, applied only when the user left `BackgroundColor`/`CornerRadius`(8)/`FontSize`(15)/`MinimumWidthRequest`/`MinimumHeightRequest` unset; default look is now the C# Crimson accent. `SetDefaultMinimumContentSize` is mirrored for BOTH axes (every C# style passes width 100, heights 41/36/40/40/32) and for the default `Unset` style too, skipped on a `Fill` axis or when a `WidthRequest`/`HeightRequest` is set, so short captions clamp to 100pt as in C#; the C# value adds `Margins` because it compares against a margin-inclusive size, here Measure applies it margin-exclusive and adds the margin after. Not ported: `Background` brushes, pressed-state shadow changes. |
@@ -26,7 +26,17 @@ export declare class SkiaButton extends SkiaLayout {
26
26
  StrokeColor: Color;
27
27
  StrokeWidth: number;
28
28
  IsPressed: boolean;
29
- IsDisabled: boolean;
29
+ private respondsToGestures;
30
+ /**
31
+ * False switches the button off for the user: taps, presses and keyboard activation do nothing (no Tapped, Down, Up),
32
+ * a tap on it does not reach controls under it, and screen readers report it disabled. Code can still change it.
33
+ * Same property as on toggles, sliders, scrolls and drawers (drawnui-cross 6w). Default true.
34
+ */
35
+ get RespondsToGestures(): boolean;
36
+ set RespondsToGestures(v: boolean);
37
+ /** @deprecated The opposite of RespondsToGestures, which every control uses: set `RespondsToGestures = false`. */
38
+ get IsDisabled(): boolean;
39
+ set IsDisabled(v: boolean);
30
40
  LockPanning: boolean;
31
41
  /** Touch feedback played on Down (DrawnUi SkiaButton.ApplyEffect). */
32
42
  ApplyEffect: SkiaTouchAnimation;
@@ -43,7 +53,7 @@ export declare class SkiaButton extends SkiaLayout {
43
53
  static DefaultAccessibilityRole?: string;
44
54
  protected DefaultAccessibilityLabel(): string | undefined;
45
55
  protected DefaultAccessibilityCanInteract(): boolean;
46
- /** A disabled button ignores taps, so keyboard navigation skips it too. */
56
+ /** With RespondsToGestures = false the button ignores taps, keyboard navigation skips it and it is reported disabled. */
47
57
  protected AcceptsInput(): boolean;
48
58
  /** The button's own BackgroundColor/CornerRadius/Stroke are the frame's; the button itself paints nothing. */
49
59
  protected PaintBackground(): void;
@@ -26,7 +26,20 @@ export class SkiaButton extends SkiaLayout {
26
26
  StrokeColor = Colors.Transparent;
27
27
  StrokeWidth = 0;
28
28
  IsPressed = false;
29
- IsDisabled = false;
29
+ respondsToGestures = true;
30
+ /**
31
+ * False switches the button off for the user: taps, presses and keyboard activation do nothing (no Tapped, Down, Up),
32
+ * a tap on it does not reach controls under it, and screen readers report it disabled. Code can still change it.
33
+ * Same property as on toggles, sliders, scrolls and drawers (drawnui-cross 6w). Default true.
34
+ */
35
+ get RespondsToGestures() { return this.respondsToGestures; }
36
+ set RespondsToGestures(v) { if (this.respondsToGestures !== v) {
37
+ this.respondsToGestures = v;
38
+ this.NotifyAccessibility();
39
+ } }
40
+ /** @deprecated The opposite of RespondsToGestures, which every control uses: set `RespondsToGestures = false`. */
41
+ get IsDisabled() { return !this.respondsToGestures; }
42
+ set IsDisabled(v) { this.RespondsToGestures = !v; }
30
43
  LockPanning = false;
31
44
  /** Touch feedback played on Down (DrawnUi SkiaButton.ApplyEffect). */
32
45
  ApplyEffect = "Ripple"; // C# default
@@ -60,9 +73,9 @@ export class SkiaButton extends SkiaLayout {
60
73
  /** Set to `Aria.RoleButton` to expose every button (React extension). */
61
74
  static DefaultAccessibilityRole;
62
75
  DefaultAccessibilityLabel() { return this.Text || undefined; }
63
- DefaultAccessibilityCanInteract() { return !this.IsDisabled; }
64
- /** A disabled button ignores taps, so keyboard navigation skips it too. */
65
- AcceptsInput() { return !this.IsDisabled; }
76
+ DefaultAccessibilityCanInteract() { return this.respondsToGestures; }
77
+ /** With RespondsToGestures = false the button ignores taps, keyboard navigation skips it and it is reported disabled. */
78
+ AcceptsInput() { return this.respondsToGestures; }
66
79
  /** The button's own BackgroundColor/CornerRadius/Stroke are the frame's; the button itself paints nothing. */
67
80
  PaintBackground() { }
68
81
  get UsingControlStyle() { return ResolveControlStyle(this.ControlStyle); }
@@ -130,8 +143,8 @@ export class SkiaButton extends SkiaLayout {
130
143
  this.Repaint();
131
144
  }
132
145
  ProcessGestures(args, apply) {
133
- if (this.IsDisabled)
134
- return null;
146
+ if (!this.respondsToGestures)
147
+ return this.BlockedGestureResult(args); // no press, no Down / Up / Tapped; a tap on it stops here
135
148
  const point = args.Event.Location;
136
149
  if (args.Type === "Down") {
137
150
  this.IsPressed = true;
@@ -144,8 +144,10 @@ export class SkiaRadioButton extends SkiaToggle {
144
144
  super.OnToggledChanged();
145
145
  }
146
146
  ProcessGestures(args, apply) {
147
+ if (!this.RespondsToGestures)
148
+ return this.BlockedGestureResult(args); // a tap does not select it, nor reach controls under it
147
149
  if (args.Type === "Tapped") {
148
- if (!this.IsToggled && this.RespondsToGestures) {
150
+ if (!this.IsToggled) {
149
151
  this.IsToggled = true;
150
152
  return this;
151
153
  }
@@ -31,7 +31,11 @@ export declare class SkiaScroll extends SkiaControl {
31
31
  AutoScrollingSpeedMs: number;
32
32
  ScrollingSpeedMs: number;
33
33
  IgnoreWrongDirection: boolean;
34
- RespondsToGestures: boolean;
34
+ private respondsToGestures;
35
+ /** False: neither a drag, the wheel nor the keyboard scrolls it (code still can), and it is reported disabled; its content keeps its own taps (drawnui-cross 6w). */
36
+ get RespondsToGestures(): boolean;
37
+ set RespondsToGestures(v: boolean);
38
+ protected AcceptsInput(): boolean;
35
39
  private header?;
36
40
  private footer?;
37
41
  /** A view before the content along the scroll axis; `Tag="Header"` on a JSX child sets it. */
@@ -28,7 +28,14 @@ export class SkiaScroll extends SkiaControl {
28
28
  AutoScrollingSpeedMs = 600;
29
29
  ScrollingSpeedMs = 400;
30
30
  IgnoreWrongDirection = false;
31
- RespondsToGestures = true;
31
+ respondsToGestures = true;
32
+ /** False: neither a drag, the wheel nor the keyboard scrolls it (code still can), and it is reported disabled; its content keeps its own taps (drawnui-cross 6w). */
33
+ get RespondsToGestures() { return this.respondsToGestures; }
34
+ set RespondsToGestures(v) { if (this.respondsToGestures !== v) {
35
+ this.respondsToGestures = v;
36
+ this.NotifyAccessibility();
37
+ } }
38
+ AcceptsInput() { return this.respondsToGestures; }
32
39
  // ---- header / footer (C# SkiaScroll.Header / Footer) ----
33
40
  header;
34
41
  footer;
@@ -19,7 +19,11 @@ export declare class SkiaSlider extends SkiaControl {
19
19
  /** Minimum distance between the two thumbs, in value units. */
20
20
  RangeMin: number;
21
21
  ClickOnTrailEnabled: boolean;
22
- RespondsToGestures: boolean;
22
+ private respondsToGestures;
23
+ /** False: neither a drag nor the arrow keys move it (code still can), and it is reported disabled (drawnui-cross 6w). */
24
+ get RespondsToGestures(): boolean;
25
+ set RespondsToGestures(v: boolean);
26
+ protected AcceptsInput(): boolean;
23
27
  IsPressed: boolean;
24
28
  IsUserPanning: boolean;
25
29
  /** Extra points around a thumb that still count as grabbing it (C# moreHotspotSize). */
@@ -20,7 +20,14 @@ export class SkiaSlider extends SkiaControl {
20
20
  /** Minimum distance between the two thumbs, in value units. */
21
21
  RangeMin = 0;
22
22
  ClickOnTrailEnabled = true;
23
- RespondsToGestures = true;
23
+ respondsToGestures = true;
24
+ /** False: neither a drag nor the arrow keys move it (code still can), and it is reported disabled (drawnui-cross 6w). */
25
+ get RespondsToGestures() { return this.respondsToGestures; }
26
+ set RespondsToGestures(v) { if (this.respondsToGestures !== v) {
27
+ this.respondsToGestures = v;
28
+ this.NotifyAccessibility();
29
+ } }
30
+ AcceptsInput() { return this.respondsToGestures; }
24
31
  IsPressed = false;
25
32
  IsUserPanning = false;
26
33
  /** Extra points around a thumb that still count as grabbing it (C# moreHotspotSize). */
@@ -19,7 +19,11 @@ export declare abstract class SkiaToggle extends SkiaLayout {
19
19
  Toggled?: (sender: SkiaToggle, value: boolean) => void;
20
20
  DefaultValue: boolean;
21
21
  IsAnimated: boolean;
22
- RespondsToGestures: boolean;
22
+ private respondsToGestures;
23
+ /** False: a tap or the keyboard does not toggle it (code still can), a tap on it stops there, and it is reported disabled (drawnui-cross 6w). */
24
+ get RespondsToGestures(): boolean;
25
+ set RespondsToGestures(v: boolean);
26
+ protected AcceptsInput(): boolean;
23
27
  private isToggled;
24
28
  private colorThumbOn?;
25
29
  private colorFrameOn?;
@@ -22,7 +22,14 @@ export class SkiaToggle extends SkiaLayout {
22
22
  Toggled;
23
23
  DefaultValue = false;
24
24
  IsAnimated = true;
25
- RespondsToGestures = true;
25
+ respondsToGestures = true;
26
+ /** False: a tap or the keyboard does not toggle it (code still can), a tap on it stops there, and it is reported disabled (drawnui-cross 6w). */
27
+ get RespondsToGestures() { return this.respondsToGestures; }
28
+ set RespondsToGestures(v) { if (this.respondsToGestures !== v) {
29
+ this.respondsToGestures = v;
30
+ this.NotifyAccessibility();
31
+ } }
32
+ AcceptsInput() { return this.respondsToGestures; }
26
33
  isToggled = false;
27
34
  colorThumbOn;
28
35
  colorFrameOn;
@@ -106,7 +113,9 @@ export class SkiaToggle extends SkiaLayout {
106
113
  get AccessibilityIsPressed() { return this.isToggled; }
107
114
  set AccessibilityIsPressed(_v) { }
108
115
  ProcessGestures(args, apply) {
109
- if (args.Type === "Tapped" && this.RespondsToGestures) {
116
+ if (!this.respondsToGestures)
117
+ return this.BlockedGestureResult(args); // a tap does not toggle it, nor reach controls under it
118
+ if (args.Type === "Tapped") {
110
119
  this.IsToggled = !this.IsToggled;
111
120
  return this;
112
121
  }
@@ -11,7 +11,11 @@ import { SkiaLayout } from "./SkiaLayout";
11
11
  */
12
12
  export declare abstract class SnappingLayout extends SkiaLayout {
13
13
  Animated: boolean;
14
- RespondsToGestures: boolean;
14
+ private respondsToGestures;
15
+ /** False: neither a swipe nor the keyboard moves it (code still can), and it is reported disabled; its content keeps its own taps (drawnui-cross 6w). */
16
+ get RespondsToGestures(): boolean;
17
+ set RespondsToGestures(v: boolean);
18
+ protected AcceptsInput(): boolean;
15
19
  IgnoreWrongDirection: boolean;
16
20
  Bounces: boolean;
17
21
  RubberDamping: number;
@@ -11,7 +11,14 @@ import { SkiaLayout } from "./SkiaLayout";
11
11
  */
12
12
  export class SnappingLayout extends SkiaLayout {
13
13
  Animated = true;
14
- RespondsToGestures = true;
14
+ respondsToGestures = true;
15
+ /** False: neither a swipe nor the keyboard moves it (code still can), and it is reported disabled; its content keeps its own taps (drawnui-cross 6w). */
16
+ get RespondsToGestures() { return this.respondsToGestures; }
17
+ set RespondsToGestures(v) { if (this.respondsToGestures !== v) {
18
+ this.respondsToGestures = v;
19
+ this.NotifyAccessibility();
20
+ } }
21
+ AcceptsInput() { return this.respondsToGestures; }
15
22
  IgnoreWrongDirection = false;
16
23
  Bounces = false;
17
24
  RubberDamping = 0.7;
@@ -375,8 +375,17 @@ export declare class SkiaControl {
375
375
  * for the pointer. Keyboard navigation uses it: Tapped for Tab and Enter / Space, Panning for the arrow keys.
376
376
  */
377
377
  CanReceiveGesture(gesture: SkiaGesturesParameters["Type"]): boolean;
378
- /** False while the control ignores gestures itself, e.g. a disabled button. Default true. */
378
+ /**
379
+ * False while the control ignores input itself: RespondsToGestures = false on a button, toggle, slider, scroll...
380
+ * Taps, keyboard and the accessibility state (reported disabled) all follow it (drawnui-cross 6w). Default true.
381
+ */
379
382
  protected AcceptsInput(): boolean;
383
+ /**
384
+ * What a control that takes no input returns for a gesture that reached it (C# BlockedGestureResult): it keeps a
385
+ * press, tap or long press, so nothing under it reacts to them, and lets moves and wheel go on to the controls around
386
+ * it (a scroll behind it still scrolls).
387
+ */
388
+ protected BlockedGestureResult(args: SkiaGesturesParameters): SkiaControl | null;
380
389
  NotifyAccessibilityFocused(focused: boolean): void;
381
390
  /** DrawnUi SmartMax: larger of two sizes, an infinite one loses. */
382
391
  protected static SmartMax(a: number, b: number): number;
@@ -633,8 +633,19 @@ export class SkiaControl {
633
633
  return false;
634
634
  return true;
635
635
  }
636
- /** False while the control ignores gestures itself, e.g. a disabled button. Default true. */
636
+ /**
637
+ * False while the control ignores input itself: RespondsToGestures = false on a button, toggle, slider, scroll...
638
+ * Taps, keyboard and the accessibility state (reported disabled) all follow it (drawnui-cross 6w). Default true.
639
+ */
637
640
  AcceptsInput() { return true; }
641
+ /**
642
+ * What a control that takes no input returns for a gesture that reached it (C# BlockedGestureResult): it keeps a
643
+ * press, tap or long press, so nothing under it reacts to them, and lets moves and wheel go on to the controls around
644
+ * it (a scroll behind it still scrolls).
645
+ */
646
+ BlockedGestureResult(args) {
647
+ return args.Type === "Down" || args.Type === "Tapped" || args.Type === "LongPressing" ? this : null;
648
+ }
638
649
  NotifyAccessibilityFocused(focused) { this.Superview?.AccessibilityManager.NotifyFocused(focused ? this : undefined); }
639
650
  /** DrawnUi SmartMax: larger of two sizes, an infinite one loses. */
640
651
  static SmartMax(a, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drawnui-react",
3
- "version": "0.1.0-preview.17",
3
+ "version": "0.1.0-preview.18",
4
4
  "description": "DrawnUi for React: the DrawnUi (.NET) drawn-UI engine in TypeScript on CanvasKit (Skia WASM). Same controls, same PascalCase API as DrawnUi.Net.",
5
5
  "license": "MIT",
6
6
  "author": "Nick Kovalsky (AppoMobi)",
@@ -73,6 +73,7 @@
73
73
  "check:velocity": "node dev/check.mjs dev/check-velocity.ts",
74
74
  "check:scroll-index": "node dev/check.mjs dev/check-scroll-index.ts",
75
75
  "check:culling": "node dev/check.mjs dev/check-culling.ts",
76
+ "check:responds": "node dev/check.mjs dev/check-responds.ts",
76
77
  "site:extras": "node dev/site-extras.mjs dist/demo",
77
78
  "build:lib": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
78
79
  "prepublishOnly": "npm run build:lib",