@ng-native/fabric 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/engine.d.ts CHANGED
@@ -9,13 +9,15 @@
9
9
  */
10
10
  import { type Conditions, type DeferredDeclaration, type StyleCache, type StyleSheet, type TokenValue } from './css.ts';
11
11
  import { type AnimationSpec, type Keyframe, type RunningAnimation, type Transition } from './transition.ts';
12
- import { type DrivenProperty, type EventFeed, type NativeAnimated, type ScrollAxis, type ScrollDrive, type ScrollRange, type StaticTransform } from './native-drive.ts';
12
+ import { type ComposedDrive, type DrivenProperty, type EventFeed, type FollowingTransform, type NativeAnimated, type ScrollAxis, type ScrollDrive, type ScrollRange, type StaticTransform } from './native-drive.ts';
13
13
  import type { DrivenChannels } from './scroll-animation.ts';
14
14
  export type FabricNode = {
15
15
  readonly __fabricNode: unique symbol;
16
16
  } | object;
17
17
  /** Where a node is, in the window's coordinates. What `Engine.measure` reports. */
18
18
  import type { HostEngine, HostNode, Settling } from './host.ts';
19
+ import { type GridLayout, type Rect } from './grid.ts';
20
+ import { type FlowPlan } from './flow.ts';
19
21
  /** A node's scroll-driven animation: what it plays, what drives it, and the frame it commits. */
