drawnui-react 0.1.0-preview.11 → 0.1.0-preview.12

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
@@ -62,7 +62,7 @@ DrawnUi name and semantics; nothing here is a redesign, only an omission.
62
62
  | Control | Status | Notes |
63
63
  |---|---|---|
64
64
  | `SkiaLayout` Absolute / Column / Row (+ `SkiaStack`, `SkiaRow`, `SkiaLayer`) | ported | `Spacing`, `Padding`, `Children`/`Views`, `AddSubView`/`RemoveSubView`/`InsertSubView`. |
65
- | `SkiaLayout` templated (Column only): `ItemsSource` (array), `ItemTemplate` (factory `() => SkiaControl`), `RecyclingTemplate` Enabled/Disabled, `MeasureItemsStrategy` `MeasureFirst` (uniform, O(1) for 100k items) / `MeasureAll`, `ChildrenFactory` (ViewsAdapter pool: `GetOrCreateViewForIndex`, `ReleaseViewAt`), `FirstVisibleIndex`/`LastVisibleIndex`, `DebugString`, `ApplyItemsSource`, `VirtualisationInflated`, `BindingContext`/`ContextIndex` on every control, `SkiaDynamicDrawnCell.SetContent` | ported | Cells realized/bound/arranged/drawn only for the visible viewport (+inflation) each frame. |
65
+ | `SkiaLayout` templated (Column only): `ItemsSource` (array), `ItemTemplate` (factory `() => SkiaControl`), `RecyclingTemplate` Enabled/Disabled, `MeasureItemsStrategy` `MeasureAll` (default, per-item size) / `MeasureFirst` (explicit uniform, O(1) for 100k items), `ChildrenFactory` (ViewsAdapter pool: `GetOrCreateViewForIndex`, `ReleaseViewAt`), `FirstVisibleIndex`/`LastVisibleIndex`, `DebugString`, `ApplyItemsSource`, `VirtualisationInflated`, `BindingContext`/`ContextIndex` on every control, `SkiaDynamicDrawnCell.SetContent` | ported | Cells realized/bound/arranged/drawn only for the visible viewport (+inflation) each frame. |
66
66
  | `LoadMoreCommand` / `LoadMoreTopCommand` / `LoadMoreOffset` / `LoadMoreTopOffset` | ported | Callbacks instead of ICommand. Bottom fires once per content extent when within the offset of the end (or when the content underfills the viewport), re-arms when the content grows or the user moves away (>offset+100 pt, >2 s) — C# CheckNeedToLoadMore. Top arms only after the offset left the top edge, fires when it comes back. Not ported: opposite-direction cooldown (`IsOppositeLoadMoreBlocked`), `IInsideViewport.ShouldTriggerLoadMore`. |
67
67
  | Structure-preserving `ItemsSource` updates | ported (array diff) | C# listens to `ObservableCollection` Add/Insert; React apps replace the array, so the setter detects **append** (old is a prefix: measured heights kept, tail measured lazily) and **prepend** (old is a suffix: view indices shifted without rebinding, new head measured synchronously up to 200 items, `ItemsInsertedAtStart(px)` lets the `SkiaScroll` move its offset so visible rows stay put — C# head-insert rebase). and **reorder** (same items permuted, the C# `ObservableCollection.Move` case: contexts rebound, the index-keyed measured heights permuted with their items, nothing re-measured, extent and scroll offset unchanged). Any other change rebuilds the structure (heights re-measured, offset kept). Not ported: removals in place, `Replace`. |
68
68
  | Templated Row/Grid/Wrap, `Split`, `ItemTemplateSelector`, `ItemTemplatePoolSize`/`ReserveTemplates`, `UsePreparedViews`, `SkiaCachedStack`, measure memo | skipped | |
@@ -8,7 +8,7 @@ import { SkiaGridStructure } from "./GridStructure";
8
8
  *
9
9
  * Templated mode (ItemsSource + ItemTemplate) is a Column only: cells are created through the ViewsAdapter for