20
22
  interface ScrollAnimation {
21
23
  readonly spec: AnimationSpec;
@@ -48,11 +50,11 @@ export type FabricNodeSet = unknown;
48
50
  export interface FabricUIManager {
49
51
  createNode(reactTag: number, viewName: string, rootTag: number, props: object, instanceHandle: unknown): FabricNode;
50
52
  /** Clone with the *given* children (omitting the argument means none) and the same props. */
51
- cloneNodeWithNewChildren(node: FabricNode): FabricNode;
53
+ cloneNodeWithNewChildren(node: FabricNode, children?: readonly FabricNode[]): FabricNode;
52
54
  /** Clone with the given props and the *same* children. */
53
55
  cloneNodeWithNewProps(node: FabricNode, newProps: object): FabricNode;
54
- /** Clone with the given props and the given children (omitting them means none). */
55
- cloneNodeWithNewChildrenAndProps(node: FabricNode, newProps: object): FabricNode;
56
+ /** Clone with the given children and the given props. */
57
+ cloneNodeWithNewChildrenAndProps(node: FabricNode, children: readonly FabricNode[], newProps: object): FabricNode;
56
58
  appendChild(parent: FabricNode, child: FabricNode): FabricNode;
57
59
  /**
58
60
  * Have native move each view whose frame the next commit changes to where it ends up, over a
@@ -80,6 +82,13 @@ export interface FabricUIManager {
80
82
  * overlay place itself in the same frame it was opened in.
81
83
  */
82
84
  measureInWindow?(node: FabricNode, onSuccess: (x: number, y: number, width: number, height: number) => void): void;
85
+ /**
86
+ * A node's box as the last commit laid it out: x, y, width, height. Fabric lays a commit out
87
+ * before `completeRoot` returns, so this answers for a commit made a line earlier, and what
88
+ * was read can be committed again before anything is drawn. That is how a grid is laid out.
89
+ * Optional because a test's fabric has no layout to read.
90
+ */
91
+ getBoundingClientRect?(node: FabricNode, includeTransform: boolean): readonly [number, number, number, number] | undefined;
83
92
  }
84
93
  /**
85
94
  * RN's `directEventTypes`: delivered to the target only, never up the tree. Everything else
@@ -184,20 +193,32 @@ interface Committed {
184
193
  viewName: string;
185
194
  }
186
195
  export interface EngineNode extends HostNode {
187
- readonly kind: NodeKind;
196
+ readonly nodeKind: NodeKind;
188
197
  /** Lowercase template spelling, e.g. `view`. Never the native view name. */
189
198
  readonly tag: string;
190
199
  /** `tag` again, for Angular 22.0, which reads it on a component's host element. */
191
200
  readonly tagName: string;
201
+ /**
202
+ * The element's name as a stylesheet's type selector reads it, where it is not `tag`: a
203
+ * drawing's `text` is kept as `svg:text` and is still `text` to `.chart text`.
204
+ */
205
+ typeName?: string;
206
+ /**
207
+ * The namespace a renderer created the element in where an extension names elements in one,
208
+ * as Angular creates what is written inside an `<svg>`: a library's drawing, whose shapes are
209
+ * painted and given their font as a browser does. An icon's shapes are created by name alone
210
+ * and have none, and commit as they always have.
211
+ */
212
+ namespace?: string;
192
213
  props: Record<string, unknown>;
193
- text: string;
194
- children: EngineNode[];
214
+ nodeText: string;
215
+ childList: EngineNode[];
195
216
  parent: EngineNode | null;
196
217
  listeners: Map<string, Set<(event: unknown) => void>> | null;
197
218
  /** CSS classes on this node, for selector matching. */
198
219
  classes: Set<string> | null;
199
220
  /** The compiled stylesheet of the component that created this node, if any. */
200
- sheet: StyleSheet | null;
221
+ templateSheet: StyleSheet | null;
201
222
  /** The sheet of the component this node hosts, if it hosts one. What `:host` matches against. */
202
223
  hostSheet: StyleSheet | null;
203
224
  /** Custom properties set on the node itself; see `StyleTarget.customProperties`. */
@@ -226,9 +247,14 @@ export interface EngineNode extends HostNode {
226
247
  touchWithin?: boolean;
227
248
  /**
228
249
  * The paragraph the engine makes around a run of text written straight into a view. It is in no
229
- * template and in no node's `children`: it holds the text, and commits where the text would.
250
+ * template and in no node's `childList`: it holds the text, and commits where the text would.
230
251
  */
231
252
  box?: EngineNode;
253
+ /**
254
+ * The paragraphs of a run of text beside a box in a line, one a word: see `wordBoxes`. In no
255
+ * node's `childList` either, and kept on the text as its one paragraph is.
256
+ */
257
+ words?: EngineNode[];
232
258
  /** A node the engine made, which no rule matches: it only inherits. */
233
259
  anonymous?: true;
234
260
  /** See `StyleTarget.styled`. */
@@ -254,12 +280,116 @@ export interface EngineNode extends HostNode {
254
280
  * are worked out again when the direction or alignment changes. Unset on every other node.
255
281
  */
256
282
  fitContainer?: string;
283
+ /**
284
+ * Whether a browser lays this element out inline, with no display of its own: `always`, as a
285
+ * span is, which is what the box that holds it reads; or `unless-block`, as a custom element
286
+ * is, which the engine lays out as an inline-block or as a block by what it holds. Set with
287
+ * `setInline`. Unset on every other node.
288
+ */
289
+ inlineLevel?: 'always' | 'unless-block';
290
+ /** Set by `scrollsOverflow`: with `overflow: auto` or `scroll` this element is a scroll view. */
291
+ scrollsOverflow?: true;
292
+ /** Set while this element is one: see `Engine.settleScrolling`. */
293
+ scrollView?: true;
294
+ /** The view a scrolling element's children are in, as it was last committed. */
295
+ inside?: {
296
+ handle: FabricNode;
297
+ childHandles: FabricNode[];
298
+ };
299
+ /** Set while `settleLine` has given an always-inline element a line for the boxes it holds. */
300
+ lined?: true;
301
+ /** Set while an always-inline element is a flex box or a grid by its own style. */
302
+ boxed?: true;
303
+ /**
304
+ * How this node lays its children out as a block container, and which of them are in its flow:
305
+ * made on each reconcile from its children's styles, so a child added, removed or restyled is
306
+ * followed. Unset on every node that is not a block container. See `flow.ts`.
307
+ */
308
+ flow?: Flow;
309
+ /**
310
+ * What an out-of-flow box is committed with in place of what Yoga cannot resolve: its `auto`
311
+ * margins as lengths, or the place it would have had in the flow. A null takes the prop away.
312
+ * See `settleAbsolute`.
313
+ */
314
+ resolved?: Readonly<Record<string, number | null>>;
315
+ /** Where a `position: sticky` box sticks, and how far it is moved now. See `settleSticky`. */
316
+ sticky?: StickyState;
317
+ /**
318
+ * The node a `position: fixed` box is committed under in place of its parent: the page it is
319
+ * on, or the root. Unset on every node that is not fixed.
320
+ */
321
+ fixedTo?: EngineNode;
322
+ /**
323
+ * Set once a child of this node has had an `order`: its children are then committed in that
324
+ * order, which Yoga has no property for. Left set, since sorting children with none is nothing.
325
+ */
326
+ ordered?: boolean;
327
+ /**
328
+ * A box in a line of a block, which is as wide as its content: the width that came to, read
329
+ * back with the percentages inside it set aside, and whether it has to be read again. See
330
+ * `settleFits`.
331
+ */
332
+ fit?: {
333
+ dirty: boolean;
334
+ width?: number;
335
+ room?: number;
336
+ grown?: EngineNode[];
337
+ };
338
+ /**
339
+ * The least width a box is held to because a fitted box in it overflows its room: a browser's
340
+ * flex item is no narrower than its content, which Yoga's is. See `growAround`.
341
+ */
342
+ fitMin?: number;
343
+ /** Set on a box inside one being fitted, while its percentage width and zero basis are off. */
344
+ fitOff?: boolean;
345
+ /**
346
+ * The declarations of this node that are a percentage with a length added, `calc(100% - 2rem)`,
347
+ * what each came to against the box the percentage is of, and that box's size then. See
348
+ * `settleMixed`. Set on `mixedOff` while that box is measured with them set aside.
349
+ */
350
+ mixed?: MixedState;
351
+ mixedOff?: boolean;
352
+ /** The line box this node is the first box of, as it was last committed. See `inLines`. */
353
+ line?: LineBox;
354
+ /**
355
+ * Set on an item in a row whose automatic minimum width is read from what it holds: whether
356
+ * text in it has somewhere to wrap. Anything changing under it has it asked again.
357
+ */
358
+ autoMin?: boolean;
359
+ /**
360
+ * The narrowest an item that takes a share of its row goes, read from a commit of it at its
361
+ * content's width with its words a line each, or nothing until it is read: see
362
+ * `settleMinimums`. Set while `shareMin` says the item's minimum is to be measured.
363
+ */
364
+ shareMin?: {
365
+ width?: number;
366
+ share?: number;
367
+ };
368
+ /** Set while that commit is made: the item is as wide as its content, with no share. */
369
+ shareOff?: boolean;
370
+ /** Whether this node's children were last laid out along a row. See `autoMinimum`. */
371
+ row?: boolean;
372
+ /** How this node lays its children out as a grid. Unset on every node that is not one. */
373
+ grid?: GridState;
374
+ /** The grid this node was last an item of. Its `grid` says whether it still is. */
375
+ gridIn?: EngineNode;
376
+ /** The block container whose flow this node was last in. Its `flow` says whether it still is. */
377
+ flowIn?: EngineNode;
257
378
  /**
258
379
  * Whether this node had a height a percentage could be taken of, when a box beneath it with a
259
380
  * percentage height last asked, as `definiteHeight` says it. Compared on each reconcile so its
260
381
  * children are worked out again when it changes. Unset on every other node.
261
382
  */
262
383
  heightBasis?: boolean;
384
+ /**
385
+ * The height a box as tall as its content is committed at, so that a percentage height in it
386
+ * is of that height, and the width it had then. See `settleHeld`.
387
+ */
388
+ heldAt?: {
389
+ height: number;
390
+ width: number;
391
+ inner: number;
392
+ };
263
393
  /**
264
394
  * Per-property transition state, for every property this node has ever seen a `transition` for.
265
395
  * A finished entry stays, because its target is what the next change is measured against.
@@ -307,6 +437,8 @@ export interface EngineNode extends HostNode {
307
437
  nativeView?: true;
308
438
  /** Props kept for selectors to match and left out of what is committed. See `keepAsAttribute`. */
309
439
  attributeOnly?: Set<string>;
440
+ /** Attributes a package keeps apart from props, for selectors alone. See `keepAttribute`. */
441
+ keptAttributes: Record<string, string> | undefined;
310
442
  /**
311
443
  * Set by whoever needs to know which props have been written: each `setProp` with a value adds
312
444
  * its key, even one equal to the value already there, and one with `undefined` or `null` takes
@@ -332,7 +464,7 @@ export interface EngineNode extends HostNode {
332
464
  dormantHoists?: EngineNode[] | null;
333
465
  committed: Committed | null;
334
466
  /** The node this one was committed as a child of, which native holds it to for its life. */
335
- committedUnder: EngineNode | null;
467
+ committedUnder: EngineNode | LineBox | null;
336
468
  /** The hoisted views this node keeps committed for, by element name. See `HoistOptions`. */
337
469
  kept?: Map<string, KeptHoist>;
338
470
  /** On a text field, the row aligned by baseline that takes a baseline from it: `lineBaseline`. */
@@ -369,6 +501,13 @@ export declare function declareNativeProps(elementName: string, props: Iterable<
369
501
  * host primitive's constructor; see `EngineNode.claimed`.
370
502
  */
371
503
  export declare function claimHost(node: HostNode): void;
504
+ /**
505
+ * Say that an element scrolls what overflows it, as a browser's does: with `overflow: auto` or
506
+ * `scroll` it is committed as a scroll view, around one view that holds what it holds. For a
507
+ * package that gives elements a browser's behaviour. Any other element keeps the view it is,
508
+ * and its `overflow` is layout alone.
509
+ */
510
+ export declare function scrollsOverflow(node: EngineNode): void;
372
511
  /**
373
512
  * Mark an element as the host of a component. The platform adapter calls this from
374
513
  * `RendererFactory2.createRenderer`, which Angular calls once for every component it mounts,
@@ -389,6 +528,141 @@ export declare function nativePlatform(): string;
389
528
  * only the mapping half is a no-op elsewhere.
390
529
  */
391
530
  export declare function registerPlatformComponents(platform: string): void;
531
+ /** A sticky box: the scroll offsets it moves between, and what moves it. */
532
+ interface StickyState {
533
+ scroll: EngineNode;
534
+ axis: ScrollAxis;
535
+ /** The offset it starts moving at, and the one it stops at: the end of its parent. */
536
+ start: number;
537
+ stop: number;
538
+ /** How far it is moved, as written on its transform. */
539
+ shift: number;
540
+ drive: ComposedDrive | null;
541
+ /** Its own transform as a transition native plays has it, which the drive applies after it. */
542
+ lent?: readonly FollowingTransform[];
543
+ }
544
+ /**
545
+ * A grid container between the commit that changed it and the commit that places its items.
546
+ *
547
+ * Yoga has no grid, so its items are taken out of the flow and placed by the engine, from sizes
548
+ * read back from Fabric. `measuring` commits each item with no size, to be read at the size its
549
+ * content wants; `sizing` commits the items whose height at a column's width is wanted, at that
550
+ * width; `placed` commits each where the grid puts it.
551
+ */
552
+ interface GridState {
553
+ phase: 'measuring' | 'words' | 'sizing' | 'placed';
554
+ /** Laid out since it or anything in it last changed. */
555
+ settled: boolean;
556
+ members: readonly EngineNode[];
557
+ /** Each item's size with its content as wide as it wants. */
558
+ content: Map<EngineNode, {
559
+ width: number;
560
+ height: number;
561
+ }>;
562
+ /**
563
+ * Each item's width with its content as narrow as it goes, read where the layout asked: its
564
+ * text is committed one word to a line, `words`, and the widest of them is that width.
565
+ */
566
+ narrow: Map<EngineNode, number>;
567
+ /** Set by a layout that asked for a width `narrow` does not have yet. */
568
+ wantsNarrow: boolean;
569
+ /** Each item's height at a width, for the widths the layout asked about. */
570
+ heights: Map<EngineNode, Map<number, number>>;
571
+ /** The widths being asked about, while `sizing`. */
572
+ widths: Map<EngineNode, number>;
573
+ /** Where each item goes, against the container's padding box, once `placed`. */
574
+ rects: Map<EngineNode, Rect>;
575
+ /** The width of the box it was last laid out in, and the height it then came to, if its own. */
576
+ width?: number;
577
+ height?: number;
578
+ /** The width its tracks came to, where nothing else gives it one. */
579
+ ownWidth?: number;
580
+ /**
581
+ * How far down each item's baseline is at a width, read as Yoga lines items up in a row: see
582
+ * `gridWithHeights`. Set on `inRow` while the items are committed that way to be read.
583
+ */
584
+ baselines: Map<EngineNode, Map<number, number>>;
585
+ /** Each item whose baseline the last layout asked for, and the width it asked at. */
586
+ asked: Map<EngineNode, number>;
587
+ wantsBaseline?: boolean;
588
+ inRow?: boolean;
589
+ /** The grid lines a placement names, from the last layout: what an out-of-flow child is against. */
590
+ area?: GridLayout['area'];
591
+ stopListening?: () => void;
592
+ /** Its style and each item's as it was last laid out, and what each item held: see `follows`. */
593
+ styled?: string;
594
+ styles?: Map<EngineNode, string>;
595
+ shapes?: Map<EngineNode, string>;
596
+ /**
597
+ * The items changed in or beneath since it was laid out, with no cause yet to lay it out
598
+ * again, and how far the content of each reached before the change.
599
+ */
600
+ followed?: Map<EngineNode, Reach>;
601
+ /** How far each of those reached after the last such change, which is before the next. */
602
+ reached?: Map<EngineNode, Reach>;
603
+ }
604
+ /** How far down an item's content reaches in it, and whether it reaches past its right edge. */
605
+ interface Reach {
606
+ bottom: number;
607
+ over: boolean;
608
+ }
609
+ interface MixedState {
610
+ /** Each declaration as its two parts: a percentage, and points added to it. */
611
+ parts: Record<string, {
612
+ percent: number;
613
+ points: number;
614
+ }>;
615
+ /** What each came to, or nothing before the box it is of has been read. */
616
+ values?: Record<string, number>;
617
+ /** The size of that box when they were worked out: a change in it works them out again. */
618
+ base?: readonly [number, number | undefined];
619
+ dirty: boolean;
620
+ }
621
+ /** A block container's plan, and the children it covers. */
622
+ interface Flow {
623
+ readonly plan: FlowPlan<EngineNode>;
624
+ readonly members: ReadonlySet<EngineNode>;
625
+ /** The boxes in a line box among blocks, each named by the first box of its line. */
626
+ readonly lined: ReadonlyMap<EngineNode, EngineNode>;
627
+ /**
628
+ * The room its lines need under the baseline, as `hang` works it out: of a block of lines, and
629
+ * of each line among blocks by its first box.
630
+ */
631
+ under?: number;
632
+ unders?: ReadonlyMap<EngineNode, number>;
633
+ /** How far each box on a line sits over the bottom of it, as a margin: see `onBaseline`. */
634
+ lifts?: ReadonlyMap<EngineNode, number>;
635
+ /** How far each box of a known height is moved down its line, as a margin: see `liftLines`. */
636
+ rises?: ReadonlyMap<EngineNode, number>;
637
+ /** Whether a box of each line reaches as high as its strut, which then holds it no taller. */
638
+ risen?: boolean;
639
+ }
640
+ /**
641
+ * A line box as it was last committed, kept on the first box of its run. It is what its boxes
642
+ * are committed under: a box whose line box is another view is made again, since native never
643
+ * moves a view to another parent. No view yet, before the first commit of it.
644
+ */
645
+ interface LineBox {
646
+ handle: FabricNode | null;
647
+ top: number;
648
+ /** Where its boxes sit along it, by the `text-align` its container has: see `alongLine`. */
649
+ along?: string;
650
+ /** How tall its strut holds it, and the room in that under the baseline: see `lineStrut`. */
651
+ strut?: LineStrut;
652
+ handles: readonly FabricNode[];
653
+ in: EngineNode;
654
+ }
655
+ /**
656
+ * A line box: the view a run of inline-level boxes among blocks is committed in, which no node
657
+ * of the app stands for. A row that wraps, with its boxes on the bottom of each line as empty
658
+ * boxes sit on a baseline. It is static and takes no touch, so what is placed or pressed inside
659
+ * it is placed against and reaches the same boxes as if it were not there.
660
+ */
661
+ /** A line box's strut, as the props of the row it is: see `lineStrut`. */
662
+ interface LineStrut {
663
+ minHeight: number;
664
+ alignContent: string;
665
+ }
392
666
  /**
393
667
  * Register a codegen'd third-party Fabric component, e.g.
394
668
  * `registerViewName('rns-screen', 'RNSScreen')`, which is how the router reaches
@@ -399,7 +673,7 @@ export declare function registerPlatformComponents(platform: string): void;
399
673
  * and skipping it is not cosmetic: `RNSScreenStackHeaderConfig` without its `position: absolute`
400
674
  * joins the screen's flex layout and pushes every page down by the height of the header.
401
675
  */
402
- export declare function registerViewName(elementName: string, viewName: string | PlatformViewName, defaultProps?: Record<string, unknown>, options?: ViewNameOptions): void;
676
+ export declare function registerViewName(elementName: string, viewName: string | PlatformViewName, defaultProps?: Record<string, unknown>, options?: ViewNameOptions): () => void;
403
677
  /** What else a registered view needs the engine to know about it. */
404
678
  export interface ViewNameOptions {
405
679
  /**
@@ -421,6 +695,12 @@ export interface ViewNameOptions {
421
695
  * element is the engine's own, as the paragraph a view is given for its loose text is.
422
696
  */
423
697
  readonly looseText?: string;
698
+ /**
699
+ * Whether the text content it takes as a prop keeps its spaces, as a span of an SVG text does:
700
+ * a run of them is one space, dropped only before the first words of what it is in and after
701
+ * the last, since the next span's words follow on the same line.
702
+ */
703
+ readonly spacedText?: boolean;
424
704
  /**
425
705
  * Where a view's own props name a font that must reach native by another name, as SwiftUI's
426
706
  * `font` modifier must name a face by its file's PostScript name: rewrites `props` in place,
@@ -440,6 +720,8 @@ export interface PlatformViewName {
440
720
  readonly ios: string;
441
721
  readonly android: string;
442
722
  }
723
+ /** An element's registered view name, for the platform the host reported. */
724
+ export declare function registeredViewName(elementName: string): string | undefined;
443
725
  /** Hear about faces registering with the platform, until the returned function is called. */
444
726
  export declare function onFontsRegistered(listener: (families: ReadonlySet<string>) => void): () => void;
445
727
  /**
@@ -470,8 +752,10 @@ export declare function fontsSettled(families: Iterable<string>): void;
470
752
  * just after the ancestor's child it was written in, or after all of them when it was written in
471
753
  * the ancestor itself, which keeps a page's scroll view ahead of its header as UIKit's large
472
754
  * title wants. A node with no such ancestor commits where it is.
755
+ *
756
+ * Answers what takes the registration away again, for a package that can be taken out.
473
757
  */
474
- export declare function registerHoist(elementName: string, ancestorName: string, options?: HoistOptions): void;
758
+ export declare function registerHoist(elementName: string, ancestorName: string, options?: HoistOptions): () => void;
475
759
  export interface HoistOptions {
476
760
  /**
477
761
  * Props for a native view the ancestor keeps once the element has committed into it.
@@ -512,16 +796,20 @@ interface KeptHoist {
512
796
  }
513
797
  /** The part of a node `viewNameOf` reads: an engine node, or any host's mirror of one. */
514
798
  export interface ViewNameNode {
515
- readonly kind: string;
799
+ readonly nodeKind: string;
516
800
  readonly tag: string;
517
801
  readonly parent: ViewNameNode | null;
518
802
  /** Whether a component is mounted on it, and whether that component is the native view. */
519
803
  readonly componentHost?: boolean;
520
804
  readonly nativeView?: boolean;
521
805
  /** What it holds, which decides whether one of HTML's text elements is text or a view. */
522
- readonly children?: readonly ViewNameNode[];
806
+ readonly childList?: readonly ViewNameNode[];
523
807
  /** Set on the paragraph the engine makes for a run of text written straight into a view. */
524
808
  readonly anonymous?: boolean;
809
+ /** Set on a text element that lays out what it holds itself: see `Engine.settleBoxed`. */
810
+ readonly boxed?: boolean;
811
+ /** Its props, of which `horizontal` decides which scroll view a scroll view is on Android. */
812
+ readonly props?: Readonly<Record<string, unknown>>;
525
813
  }
526
814
  /**
527
815
  * The native view a node commits as: `Paragraph` for a `<text>`, `VirtualText` for one nested in
@@ -531,10 +819,24 @@ export interface ViewNameNode {
531
819
  * Exported for tools that show a template beside what it becomes, such as the X-ray in the
532
820
  * documentation's course, which labels `@ng-native/web`'s DOM with these names. It reads the same
533
821
  * table the commit does, so after `registerPlatformComponents('android')` it answers for Android.
822
+ *
823
+ * Exempt from the complexity limit as `mergeProps` is: asked of every element several times a
824
+ * commit, where a call more for the name of a plain view measured slower in `pnpm bench`.
534
825
  */
535
826
  export declare function viewNameOf(node: ViewNameNode): string;
536
827
  /** Whether a value is one of the engine's own nodes. */
537
828
  export declare function isEngineNode(value: unknown): value is EngineNode;
829
+ /**
830
+ * Give every node members of a package's own, on the prototype they share: a getter, a method.
831
+ * Returns what takes them away again.
832
+ *
833
+ * For a package that presents nodes to code written against another API, as a web-compatibility
834
+ * layer answers `getAttribute` and `closest` from a node's name and props. A field the engine
835
+ * keeps on a node (`nodeKind`, `props`, `childList`) is refused. A member a node already has on the
836
+ * prototype (`classList`, `addEventListener`) is replaced, and put back when the extension is
837
+ * taken away: what replaces it has to do what the original did for Angular.
838
+ */
839
+ export declare function extendNodes(members: PropertyDescriptorMap & ThisType<EngineNode>): () => void;
538
840
  /**
539
841
  * RN-specific helpers, injected rather than imported so the engine stays runnable under Node.
540
842
  */
@@ -575,6 +877,14 @@ export interface EngineOptions {
575
877
  * which nothing knows until a view has been laid out - come through `updateTokens` instead.
576
878
  */
577
879
  tokens?: Readonly<Record<string, TokenValue>>;
880
+ /**
881
+ * `strict` lays the app out without Yoga's legacy errata, as a browser would: a percentage
882
+ * inset or size of an out-of-flow box is of its container's padding box, and one with no inset
883
+ * starts inside the padding. `compatibility` keeps the errata and is the default, as it is in
884
+ * React Native, whose `experimental_LayoutConformance` takes the same two modes. Strict commits
885
+ * the app inside that view, which has no box of its own.
886
+ */
887
+ layoutConformance?: 'strict' | 'compatibility';
578
888
  /**
579
889
  * Report host primitives used without their component (see `claimHost`). Defaults to RN's
580
890
  * `__DEV__`, so a release build never looks.
@@ -627,6 +937,8 @@ export declare class Engine implements HostEngine {
627
937
  readonly root: EngineNode;
628
938
  private readonly fabric;
629
939
  private readonly rootTag;
940
+ /** Whether the app is laid out without Yoga's errata. See `EngineOptions`. */
941
+ private readonly strict;
630
942
  private readonly styles;
631
943
  /** Whether to run the development checks, which a release build skips. */
632
944
  readonly dev: boolean;
@@ -642,6 +954,11 @@ export declare class Engine implements HostEngine {
642
954
  * for them. Only those in the tree: see `releaseDetached`.
643
955
  */
644
956
  private readonly hoisted;
957
+ /**
958
+ * Whether a subtree that left the tree has ever held a hoisted node of its own: until one has,
959
+ * a node taken out has none to carry, and `carryHoists` does not walk up to look.
960
+ */
961
+ private hoistsHeld;
645
962
  /** The nodes taken out of a child list since the last commit. See `releaseDetached`. */
646
963
  private readonly removedSinceCommit;
647
964
  /**
@@ -671,8 +988,15 @@ export declare class Engine implements HostEngine {
671
988
  private readonly placeElsewhere;
672
989
  /** The sheets `watchStructure` has read, which it is asked about once an element. */
673
990
  private readonly watchedStructure;
674
- /** Whether any sheet uses `:has()`. See `markBeneath`. */
991
+ /**
992
+ * The sheets in play that use `:has()`, each with whether it asks about what comes after a
993
+ * node, `:has(+ .x)`: see `hasBeside`. A sheet taken away asks no more.
994
+ */
995
+ private readonly hasWatched;
996
+ /** Whether any sheet in play uses `:has()`. See `markBeneath`. */
675
997
  private hasSheets;
998
+ /** Whether any asks about what comes after a node. See `markBefore`. */
999
+ private hasBesideSheets;
676
1000
  private readonly resolveAssetSource;
677
1001
  constructor(fabric: FabricUIManager, rootTag: number, options?: EngineOptions);
678
1002
  /**
@@ -732,10 +1056,19 @@ export declare class Engine implements HostEngine {
732
1056
  */
733
1057
  addGlobalSheet(sheet: StyleSheet, replacing?: StyleSheet): boolean;
734
1058
  /**
735
- * Have styled again each node a sheet just added could match. The rest keep the style they
736
- * have, which the resolver lets stand for a node none of the sheet's rules is written for,
737
- * so a commit steps over them: the walk here is what finds the ones it must not step over.
1059
+ * The sheets added since the last commit, whose nodes are not yet marked: see `markAdded`.
1060
+ * Emptied by each commit. One taken away before it stays in the list, which only marks nodes
1061
+ * it could have matched: taking a sheet away styles everything again in any case.
1062
+ */
1063
+ private readonly sheetsAdded;
1064
+ /**
1065
+ * Have styled again each node a sheet added since the last commit could match. The rest keep
1066
+ * the style they have, which the resolver lets stand for a node none of the sheets' rules is
1067
+ * written for, so a commit steps over them: the walk here is what finds the ones it must not
1068
+ * step over. One walk for all of them: a screen of a component library adds a sheet for each
1069
+ * component it renders for the first time.
738
1070
  */
1071
+ private markAdded;
739
1072
  private markWrittenFor;
740
1073
  /**
741
1074
  * Stop matching a sheet `addGlobalSheet` added, and restyle everything; false, and nothing
@@ -801,6 +1134,11 @@ export declare class Engine implements HostEngine {
801
1134
  visibleBottom?: number;
802
1135
  margin?: number;
803
1136
  }): void;
1137
+ /**
1138
+ * The view a scroll view's content is in: an element that scrolls its overflow holds its
1139
+ * children in one of its own, and any other scroll view's first child is it.
1140
+ */
1141
+ private contentOf;
804
1142
  /**
805
1143
  * Commit one measured node again, cloned with its children, so Fabric measures it once more.
806
1144
  *
@@ -829,10 +1167,23 @@ export declare class Engine implements HostEngine {
829
1167
  private readonly viewportWatchers;
830
1168
  /** Calls `listener` after each change of conditions, which is when `viewport` can change. */
831
1169
  watchViewport(listener: () => void): () => void;
1170
+ /**
1171
+ * The conditions given to the constructor or to `updateConditions` last, or undefined before
1172
+ * any, when the engine settles colours as light and has no size: what a package
1173
+ * answering a media query from a script, `matchMedia`, reads the colour scheme and the motion
1174
+ * preference from.
1175
+ */
1176
+ get conditions(): Conditions | undefined;
1177
+ private lastConditions;
832
1178
  updateConditions(next: Conditions): void;
833
1179
  createElement(name: string, sheet?: StyleSheet | null): EngineNode;
834
1180
  addClass(node: EngineNode, name: string): void;
835
1181
  removeClass(node: EngineNode, name: string): void;
1182
+ /**
1183
+ * A node's classes as its `class` attribute is written, where a sheet reads the attribute as a
1184
+ * whole: see `ClassChange`. Null where none does, and nothing is written.
1185
+ */
1186
+ private classAttribute;
836
1187
  /**
837
1188
  * Mark a node whose classes changed, by what the rules that name those classes can restyle.
838
1189
  *
@@ -842,14 +1193,17 @@ export declare class Engine implements HostEngine {
842
1193
  * or `.close:is(.animating *)`, the elements under the node that such rules are for. What is
843
1194
  * under any of those is styled again from the rules it matched, for what it inherits: a `dark`
844
1195
  * class on the root finds no rule again for an element no `dark` rule is for. One named in
845
- * `:has()`, or answering a test of the class attribute there, has the boxes above the node
846
- * asked again, and one named only in `:has(> )` the box right above it. Any other class has the node and everything under it matched again, as any
847
- * other change to it does.
1196
+ * `:has()`, or answering a test of the class attribute there, has the boxes above the node and
1197
+ * those before it asked again, and one named only in `:has(> )` the box right above it. Any
1198
+ * other class has the node and everything under it matched again, as any other change to it
1199
+ * does.
848
1200
  *
849
1201
  * A sheet that names a class later restyles what it is for as it arrives, and a node not yet
850
1202
  * committed is styled when it is, with the class as it is then.
851
1203
  */
852
1204
  private markClasses;
1205
+ /** Mark the boxes whose `:has()` can ask of a node whose classes changed, by `reach`. */
1206
+ private markHasAsking;
853
1207
  /**
854
1208
  * How many class changes have restyled what is under an element. `markUnder` walks the tree as
855
1209
  * it is, so an element out of it then is not reached: one that comes back after any is matched
@@ -869,6 +1223,29 @@ export declare class Engine implements HostEngine {
869
1223
  * under another is marked too: what is under an element marked this way keeps its rules.
870
1224
  */
871
1225
  private markUnder;
1226
+ /** What the sheets in play give a generated box to, by the last thing their selectors name. */
1227
+ private generated;
1228
+ /** What each sheet in play gives a generated box to: `generated` is all of them together. */
1229
+ private readonly generatedBySheet;
1230
+ /**
1231
+ * Note the elements a sheet's `::before` and `::after` rules are written for, and give the
1232
+ * ones there already their boxes. Only a sheet compiled with them has any, which is a
1233
+ * library's the build names as a browser's; for every other this reads the sheet once.
1234
+ */
1235
+ private watchGenerated;
1236
+ /**
1237
+ * A sheet has left play, by a hot swap or by being removed: the boxes only it gave go, from
1238
+ * every element in the tree.
1239
+ */
1240
+ private unwatchGenerated;
1241
+ /** `next` in play where `sheet` was: noted first, so a box both give is kept, not made again. */
1242
+ private swapGenerated;
1243
+ /** An attribute or the id a rule gives a generated box by came or went on an element. */
1244
+ private generateFor;
1245
+ private generateBeneath;
1246
+ /** Keep a box first and last in an element a rule could draw one for, and nowhere else. */
1247
+ private generate;
1248
+ private keepGenerated;
872
1249
  /**
873
1250
  * The sheet of the component `node` hosts, whose `:host` rules it matches. Set again when a hot
874
1251
  * swap replaces the component's sheet, which recreates the views inside but not the host, so the
@@ -881,6 +1258,19 @@ export declare class Engine implements HostEngine {
881
1258
  * the web's mount point has, unless the app's `:host` sizes it otherwise.
882
1259
  */
883
1260
  setDefaultStyle(node: EngineNode, style: Readonly<Record<string, unknown>> | undefined): void;
1261
+ /**
1262
+ * What a default style asks for. The root component's host is given the surface's height as a
1263
+ * percentage of it, and the surface's height is native's, which nothing is held at: an app of
1264
+ * plain flex that `mount` gives that height is asked nothing for it. See `noteShare`.
1265
+ */
1266
+ private defaultAsks;
1267
+ /**
1268
+ * Say that a browser lays an element out inline, for a package that gives elements a
1269
+ * browser's defaults. `unless-block` is an element with no display of its own, a custom
1270
+ * element: its default display is the engine's from here, an inline-block while it holds only
1271
+ * text and inline-level boxes and a block once it holds one, which cannot sit in a line.
1272
+ */
1273
+ setInline(node: EngineNode, how: 'always' | 'unless-block' | undefined): void;
884
1274
  /**
885
1275
  * `class="a b"` from a template. Replaces the set rather than adding to it. The same classes in
886
1276
  * another order are a change too, to a selector that reads the class attribute, `[class^="a"]`.
@@ -910,8 +1300,20 @@ export declare class Engine implements HostEngine {
910
1300
  * of the paragraph's outermost element, which is the view; any other change leaves it be.
911
1301
  */
912
1302
  private markWords;
1303
+ /**
1304
+ * A node taken out of a subtree that left the tree can take hoisted nodes of the subtree's with
1305
+ * it, as content projected inside an element of an `@if` moves into the element made again when
1306
+ * the block opens. All of the subtree's are woken, and the commit, which the removal makes
1307
+ * release, puts each back with the subtree it is in.
1308
+ */
1309
+ private carryHoists;
913
1310
  /** A subtree that went out of the tree is back in: its hoisted nodes commit again. */
914
1311
  private wakeHoists;
1312
+ /**
1313
+ * Let go of what is placed from here, and of the pages fixed boxes are on, out of the tree: a
1314
+ * box that comes back is placed again from the start.
1315
+ */
1316
+ private releasePlacements;
915
1317
  /**
916
1318
  * Let go of everything the engine holds for nodes that have left the tree.
917
1319
  *
@@ -950,8 +1352,11 @@ export declare class Engine implements HostEngine {
950
1352
  private topOf;
951
1353
  /**
952
1354
  * Angular calls this per node on view destroy, but only when `Renderer2.destroyNode` is
953
- * non-null. Without it the listener sets on discarded nodes stay reachable from the
954
- * closures Angular hands us, which is a slow leak on any screen that churns views.
1355
+ * non-null. It is not always the end of the node: Angular calls it for the content an
1356
+ * `<ng-content>` at the top of the view projects too, which belongs to the declaring view, and
1357
+ * puts the same nodes back when the view is made again. So what is let go here comes back when
1358
+ * the node does, and its listeners stay: each goes when the view or directive that added it
1359
+ * tears it down, and Angular does not listen again for content it puts back.
955
1360
  */
956
1361
  destroyNode(node: EngineNode): void;
957
1362
  parentNode(node: EngineNode): EngineNode | null;
@@ -966,8 +1371,15 @@ export declare class Engine implements HostEngine {
966
1371
  private eased;
967
1372
  /** Note a sheet any of whose rules transitions or animates: see `eases`. */
968
1373
  private noteSheetEasing;
969
- /** Note a prop, or a style set as one, that transitions or animates: see `eases`. */
1374
+ /**
1375
+ * Note a prop, or a style set as one, that transitions or animates: see `eases`. Asked of every
1376
+ * prop and declaration set until one does, so it reads the keys where they are, copying none.
1377
+ */
970
1378
  private noteEasingProp;
1379
+ /**
1380
+ * Exempt from the complexity limit deliberately, as `mergeProps` is: run for every prop Angular
1381
+ * writes, where a call more for what a value asks of the engine measured slower in `pnpm bench`.
1382
+ */
971
1383
  setProp(node: EngineNode, key: string, value: unknown): void;
972
1384
  /**
973
1385
  * Have the paragraph a run of text is in merged again: it is as tall as the tallest line of
@@ -999,6 +1411,13 @@ export declare class Engine implements HostEngine {
999
1411
  * static attribute that is an input of the host's component.
1000
1412
  */
1001
1413
  keepAsAttribute(node: EngineNode, key: string): void;
1414
+ /**
1415
+ * Keep an attribute of a node apart from its props: matched by a selector, over a prop of the
1416
+ * same name, and committed to nothing. For a package that keeps attributes a native view reads
1417
+ * under other names, as `@ng-native/web-compat` keeps a drawing's `width`. What depends on it is
1418
+ * restyled as it would be for a prop; `null` or `undefined` takes it away.
1419
+ */
1420
+ keepAttribute(node: EngineNode, name: string, value: string | null | undefined): void;
1002
1421
  /**
1003
1422
  * Whether a node's inline style can change what it or anything below it resolves to: it sets,
1004
1423
  * or until now set, a property its children inherit.
@@ -1006,6 +1425,8 @@ export declare class Engine implements HostEngine {
1006
1425
  private inlineReachesStyle;
1007
1426
  /** Whether a node's inline style sets `direction`, remembering that one has. */
1008
1427
  private noteInlineDirection;
1428
+ /** Note what a prop just set asks for: a style, or one declaration of one. */
1429
+ private askedBy;
1009
1430
  /**
1010
1431
  * The style object a node already holds has been changed in place.
1011
1432
  *
@@ -1014,7 +1435,7 @@ export declare class Engine implements HostEngine {
1014
1435
  * there and may write into it; this is how it says so, since nothing about the object's identity
1015
1436
  * has changed for the props diff to notice.
1016
1437
  */
1017
- styleChanged(node: EngineNode): void;
1438
+ styleChanged(node: EngineNode, key?: string): void;
1018
1439
  /**
1019
1440
  * A bound declaration, `[style.color]`, whose value may be a `var()`, or a length in `em` or a
1020
1441
  * viewport unit. One that is, is kept as a declaration the cascade settles with the node's
@@ -1023,6 +1444,8 @@ export declare class Engine implements HostEngine {
1023
1444
  * answered too. Any other value forgets what was kept.
1024
1445
  */
1025
1446
  setBoundStyle(node: EngineNode, prop: string, value: unknown): boolean;
1447
+ /** Keep a bound declaration for the cascade to settle, or forget the one kept, with `null`. */
1448
+ private keepBound;
1026
1449
  /** Whether a bound value is one CSS has none of, which is dropped with a warning. */
1027
1450
  private refusedBound;
1028
1451
  /**
@@ -1039,13 +1462,44 @@ export declare class Engine implements HostEngine {
1039
1462
  private markProps;
1040
1463
  /** Start matching ancestors again on a change, once a sheet that uses `:has()` is in play. */
1041
1464
  private watchHas;
1465
+ /** A sheet has left play: what it asked of `:has()` goes with it. */
1466
+ private unwatchHas;
1467
+ /**
1468
+ * Have caches keep the rules each node matched while a sheet in play compares with them, and
1469
+ * stop once none does. A sheet that asks about a place in a child list is never unset.
1470
+ */
1471
+ private trackMatched;
1042
1472
  /**
1043
1473
  * Something at or beneath `from` changed: every node from there up may match a `:has()` rule
1044
- * it did not, or stop matching one, up to `upTo` and not it. They are matched again rather than
1045
- * marked for restyling, which would restyle everything under them. Only sheets that use
1046
- * `:has()` pay.
1474
+ * it did not, or stop matching one. They are matched again rather than marked for restyling,
1475
+ * which would restyle everything under them. Only sheets that use `:has()` pay. `changed` is
1476
+ * the child of `from` that changed, or `at` where in its list one came or went.
1047
1477
  */
1048
1478
  private markBeneath;
1479
+ /** The boxes from `from` up, to `upTo` and not it, to ask `:has()` again: see `markBeneath`. */
1480
+ private markAsked;
1481
+ /** `markBefore` for a change to `changed` in `parent`'s list, or one coming or going at `at`. */
1482
+ private markBeside;
1483
+ /**
1484
+ * By child list, how many of its first children `markBefore` has marked since the last commit,
1485
+ * which marks no more of them again: a list that gains its items one at a time is not looked
1486
+ * through once for each. A child coming or going before that many brings it down to where.
1487
+ */
1488
+ private readonly markedBefore;
1489
+ /**
1490
+ * By child list, how many of its first children `markRepositioned` has marked for their place
1491
+ * from the end since the last commit: a list that gains its items one at a time at its end is
1492
+ * not looked through once for each.
1493
+ */
1494
+ private readonly placesMarked;
1495
+ /** By child list, the first of the children `markAllAfter` has marked with all after it. */
1496
+ private readonly placesMarkedAfter;
1497
+ /**
1498
+ * `:has(+ .x)` and `:has(~ .x .y)`: a change in `parent`'s list at `at` can change what the
1499
+ * elements before it match, and so can one beneath a box for the elements before that box.
1500
+ * Each is matched again, as an ancestor is. Only sheets that ask about what comes after pay.
1501
+ */
1502
+ private markBefore;
1049
1503
  /**
1050
1504
  * The boxes rules ask `:has()` of above the node they style, `.card:has(.x) .title`, by the
1051
1505
  * sheet that asks: a sheet replaced or taken away asks no more.
@@ -1069,6 +1523,12 @@ export declare class Engine implements HostEngine {
1069
1523
  * together. What was walked under it and above it, which is `above` where it asks no more.
1070
1524
  */
1071
1525
  private markUnderBox;
1526
+ /**
1527
+ * Have matched again each element after `node` that one of `subjects`' rules could be for, and
1528
+ * each under one of those: what `.card:has(.x) ~ .title` is for, where the card is `node`.
1529
+ * One already reached for `subjects` in this pass had all after it reached with it.
1530
+ */
1531
+ private markAfter;
1072
1532
  /**
1073
1533
  * What `node` matches changed, which the elements after it can read: as many of them as a rule
1074
1534
  * steps along from one, every one for a `~`, and none where no sheet steps at all.
@@ -1090,6 +1550,12 @@ export declare class Engine implements HostEngine {
1090
1550
  * may have stopped or started being first. Nothing comes after the two at the end.
1091
1551
  */
1092
1552
  private markRepositioned;
1553
+ /**
1554
+ * Mark every element after a change at `at`, where a sheet asks about any element before
1555
+ * (`~`). Those after the last change marked so since the commit are marked still, wherever they
1556
+ * moved to: a list losing its rows first to last is not looked through once for each.
1557
+ */
1558
+ private markAllAfter;
1093
1559
  /**
1094
1560
  * A child's place in its list changed, which is all that changed about it. It is matched
1095
1561
  * again, and keeps its style and all that is under it unless it now matches other rules: its
@@ -1100,13 +1566,28 @@ export declare class Engine implements HostEngine {
1100
1566
  */
1101
1567
  private markPlace;
1102
1568
  /**
1103
- * Whether a rule could read this element's place from another element. By its classes alone,
1104
- * which every such compound it could be asks for: a compound with none could be any element.
1569
+ * Whether a rule could read this element's place from another element. By its classes and its
1570
+ * element name, which every such compound it could be asks for: one with neither could be any.
1105
1571
  */
1106
1572
  private placeReadFromUnder;
1107
1573
  /** Note what a sheet coming into play asks about a child list. None is unset: see `structural`. */
1108
1574
  private watchStructure;
1109
1575
  /** Walk up until we hit a node already known to have a dirty subtree. */
1576
+ /**
1577
+ * Whether anything has been marked since the last commit that could move layout: everything
1578
+ * is, but a frame of an animation that only paints. A commit of such frames alone plans no
1579
+ * layout and reads nothing back: a spinner turns on every frame for as long as its page is
1580
+ * open, and the page's layout is the same on each of them.
1581
+ */
1582
+ private layoutStale;
1583
+ /** Set while a frame of an animation marks a node whose animated props only paint. */
1584
+ private paintTick;
1585
+ /** Set for the length of a commit that nothing but such frames led to. */
1586
+ private paintOnly;
1587
+ /** Mark a node for a frame of its animation or transition, which moved these props. */
1588
+ private tick;
1589
+ /** Tell the host the tree is dirty: what its listener changes is no frame that only paints. */
1590
+ private dirtied;
1110
1591
  private markPath;
1111
1592
  private isClean;
1112
1593
  /**
@@ -1116,6 +1597,8 @@ export declare class Engine implements HostEngine {
1116
1597
  * optimisation.
1117
1598
  */
1118
1599
  commit(): boolean;
1600
+ /** Count a commit that reached native, and how long it took, in `stats`. */
1601
+ private countCommit;
1119
1602
  /** A field went out of view focused, in the commit running: see `undisplayed`. */
1120
1603
  private blurAfterCommit;
1121
1604
  private blurHidden;
@@ -1157,6 +1640,8 @@ export declare class Engine implements HostEngine {
1157
1640
  driveByScroll(view: EngineNode, scroll: EngineNode, axis: ScrollAxis, range: ScrollRange, statics?: readonly StaticTransform[]): ScrollDrive | null;
1158
1641
  /** See `HostEngine.driveByEvent`. */
1159
1642
  driveByEvent(view: EngineNode, source: EngineNode, feed: EventFeed, property: DrivenProperty, range: ScrollRange, statics?: readonly StaticTransform[], shift?: number | null): ScrollDrive | null;
1643
+ /** See `driveByEvent`: a drive whose transform after its move can change. */
1644
+ private composedDrive;
1160
1645
  /**
1161
1646
  * `transitionstart` and `transitionend`, for anything listening.
1162
1647
  *
@@ -1190,6 +1675,613 @@ export declare class Engine implements HostEngine {
1190
1675
  */
1191
1676
  private readonly lettingGo;
1192
1677
  private letGo;
1678
+ /** Everything the engine lays out in Yoga's place, from the commit just made. */
1679
+ private settleLayout;
1680
+ /** Note a node that is settled after layout: by a sum of a share and a length, or its least. */
1681
+ private noteSettled;
1682
+ /** The items whose minimum width is measured: see `shareMinimum`. */
1683
+ private readonly minimums;
1684
+ /** Those whose text is committed a word to a line, while how narrow they go is read. */
1685
+ private narrowed;
1686
+ private inWords;
1687
+ /**
1688
+ * Read how narrow each item that takes a share of its row goes, where that is not known or
1689
+ * something in the item changed: all of them committed as wide as their content with their
1690
+ * words a line each, read, and committed again with that as their minimum. Two commits for
1691
+ * all of them together, and none where nothing in any of them moved.
1692
+ */
1693
+ private settleMinimums;
1694
+ /** The boxes under a node whose width is capped at a share of what they are in. */
1695
+ private noWiderThanRoom;
1696
+ /** Share each row out again where its room or its items changed, with no minimum to read. */
1697
+ private reshare;
1698
+ /**
1699
+ * Work out each item's share of its line again, for every row whose items all grow into it
1700
+ * from nothing, and answer the items whose share is another than it was. A row with any other
1701
+ * item in it, one with a width or as wide as its content, is left to Yoga with its items'
1702
+ * minimums: what such an item takes of a line is not known until the line is laid out.
1703
+ */
1704
+ private sharedAgain;
1705
+ /** An item of a row that is laid out in it: displayed, and not out of the flow. */
1706
+ private inFlowOfRow;
1707
+ /** An item as `lineShares` takes one, or nothing for one that does not grow from nothing. */
1708
+ private sharerOf;
1709
+ /**
1710
+ * An item that takes no share of its row, as what it takes of a line: the width it was laid
1711
+ * out at. Nothing for one that grows from its content, whose width is the line's to give.
1712
+ */
1713
+ private unsharing;
1714
+ private gapOf;
1715
+ private wrapsRow;
1716
+ /** Whether an item's minimum is to be read: it never was, or something in it moved or grew. */
1717
+ private minimumIsStale;
1718
+ /** Reconcile what is dirty and hand the tree to Fabric, which lays it out before returning. */
1719
+ private commitTree;
1720
+ private commitWhole;
1721
+ /** The fixed boxes each page, or the root, is committed with. */
1722
+ private readonly fixedIn;
1723
+ /** Boxes found to be fixed while they were being committed under their parent. */
1724
+ private readonly fixedLate;
1725
+ /** What a finger is on, while one is down. */
1726
+ private fingerOn;
1727
+ /** Boxes that became fixed or absolute with the finger on them, left under their parents. */
1728
+ private readonly fixedUnderFinger;
1729
+ /** Note what a finger comes down on, and once the last has lifted move what waited for it. */
1730
+ private trackFinger;
1731
+ /** The page a box is on: the nearest view that holds one, or the root. */
1732
+ private pageOf;
1733
+ /** Whether anything between a box and its page scrolls or clips what is inside it. */
1734
+ private scrollsOrClips;
1735
+ /**
1736
+ * Note a node that has become `position: fixed` inside something that scrolls or clips, which
1737
+ * a fixed box does neither with: it is committed under its page in place of its parent. It is
1738
+ * being reconciled under its parent as this is asked, so it is committed there once more and
1739
+ * moved straight after: see `moveFixed`. Anywhere else a fixed box stays where it is, and is
1740
+ * placed against its page by `settleAbsolute`.
1741
+ */
1742
+ private refix;
1743
+ /**
1744
+ * The box an absolute box is placed against, where that is further up than its parent: one
1745
+ * under a parent that is not positioned. A browser clips such a box by nothing between the
1746
+ * two, where a native view is clipped by every view it is in, so where one of them clips it is
1747
+ * committed under the box it is placed against, as a fixed box is under its page.
1748
+ */
1749
+ private placedAbove;
1750
+ /**
1751
+ * Whether a child is committed under its page, and not under its parent. On Android a fixed box
1752
+ * is taken there before its parent commits it, so that it is never moved: Android mounts a
1753
+ * view moved out of boxes of layout alone wrongly. See `clipsFixed`.
1754
+ */
1755
+ private onPage;
1756
+ /** Whether a box committed under another still is to be: asked in place of committing it under its parent. */
1757
+ private staysFixed;
1758
+ /** The view each page's fixed boxes are committed in, and what it was last committed with. */
1759
+ private readonly fixedLayers;
1760
+ /**
1761
+ * The fixed boxes pinned to `page`, committed after its own children so they draw over them,
1762
+ * in a view over the whole page: Android's screen view clips each view in it to that view's
1763
+ * bounds, and a fixed box draws past its own, as a toaster of no height draws its toasts.
1764
+ */
1765
+ private fixedHandles;
1766
+ /** The view `fixedHandles` puts a page's fixed boxes in: the same view each commit. */
1767
+ private fixedLayer;
1768
+ /** The fixed boxes pinned to `page`, as they are committed. */
1769
+ private fixedBoxes;
1770
+ /** Whether anything between a node and `page` is `display: none`. */
1771
+ private hiddenBelow;
1772
+ /** Commit again with each box that has just become fixed under its page, in the same task. */
1773
+ private moveFixed;
1774
+ /**
1775
+ * What the engine lays out in Yoga's place, for a node being reconciled: a block's flow, a
1776
+ * grid, and a fixed, sticky or out-of-flow box. Its display and position are read once here,
1777
+ * since this is asked of every node reconciled and most are none of these.
1778
+ */
1779
+ private relayout;
1780
+ /**
1781
+ * `replan` for an app nothing in which has asked for a layout of CSS's: what a box of plain
1782
+ * flex can still need of the engine, a share of a box as wide as its content and a
1783
+ * percentage with a length added. See `asked`.
1784
+ */
1785
+ private replanPlain;
1786
+ /**
1787
+ * What has been asked for that the engine works out in Yoga's place, as the bits of `asks`:
1788
+ * by a sheet, a style or a package that gives elements a browser's defaults. Until something
1789
+ * asks, a node is asked none of what that takes, which is most of what is asked of one: an
1790
+ * app of native views and flex is laid out by Yoga alone. Nothing is taken back, as a sheet
1791
+ * is never forgotten.
1792
+ */
1793
+ private asked;
1794
+ private readonly checksAsks;
1795
+ /** The boxes that asked for a layout of CSS's as they were merged: see `laidOut`. */
1796
+ private readonly askedLate;
1797
+ private want;
1798
+ /** The sheets whose asks are in `asked` already: read once each, as a sheet does not change. */
1799
+ private readonly askingSheets;
1800
+ private watchLayout;
1801
+ /**
1802
+ * Commit the tree, and again where a box asked for a layout of CSS's as it was merged, by
1803
+ * what it came to and no one declaration: it had been planned as a box of plain flex by
1804
+ * then, so it is planned and merged again, now that it is asked what it was not.
1805
+ */
1806
+ private commitAsAsked;
1807
+ /**
1808
+ * A test run's check that nothing was left unasked: throw where a node being merged would
1809
+ * be laid out by what no declaration has asked for, which a sheet or a style is not read for.
1810
+ */
1811
+ private checkAsked;
1812
+ /** What a layout of CSS's would make of a node that no declaration asked for one of. */
1813
+ private unaskedLayout;
1814
+ /** Whether any element has been said to be inline: only then is any looked for. */
1815
+ private inlines;
1816
+ /**
1817
+ * Settle the display of a box that is inline in a browser, and of each such box it holds:
1818
+ * those first, since the plan about to be made for this one reads them, and each is reconciled
1819
+ * after it.
1820
+ */
1821
+ private settleInlines;
1822
+ /**
1823
+ * Give an element that is text in a browser, a span or a label, a line to lay out what it
1824
+ * holds in, once it holds a box: a label's words and the arrow after them are one line in a
1825
+ * browser, and a view's children are a column. Nothing where it holds only text, which a text
1826
+ * element lays out itself, or where it has a display of its own.
1827
+ *
1828
+ * ponytail: the elements that are text and nothing else. A button or a link with no display
1829
+ * is inline too, and is left the flex box it has been: one as wide as an item that is as wide
1830
+ * as its content, `width: 100%`, is as wide as the room where it sits in a line. Fit the item
1831
+ * to its content first if a library leaves a button's display to the browser.
1832
+ */
1833
+ private settleLine;
1834
+ /**
1835
+ * A span that is a flex box or a grid by its own style is a view, and each span in it an item
1836
+ * of it with a paragraph of its own: a toolbar's count, title and description, with a gap
1837
+ * between them. Text all the way down is one paragraph otherwise, whatever its display.
1838
+ */
1839
+ private settleBoxed;
1840
+ /** Give an element that is inline in a browser the display it has for what it holds now. */
1841
+ private settleInline;
1842
+ /** Whether a box holds a block-level box in its flow, through any box that is only inline. */
1843
+ private holdsBlock;
1844
+ /** Whether a box's display is the one the engine gave it for being inline in a browser. */
1845
+ private inlineByDefault;
1846
+ private replan;
1847
+ /** Have a box fitted to its content again, and the item of a row it is a share of. */
1848
+ private noteFits;
1849
+ /** Whether a box is as wide as what it holds: an item of a row, or out of the flow. */
1850
+ private fitsContent;
1851
+ /**
1852
+ * Whether a box with no width of its own is as wide as the box it is in: a block in the flow,
1853
+ * or an item a column stretches. A share of it is then a share of that box.
1854
+ */
1855
+ private wideAsItsBox;
1856
+ private refitted;
1857
+ /**
1858
+ * Whether a box is an item of a flex row with no width, share or basis of its own, which is
1859
+ * as wide as its content: a dialog's pane, in a wrapper that centres it. A box in it that is
1860
+ * `width: 100%` is as wide as the item, where to Yoga it is as wide as the room.
1861
+ */
1862
+ private itemOfRow;
1863
+ /**
1864
+ * Whether an item grows into its row from the width of what it holds, `flex: 1 1 auto`, and
1865
+ * holds a text field as wide as it is. A browser starts it at the field's own width, its
1866
+ * characters, and wraps the row on that; a native field holds nothing to be measured by, so
1867
+ * the item is fitted as one with no share is, and grows from the width it comes to.
1868
+ */
1869
+ private growsFromField;
1870
+ /**
1871
+ * Ask an automatic minimum again: of this node when something under it changed, and of its
1872
+ * children when it turns between a row and a column. See `autoMinimum`.
1873
+ */
1874
+ private reminimum;
1875
+ /** The boxes that sit in a line of a block, and so are as wide as their content. */
1876
+ private readonly fits;
1877
+ /** Whether a box is an inline-level one in a block's flow: on a line, at its content's width. */
1878
+ private sitsInLine;
1879
+ /**
1880
+ * Size each box that sits in a line from its content, where Yoga would size it from the room
1881
+ * on offer: a box holding a row with a percentage width, or cells that share a row from a
1882
+ * basis of nothing. The box is committed with those set aside, its width is read back, and it
1883
+ * is committed at that width, which the percentages and the shares are then of.
1884
+ */
1885
+ private settleFits;
1886
+ /** The boxes the commit being settled resized or moved, or moved others by: see `noteMoved`. */
1887
+ private readonly movedBoxes;
1888
+ /** Those that only came to hold more: words added to, a child more than there was. */
1889
+ private readonly grownBoxes;
1890
+ /** The nodes the commit being settled changed: their props, their style or their children. */
1891
+ private readonly changed;
1892
+ /**
1893
+ * Those of them cloned with nothing that lays a box out: a colour, or what a screen reader
1894
+ * is told, as a progress bar's value is each time it ticks. And those cloned with more.
1895
+ */
1896
+ private readonly quietly;
1897
+ private readonly loudly;
1898
+ /** Unset where a box went or the conditions changed, which can move any box: see `heldIn`. */
1899
+ private changesHeld;
1900
+ /** What `heldIn` answered, until something more is changed. */
1901
+ private holders;
1902
+ /** Asked only where a layout of the engine's reads it: see `want` for one asked in a commit. */
1903
+ private noteChanged;
1904
+ /**
1905
+ * The boxes every change of the commit being settled is inside, where each is out of the flow
1906
+ * with a width and a height of its own, or nothing where any change is not inside one. Yoga
1907
+ * lays such a box out at the size it is given, so nothing in it moves a box outside it: a
1908
+ * progress bar's indicator, in a track of a set size, can tick on a timer without anything
1909
+ * else on the page being read back to see whether it has to be laid out again.
1910
+ */
1911
+ private heldIn;
1912
+ /** The nearest box above a node that holds what changes in it, unchanged itself. */
1913
+ private holderOf;
1914
+ /** Note whether a node is cloned with more than how it is painted: see `heldIn`. */
1915
+ private noteHow;
1916
+ /** Whether a node was changed in the commit being settled by more than how it is painted. */
1917
+ private movedItself;
1918
+ private isFixedIn;
1919
+ /**
1920
+ * Whether a box can have moved in the commit being settled: see `heldIn`. One asked to be
1921
+ * merged again is asked, too: a box read back at a new width is marked for nothing else.
1922
+ */
1923
+ private mayHaveMoved;
1924
+ /**
1925
+ * Leave each box that is fitted already as it is, where nothing in it or above it moved: a
1926
+ * button pressed and painted another colour leaves the box around it the width it has. One
1927
+ * as wide as its room is left as what it holds grows, too: an answer written a letter at a
1928
+ * time wraps, and is no wider.
1929
+ *
1930
+ * ponytail: a word added that cannot wrap, and is wider than the room, is not reached past
1931
+ * the room for until the box is next fitted. Read how far the content reaches if one is seen.
1932
+ */
1933
+ private standFitted;
1934
+ /** The boxes whose own styles changed in this commit, while any box is fitted. */
1935
+ private readonly restyled;
1936
+ /**
1937
+ * Have each fitted box under a box that was restyled fitted again. The room a box is in can
1938
+ * come from far above it, through boxes that are each as wide as what they hold: an overlay's
1939
+ * outer box is given the screen, and nothing between it and a calendar says so. The room
1940
+ * read from the box's own parent is then the box's own width, and never changes.
1941
+ */
1942
+ private refitUnderRestyled;
1943
+ /**
1944
+ * Whether a box is to be fitted to its content again. One that is no longer fitted at all, or
1945
+ * holds nothing sized by the room, is let go here, and one that stands as it is is left.
1946
+ */
1947
+ private toFit;
1948
+ /**
1949
+ * Fit boxes with nothing of each other in them: all committed with what is sized by the room
1950
+ * set aside, read, and committed at the widths they came to. Two commits for all of them,
1951
+ * where one at a time is two commits of the whole screen for each.
1952
+ */
1953
+ private fitTogether;
1954
+ /**
1955
+ * Lay out again each grid in a box whose content's share of the room was just set aside or
1956
+ * given back. A grid keeps the width its tracks came to, which was worked out in whatever
1957
+ * width it had then: a share of a pane not yet fitted is a share of nothing, and its columns
1958
+ * are as narrow as a word.
1959
+ */
1960
+ private gridsAgain;
1961
+ /**
1962
+ * The width a box comes to from the commit just made of it, with what is sized by the room
1963
+ * set aside. No wider than the room, and no narrower than what in it cannot get narrower:
1964
+ * text wraps to the room, and a row of cells with a least width does not, so it reaches past
1965
+ * the box's edge. A browser's box is that wide, and overflows the room it is in.
1966
+ */
1967
+ private fittedWidth;
1968
+ /**
1969
+ * Hold the boxes around a fitted box that overflows its room to its width: each one that is
1970
+ * as wide as its content, out to the first with a width of its own or with room enough. A
1971
+ * popover's panel around a calendar wider than the room the panel was given: in a browser a
1972
+ * flex item is no narrower than its content, and the panel is drawn under all of the calendar.
1973
+ */
1974
+ private growAround;
1975
+ /**
1976
+ * Whether a box is as wide as its content and not as its room: out of the flow, on a line, an
1977
+ * item of a row, or kept from stretching across a column. A block, and an item stretched
1978
+ * across a column, is as wide as the room whatever it holds.
1979
+ */
1980
+ private sizedByWhatItHolds;
1981
+ /** Let go of the boxes a fit was holding wider, and answer them, to be committed again. */
1982
+ private ungrow;
1983
+ /**
1984
+ * Whether a box's fit still holds: nothing about it changed, and it was fitted in the room
1985
+ * it is in now. A box is no wider than its room, so it is fitted again when that grows or
1986
+ * shrinks, though nothing about the box did.
1987
+ */
1988
+ private fitStands;
1989
+ /** How far right the boxes in a node reach, in the window: past its own edge where they overflow. */
1990
+ private reachOf;
1991
+ /** The room a fitted box is in now, as its parent was last laid out. */
1992
+ private roomOf;
1993
+ /** Stop fitting a box, and commit it again as written where it had been given a width. */
1994
+ private unfit;
1995
+ /**
1996
+ * The boxes inside `node` that Yoga sizes from the room on offer and not from their content:
1997
+ * one with a percentage width, and one that takes a share of a row from a basis of nothing.
1998
+ * Nothing under a box with a width of its own in points is looked at: that width is its
1999
+ * content's room whatever it holds.
2000
+ */
2001
+ private sizedByRoom;
2002
+ /** The boxes a percentage height in them is of, or may be: see `settleHeld`. */
2003
+ private readonly holds;
2004
+ /** Note the box a node's percentage height or basis is of, which may be held for it. */
2005
+ private noteShare;
2006
+ /**
2007
+ * Hold each box that a percentage height in it is of, and that is as tall as its content, at
2008
+ * the height that came to: once the column it is in has sized it, a browser takes the
2009
+ * percentage of that height (CSS Flexbox 9.8), where Yoga takes it of the space on offer. The
2010
+ * box is read from a commit with each percentage in it set aside, as a browser sizes it, and
2011
+ * committed at that height, which a percentage in it is then of and adds nothing to. It is read
2012
+ * again when anything in it or beside it moves, and when its width changes.
2013
+ */
2014
+ private settleHeld;
2015
+ /** A box's height as it was just committed, and the height of its content box then. */
2016
+ private heldBox;
2017
+ /** Whether a box is to be read again: not held yet, moved, or with something in it moved. */
2018
+ private heldIsStale;
2019
+ /** Whether a box is held: as tall as its content, sized by flex, and a percentage is of it. */
2020
+ private holdsHeight;
2021
+ /** The boxes with a declaration that is a percentage and a length: see `settleMixed`. */
2022
+ private readonly mixeds;
2023
+ /**
2024
+ * Finish each `calc()` of a percentage and a length from the commit just made: read the box
2025
+ * the percentage is of, and commit the box at what the sum comes to. A box in the flow is
2026
+ * committed first with those declarations set aside, since the box it is in may be as wide as
2027
+ * its content, and in a browser the percentage is of that width without them. It is worked out
2028
+ * again when the box or anything in it changes, and when the box it is of changes size.
2029
+ * Whether any was worked out.
2030
+ */
2031
+ private settleMixed;
2032
+ /** Whether a box is to be worked out: it changed, or the box it is a share of did. */
2033
+ private mixedIsStale;
2034
+ /**
2035
+ * Work out boxes that are not in one another with two commits between them: one with each
2036
+ * set aside, to read what it is a share of, and one with each at what it comes to. A grid and
2037
+ * a fitted box are sized from their content in commits of their own.
2038
+ */
2039
+ private settleMixedTogether;
2040
+ /** What a node's sums come to against the box they are of, read now where none was given. */
2041
+ private workOutMixed;
2042
+ private commitTouched;
2043
+ /** A translate moves nothing but the box itself: nothing is measured again for one. */
2044
+ private mixedOnlyMoves;
2045
+ private mixedInFlow;
2046
+ /**
2047
+ * Commit a node whose mixed declarations were set aside or worked out. A grid, and a box in
2048
+ * a line, is sized from its content and keeps the width that came to, so it is sized again
2049
+ * from the start: left as it was, it would be measured at the width its last limit gave it.
2050
+ */
2051
+ private commitMixed;
2052
+ /**
2053
+ * The box a node's percentages are of, with its mixed declarations set aside: a box in the
2054
+ * flow can be what makes its container as wide as it is. One out of the flow makes nothing
2055
+ * wider, so the box it is placed in is read as it stands.
2056
+ */
2057
+ private measuredBase;
2058
+ /**
2059
+ * The width and height a node's percentages are of: the padding box of what an out-of-flow
2060
+ * box is placed in, and the content box of its parent for any other. The height is nothing
2061
+ * where the parent was given none, as a percentage of an `auto` height is in a browser.
2062
+ */
2063
+ private mixedBase;
2064
+ /** The out-of-flow boxes Yoga does not place as CSS does: see `settleAbsolute`. */
2065
+ private readonly unplaced;
2066
+ /**
2067
+ * Note a fixed box, an out-of-flow one with an `auto` margin or no inset in a block, and one
2068
+ * in a grid.
2069
+ */
2070
+ private reabsolute;
2071
+ /**
2072
+ * Resolve from the commit just made what Yoga leaves undone for an out-of-flow box, and commit
2073
+ * again where anything changed: `auto` margins between two insets, which centre it, and the
2074
+ * place in a block's flow it has with no inset. Both need its size and its container's.
2075
+ */
2076
+ private settleAbsolute;
2077
+ /**
2078
+ * Whether the commit being settled can have changed where an out-of-flow box is placed: it
2079
+ * resized or moved something in the box it is placed against, or that box or one above it.
2080
+ * A box is placed from its own size, its container's and what comes before it there, each
2081
+ * read back from native, and a screen of buttons has one in each: read on every commit, a
2082
+ * few hundred reads for a colour that changed somewhere else.
2083
+ *
2084
+ * A fixed box is asked every time: it is placed against its page, wherever it is written.
2085
+ * So is one styled again itself, whose insets, margins or lines may be others while what it
2086
+ * is committed with is the same.
2087
+ */
2088
+ /**
2089
+ * The out-of-flow boxes found to need nothing resolved, placed as written: noted again each
2090
+ * time one is reconciled, and placed again only for what concerns it, as one resolved is.
2091
+ */
2092
+ private readonly placedAsWritten;
2093
+ /** The out-of-flow boxes whose own styles changed since they were last placed. */
2094
+ private readonly restyledPlaced;
2095
+ private concernedBy;
2096
+ private resolveAbsolute;
2097
+ /**
2098
+ * An out-of-flow box, the box Yoga positions it by and the box CSS positions it against, each
2099
+ * of the last two inside its border. They are one box unless it is fixed in place, where CSS
2100
+ * means its page.
2101
+ */
2102
+ /** The area of a grid an out-of-flow item is placed in: none for a fixed one, on its page. */
2103
+ private areaFor;
2104
+ private boxesFor;
2105
+ /**
2106
+ * What an out-of-flow child of a grid is placed against: the area between the lines its
2107
+ * placement names, in the window. A side it names no line for, or one the grid has not got,
2108
+ * is the grid's padding edge. `by` is the grid's box inside its border.
2109
+ */
2110
+ private gridArea;
2111
+ /** The box Yoga positions an out-of-flow node by: the nearest ancestor that is not static. */
2112
+ private containingBlock;
2113
+ /** A box inside its border, which insets are measured from. The root's is the window. */
2114
+ private paddingBox;
2115
+ /** A container's borders alone: an inset is measured from inside the border. */
2116
+ private borderInsets;
2117
+ /**
2118
+ * Where a box with no vertical inset would have been in its block's flow: under the in-flow
2119
+ * sibling before it and that sibling's bottom margin, which an out-of-flow box does not
2120
+ * collapse with: Chrome has it under the margin, and its own margin under that. `origin` is the
2121
+ * top of the container's padding box.
2122
+ *
2123
+ * ponytail: the sibling's own bottom margin, of points and over none. One its last child's
2124
+ * margin collapses into, or a negative one, is a few points out; read the plan's margins if a
2125
+ * box under a card's last paragraph is ever seen out.
2126
+ */
2127
+ private flowPlace;
2128
+ /** The bottom of the line box `first` starts in `container`, from `origin`, once it is laid out. */
2129
+ private lineBottom;
2130
+ /** A box's own bottom margin, where it is points over none. */
2131
+ private marginUnder;
2132
+ /** Every `position: sticky` box in the tree. */
2133
+ private readonly stickies;
2134
+ /** Each scroll view with a sticky box in it: its offset, and what stops listening for it. */
2135
+ private readonly stickyScrolls;
2136
+ /**
2137
+ * Work out where each sticky box sticks from the commit just made: its place in its scroll
2138
+ * view, and the end of its parent, which it does not leave. Native moves it between the two
2139
+ * where it can. A host with no layout to read leaves it where it is written.
2140
+ */
2141
+ private settleSticky;
2142
+ /** The scroll view a box sticks in, or nothing once it is no longer sticky or in the tree. */
2143
+ private stickyScroll;
2144
+ private stick;
2145
+ /** Have native move a sticky box between these offsets, of this scroll view on this axis. */
2146
+ private redrive;
2147
+ /**
2148
+ * The scroll offsets a sticky box moves between, read from where the last commit laid it out:
2149
+ * from its place in the scroll view less its inset, to the end of its parent.
2150
+ */
2151
+ private stickySpan;
2152
+ private unstick;
2153
+ /**
2154
+ * Have native apply a sticky box's own transform after the move it drives: as a transition
2155
+ * native plays has it while one does, and as it is committed otherwise.
2156
+ */
2157
+ private composeSticky;
2158
+ /**
2159
+ * Let a sticky box's move go: native stops driving it, and it is committed where it is. A
2160
+ * transition of its transform native was easing in the drive is eased on from here.
2161
+ */
2162
+ private loosen;
2163
+ /**
2164
+ * Native goes on drawing what a drive set last once it is gone, which no commit changes (see
2165
+ * `Touched`): a box's own transform is set there where it has one or the drive had moved it.
2166
+ */
2167
+ private undriven;
2168
+ /** Write how far a sticky box is moved at its scroll view's offset, where that has changed. */
2169
+ private shiftSticky;
2170
+ /** Keep a scroll view's offset, and move its sticky boxes as it changes. */
2171
+ private followScroll;
2172
+ /** Every grid container in the tree, or once in it. */
2173
+ private readonly grids;
2174
+ /** Set while grids are laid out, when a node is reconciled for a phase and not for a change. */
2175
+ private settling;
2176
+ /** The children a grid places: elements in its flow, committed under it. */
2177
+ private gridMembers;
2178
+ /**
2179
+ * Note a grid container reconciled for a change, in it or beneath it: its items are committed
2180
+ * unsized in this commit, to be read and placed straight after it. Nothing is noted on a host
2181
+ * with no layout to read back, where a grid stays the column it would otherwise be.
2182
+ */
2183
+ private regrid;
2184
+ /**
2185
+ * Whether a grid laid out already stays as it is for this commit: its own style and each
2186
+ * item's are what it was laid out from, and its items are the same ones. What changed is then
2187
+ * in an item or beneath one, and is committed as any change is; whether the grid has to be
2188
+ * laid out again for it is asked once it has been, of what the change did: see `outgrown`.
2189
+ *
2190
+ * Laying a grid out is three commits, and most of what changes in one changes nothing it is
2191
+ * sized from: a colour, a state, a bar a share of its track wide, a number as long as the last.
2192
+ *
2193
+ * ponytail: content that comes to want another width with no other sign of it (text of the
2194
+ * same length in wider letters, a box beneath given a width) keeps the track it had until the
2195
+ * grid is next laid out. Read each item's content width where a track is sized by it if a
2196
+ * grid is seen a few points out.
2197
+ */
2198
+ private follows;
2199
+ /** Whether a grid's style and its items, and each item's style, are what it was laid out from. */
2200
+ private asLaidOut;
2201
+ /** How far the content of a grid's item reaches, as it is laid out now. */
2202
+ private reach;
2203
+ /**
2204
+ * Whether a change a grid was not laid out again for turns out to need it: an item holds
2205
+ * more or less than it did, or its content reaches further down, or past its edge.
2206
+ */
2207
+ private outgrown;
2208
+ /** Start a grid over: its items unsized, and nothing known about them. */
2209
+ private restartGrid;
2210
+ private ungrid;
2211
+ private newGrid;
2212
+ private regridIfResized;
2213
+ private boxOf;
2214
+ /** Have these nodes merged again in the next commit, without asking the host for one. */
2215
+ private touch;
2216
+ /**
2217
+ * Lay out every grid that changed, or whose box did: read sizes from the commit just made,
2218
+ * and commit again with each item placed. An inner grid is laid out once the outer one has
2219
+ * given it a width, and the outer one again once the inner one has a height, so this repeats
2220
+ * until nothing moves. All of it is in one task, so only the last commit is drawn.
2221
+ */
2222
+ private settleGrids;
2223
+ private gridIsStale;
2224
+ /**
2225
+ * Whether a grid is another width than it was laid out at. Native answers in floats, and a
2226
+ * box at a third of a point across is a hair off the width it was given.
2227
+ */
2228
+ private gridResized;
2229
+ /** Those of some grids that are in another of them, or have another of them inside. */
2230
+ private gridsNested;
2231
+ /** Commit grids as stacks of their items, to read what each item holds: one commit for all. */
2232
+ private measureGrids;
2233
+ private settleGrid;
2234
+ /** Note where a grid's layout puts it and its items, and answer how tall it came to. */
2235
+ private placeGrid;
2236
+ /** What a grid is laid out from, read from its style and from the commit that measured it. */
2237
+ private gridRun;
2238
+ /**
2239
+ * A grid laid out in the width it has: its rows as tall as they come to, or held to its own
2240
+ * least and most, or laid out in the row of the grid it is in where that stretches it. `rows`
2241
+ * is set to what they came to, before any stretch.
2242
+ */
2243
+ private gridRows;
2244
+ /**
2245
+ * The width a grid gives itself, or nothing where something else gives it one. It was
2246
+ * measured as a stack of its items at their content's width: wider than the widest of them,
2247
+ * something gave it that width, and it is kept. As wide as the widest and no wider, nothing
2248
+ * did, and it is as wide as its tracks come to, up to the width of what holds it, and within
2249
+ * its own least and most.
2250
+ */
2251
+ private gridWidth;
2252
+ /** The width inside a box's padding and border, which is the most a child of it is given. */
2253
+ private roomIn;
2254
+ private unsettleAbove;
2255
+ /**
2256
+ * The grid laid out, with each height it asks for read from a commit of those items at that
2257
+ * width: a row is as tall as its items are at their columns' widths, which only laying them
2258
+ * out there says.
2259
+ */
2260
+ private gridWithHeights;
2261
+ /**
2262
+ * Commit the items a layout asked the height of, each at the width it asked at, and read them.
2263
+ * Baselines are read from a row of every item, lined up by them: see `gridContainer`. Each is
2264
+ * counted from that row's baseline, so all that were asked for are read from the one row, and
2265
+ * none is kept from a row before it.
2266
+ */
2267
+ private readSizes;
2268
+ /** The grid whose items' text is committed one word to a line, while their words are read. */
2269
+ private wordsOf;
2270
+ /**
2271
+ * Read how narrow each item's content goes, which Yoga has no way to say: commit the grid's
2272
+ * text one word to a line, with each item at its content's width, and the widest line is the
2273
+ * longest word. A box inside that has a width of its own keeps it, as it would in a browser.
2274
+ */
2275
+ private readNarrow;
2276
+ /** One run of the grid layout, noting in `widths` each height it wanted and nothing has read. */
2277
+ private layOutGrid;
2278
+ /** What the root is committed with: the app's top views, or the strict view around them. */
2279
+ private rootHandles;
2280
+ /** The `LayoutConformance` view the app is committed in. See `EngineOptions`. */
2281
+ private strictView;
2282
+ private strictChildren;
2283
+ /** The app's top views inside the strict view: the same view each commit, with these in it. */
2284
+ private inStrictView;
1193
2285
  /** Anchors take part in sibling ordering but never reach Fabric. */
1194
2286
  private visibleChildren;
1195
2287
  /**
@@ -1205,7 +2297,101 @@ export declare class Engine implements HostEngine {
1205
2297
  */
1206
2298
  /** What a touch on an element that keeps a drag holds off, while it lasts: see `holdSwipe`. */
1207
2299
  private heldFor;
2300
+ /**
2301
+ * Exempt from the complexity limit deliberately, as `matchesCompound` is: a flat sequence of
2302
+ * steps, each guarded by what it reads, run for every node merged. Moving the guards into calls
2303
+ * of their own measured slower in `pnpm bench` and `pnpm bench:tailwind`.
2304
+ */
1208
2305
  private mergeProps;
2306
+ /** A run of text as it is committed: a word to a line while how narrow it goes is read. */
2307
+ private textProps;
2308
+ /** A node's part in a block's flow, where a layout of CSS's has been asked for. */
2309
+ private flowed;
2310
+ /** What the engine lays out in Yoga's place, of what has been asked for: see `asked`. */
2311
+ private laidOut;
2312
+ /** What a node's rules give it: for a generated box with no content, nothing but `display: none`. */
2313
+ private ruleStyle;
2314
+ /** Each node's layout styles while one container is planned, so each is merged once. */
2315
+ private readonly flowStyles;
2316
+ /** A node's own layout styles, in the order `mergeProps` applies them. */
2317
+ private flowStyle;
2318
+ /** The engine's nodes as `planFlow` reads them. A run of text is a box with no style. */
2319
+ private readonly flowTree;
2320
+ /**
2321
+ * Whether a node is a block container, or was one when it was last planned. A text element
2322
+ * lays out text, not boxes: it has no flow to plan, whatever its display.
2323
+ */
2324
+ private flows;
2325
+ /**
2326
+ * Plan a block container's flow again, and have merged again each child the plan lays out
2327
+ * differently: one whose collapsed margins moved, one that joined the flow or left it. A child
2328
+ * is planned from its siblings, so nothing about it need have changed for this to change.
2329
+ */
2330
+ private reflow;
2331
+ /**
2332
+ * Work out the room each line needs under its baseline, and how far over the bottom of it
2333
+ * each box on it sits, and have merged again the container and each box where that changed:
2334
+ * every one of them is placed by it. See `liftLines`.
2335
+ */
2336
+ private hang;
2337
+ /**
2338
+ * A browser sits each box on a line by its baseline, and the line has its strut's room under
2339
+ * the baseline at least. The engine sits the boxes on the bottom of a row instead, so each is
2340
+ * given a margin under it: the room under the line's baseline, the most any box or the strut
2341
+ * needs, less the room under the box's own. An empty box's baseline is its bottom edge, and a
2342
+ * box of text or of lines has its last line's under it, with its padding and border.
2343
+ *
2344
+ * ponytail: read from the sheets and the props, where a library's struts are. A shift bound on
2345
+ * an element is not seen here until the inline form compiles to one.
2346
+ */
2347
+ private liftLines;
2348
+ /**
2349
+ * The room over a line's baseline, as its boxes keep it: a box whose height is known is moved
2350
+ * down by a top margin to reach as high as the strut does, so the line is as tall over its
2351
+ * baseline as a browser has it without a least height of the row it is in. That holds a line
2352
+ * in a box with a height of its own, which the row's least height cannot, and lets a line
2353
+ * taller than the box it is in reach down out of it, where the row's lines on its bottom
2354
+ * would reach up.
2355
+ */
2356
+ private riseLines;
2357
+ /**
2358
+ * How high over the baseline an empty box on a line reaches, with its margins, where that
2359
+ * is known before layout: a height in points, or a share of a box of lines held at its
2360
+ * content's height, and its padding and border. Nothing for a box aligned another way.
2361
+ */
2362
+ private knownAbove;
2363
+ /** Whether `vertical-align` sets a box to the top, the middle or the bottom of its line. */
2364
+ private alignedOnLine;
2365
+ /** The boxes in a block's lines: those in its flow, a run of text among them. */
2366
+ private onLines;
2367
+ /**
2368
+ * How far under a line's baseline a box on it reaches: a run of text, of the line's font, as
2369
+ * far as the strut's room, `below`. See `liftLines`.
2370
+ */
2371
+ private depthOnLine;
2372
+ /** An inline-flex or inline-grid box with nothing in it: its baseline is its border box's bottom. */
2373
+ private emptyFlexOnALine;
2374
+ /**
2375
+ * The room under a box's own baseline, inside its margin: none where it has no line in it,
2376
+ * or clips what it holds, and its last line's room and its padding and border where it has.
2377
+ *
2378
+ * ponytail: a box of blocks with text in them is taken to end on a line of its own font.
2379
+ */
2380
+ private ownUnder;
2381
+ /**
2382
+ * How far under the baseline of its first line a box with a height in points reaches.
2383
+ *
2384
+ * ponytail: one line of its own font, as an input or a badge has. A box of a set height with
2385
+ * lines of words in it ends lower; count the lines if one is seen.
2386
+ */
2387
+ private belowFirstLine;
2388
+ /** Whether a block container holds lines: something in its flow, and nothing a block. */
2389
+ private holdsLines;
2390
+ /** The room under the baseline of a box's lines, as `liftLines` works it out for it. */
2391
+ private lineUnder;
2392
+ /** The room under the baseline of a node's strut, as native scales its text. */
2393
+ private strutBelow;
2394
+ private planFlow;
1209
2395
  /**
1210
2396
  * The z-index a view is drawn at for the boxes in it: the highest of theirs. A browser draws a
1211
2397
  * box with a z-index over what follows the boxes it is in, and a native view is ordered among
@@ -1393,19 +2579,6 @@ export declare class Engine implements HostEngine {
1393
2579
  * drawn where the animation left it until then.
1394
2580
  */
1395
2581
  private endedNatively;
1396
- /** A graph of native's was connected to a view: see `Touched`. */
1397
- private touchedNatively;
1398
- /**
1399
- * Set on native a change of a prop a graph of native's has set on the view before, while no
1400
- * graph of its holds it: the commit cannot change it (see `Touched`). The payload is committed
1401
- * as well, so the shadow node is as the view is drawn. A transform native cannot take as
1402
- * numbers, a matrix, is left committed alone.
1403
- */
1404
- private setOwned;
1405
- /** The size a view is laid out at, where it has been. */
1406
- private boxSize;
1407
- /** Forget the props native set on a node's view, which is gone or made again. */
1408
- private disown;
1409
2582
  /** Take an animation back from native, which stops it there. The caller plays it on, or not. */
1410
2583
  private stopNative;
1411
2584
  /**
@@ -1489,21 +2662,6 @@ export declare class Engine implements HostEngine {
1489
2662
  * that waits. Native has a colour node for the first; give the driver a channel for it.
1490
2663
  */
1491
2664
  private easeNatively;
1492
- /** The root's children as the views they are committed as, each reconciled. */
1493
- private rootHandles;
1494
- /** The transitions this commit lays out where they end, for native to move the views to. */
1495
- private laying;
1496
- /** Whether this commit resizes or moves a box that is in no such transition. */
1497
- private movesOthers;
1498
- /**
1499
- * Commit where it ends each transition of a size or a place that just started, for native to
1500
- * move the view there: a layout animation, which the commit asks for once it is known that
1501
- * nothing else in it moves. One still on its way is committed where it ends too. On a host
1502
- * with no layout animation they are eased from JavaScript, but for one sent on again and again.
1503
- *
1504
- * A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.
1505
- */
1506
- private layEased;
1507
2665
  /** When each size in transition was last started, and how many starts in a row came soon. */
1508
2666
  private readonly laidStarts;
1509
2667
  /**
@@ -1528,6 +2686,26 @@ export declare class Engine implements HostEngine {
1528
2686
  private playLaidHere;
1529
2687
  /** An animation native laid out has had its time: it is at its last frame, and says so. */
1530
2688
  private endLaidPlayed;
2689
+ /** The transitions this commit lays out where they end, for native to move the views to. */
2690
+ private laying;
2691
+ /** Whether this commit resizes or moves a box that is in no such transition. */
2692
+ private movesOthers;
2693
+ /**
2694
+ * Whether the boxes a commit moves or resizes are noted: for what the engine lays out in
2695
+ * Yoga's place, which is laid out again around them, and for a transition native lays out,
2696
+ * which is eased from JavaScript where anything else moves. An app with neither has no use
2697
+ * for the note. Kept by `want`, as what is asked grows.
2698
+ */
2699
+ private notesMoves;
2700
+ /**
2701
+ * Commit where it ends each transition of a size or a place that just started, for native to
2702
+ * move the view there: a layout animation, which the commit asks for once it is known that
2703
+ * nothing else in it moves. One still on its way is committed where it ends too. On a host
2704
+ * with no layout animation they are eased from JavaScript, but for one sent on again and again.
2705
+ *
2706
+ * A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.
2707
+ */
2708
+ private layEased;
1531
2709
  /**
1532
2710
  * Before a commit is handed over: ask native to move what it lays out, and take back to
1533
2711
  * ease from JavaScript whatever it cannot: all of it where the commit moves anything else,
@@ -1537,11 +2715,6 @@ export declare class Engine implements HostEngine {
1537
2715
  private layOut;
1538
2716
  /** Ask native to move what the commit lays out over `duration`, and end each when it is up. */
1539
2717
  private askLayout;
1540
- /**
1541
- * Note a commit that resizes or moves a box in no transition native lays out: a prop of one
1542
- * that moves boxes, children that came or went, text longer or shorter than it was.
1543
- */
1544
- private noteMoved;
1545
2718
  /** A transition native laid out has had its time: it is where it ends, and says so. */
1546
2719
  private endLaid;
1547
2720
  /**
@@ -1567,6 +2740,19 @@ export declare class Engine implements HostEngine {
1567
2740
  private takeBackEased;
1568
2741
  /** Stop a clock native runs, and go on from JavaScript with each transition it was playing. */
1569
2742
  private backToScriptEased;
2743
+ /** A graph of native's was connected to a view: see `Touched`. */
2744
+ private touchedNatively;
2745
+ /**
2746
+ * Set on native a change of a prop a graph of native's has set on the view before, while no
2747
+ * graph of its holds it: the commit cannot change it (see `Touched`). The payload is committed
2748
+ * as well, so the shadow node is as the view is drawn. A transform native cannot take as
2749
+ * numbers, a matrix in depth, is left committed alone.
2750
+ */
2751
+ private setOwned;
2752
+ /** The size a view is laid out at, where it has been. */
2753
+ private boxSize;
2754
+ /** Forget the props native set on a node's view, which is gone or made again. */
2755
+ private disown;
1570
2756
  /** Let go of what native is easing on an element that is going, or gone. */
1571
2757
  private stopEased;
1572
2758
  /**
@@ -1647,6 +2833,30 @@ export declare class Engine implements HostEngine {
1647
2833
  private processGradients;
1648
2834
  private clearFlags;
1649
2835
  private reconcile;
2836
+ /**
2837
+ * Note a commit that resizes or moves a box in no transition native lays out: a prop of one
2838
+ * that moves boxes, children that came or went, text longer or shorter than it was.
2839
+ */
2840
+ private noteMoved;
2841
+ /** Note a clone that moves or resizes a box, where moves are noted: see `notesMoves`. */
2842
+ private noteClone;
2843
+ /** Where a box is noted that holds this many more children or letters: none is another change. */
2844
+ private movedOrGrown;
2845
+ /**
2846
+ * Whether an element said to scroll its overflow is to: its style says `auto` or `scroll`. Noted
2847
+ * on the node, for the view it is committed as, and answered.
2848
+ */
2849
+ private settleScrolling;
2850
+ /**
2851
+ * `reconcile` for an element that scrolls its overflow: a scroll view, and in it the one view
2852
+ * its children are in. Each is created once and cloned for what changed of its own: the
2853
+ * content for the children and for how they are laid out, the scroll view for its box and
2854
+ * for a content that was cloned.
2855
+ */
2856
+ private reconcileScroller;
2857
+ /** A view cloned for the props and the children that changed, or itself where neither did. */
2858
+ private clonedFor;
2859
+ private createScroller;
1650
2860
  /** What a clone sends: the props that changed, and a text input's font once it registered. */
1651
2861
  private propsPayload;
1652
2862
  /**
@@ -1667,6 +2877,48 @@ export declare class Engine implements HostEngine {
1667
2877
  * which, per child, was most of what a one-row update cost.
1668
2878
  */
1669
2879
  private reconcileChildren;
2880
+ /** `reconcileChildren` for a block: its children, with each run of boxes in its line box. */
2881
+ private reconcileInFlow;
2882
+ /**
2883
+ * A run of text beside a box in a line: its words are each a view, which are added to
2884
+ * `handles` here, and it has no one view to answer with.
2885
+ */
2886
+ private reconcileWordsInto;
2887
+ /** One child's view under `node`, or nothing for a child that has none there. */
2888
+ private reconcileChild;
2889
+ /**
2890
+ * A block's children with each run of inline-level boxes in its line box: the view is where
2891
+ * the first box of the run was, and holds the run. The same view is committed while its boxes
2892
+ * and the margin over it are the same, so a commit that changes neither sends nothing for it.
2893
+ */
2894
+ private inLines;
2895
+ private lineBox;
2896
+ /**
2897
+ * Where `text-align` puts the boxes of a line in `container`, as the row the line is places
2898
+ * its items: a browser sets inline-level boxes where it would set the line's words. Nothing
2899
+ * at the start, which is where a row has them.
2900
+ *
2901
+ * ponytail: `end` and `right` are both the row's end, which is the left in a right-to-left
2902
+ * layout: right for `end` and wrong for `right`. Read the direction if that is ever seen.
2903
+ */
2904
+ private alongLine;
2905
+ /**
2906
+ * A box's part in that: the container of lines and nothing else is the row itself. A line
2907
+ * among blocks is a line box, which `lineBox` sets its boxes along.
2908
+ */
2909
+ private alignLine;
2910
+ /**
2911
+ * The line box `first` starts in `container`: the one it has, or a new one with no view yet.
2912
+ * A line box is a view of its container's, so in another container it is another one, and so
2913
+ * is the one of a first box that has been made again.
2914
+ */
2915
+ private lineOf;
2916
+ /**
2917
+ * A flex container's children in the order their `order` gives, as written among equals. A
2918
+ * block lays its children out as written whatever they say, and text in the container has no
2919
+ * order of its own.
2920
+ */
2921
+ private inOrder;
1670
2922
  /**
1671
2923
  * The paragraph a run of text written straight into a view is drawn in, or nothing for a run of
1672
2924
  * whitespace, which a browser draws nothing for between the items of a flex box either.
@@ -1680,6 +2932,17 @@ export declare class Engine implements HostEngine {
1680
2932
  * prop (see `ViewNameOptions`) or the run is whitespace between a view's children.
1681
2933
  */
1682
2934
  private reconcileText;
2935
+ /**
2936
+ * A run of text beside a box in a line, as the paragraphs of its words: a browser breaks the
2937
+ * line between any two of them, and what follows the run is where its last word ends. One
2938
+ * paragraph is a box as wide as its longest line, with the next box under all of it.
2939
+ */
2940
+ private reconcileWords;
2941
+ /** The paragraph of each word of a run, kept for the word in its place while there is one. */
2942
+ private wordBoxes;
2943
+ private wordBox;
2944
+ /** The box a run of loose text is drawn by: the one it has, or one made for the element. */
2945
+ private boxFor;
1683
2946
  private looseText;
1684
2947
  /** Remember an iOS modal host committed as showing, so hiding it waits for `topDismiss`. */
1685
2948
  private notePresented;
@@ -1707,6 +2970,19 @@ export declare class Engine implements HostEngine {
1707
2970
  * is: what its views held of their own, a scroll offset, is not kept.
1708
2971
  */
1709
2972
  private undisplayed;
2973
+ /**
2974
+ * Whether a generated box is one no rule draws, which has no view. A view that is not
2975
+ * displayed would do for what is seen, but Yoga marks one as laid out each time it measures
2976
+ * what holds it, as `undisplayed` says. An element holds two of these for every rule that could
2977
+ * draw it one.
2978
+ */
2979
+ private undrawn;
2980
+ /**
2981
+ * The words a generated box's `content` writes, as the text the box holds: a label a library
2982
+ * hangs on an element by its `::before`. Read as the box is about to be committed, which is
2983
+ * when its rules are known, and before what it holds is.
2984
+ */
2985
+ private writeContent;
1710
2986
  /**
1711
2987
  * Whether a node hoisted into `target` is not displayed where it was written: it, or a box
1712
2988
  * between it and the child of `target` it was written in. That child is asked before this is.
@@ -1718,6 +2994,11 @@ export declare class Engine implements HostEngine {
1718
2994
  * keeps for hoisted nodes that are gone.
1719
2995
  */
1720
2996
  private reconcileHoistTarget;
2997
+ /**
2998
+ * What a hoist target takes of a child written in it: the child's handle, `direct` for one
2999
+ * hoisted into it, which goes after its siblings, or null for none.
3000
+ */
3001
+ private takenByTarget;
1721
3002
  /**
1722
3003
  * `reconcileHoistTarget` for a node that commits only what is hoisted into it
1723
3004
  * (`HoistOptions.only`): those nodes, in the order they were written, and none of its own.
@@ -1744,6 +3025,8 @@ export declare class Engine implements HostEngine {
1744
3025
  * for hoisted names go too: they are children of the native view it is losing.
1745
3026
  */
1746
3027
  private forgetCommitted;
3028
+ /** The paragraphs a run of text is drawn in, let go with it: see `paragraphsOf`. */
3029
+ private forgetParagraphs;
1747
3030
  /** A hoisted node, which commits into an ancestor further up than the parent it is in. */
1748
3031
  private committedElsewhere;
1749
3032
  /**
@@ -1757,14 +3040,9 @@ export declare class Engine implements HostEngine {
1757
3040
  */
1758
3041
  private standIn;
1759
3042
  /**
1760
- * What a hoist target takes of a child written in it: the child's handle, `direct` for one
1761
- * hoisted into it, which goes after its siblings, or null for none.
1762
- */
1763
- private takenByTarget;
1764
- /**
1765
- * A clean element's handle under `parent`, before anything else is asked of it: one committed
1766
- * there and unchanged since was displayed and in its place, and is still. The siblings of what
1767
- * changed are most of what a commit steps over: a list one row of which ticks.
3043
+ * A clean child's handle under `parent`, before anything else is asked of it: one committed
3044
+ * there and unchanged since was displayed, in its place, and is still. The siblings of what
3045
+ * changed are most of what a commit steps over: a page of examples one of which ticks.
1768
3046
  */
1769
3047
  private cleanUnder;
1770
3048
  /** A clean child's committed handle, when its style still holds under its parent's. */
@@ -1860,6 +3138,28 @@ export declare class Engine implements HostEngine {
1860
3138
  * nothing to receive it and the call is dropped.
1861
3139
  */
1862
3140
  dispatchCommand(node: EngineNode, name: string, args?: readonly unknown[]): void;
3141
+ /**
3142
+ * Where a node is, in window coordinates.
3143
+ *
3144
+ * `(layout)` reports a frame in the parent's coordinates, which sizes a view and says nothing
3145
+ * about where it is relative to anything else. This is what an anchored overlay needs: a
3146
+ * popover and its trigger live in different parts of the tree and can only be compared in the
3147
+ * window's frame.
3148
+ *
3149
+ * The callback is the platform's own shape rather than a promise, and on the new architecture
3150
+ * it fires before this returns - so a caller that needs the value immediately can capture it,
3151
+ * and one that does not is unaffected if that ever changes.
3152
+ *
3153
+ * Silent when the node has never been committed, or when the host has no `measureInWindow`.
3154
+ * Reporting zeroes would be worse than reporting nothing: a zero frame is a position, and an
3155
+ * overlay would believe it and place itself in the corner.
3156
+ */
3157
+ /**
3158
+ * A node's box as it is laid out, with no transform on it or above it: nothing where it has
3159
+ * not been committed, or on a host that cannot say. `measure` answers where it is drawn,
3160
+ * which is smaller for a panel scaling in.
3161
+ */
3162
+ layoutOf(node: EngineNode): WindowFrame | undefined;
1863
3163
  /**
1864
3164
  * Where a node is, in window coordinates.
1865
3165
  *
@@ -1877,6 +3177,8 @@ export declare class Engine implements HostEngine {
1877
3177
  * overlay would believe it and place itself in the corner.
1878
3178
  */
1879
3179
  measure(node: EngineNode, into: (frame: WindowFrame) => void): void;
3180
+ /** `measure` for a committed view by its handle, which a node's own may not be. */
3181
+ private measureHandle;
1880
3182
  /**
1881
3183
  * The react tag a node was committed with, or null if it has never reached a commit.
1882
3184
  *
@@ -1974,6 +3276,21 @@ export declare class Engine implements HostEngine {
1974
3276
  * bubble for the rest, as in the DOM.
1975
3277
  */
1976
3278
  dispatchEvent(instanceHandle: unknown, topLevelType: string, nativeEvent: unknown): void;
3279
+ /**
3280
+ * Where a touch is taken to be, by a package that finds it better than native's hit test: a
3281
+ * drawing's shape a browser finds by its box, where native finds none. Asked as a touch
3282
+ * starts, and kept for each finger until it lifts, as a touch stays on what it started on.
3283
+ */
3284
+ private retarget;
3285
+ private readonly fingersOn;
3286
+ /**
3287
+ * The target a touch is dispatched to, where a package's retarget runs: nothing it throws may
3288
+ * reach native, so a throw is reported and the touch goes to native's own target.
3289
+ */
3290
+ private guardedTarget;
3291
+ /** Say where a touch that starts on a node is taken to be, or nothing to leave it to native. */
3292
+ setTouchTarget(retarget: ((target: EngineNode, nativeEvent: unknown) => EngineNode) | null): void;
3293
+ private touchTarget;
1977
3294
  /** The screen whose swipe back is held off while a finger is on what keeps a sideways drag. */
1978
3295
  private swipeHeld;
1979
3296
  /**
@@ -1992,12 +3309,22 @@ export declare class Engine implements HostEngine {
1992
3309
  */
1993
3310
  private drag;
1994
3311
  private holdFrom;
1995
- /** The scroll view whose scrolling is off while a drag over it is an element's own. */
1996
- private scrollHeld;
3312
+ /** The scroll views whose scrolling is off while a drag over them is an element's own. */
3313
+ private readonly scrollHeld;
3314
+ /** Whether a package has kept the drag now under way from the page: see `keepDrag`. */
3315
+ private dragKept;
3316
+ /**
3317
+ * Keep the drag now under way from the page, as a browser does for a `touchmove` a listener
3318
+ * prevented the default of: the scroll view the node is in stops scrolling, and native is told
3319
+ * that whoever holds the touch keeps it, until the last finger lifts. Told from a move, a
3320
+ * frame or so after native saw it, so a scroll that had already begun stops where it is.
3321
+ */
3322
+ keepDrag(node: EngineNode): void;
1997
3323
  /**
1998
- * Stop the scroll view a node is in from scrolling, until the touch ends. Telling native who
1999
- * holds the touch does this on Android. On iOS a scroll view is held off only by a responder
2000
- * that is over it, never one inside it, so it is told not to scroll.
3324
+ * Stop every scroll view a node is in from scrolling, until the touch ends: one held off hands
3325
+ * the drag to the one around it. Telling native who holds the touch does this on Android. On
3326
+ * iOS a scroll view is held off only by a responder that is over it, never one inside it, so
3327
+ * each is told not to scroll.
2001
3328
  */
2002
3329
  private holdScroll;
2003
3330
  /** Settle which way a drag set off, and hold native's own off one that set off across. */
@@ -2047,11 +3374,11 @@ export declare class Engine implements HostEngine {
2047
3374
  * `children` is null when the child list is unchanged, in which case Fabric keeps the previous
2048
3375
  * revision's children and there is nothing to append.
2049
3376
  *
2050
- * Otherwise this clones the way React does: the no-children form, then `appendChild` per child.
2051
- * Omitting the child list gives the clone *empty* children, not the old ones, and whether a
2052
- * binding takes that argument cannot be feature-detected - `UIManagerBinding.cpp` registers
2053
- * both clone methods with a fixed `paramCount` and argument validation is commented out - so
2054
- * `fn.length` says nothing. One code path, no detection.
3377
+ * Otherwise the clone is handed its children in the one call, as an array: a call into native
3378
+ * for each of them is most of what cloning a box of hundreds costs, and each box over a change
3379
+ * is cloned on every commit. React Native's binding (`UIManagerBinding.cpp`, the one on iOS
3380
+ * and Android) reads an array there in every version the packages support, and takes it as the
3381
+ * second argument of three where there are props as well.
2055
3382
  */
2056
3383
  private clone;
2057
3384
  private detach;