10
10
  * the indexes inside the visible viewport (+ VirtualisationInflated), everything else is arithmetic —
11
- * MeasureFirst measures one cell and assumes uniform size, MeasureAll measures every item once.
11
+ * MeasureAll (default) measures every item once, MeasureFirst measures one cell and assumes uniform size.
12
12
  */
13
13
  export declare class SkiaLayout extends SkiaControl {
14
14
  /** Layout type. SkiaShape redeclares it as ShapeType (any shape value lays out as Absolute), like the C# hidden Type. */
@@ -33,6 +33,7 @@ export declare class SkiaLayout extends SkiaControl {
33
33
  DynamicColumns: boolean;
34
34
  /** Templated Grid: fill column-major (top to bottom, then next column) instead of row-major (C# Invert). */
35
35
  Invert: boolean;
36
+ /** Default MeasureAll (DrawnUi 1.10.6.20): every item keeps its own size; MeasureFirst is explicit uniform rows. */
36
37
  MeasureItemsStrategy: MeasuringStrategy;
37
38
  /** Realized views per item (Disabled) or a recycled pool for the visible range (Enabled). */
38
39
  readonly ChildrenFactory: ViewsAdapter;
@@ -41,7 +42,7 @@ export declare class SkiaLayout extends SkiaControl {
41
42
  private itemsSource?;
42
43
  private itemTemplate?;
43
44
  private structureDirty;
44
- /** Per-item heights in pixels (MeasureAll) or a single uniform height (MeasureFirst). */
45
+ /** Per-item heights in pixels (MeasureAll, the default) or a single uniform height (MeasureFirst). */
45
46
  private itemHeights;
46
47
  private uniformHeight;
47
48
  private measuredWidthPx;
@@ -8,7 +8,7 @@ import { SkiaGridStructure } from "./GridStructure";
8
8
  *
9
9
  * Templated mode (ItemsSource + ItemTemplate) is a Column only: cells are created through the ViewsAdapter for
10
10
  * the indexes inside the visible viewport (+ VirtualisationInflated), everything else is arithmetic —
11
- * MeasureFirst measures one cell and assumes uniform size, MeasureAll measures every item once.
11
+ * MeasureAll (default) measures every item once, MeasureFirst measures one cell and assumes uniform size.
12
12
  */
13
13
  export class SkiaLayout extends SkiaControl {
14
14
  /** Layout type. SkiaShape redeclares it as ShapeType (any shape value lays out as Absolute), like the C# hidden Type. */
@@ -35,7 +35,8 @@ export class SkiaLayout extends SkiaControl {
35
35
  DynamicColumns = false;
36
36
  /** Templated Grid: fill column-major (top to bottom, then next column) instead of row-major (C# Invert). */
37
37
  Invert = false;
38
- MeasureItemsStrategy = "MeasureFirst";
38
+ /** Default MeasureAll (DrawnUi 1.10.6.20): every item keeps its own size; MeasureFirst is explicit uniform rows. */
39
+ MeasureItemsStrategy = "MeasureAll";
39
40
  /** Realized views per item (Disabled) or a recycled pool for the visible range (Enabled). */
40
41
  ChildrenFactory = new ViewsAdapter(this);
41
42
  FirstVisibleIndex = -1;
@@ -43,7 +44,7 @@ export class SkiaLayout extends SkiaControl {
43
44
  itemsSource;
44
45
  itemTemplate;
45
46
  structureDirty = true;
46
- /** Per-item heights in pixels (MeasureAll) or a single uniform height (MeasureFirst). */
47
+ /** Per-item heights in pixels (MeasureAll, the default) or a single uniform height (MeasureFirst). */
47
48
  itemHeights = [];
48
49
  uniformHeight = 0;
49
50
  measuredWidthPx = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drawnui-react",
3
- "version": "0.1.0-preview.11",
3
+ "version": "0.1.0-preview.12",
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)",