@ng-native/fabric 0.16.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/css.d.ts +141 -18
- package/dist/css.js +793 -111
- package/dist/css.js.map +1 -1
- package/dist/defer-triggers.js +4 -4
- package/dist/defer-triggers.js.map +1 -1
- package/dist/engine.d.ts +1408 -81
- package/dist/engine.js +9341 -2831
- package/dist/engine.js.map +1 -1
- package/dist/fabric.d.ts +1 -1
- package/dist/fabric.js +1 -0
- package/dist/fabric.js.map +1 -1
- package/dist/flow.d.ts +78 -0
- package/dist/flow.js +270 -0
- package/dist/flow.js.map +1 -0
- package/dist/grid.d.ts +73 -0
- package/dist/grid.js +934 -0
- package/dist/grid.js.map +1 -0
- package/dist/host.d.ts +11 -5
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/native-drive.d.ts +29 -2
- package/dist/native-drive.js +91 -36
- package/dist/native-drive.js.map +1 -1
- package/dist/next-frame.d.ts +2 -0
- package/dist/next-frame.js +10 -0
- package/dist/next-frame.js.map +1 -0
- package/dist/scroll-animation.d.ts +4 -3
- package/dist/scroll-animation.js +64 -4
- package/dist/scroll-animation.js.map +1 -1
- package/package.json +1 -1
package/dist/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,YAAY,GAUb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO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C,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACrE,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,MAAM,CAAC,KAAiB;QAC9B,IAAI,KAAK,CAAC,MAAM;YAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,IAAgB;IACnC,IAAI,CAAC,IAAI,CAAC,YAAY;QAAE,OAAO;IAC/B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC1B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;QAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/**\n * Framework-agnostic retained tree + incremental Fabric commit.\n * Nothing Angular-specific may enter this file; lint bans the import (see docs/ARCHITECTURE.md).\n *\n * Angular mutates; Fabric is persistent. A committed node is never mutated, it is cloned with\n * new props and/or a new child set. Cloning a leaf therefore forces every ancestor to re-clone,\n * because a persistent parent holds references to specific child handles. That bubble is\n * inherent and is what React's own Fabric renderer does.\n */\n\nimport {\n boundDeclaration,\n boundRelativeLength,\n CSS_SPACE,\n isNegativeLineHeight,\n faded,\n fills,\n inlineInherited,\n setsInherited,\n StyleResolver,\n usesActive,\n elementsAtEnd,\n hasAbove,\n joinSubjects,\n placeReadElsewhere,\n siblingReach,\n type Compound,\n type HasAbove,\n type PlaceReader,\n type Conditions,\n type DeferredDeclaration,\n type StyleCache,\n type StyleSheet,\n type Subjects,\n type TokenValue,\n} from './css.ts';\nimport { applyAria } from './aria-props.ts';\nimport { STYLED_ELEMENTS } from './element-styles.ts';\nimport {\n aimsElsewhere,\n animationEvent,\n bezier,\n interpolate,\n readsInheritedColour,\n sample,\n step,\n steppedKeys,\n tracksOf,\n type AnimationSpec,\n type EasedNatively,\n type Keyframe,\n type RunningAnimation,\n type TrackPoint,\n type Transition,\n type TransitionSpec,\n} from './transition.ts';\nimport { isFormsInput } from './forms-inputs.ts';\nimport { transformList } from './inline-transform.ts';\nimport { tokenFromValue } from './inline-token.ts';\nimport {\n NativeScrollDriver,\n scrollFeed,\n type DrivenProperty,\n type EventFeed,\n type NativeAnimated,\n type ScrollAxis,\n type ScrollDrive,\n type ScrollRange,\n type SetValues,\n type StaticTransform,\n} from './native-drive.ts';\nimport type { DrivenChannels } from './scroll-animation.ts';\n\nexport type FabricNode = { readonly __fabricNode: unique symbol } | object;\n\n/** Where a node is, in the window's coordinates. What `Engine.measure` reports. */\nimport type { HostEngine, HostNode, Settling } from './host.ts';\nimport {\n clockChannels,\n colourChannels,\n firstFrame,\n heldTransform,\n movesByShare,\n rangeOf,\n scrollChannels,\n sharesAsPoints,\n} from './scroll-animation.ts';\nimport { FontFaces } from './font-faces.ts';\nimport { premultipliedStops } from './premultiplied-stops.ts';\n\n/**\n * The animation a node's style asks for, with a play state from a rule of its own applied. Both\n * are instructions for this engine and nothing native has heard of them, so they come out of the\n * props; only when there, because a `delete` sends an object to Hermes's slow dictionary layout,\n * and this runs for every node that commits.\n */\nfunction animationOf(props: Record<string, unknown>): AnimationSpec | undefined {\n let spec = props['$animation'] as AnimationSpec | undefined;\n if (spec !== undefined) delete props['$animation'];\n for (const [key, field] of ANIMATION_ENTRIES) {\n if (!(key in props)) continue;\n const value = props[key];\n delete props[key];\n if (spec && value !== null) spec = { ...spec, ...animationPart(field, value) };\n }\n return spec;\n}\n\nconst ANIMATION_PARTS = {\n $animationDuration: 'duration',\n $animationDelay: 'delay',\n $animationEasing: 'easing',\n $animationIterations: 'iterations',\n $animationDirection: 'direction',\n $animationFill: 'fill',\n $playState: 'paused',\n} as const;\n/** Listed once: `animationOf` reads them for every node that commits. */\nconst ANIMATION_ENTRIES = Object.entries(ANIMATION_PARTS);\n\nfunction animationPart(\n field: (typeof ANIMATION_PARTS)[keyof typeof ANIMATION_PARTS],\n value: unknown,\n): Partial<AnimationSpec> {\n switch (field) {\n case 'iterations':\n return { iterations: value === 'infinite' ? null : (value as number) };\n case 'direction':\n return {\n direction: value === 'normal' ? undefined : (value as AnimationSpec['direction']),\n };\n case 'paused':\n return { paused: value === 'paused' ? true : undefined };\n default:\n return { [field]: value };\n }\n}\n\n/**\n * Whether two specs ask for the same animation. By what they say rather than which object they\n * are: a spec with a token in its timing is settled afresh each time the node's style is, and an\n * animation that started again on every such commit would never get past its first frame.\n */\nfunction sameAnimation(a: AnimationSpec, b: AnimationSpec): boolean {\n if (a === b) return true;\n return (\n SPEC_FIELDS.every((field) => a[field] === b[field]) &&\n a.easing.join() === b.easing.join() &&\n a.range?.start === b.range?.start &&\n a.range?.end === b.range?.end\n );\n}\n\nconst SPEC_FIELDS = [\n 'name',\n 'duration',\n 'delay',\n 'iterations',\n 'fill',\n 'direction',\n 'timeline',\n] as const satisfies readonly (keyof AnimationSpec)[];\n\n/** A node's scroll-driven animation: what it plays, what drives it, and the frame it commits. */\ninterface ScrollAnimation {\n readonly spec: AnimationSpec;\n /** The `@keyframes` it was laid out from, so a hot swap that edits them lays it out again. */\n readonly frames: readonly Keyframe[];\n readonly tracks: ReadonlyMap<string, readonly { offset: number; value: unknown }[]>;\n /** The properties among `tracks` declared `!important`, left where the rule puts them. */\n readonly pinned: readonly string[];\n readonly resting: Record<string, unknown>;\n readonly first: Record<string, unknown>;\n /** The colour the node inherits, which the tracks were built with, for frames that read it. */\n readonly inherited: unknown;\n readonly source: EngineNode | null;\n readonly drive: { update(channels: DrivenChannels): void; stop(): void } | null;\n}\n\nexport interface WindowFrame {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n}\nexport type FabricNodeSet = unknown;\n\n/** The slice of `global.nativeFabricUIManager` we actually use. */\nexport interface FabricUIManager {\n createNode(\n reactTag: number,\n viewName: string,\n rootTag: number,\n props: object,\n instanceHandle: unknown,\n ): FabricNode;\n /** Clone with the *given* children (omitting the argument means none) and the same props. */\n cloneNodeWithNewChildren(node: FabricNode): FabricNode;\n /** Clone with the given props and the *same* children. */\n cloneNodeWithNewProps(node: FabricNode, newProps: object): FabricNode;\n /** Clone with the given props and the given children (omitting them means none). */\n cloneNodeWithNewChildrenAndProps(node: FabricNode, newProps: object): FabricNode;\n appendChild(parent: FabricNode, child: FabricNode): FabricNode;\n /**\n * Have native move each view whose frame the next commit changes to where it ends up, over a\n * time and by one of its own curves, with no frame of it in JavaScript.\n */\n configureNextLayoutAnimation?(\n config: { duration: number; update: { type: string } },\n ended: () => void,\n failed: () => void,\n ): void;\n createChildSet(rootTag: number): FabricNodeSet;\n appendChildToSet(set: FabricNodeSet, child: FabricNode): void;\n completeRoot(rootTag: number, set: FabricNodeSet): void;\n registerEventHandler?(\n handler: (instanceHandle: unknown, topLevelType: string, nativeEvent: unknown) => void,\n ): void;\n /** Tells the native side that JS owns the gesture, and whether to stop its own. */\n setIsJSResponder?(node: FabricNode, isResponder: boolean, blockNativeResponder: boolean): void;\n /** A view command: `focus` on a text input, `scrollTo` on a scroll view. */\n dispatchCommand?(node: FabricNode, name: string, args: readonly unknown[]): void;\n /**\n * A node's frame in window coordinates, which is the only frame two nodes can be compared in.\n *\n * Optional because an older host may not have it, and because the callback is the platform's\n * own shape: on the new architecture it fires before this returns, which is what lets an\n * overlay place itself in the same frame it was opened in.\n */\n measureInWindow?(\n node: FabricNode,\n onSuccess: (x: number, y: number, width: number, height: number) => void,\n ): void;\n}\n\n/**\n * The scroll events that mean a finger is dragging the list rather than tapping something in it.\n *\n * `topScrollBeginDrag` is the precise one; `topScroll` is here because a scroll view configured\n * without drag events still reports movement, and a press surviving that is the bug either way.\n */\nconst SCROLL_CANCELS_PRESS = new Set(['topScroll', 'topScrollBeginDrag']);\n\n/**\n * RN's `directEventTypes`: delivered to the target only, never up the tree. Everything else\n * bubbles, which matches RN's `bubblingEventTypes` for the touch and input events that matter.\n * The web host's engine reads this set too, so both hosts deliver an event the same way.\n *\n * ponytail: a hand-kept set rather than real ViewConfigs. It is wrong only for a nested\n * scroll view, where an ancestor listening for the same direct event would not fire (correct)\n * but a third-party component's custom direct event would bubble (harmless in practice).\n * Swap it for per-component ViewConfig metadata if that ever matters.\n */\nexport const DIRECT_EVENTS: ReadonlySet<string> = new Set([\n 'topScroll',\n 'topScrollBeginDrag',\n 'topScrollEndDrag',\n 'topMomentumScrollBegin',\n 'topMomentumScrollEnd',\n 'topScrollToTop',\n 'topContentSizeChange',\n 'topLayout',\n 'topLoad',\n 'topLoadStart',\n 'topLoadEnd',\n 'topError',\n 'topProgress',\n 'topRefresh',\n 'topTextLayout',\n // react-native-screens. `topDismissed` is how a swipe-back or a native back button reaches\n // JS, and it must not bubble: the stack above would see its child's pop as its own.\n 'topDismissed',\n 'topNativeDismissCancelled',\n 'topWillAppear',\n 'topAppear',\n 'topWillDisappear',\n 'topDisappear',\n 'topHeaderHeightChange',\n 'topTransitionProgress',\n 'topFinishTransitioning',\n // The tabs host reports its own selection, and only the host it happened in wants to know.\n 'topTabSelected',\n // Safe-area insets, reported by the provider that measured them.\n 'topInsetsChange',\n]);\n\n/**\n * What a listener receives. RN's synthetic event carries more, but `nativeEvent` is the part\n * every RN API is documented against, and `stopPropagation` is the part a nested control needs.\n *\n * `stopPropagation` ends the walk to the root after the current node, as it does in the DOM and\n * on RN's `SyntheticEvent`: the other listeners on the node that called it still run. It does not\n * touch the responder negotiation, which has already finished by the time a listener sees the\n * event, so it cannot take a press away from a pressable; the negotiation already keeps an inner\n * pressable's press from reaching the one around it.\n */\nexport interface NativeSyntheticEvent<T = unknown> {\n readonly nativeEvent: T;\n /**\n * The node the event happened on, which a listener further up can compare with its own: RN's\n * `event.target`. Null where a host has no node to name.\n */\n readonly target?: unknown;\n stopPropagation(): void;\n isPropagationStopped(): boolean;\n}\n\n/**\n * The event object a dispatch hands every listener along the path. Exported so another host can\n * hand its listeners the same shape rather than a bare `{ nativeEvent }` that lacks the methods\n * the type promises.\n */\nexport class SyntheticEvent<T = unknown> implements NativeSyntheticEvent<T> {\n readonly nativeEvent: T;\n readonly target: unknown;\n private stopped = false;\n\n constructor(nativeEvent: T, target: unknown = null) {\n this.nativeEvent = nativeEvent;\n this.target = target;\n }\n\n stopPropagation(): void {\n this.stopped = true;\n }\n\n isPropagationStopped(): boolean {\n return this.stopped;\n }\n}\n\n/**\n * The JS responder system: RN's second touch layer, and the renderer's job rather than the app's.\n *\n * Fabric delivers raw touches to whichever node was hit. On top of that, React runs a negotiation\n * deciding *who owns the gesture*: a capture pass from the root down, then a bubble pass from the\n * target up, electing a single responder that alone receives grant/move/release/terminate. When\n * ownership changes the renderer tells native through `setIsJSResponder`, which is how a JS\n * control stops a native scroll view from also scrolling.\n *\n * All of RN's `Pressability` sits on this, never on raw touch events. Without it there is no way\n * for a button and an enclosing scroll view to agree on who owns a drag.\n */\n/**\n * What a touch event carries. The responder system is touch-only, so its handlers are typed\n * against this rather than `unknown`: every consumer wants the coordinates and would otherwise\n * cast to get at them.\n */\nexport interface TouchPayload {\n readonly pageX?: number;\n readonly pageY?: number;\n readonly locationX?: number;\n readonly locationY?: number;\n readonly identifier?: number;\n readonly target?: number;\n readonly timestamp?: number;\n}\n\nexport type ResponderEvent = NativeSyntheticEvent<TouchPayload>;\n\nexport interface ResponderHandlers {\n /** The `target` is the node the touch landed on, which a capturing ancestor may inspect. */\n onStartShouldSetResponderCapture?(event: ResponderEvent, target: EngineNode): boolean;\n onStartShouldSetResponder?(event: ResponderEvent, target: EngineNode): boolean;\n onMoveShouldSetResponderCapture?(event: ResponderEvent, target: EngineNode): boolean;\n onMoveShouldSetResponder?(event: ResponderEvent, target: EngineNode): boolean;\n onResponderGrant?(event: ResponderEvent): void;\n onResponderMove?(event: ResponderEvent): void;\n onResponderRelease?(event: ResponderEvent): void;\n onResponderTerminate?(event: ResponderEvent): void;\n /** Return false to keep the gesture when something else asks for it. Defaults to allowing. */\n onResponderTerminationRequest?(event: ResponderEvent): boolean;\n /** Ask native to stop its own gesture while we hold the responder (a slider inside a list). */\n blockNativeResponder?: boolean;\n}\n\n/**\n * Events the native side will not emit unless a **prop** opts in, separately from anyone\n * listening. `ShadowTree.cpp` guards the layout notification with `if (viewProps->onLayout)`,\n * so a view that never sets the prop is never measured, however many listeners it has.\n *\n * React gets this for free: attaching a handler puts `onLayout` in the props object. A renderer\n * that keeps listeners in its own registry has to set the prop deliberately, and the failure is\n * silent - the callback simply never runs.\n */\nconst EVENT_OPT_IN_PROPS: Record<string, string> = {\n topLayout: 'onLayout',\n /*\n * Hover, which exists on this platform after all.\n *\n * React Native implements the W3C pointer events, and on iPadOS a connected trackpad or mouse\n * produces them: `onPointerEnter` and `onPointerLeave` fire as the cursor crosses a view. A\n * phone never sends them, so this costs a phone two props and nothing else, and it is what\n * makes a hover style reachable on the one device that has a pointer.\n */\n topPointerEnter: 'onPointerEnter',\n topPointerLeave: 'onPointerLeave',\n};\n\n/**\n * The same opt-in, for events one view type guards with a prop of its own. Android's\n * `ReactImageView` emits no load events at all unless `shouldNotifyLoadEvents` is set, which\n * `Image.android.js` does whenever any load handler is attached. iOS ignores the prop.\n */\nconst VIEW_EVENT_OPT_IN_PROPS: Record<string, Record<string, string>> = {\n Image: {\n topLoadStart: 'shouldNotifyLoadEvents',\n topLoad: 'shouldNotifyLoadEvents',\n topLoadEnd: 'shouldNotifyLoadEvents',\n topError: 'shouldNotifyLoadEvents',\n topProgress: 'shouldNotifyLoadEvents',\n },\n // `ReactTextInputManager` watches each of these only behind a prop of the handler's name,\n // which `TextInput.js` sets by passing the handler through. iOS's field sends them unasked.\n AndroidTextInput: {\n topContentSizeChange: 'onContentSizeChange',\n topScroll: 'onScroll',\n topKeyPress: 'onKeyPress',\n },\n};\n\n/**\n * Props the engine itself writes or reads off a node, so never a misspelling: the style, the\n * event opt-ins, and the bookkeeping keys that never reach native. See `checkProps`.\n */\nconst ENGINE_PROPS = new Set<string>([\n 'style',\n 'collapsable',\n // Read by the cascade for `:disabled`, whether or not the native view takes it.\n 'disabled',\n 'intrinsicSize',\n 'styleOverride',\n ...Object.values(EVENT_OPT_IN_PROPS),\n ...Object.values(VIEW_EVENT_OPT_IN_PROPS).flatMap((props) => Object.values(props)),\n]);\n\n/** Touch events that drive the responder negotiation. */\nconst TOUCH_START = 'topTouchStart';\nconst TOUCH_MOVE = 'topTouchMove';\nconst TOUCH_END = 'topTouchEnd';\nconst TOUCH_CANCEL = 'topTouchCancel';\n\nexport type NodeKind = 'element' | 'text' | 'anchor';\n\n/** What Fabric currently holds for a node. `null` until the node has been committed once. */\ninterface Committed {\n handle: FabricNode;\n /**\n * The react tag this node was created with. Kept because the native animation driver addresses\n * a view by tag and has no other way to find one of ours: `findNodeHandle` returns a number it\n * is given unchanged, so a tag is all an animated graph needs to point here.\n */\n tag: number;\n props: Record<string, unknown>;\n /** The child handles this node was committed with, in order. */\n childHandles: FabricNode[];\n /** The native view it was created as, which a clone cannot change. */\n viewName: string;\n}\n\nexport interface EngineNode extends HostNode {\n readonly kind: NodeKind;\n /** Lowercase template spelling, e.g. `view`. Never the native view name. */\n readonly tag: string;\n /** `tag` again, for Angular 22.0, which reads it on a component's host element. */\n readonly tagName: string;\n props: Record<string, unknown>;\n text: string;\n children: EngineNode[];\n parent: EngineNode | null;\n listeners: Map<string, Set<(event: unknown) => void>> | null;\n\n /** CSS classes on this node, for selector matching. */\n classes: Set<string> | null;\n /** The compiled stylesheet of the component that created this node, if any. */\n sheet: StyleSheet | null;\n /** The sheet of the component this node hosts, if it hosts one. What `:host` matches against. */\n hostSheet: StyleSheet | null;\n /** Custom properties set on the node itself; see `StyleTarget.customProperties`. */\n customProperties: Record<string, TokenValue> | null;\n /** Resolved style, memoised across commits. Owned by the CSS resolver. */\n styleCache: StyleCache | null;\n /** Set when something that could change what this node matches has changed. */\n styleDirty: boolean;\n /** See `StyleTarget.ownDirty`. */\n ownDirty: boolean;\n /** See `StyleTarget.hasDirty`. */\n hasDirty: boolean;\n /** See `StyleTarget.stateDirty`. */\n stateDirty: boolean;\n /** A family left out while it loads. See `loadingFamilies`. */\n heldFamily?: string;\n /** See `StyleTarget.inlineInherits`. */\n inlineInherits?: boolean;\n /** See `StyleTarget.boundStyle`: the declarations, and the same by the property each sets. */\n boundStyle?: readonly DeferredDeclaration[] | null;\n boundByProp?: Map<string, DeferredDeclaration>;\n /**\n * Whether this node, or one inside it, takes touches under a `pointer-events: none` it would\n * otherwise inherit. Kept as each node is reconciled, children first. See `noteTouches`.\n */\n touchWithin?: boolean;\n /**\n * The paragraph the engine makes around a run of text written straight into a view. It is in no\n * template and in no node's `children`: it holds the text, and commits where the text would.\n */\n box?: EngineNode;\n /** A node the engine made, which no rule matches: it only inherits. */\n anonymous?: true;\n /** See `StyleTarget.styled`. */\n styled?: true;\n /** `:focus`, from the native focus and blur events. */\n focused?: boolean;\n /** `:active`, set on the responder and every ancestor of it. */\n active?: boolean;\n /**\n * The style object the platform adapter made for this node, and may therefore write into.\n *\n * Angular sets style properties one at a time, so building a fresh object per property means a\n * style of ten properties costs ten copies of a growing object, for every element that has one.\n * An object the adapter created is its to mutate; one that arrived any other way is copied,\n * once. A field rather than a `WeakSet` of such objects, which Hermes makes slow to consult.\n */\n ownStyle?: object;\n /** The resolved style this node was last committed with, for the skip check in `reconcile`. */\n styleCommitted: StyleCache | null;\n /**\n * How this node laid its children out when one of them last had a `fit-content` size, as\n * `containerOf` says it. Set by such a child, and compared on each reconcile so the children\n * are worked out again when the direction or alignment changes. Unset on every other node.\n */\n fitContainer?: string;\n /**\n * Whether this node had a height a percentage could be taken of, when a box beneath it with a\n * percentage height last asked, as `definiteHeight` says it. Compared on each reconcile so its\n * children are worked out again when it changes. Unset on every other node.\n */\n heightBasis?: boolean;\n /**\n * Per-property transition state, for every property this node has ever seen a `transition` for.\n * A finished entry stays, because its target is what the next change is measured against.\n */\n transitions?: Map<string, Transition>;\n /** The `@keyframes` animation this node is playing, if any. One at a time. */\n playing?: RunningAnimation;\n /** An animation played by a scroll view's offset rather than the clock. See `scrollAnimated`. */\n scrolled?: ScrollAnimation;\n /**\n * The props a native animated graph has set on the view with this tag, which no commit\n * changes again: see `Touched`. A view made again has another tag, and starts with none.\n */\n owned?: { readonly tag: number; readonly keys: Set<string> };\n /**\n * The last `transform` built from the individual transform properties, and what it was built\n * from. Reused while the parts are the same objects, so an unrelated change does not re-send it.\n */\n composedTransform?: { parts: readonly unknown[]; value: unknown[] };\n /** The commit that created this node's view, by its number: see `Engine.commitUnseen`. */\n bornIn?: number;\n /** The last bound `transform` string and the list it reads as, undefined where CSS cannot. */\n boundTransform?: { text: string; list: unknown[] | undefined };\n /**\n * Set by the component that owns this element. A host primitive that reaches a commit without it\n * was written in a template that never imported the component, which is reported in dev.\n */\n claimed?: true;\n /**\n * Set by the platform adapter when Angular mounts a component on this element. What makes an\n * `<x-card>` host legitimate where a `<veiw>` typo is not, since both are names no view table\n * knows. See `markComponentHost`.\n */\n componentHost?: true;\n /** See `keepNativeView`. */\n nativeView?: true;\n /** Props kept for selectors to match and left out of what is committed. See `keepAsAttribute`. */\n attributeOnly?: Set<string>;\n /**\n * Set by whoever needs to know which props have been written: each `setProp` with a value adds\n * its key, even one equal to the value already there, and one with `undefined` or `null` takes\n * it out. The native stack outlet tells a page's own binding from a value it carried this way.\n */\n writes?: Set<string>;\n /** The child this node's background is painted on instead of itself. See `paintOn`. */\n paintsOn?: EngineNode;\n /** What this node's background colour is handed to instead of painted. See `takePaint`. */\n paintTaker?: (color: unknown) => void;\n /** The background colour `paintTaker` was last handed, or is about to be. */\n paintTaken?: unknown;\n /**\n * Style weaker than every sheet, where no rule and no inline style says otherwise. What lets the\n * root component's host fill the surface by default and still give way to its own `:host`. See\n * `setDefaultStyle`.\n */\n defaultStyle?: Readonly<Record<string, unknown>>;\n\n /**\n * Hoisted nodes (`registerHoist`) inside this subtree while it is out of the tree, held here\n * rather than by the engine. See `Engine.releaseDetached`.\n */\n dormantHoists?: EngineNode[] | null;\n\n committed: Committed | null;\n /** The node this one was committed as a child of, which native holds it to for its life. */\n committedUnder: EngineNode | null;\n /** The hoisted views this node keeps committed for, by element name. See `HoistOptions`. */\n kept?: Map<string, KeptHoist>;\n /** On a text field, the row aligned by baseline that takes a baseline from it: `lineBaseline`. */\n onBaseline?: EngineNode;\n /** On such a row, the fields it has marked, which it unmarks when they are no longer its own. */\n baselineFields?: Set<EngineNode>;\n /** Commit this node again with its children so Fabric measures it again. `remeasureText`. */\n remeasure?: true;\n /** On a paragraph, whether its text was one word when it was last merged: `wholeWords`. */\n oneWord?: boolean;\n /** The z-index this view is drawn at for a box in it, where it has none: `Engine.raise`. */\n raised?: number;\n /**\n * A modal host committed as visible on iOS whose dismissal native has not yet reported. It\n * stays committed after `visible` goes false until `topDismiss`, as React Native's Modal.js\n * keeps it for the dismissal animation. See `Engine.withheld`.\n */\n presented?: true;\n /** This node's own props changed. */\n propsDirty: boolean;\n /** This node's child list changed. */\n structureDirty: boolean;\n /** Something below this node is dirty, so the walk must descend. */\n subtreeDirty: boolean;\n}\n\n/**\n * Canonical Fabric component names, taken from `RCTFabricComponentsPlugins.mm` and the C++\n * `ComponentName[]` declarations rather than guessed. Legacy `RCT`-prefixed names also work\n * today, but only through `componentNameByReactViewName`, a documented transition-period shim\n * that strips the prefix and maps `Text` to `Paragraph`.\n */\nconst VIEW_NAMES: Record<string, string | PlatformViewName> = {\n view: 'View',\n text: 'Paragraph',\n image: 'Image',\n 'scroll-view': 'ScrollView',\n 'safe-area-view': 'SafeAreaView',\n modal: 'ModalHostView',\n switch: 'Switch',\n 'text-input': 'TextInput',\n 'activity-indicator': 'ActivityIndicatorView',\n 'refresh-control': 'PullToRefreshView',\n 'input-accessory-view': 'InputAccessoryView',\n // Composites from the components package. Their host is a plain view; they are listed so a\n // template that uses one without importing it is reported like any other host primitive.\n pressable: 'View',\n 'touchable-opacity': 'View',\n 'image-background': 'View',\n 'keyboard-avoiding-view': 'View',\n // The windowing component; its host really is a native scroll view.\n 'virtual-list': 'ScrollView',\n};\n\n/**\n * The element names above, as they were before any app registered its own.\n *\n * Only these have a component in `@ng-native/components` to forget to import, which is what\n * the dev-mode check below is about. A name added by `registerViewName` may have nothing behind\n * it on purpose: an Expo view driven as a plain element is the whole point of\n * `@ng-native/expo`, and warning about it would be noise.\n */\nconst PRIMITIVE_NAMES = new Set(Object.keys(VIEW_NAMES));\n\n/**\n * HTML's text elements, which a template can write as it would for a browser.\n *\n * Each is text when it holds only text and other text elements, and a view when it holds anything\n * else: a box inside a paragraph has no layout, so `<span>Inbox<view class=\"dot\" /></span>` is a\n * view with its text in a paragraph of its own. Decided as the element is committed, by\n * `viewNameOf`. They have no component to import, so they are not `PRIMITIVE_NAMES`.\n */\nconst TEXT_ELEMENTS = new Set([\n ...['span', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'label', 'strong', 'b', 'em', 'i'],\n ...['u', 's', 'small', 'code', 'mark', 'abbr', 'cite', 'time'],\n]);\n\n/** HTML's layout elements, each a plain view, as a browser's are boxes with a name. */\nconst LAYOUT_ELEMENTS = [\n ...['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'],\n];\n\nfor (const name of TEXT_ELEMENTS) VIEW_NAMES[name] = 'Paragraph';\nfor (const name of LAYOUT_ELEMENTS) VIEW_NAMES[name] = 'View';\n\n/**\n * What an HTML element has for its name alone, given to the node as it is made: a heading's role,\n * which a binding can replace as it can any prop, and whether the engine has styles for it.\n */\nconst HTML_ELEMENTS = new Map<string, { role?: string; styled?: true }>([\n ...['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map((name) => [name, { role: 'header' }] as const),\n ...[...STYLED_ELEMENTS].map((name) => [name, { styled: true }] as const),\n]);\n\n/**\n * The props each host primitive's native view is sent, by element name, as the components\n * declare them: every input the element's component has, and the props it writes that no input\n * carries. What the development check for a misspelt prop compares against. See\n * `declareNativeProps`.\n */\nconst DECLARED_PROPS = new Map<string, Set<string>>();\n\n/**\n * Declare props the native view behind an element accepts. `@ng-native/components` calls this\n * once per host primitive with the component's inputs; an app driving a primitive's native view\n * with a prop the component has no input for can declare that prop too.\n */\nexport function declareNativeProps(elementName: string, props: Iterable<string>): void {\n let declared = DECLARED_PROPS.get(elementName);\n if (!declared) DECLARED_PROPS.set(elementName, (declared = new Set()));\n for (const prop of props) declared.add(prop);\n}\n\n/**\n * Mark a host element as owned by its component. The components package calls this from each\n * host primitive's constructor; see `EngineNode.claimed`.\n */\nexport function claimHost(node: HostNode): void {\n node.claimed = true;\n}\n\n/**\n * Mark an element as the host of a component. The platform adapter calls this from\n * `RendererFactory2.createRenderer`, which Angular calls once for every component it mounts,\n * with the host element in hand, whatever the component's selector.\n */\nexport function markComponentHost(node: HostNode): void {\n (node as EngineNode).componentHost = true;\n}\n\n/**\n * Say that a component's host is the native view its element name is registered as: a typed\n * wrapper for the view, where a component of the app's own with the same selector is a plain view.\n * Called from the component's constructor. See `ViewNameOptions.yieldsToComponents`.\n */\nexport function keepNativeView(node: HostNode): void {\n (node as EngineNode).nativeView = true;\n}\n\n/** `text-input` -> `TextInput`: how the components package names the class for an element. */\nconst className = (element: string): string =>\n element.replace(/(^|-)([a-z])/g, (_, __, c: string) => c.toUpperCase());\n\n/** Names Android registers differently. */\nexport const ANDROID_VIEW_NAMES: Record<string, string> = {\n switch: 'AndroidSwitch',\n 'text-input': 'AndroidTextInput',\n 'activity-indicator': 'AndroidProgressBar',\n 'refresh-control': 'AndroidSwipeRefreshLayout',\n // Neither exists on Android; RN's own wrappers render a plain view there too.\n 'safe-area-view': 'View',\n 'input-accessory-view': 'View',\n};\n\n/**\n * iOS's names for the elements Android names differently, so reporting iOS after Android puts\n * them back.\n */\nconst IOS_VIEW_NAMES: Record<string, string> = Object.fromEntries(\n Object.keys(ANDROID_VIEW_NAMES).map((element) => [element, VIEW_NAMES[element] as string]),\n);\n\n/**\n * The platform the host reported at startup. Defaults to iOS, which is what the view-name table\n * above assumes too.\n *\n * Exposed because a few of React Native's JavaScript wrappers behave differently per platform in\n * ways nothing native can infer: `Text.js` makes a text an accessibility element on iOS always,\n * and on Android only when it can be pressed.\n */\nlet platformOS = 'ios';\n\nexport function nativePlatform(): string {\n return platformOS;\n}\n\n/**\n * Call once at startup with `Platform.OS`. The view names above are the iOS/canonical ones, so\n * only the mapping half is a no-op elsewhere.\n */\nexport function registerPlatformComponents(platform: string): void {\n platformOS = platform;\n const names = platform === 'android' ? ANDROID_VIEW_NAMES : IOS_VIEW_NAMES;\n for (const [element, viewName] of Object.entries(names)) registerViewName(element, viewName);\n}\n\n/**\n * Props RN's JS wrappers apply before the caller's, per native view name.\n *\n * The native ScrollView does not clip on its own; RN's `ScrollView.js` supplies\n * `{flexGrow, flexShrink, flexDirection, overflow: 'scroll'}` as a base style. Omit it and the\n * content spills straight out of the scroll view's bounds, which reads as a layout bug in the\n * content rather than a missing default.\n *\n * Caller props and styles are applied on top, so any of this can be overridden.\n */\nconst DEFAULT_PROPS: Record<string, Record<string, unknown>> = {\n ScrollView: { flexGrow: 1, flexShrink: 1, flexDirection: 'column', overflow: 'scroll' },\n // RN's Image.ios.js: without it a border radius rounds the view but not the picture.\n Image: { overflow: 'hidden' },\n // RN's Modal.js gives the native host this; without it the modal does not lay out.\n ModalHostView: { position: 'absolute' },\n // RN's InputAccessoryView.js does the same for the keyboard bar.\n InputAccessoryView: { position: 'absolute' },\n // RN's Text.js ends truncated text in an ellipsis; native's own default is to clip. A default\n // rather than a prop the component writes, so `text-overflow` in a stylesheet can change it.\n Paragraph: { ellipsizeMode: 'tail' },\n};\n\nconst RAW_TEXT = 'RawText';\n/**\n * A `<text>` nested inside another `<text>` is a span, not a paragraph.\n *\n * Note the name: the C++ component really is called `Text`, but that name is **unreachable\n * from JS**. `ComponentDescriptorRegistry::at` puts every lookup through\n * `componentNameByReactViewName`, which rewrites `Text` to `Paragraph` and `VirtualText` to\n * `Text`. Sending the canonical `Text` therefore yields a Paragraph nested inside a Paragraph,\n * which Fabric treats as an inline view attachment: the run renders top-aligned and does not\n * inherit the parent's text attributes. It looks like a superscript.\n */\nconst VIRTUAL_TEXT = 'VirtualText';\nconst DEFAULT_VIEW = 'View';\n/** A top-level text, the one view that aligns its lines. A nested text is a `VirtualText`. */\nconst PARAGRAPH = 'Paragraph';\n\n/**\n * The box Yoga takes a view's baseline from where the view has none of its own: its first child\n * that is laid out in its flow. Words written straight into the view are the paragraph the\n * engine makes around them, and a child that is not displayed has no view to ask.\n */\n/**\n * A view with a transition is a native view for as long as it has one, as an `Animated.View` is.\n *\n * React Native gives a view a native view of its own for an opacity under 1, a transform or a\n * background, and takes it away when the last such reason goes. A wrapper that fades in was one\n * for the length of the fade and none after, and Fabric moved everything inside it to the view\n * above as the fade ended. Being moved takes a focused field out of the window for a moment, and\n * it lost its focus: a field focused as its container faded in blurred when the fade finished.\n *\n * A floor, as `keepNative` is: a `collapsable` written on the element is left alone. Not for\n * `transition: none`, which transitions nothing.\n */\nfunction keepForTransition(\n node: EngineNode,\n props: Record<string, unknown>,\n spec: Readonly<Record<string, unknown>>,\n): void {\n if (viewNameOf(node) !== DEFAULT_VIEW || props['collapsable'] !== undefined) return;\n if (Object.keys(spec).length > 0) props['collapsable'] = false;\n}\n\nfunction firstInFlow(node: EngineNode): EngineNode | undefined {\n for (const child of node.children ?? []) {\n // Not the paragraph itself, which holds the words it was made around.\n if (child.kind === 'text' && child.box) return child.box === node ? undefined : child.box;\n if (child.kind !== 'element' || ownLayout(child, 'display') === 'none') continue;\n if (ownLayout(child, 'position') !== 'absolute') return child;\n }\n return undefined;\n}\n\nconst isNode = (node: EngineNode | undefined): node is EngineNode => node !== undefined;\n\n/** Whether a row lays a child out among its others, and so can take its baseline from it. */\nconst inFlow = (child: EngineNode): boolean =>\n child.kind === 'element' && ownLayout(child, 'position') !== 'absolute';\n\n/** The text field a row's box takes its baseline from: itself, or the first in its flow down. */\nfunction fieldOnBaseline(item: EngineNode): EngineNode | undefined {\n let at: EngineNode | undefined = item;\n while (at?.kind === 'element' && !TEXT_INPUTS.has(viewNameOf(at))) at = firstInFlow(at);\n return at?.kind === 'element' ? at : undefined;\n}\n\ntype TextDirection = 'ltr' | 'rtl';\n\nconst textDirection = (value: unknown): TextDirection | undefined =>\n value === 'ltr' || value === 'rtl' ? value : undefined;\n\n/**\n * What iOS scales a text's `lineHeight` by: the system text size, capped by the text's own\n * `maxFontSizeMultiplier` where it is at least 1, and 1 without font scaling\n * (`RCTEffectiveFontSizeMultiplierFromTextAttributes`).\n */\nfunction textScale(props: Record<string, unknown>, fontScale = 1): number {\n if (props['allowFontScaling'] === false) return 1;\n const cap = props['maxFontSizeMultiplier'];\n return typeof cap === 'number' && cap >= 1 ? Math.min(fontScale, cap) : fontScale;\n}\n\n/** A field's padding and border on its top or bottom edge, as they are written. */\nconst blockEdge = (\n props: Record<string, unknown>,\n side: 'Top' | 'Bottom',\n logical: 'Start' | 'End',\n): unknown[] => [\n props[`padding${side}`] ??\n props[`paddingBlock${logical}`] ??\n props['paddingBlock'] ??\n props['paddingVertical'] ??\n props['padding'] ??\n 0,\n props[`border${side}Width`] ?? props['borderWidth'] ?? 0,\n];\n\n/**\n * A multiline field's `rows` as its height, where it was given none: that many lines of its\n * line height at the system text size, inside its padding and border, as a browser sizes a `<textarea>`. A native field\n * is as tall as its text, which is one line before anything is typed. Taken off the props once\n * read: neither platform's native field has a prop of that name.\n */\nfunction rowsTall(\n viewName: string,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n): void {\n if (!TEXT_INPUTS.has(viewName)) return;\n const rows = Number(props['rows']);\n delete props['rows'];\n const line = props['lineHeight'];\n if (props['multiline'] !== true || !(rows > 0) || typeof line !== 'number') return;\n if (isSet(props['height']) && props['height'] !== 'auto') return;\n // A content box's height is its lines alone: Yoga adds the padding and border itself.\n const edges =\n props['boxSizing'] === 'content-box'\n ? []\n : [...blockEdge(props, 'Top', 'Start'), ...blockEdge(props, 'Bottom', 'End')];\n if (!edges.every((part) => typeof part === 'number')) return;\n // At the system text size, which the field's lines are drawn at.\n const lines = rows * line * textScale(props, fontScale);\n props['height'] = edges.reduce<number>((sum, part) => sum + (part as number), lines);\n}\n\n/** A field's own minimum height: none where it says `auto`, which a web element starts with. */\nconst ownMinimum = (minHeight: unknown): unknown => (minHeight === 'auto' ? 0 : (minHeight ?? 0));\n\n/** How tall the system's font is, as a share of its size: its rise over the baseline and fall under. */\nconst FONT_LINE = 0.95 + 0.24;\n\n/**\n * How tall a field is by its line: the line, padding and border of a border-box field, Yoga's\n * default, and its content alone for a content-box one, which Yoga adds the padding and border\n * to itself. In a row aligned by baseline some of the line is kept as padding: `lineBaseline`.\n */\nfunction lineBox(\n props: Record<string, unknown>,\n box: readonly number[],\n onBaseline: boolean,\n fontScale: number | undefined,\n): number {\n const half = onBaseline ? lineBaseline(props, box[0]!, box, fontScale) : 0;\n if (props['boxSizing'] === 'content-box') return box[0]! - 2 * half;\n return box.reduce((sum, part) => sum + part, 0);\n}\n\n/**\n * `lineBaseline` for a field a height sizes: the room is what the height leaves its text, and\n * the field stays that height. A content-box field's height is its content's, so what is now\n * padding comes out of it.\n */\nfunction heightBaseline(\n props: Record<string, unknown>,\n height: number,\n onBaseline: boolean,\n fontScale: number | undefined,\n): void {\n if (!onBaseline) return;\n const edges = [...blockEdge(props, 'Top', 'Start'), ...blockEdge(props, 'Bottom', 'End')];\n if (!edges.every((part) => typeof part === 'number')) return;\n const content = props['boxSizing'] === 'content-box';\n const room = content ? height : (edges as number[]).reduce((left, part) => left - part, height);\n const half = lineBaseline(props, room, [room, ...(edges as number[])], fontScale);\n if (content) props['height'] = height - 2 * half;\n}\n\n/**\n * Give a field with its line height left out the baseline of a paragraph in a line as tall, for\n * a field in a row aligned by baseline: half the room the line has over the font is kept as\n * padding over and under the text. React Native says a field's baseline from its text and its\n * top padding, so without this it is the font's own, and the row lifts the paragraphs beside the\n * field to it: a form field's prefix and suffix sit higher than what is typed. Answers the half.\n *\n * ponytail: the font is taken to be as tall as the system's, `FONT_LINE` of its size. Read from\n * the font if a field in another face is seen a point off its prefix.\n */\nfunction lineBaseline(\n props: Record<string, unknown>,\n line: number,\n [, top, , bottom]: readonly number[],\n fontScale: number | undefined,\n): number {\n const size = props['fontSize'];\n if (typeof size !== 'number') return 0;\n const half = Math.max(0, (line - size * textScale(props, fontScale) * FONT_LINE) / 2);\n props['paddingTop'] = top! + half;\n props['paddingBottom'] = bottom! + half;\n return half;\n}\n\n/**\n * Centre the text of a single-line text field that has a line height, as Chrome centres an\n * input's, keeping the height the line height gives it.\n *\n * Where a `height` in points sizes the field, the line height has nothing left to do, and is left\n * out on both platforms: on Android, `EditText` centres a line box taller than the font's own\n * about 1.7pt high of centre in a 44pt field, and centres the font's own exactly. A percentage\n * height sizes the field only where its parent's height is definite, which is known at layout\n * alone, so on Android such a field is left as it was. Elsewhere Android sizes the field by the\n * line height and centres the text in it itself, and keeps it.\n *\n * On iOS, React Native's field sets `lineHeight` as the paragraph's minimum and maximum line\n * height and, unlike a paragraph (`RCTApplyBaselineOffset`), never offsets the baseline, so the\n * glyphs sit at the bottom of a line box taller than the font. One line has nothing to space, so\n * the line height is left out. What it does in Chrome, and on Android, is set the field's height:\n * line height, padding and border. That is kept as a `minHeight`, the larger of it and the field's\n * own, within its `maxHeight`: the whole sum for a border-box field, Yoga's default, and the line\n * height alone for a content-box one. A null `height` is no height. A value that is not a number\n * cannot be added up, and leaves the field as it was.\n */\nfunction centreSingleLine(\n viewName: string,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n onBaseline = false,\n): void {\n const lineHeight = props['lineHeight'];\n if (!TEXT_INPUTS.has(viewName) || typeof lineHeight !== 'number') return;\n if (props['multiline'] === true) return;\n const height = props['height'];\n if (typeof height === 'number') {\n delete props['lineHeight'];\n heightBaseline(props, height, onBaseline, fontScale);\n return;\n }\n // Android sizes the field by its line height, and centres the text in it, itself. A\n // percentage is a fixed height only where the parent's is definite, known at layout alone:\n // there too the line height is left out on iOS, and kept as the least the field is tall.\n if (viewName !== 'TextInput') return;\n const edge = (side: 'Top' | 'Bottom', logical: 'Start' | 'End') =>\n blockEdge(props, side, logical);\n const line = lineHeight * textScale(props, fontScale);\n const box = [line, ...edge('Top', 'Start'), ...edge('Bottom', 'End')];\n const own = ownMinimum(props['minHeight']);\n const max = props['maxHeight'] ?? Infinity;\n if (![...box, own, max].every((part) => typeof part === 'number')) return;\n delete props['lineHeight'];\n const content = lineBox(props, box as number[], onBaseline, fontScale);\n props['minHeight'] = Math.max(own as number, Math.min(content, max as number));\n}\n\nconst NO_STYLE: Readonly<Record<string, unknown>> = {};\n\n/**\n * An element's inline style, less each property a rule it matches declared `!important`: an\n * inline style is the last of the plain declarations, under every important one.\n *\n * ponytail: by the name a property is committed under, so an inline `padding` is not taken out\n * by an important `padding-top`. Expand the inline shorthand here if one is ever written so.\n */\nfunction inlineOf(node: EngineNode): Readonly<Record<string, unknown>> {\n if (!node.props['style']) return NO_STYLE;\n const inline = flattenStyle(node.props['style'], {});\n for (const key of node.styleCache?.important ?? []) delete inline[key];\n return inline;\n}\n\n/**\n * What a node's `@keyframes` animation sets this frame, less each property a rule it matches\n * declared `!important`: an important author declaration is above the animation in the cascade.\n * A transition is above both, so `transitioned` takes no such care.\n */\nfunction playedOver(node: EngineNode): Readonly<Record<string, unknown>> {\n const values = node.playing?.values;\n const important = node.styleCache?.important;\n if (!values || !important) return values ?? NO_STYLE;\n const played = { ...values };\n for (const key of important) delete played[key];\n return played;\n}\n\n/**\n * The properties among an animation's tracks that a rule `node` matches declared `!important`,\n * which native is not handed: what native plays it sets on the view, over what the rule says.\n */\nfunction pinnedIn(node: EngineNode, tracks: ReadonlyMap<string, unknown>): string[] {\n const important = node.styleCache?.important;\n return important ? [...tracks.keys()].filter((key) => important.has(key)) : [];\n}\n\n/** Whether native is playing an animation whose important properties are no longer the ones left out. */\nfunction pinsChanged(node: EngineNode, running: RunningAnimation): boolean {\n if (!running.native) return false;\n return pinnedIn(node, running.tracks).join(' ') !== running.pinned?.join(' ');\n}\n\n/** `tracks` less the properties named. */\nfunction unpinned<T>(\n tracks: ReadonlyMap<string, T>,\n pinned: readonly string[],\n): ReadonlyMap<string, T> {\n if (!pinned.length) return tracks;\n const kept = new Map(tracks);\n for (const key of pinned) kept.delete(key);\n return kept;\n}\n\n/**\n * What a container's own style says for `key`, in the order `mergeProps` applies them: a\n * component's override, inline, a prop, its stylesheet, its default.\n */\nfunction ownLayout(node: EngineNode, key: string): unknown {\n return (\n flattenStyle(node.props[STYLE_OVERRIDE], {})[key] ??\n inlineOf(node)[key] ??\n node.props[key] ??\n node.styleCache?.style[key] ??\n node.defaultStyle?.[key]\n );\n}\n\n/**\n * A container's main axis and how it aligns across it, as `row` or `column` and a keyword. A\n * `display: contents` node is no container: its children are laid out in the one above it.\n */\nfunction containerOf(node: EngineNode): string {\n if (ownLayout(node, 'display') === 'contents') return 'contents';\n const direction = String(ownLayout(node, 'flexDirection') ?? 'column');\n return `${direction.startsWith('row') ? 'row' : 'column'} ${ownLayout(node, 'alignItems') ?? 'stretch'}`;\n}\n\n/**\n * The node a box is laid out in: its parent, or the one above every `display: contents` ancestor.\n * Each of those is told a `fit-content` child passed through, so that when it stops being\n * `contents`, and is the container, the child is worked out again.\n */\nfunction layoutParent(node: EngineNode): EngineNode | null {\n let parent = node.parent;\n while (parent && containerOf(parent) === 'contents') {\n parent.fitContainer = 'contents';\n parent = parent.parent;\n }\n return parent;\n}\n\nconst STRETCHES = new Set([undefined, null, 'auto', 'stretch']);\n\n/**\n * `width: fit-content` and `height: fit-content`, which Yoga has no size for.\n *\n * Along its container's main axis a box is as big as its content already, so the size is\n * dropped. Across it a box stretches, where a browser keeps it at its content's size and at the\n * start: `align-self: flex-start` does both. An alignment the container or the box asked for is\n * kept, since it stops the stretch already.\n */\nfunction fitContent(node: EngineNode, props: Record<string, unknown>): void {\n const capped = {\n row: capAtContent(props, 'width', 'maxWidth'),\n column: capAtContent(props, 'height', 'maxHeight'),\n };\n const width = props['width'] === 'fit-content';\n const height = props['height'] === 'fit-content';\n if (!width && !height) return;\n if (width) delete props['width'];\n if (height) delete props['height'];\n const parent = layoutParent(node);\n if (!parent) return;\n const container = containerOf(parent);\n parent.fitContainer = container;\n const [direction, align] = container.split(' ');\n if (capped[direction === 'row' ? 'row' : 'column']) withoutGrowth(props);\n const across = direction === 'row' ? height : width;\n if (across && align === 'stretch' && STRETCHES.has(props['alignSelf'] as string)) {\n props['alignSelf'] = 'flex-start';\n }\n}\n\n/**\n * A box capped at its content along its container's main axis, where it would grow: a browser\n * clamps a growing item by its maximum, and there is no such cap to hand Yoga. So it does not\n * grow, and starts from its content, which is as far as the cap would let it get. It may still\n * shrink.\n */\nfunction withoutGrowth(props: Record<string, unknown>): void {\n if (typeof props['flex'] === 'number' && props['flex'] > 0) {\n delete props['flex'];\n props['flexShrink'] ??= 1;\n }\n delete props['flexGrow'];\n delete props['flexBasis'];\n}\n\n/**\n * `max-width: max-content`, and the same of a height: no bigger than its content, which for a\n * box that would fill its container is `fit-content`. Yoga has no such cap. Answers whether the\n * box is the size of its content for it: one that would fill, or one that was `fit-content` as\n * written.\n *\n * ponytail: a size in points is left as it is, since nothing here knows how big the content\n * is. Measure it if a box is ever given both.\n */\nfunction capAtContent(props: Record<string, unknown>, size: string, cap: string): boolean {\n if (props[cap] !== 'max-content') return false;\n delete props[cap];\n const own = props[size];\n const fills = own == null || own === 'auto' || (typeof own === 'string' && own.endsWith('%'));\n if (fills) props[size] = 'fit-content';\n return fills || own === 'fit-content';\n}\n\nconst isPercent = (value: unknown): boolean => typeof value === 'string' && value.endsWith('%');\n\n/** Whether a `flex-basis` is a length or a percentage of something: not zero, and not `auto`. */\nconst isSizedBasis = (basis: unknown): boolean =>\n isPercent(basis)\n ? Number.parseFloat(basis as string) !== 0\n : typeof basis === 'number' && basis !== 0;\n\n/**\n * A `flex-basis` that is a length or a percentage, as the size it is along its container's main\n * axis: a width in a row and a height in a column, over one written for that axis.\n *\n * Yoga works a `flexBasis` out once for a view and keeps the answer, and React Native never has\n * it forgotten when the view's props change (`computedFlexBasis`, cleared only by\n * `markDirtyAndPropagate`). A basis that changes after the first layout is not read again, and\n * a percentage does not follow the box it is a share of. A size is worked out on every pass, and\n * with no basis Yoga takes the size along the main axis as the basis: the same sum.\n *\n * A basis of zero is left as it is, which is every `flex: 1`: under a container with no size on\n * its main axis Yoga passes over a basis and sizes the box by its content, where a size of zero\n * would be zero. A box out of the flow is no flex item, and keeps its own size.\n */\nfunction basisAsSize(node: EngineNode, props: Record<string, unknown>): void {\n const basis = props['flexBasis'];\n if (!isSizedBasis(basis) || props['position'] === 'absolute') return;\n const parent = layoutParent(node);\n if (!parent) return;\n const container = containerOf(parent);\n // Remembered on the container, so the box is merged again when the direction changes.\n parent.fitContainer = container;\n delete props['flexBasis'];\n if (container.startsWith('row')) props['width'] = basis;\n else {\n props['height'] = basis;\n percentHeight(node, props);\n }\n}\n\n/**\n * Whether a box has a height a percentage can be taken of, as CSS defines one: a height of its\n * own, or one the layout around it gives it. A box as tall as what it holds has none.\n *\n * Asked of each box on the way up, and remembered on it, so a change to any of them works out\n * again the boxes beneath it. Where the answer is not known for certain it is yes, which leaves\n * the percentage to Yoga as before: a view native sizes itself, or one placed out of the flow.\n */\nfunction definiteHeight(node: EngineNode): boolean {\n return (node.heightBasis = hasDefiniteHeight(node));\n}\n\nfunction hasDefiniteHeight(node: EngineNode): boolean {\n // The root is the screen, and only a plain view is sized by its content alone.\n if (!node.parent || node.kind !== 'element' || viewNameOf(node) !== 'View') return true;\n const parent = layoutParent(node);\n if (!parent) return true;\n const height = ownLayout(node, 'height');\n if (isPercent(height)) return definiteHeight(parent);\n return sizesItself(node, height) || heightFromLayout(node, parent);\n}\n\nconst NO_HEIGHT = new Set([undefined, null, 'auto', 'fit-content']);\n\n/** Whether a box has a height from its own style: written, or placed, or kept in proportion. */\nfunction sizesItself(node: EngineNode, height: unknown): boolean {\n if (!NO_HEIGHT.has(height as string)) return true;\n return ownLayout(node, 'position') === 'absolute' || ownLayout(node, 'aspectRatio') != null;\n}\n\n/** Whether the container a box is in gives it a height: a row's, or a share of a column's. */\nfunction heightFromLayout(node: EngineNode, parent: EngineNode): boolean {\n const [direction, align] = containerOf(parent).split(' ');\n if (direction === 'row') {\n // Stretched across a row, it is as tall as the row, where the row has a height to be. One\n // as tall as its content gives none: Yoga takes the percentage of the space on offer there\n // too, the screen's, where a browser takes it of the row once its content has sized it.\n const self = ownLayout(node, 'alignSelf') as string | undefined;\n return STRETCHES.has(self) && align === 'stretch' && definiteHeight(parent);\n }\n // In a column it has the height it grows to, where the column has one to share out.\n const grows = Number(ownLayout(node, 'flexGrow') ?? ownLayout(node, 'flex') ?? 0) > 0;\n return grows && definiteHeight(parent);\n}\n\n/**\n * A placeholder's opacity, which native has none for, as its colour faded by that share: none of\n * it at 0, which is how a stylesheet hides a placeholder under a label, and all of it at 1.\n *\n * ponytail: with no colour of its own the placeholder is native's default, and a platform colour\n * is native's to resolve: neither is known here, so each is hidden at 0 and left as it is above\n * that. Name the platform's default, or read the colour back, if one is faded part of the way.\n */\nfunction placeholderFaded(props: Record<string, unknown>): void {\n const opacity = props['placeholderOpacity'];\n if (opacity === undefined) return;\n delete props['placeholderOpacity'];\n if (typeof opacity !== 'number' || opacity >= 1) return;\n const colour = props['placeholderTextColor'];\n if (typeof colour === 'string')\n props['placeholderTextColor'] = faded(colour, Math.max(opacity, 0));\n else if (opacity <= 0) props['placeholderTextColor'] = 'rgba(0, 0, 0, 0)';\n}\n\n/**\n * What a removed prop travels as: null, which native resets the prop on, except `pointerEvents`,\n * which react-native-svg's Android root reads as a string and stops the app on a null. `auto` is\n * what no value means.\n */\nconst cleared = (key: string): unknown => (key === 'pointerEvents' ? 'auto' : null);\n\n/** The least alpha iOS sends a touch to a view at: under a hundredth it is passed over. */\nconst TOUCHED_ALPHA = 0.011;\n\n/**\n * A view that takes a touch and has no opacity, committed with the least there is to be sent\n * one. A browser sends a press to an element at `opacity: 0`, which is how a see-through\n * backdrop hears a press outside a menu; iOS passes over a view it would not draw. A hundredth\n * of what the view draws is not seen.\n */\nfunction stillTouched(props: Record<string, unknown>): Record<string, unknown> {\n // One told to take no touch is not to be sent one, seen or not.\n if (props['pointerEvents'] === 'none') return props;\n const opacity = props['opacity'];\n if (typeof opacity === 'number' && opacity < TOUCHED_ALPHA) props['opacity'] = TOUCHED_ALPHA;\n return props;\n}\n\n/** Every prop `setOwned` can set, as a payload that changes them all. */\nconst RESET_OWNED: Readonly<Record<string, unknown>> = { opacity: undefined, transform: undefined };\n\n/** As Animated does: a view native sets values on is kept, or there is no view to set them on. */\nfunction keptForNative(node: EngineNode, props: Record<string, unknown>): void {\n if (node.owned && props['collapsable'] === undefined) props['collapsable'] = false;\n}\n\n/**\n * How a paragraph is truncated, which native does by its props: one the engine made around a\n * view's own words is truncated as the view says, as a browser truncates a block's own text.\n */\nconst TRUNCATION = ['numberOfLines', 'ellipsizeMode'] as const;\n\n/**\n * The truncation each paragraph made around a view's words was merged with, as the view said it.\n * Not what it was committed with, which has the paragraph's own defaults in it.\n */\nconst truncatedBy = new WeakMap<EngineNode, readonly unknown[]>();\n\n/** What a view says of how its own words are truncated. */\nconst truncationOf = (parent: EngineNode): unknown[] =>\n TRUNCATION.map((key) => ownLayout(parent, key) ?? null);\n\n/** Whether a paragraph made around a view's words is truncated other than the view now says. */\nfunction truncationMoved(box: EngineNode, parent: EngineNode): boolean {\n const merged = truncatedBy.get(box);\n if (!merged) return false;\n return truncationOf(parent).some((said, at) => said !== merged[at]);\n}\n\nfunction truncatedAs(box: EngineNode, props: Record<string, unknown>): void {\n if (!box.anonymous || !box.parent) return;\n const said = truncationOf(box.parent);\n truncatedBy.set(box, said);\n TRUNCATION.forEach((key, at) => {\n if (said[at] !== null) props[key] = said[at];\n });\n}\n\n/**\n * Stretch the lines of a wrapping flex container that says nothing of `align-content`, as CSS\n * starts them (`normal`, which is `stretch` in a flex container). Yoga starts them at\n * `flex-start`, as tall as what is in them, where an item that stretches across its line has\n * no size. A container that does not wrap has one line, which Yoga stretches already.\n */\nfunction wrappedLinesStretch(props: Record<string, unknown>): void {\n const wraps = props['flexWrap'] === 'wrap' || props['flexWrap'] === 'wrap-reverse';\n if (wraps && props['alignContent'] == null) props['alignContent'] = 'stretch';\n}\n\n/**\n * A flex item that stretches across its line, with its size across the line `auto`, as CSS has\n * it: as wide as a column, or as tall as a row, where Yoga takes the ratio over the stretch. In a\n * column, a height given leaves the ratio nothing to work out. In a row, the line is as tall as\n * the ratio makes the item from its width, at least, which is then the item's least height.\n *\n * ponytail: a width in points that does not grow, in a row, with any least or most height in\n * points. One that grows, or is a share, keeps the ratio, as Yoga has it. A plain view only: an image keeps its picture's proportions.\n */\nfunction stretchedOverRatio(node: EngineNode, props: Record<string, unknown>): void {\n if (!isSet(props['aspectRatio']) || props['position'] === 'absolute') return;\n if (viewNameOf(node) !== DEFAULT_VIEW) return;\n const parent = layoutParent(node);\n if (!parent) return;\n const container = containerOf(parent);\n // Remembered on the container, so the item is merged again when its direction changes.\n parent.fitContainer = container;\n const [direction, align] = container.split(' ');\n if (align !== 'stretch' || !stretchesAcross(props, direction === 'row')) return;\n if (direction === 'row') ratioAsLeast(props);\n else if (isSet(props['height']) && props['height'] !== 'auto') delete props['aspectRatio'];\n}\n\n/** Whether an item stretches across its line: its own size and margins across it are `auto`. */\nfunction stretchesAcross(props: Record<string, unknown>, row: boolean): boolean {\n if (!STRETCHES.has(props['alignSelf'] as string)) return false;\n const size = row ? 'height' : 'width';\n if (isSet(props[size]) && props[size] !== 'auto') return false;\n const sides = row\n ? MARGINS_ACROSS_ROW\n : props['direction'] === 'rtl'\n ? MARGINS_ACROSS_COLUMN_RTL\n : MARGINS_ACROSS_COLUMN;\n return sides.every((keys) => keys.map((key) => props[key]).find(isSet) !== 'auto');\n}\n\n/** The margins across a line, a side each, as Yoga reads them: the first set wins. */\nconst MARGINS_ACROSS_ROW = [\n ['marginTop', 'marginVertical', 'margin'],\n ['marginBottom', 'marginVertical', 'margin'],\n];\nconst MARGINS_ACROSS_COLUMN = [\n ['marginStart', 'marginLeft', 'marginHorizontal', 'margin'],\n ['marginEnd', 'marginRight', 'marginHorizontal', 'margin'],\n];\n/** Right to left, where the start is the right side. */\nconst MARGINS_ACROSS_COLUMN_RTL = [\n ['marginEnd', 'marginLeft', 'marginHorizontal', 'margin'],\n ['marginStart', 'marginRight', 'marginHorizontal', 'margin'],\n];\n\n/** In a row, the height a ratio gives a width in points, as the item's least height. */\nfunction ratioAsLeast(props: Record<string, unknown>): void {\n const [width, ratio] = [props['width'], props['aspectRatio']];\n if (typeof width !== 'number' || typeof ratio !== 'number' || ratio <= 0) return;\n const [least, most] = [props['minHeight'], props['maxHeight']];\n const inPoints = (bound: unknown) => !isSet(bound) || typeof bound === 'number';\n if (props['boxSizing'] === 'content-box' || !inPoints(least) || !inPoints(most)) return;\n if (sizedAlong(props)) return;\n props['minHeight'] = heldTo(width / ratio, least, most);\n delete props['aspectRatio'];\n}\n\n/** Whether an item's width is not what it is along its line: it has a basis, or it grows. */\nfunction sizedAlong(props: Record<string, unknown>): boolean {\n const basis = props['flexBasis'];\n return (isSet(basis) && basis !== 'auto') || Number(props['flexGrow'] ?? props['flex'] ?? 0) > 0;\n}\n\n/** A height held to the least and most given, which CSS keeps: the least wins over the most. */\nfunction heldTo(height: number, least: unknown, most: unknown): number {\n const under = typeof most === 'number' ? Math.min(height, most) : height;\n return typeof least === 'number' ? Math.max(under, least) : under;\n}\n\n/**\n * Leave `aspect-ratio` out for a box with both a width and a height. CSS takes the ratio only\n * for a size that is `auto`; Yoga takes it over one of two that are given, the height in a\n * column and the width in a row.\n */\nfunction ratioForAutoSize(props: Record<string, unknown>): void {\n if (!isSet(props['aspectRatio'])) return;\n const given = (size: unknown) => isSet(size) && size !== 'auto';\n if (given(props['width']) && given(props['height'])) delete props['aspectRatio'];\n}\n\nconst OUTLINE_KEYS = ['outlineWidth', 'outlineStyle', 'outlineColor', 'outlineOffset'];\n\n/** Whether a side of a border has a width and nothing that gives it a colour. */\nfunction colourless(\n props: Record<string, unknown>,\n side: (typeof BORDER_SIDES)[number],\n flipped: boolean,\n): boolean {\n const width = props[side.width] ?? props['borderWidth'];\n if (typeof width !== 'number' || width <= 0) return false;\n const given = [side.color, flipped ? side.flipped : side.logical, 'borderColor'];\n return given.every((key) => props[key] == null);\n}\n\n/**\n * Each side a border has: its width, its colour, and the logical colour React Native takes for\n * it too, read left to right and, `flipped`, right to left.\n */\nconst BORDER_DRAWN = /^border\\w*(Width|Style)$/;\nconst BORDER_COLOUR = /^border\\w*Color$/;\n\n/**\n * Send a border's colours again with an update that gives it a width or a style: Android draws\n * the border black when that update does not carry its colour, though it was given one before.\n * A box made without a border and given one later, a file attachment that is done, has one.\n */\nfunction borderColoursAgain(payload: Record<string, unknown>, props: Record<string, unknown>) {\n if (!Object.keys(payload).some((key) => BORDER_DRAWN.test(key))) return;\n for (const key in props)\n if (BORDER_COLOUR.test(key) && !(key in payload)) payload[key] = props[key];\n}\n\nconst BORDER_SIDES = [\n ['Top', 'BlockStart', 'BlockStart'],\n ['Right', 'End', 'Start'],\n ['Bottom', 'BlockEnd', 'BlockEnd'],\n ['Left', 'Start', 'End'],\n].map(([side, logical, flipped]) => ({\n width: `border${side}Width`,\n color: `border${side}Color`,\n logical: `border${logical}Color`,\n flipped: `border${flipped}Color`,\n}));\n\n/**\n * Send nothing for an outline of no width, which is what `outline: none` is: it draws nothing,\n * and a view with no outline is the same view. Sent, it is an update that is not one, and on\n * Android a text field given an outline prop after it is first drawn has its background set\n * again, with which the padding Android gives a text field comes back over the padding it was\n * laid out with: a field as tall as its line clips its text away. A stylesheet takes a\n * browser's focus ring off a field with `outline: none` for the focused field alone.\n */\nfunction noOutline(props: Record<string, unknown>): void {\n if (props['outlineWidth'] !== 0) return;\n for (const key of OUTLINE_KEYS) delete props[key];\n}\n\n/**\n * A box with `display: none`, out of the flow as well. It takes no room either way, but Yoga\n * reads an item's baseline from its first child that is in the flow, and a hidden one has no\n * layout to read: under a row with `align-items: baseline` the baseline is not a number, and\n * the row comes to no height with nothing in it placed. Out of the flow it is passed over.\n */\nfunction hiddenOutOfFlow(props: Record<string, unknown>): void {\n if (props['display'] === 'none') props['position'] = 'absolute';\n}\n\n/**\n * `height: 50%` under a parent with no height to take it of, which CSS reads as `auto`. Yoga\n * takes it of the space on offer, the screen's or everything a scroll view holds, so no height\n * is sent.\n */\nfunction percentHeight(node: EngineNode, props: Record<string, unknown>): void {\n if (!isPercent(props['height'])) return;\n // Out of the flow, it is of the box that holds it, which is laid out first and has a height.\n if (props['position'] === 'absolute') return;\n const parent = layoutParent(node);\n if (parent && !definiteHeight(parent)) delete props['height'];\n}\n\n/**\n * Start a multiline Android text field's text at the top, as iOS and a `<textarea>` do.\n *\n * React Native maps an unset `textAlignVertical` to `Gravity.NO_GRAVITY`, which `ReactEditText`\n * reads as the `EditText`'s own gravity, `center_vertical`. One the app set, through the input or\n * a CSS `vertical-align`, stays.\n */\nfunction alignMultiline(viewName: string, props: Record<string, unknown>): void {\n if (viewName !== 'AndroidTextInput' || props['multiline'] !== true) return;\n props['textAlignVertical'] ??= 'top';\n}\n\n/** The props of a run of text that change how tall its line is drawn. */\nconst SIZES_A_RUN = new Set(['style', 'allowFontScaling', 'maxFontSizeMultiplier']);\n\n/**\n * Keep a paragraph as tall as one of its lines, as a browser's line box is whatever holds it.\n * Yoga measures an item no taller than the room inside its container, and the text view cuts\n * its letters off there: a 24 point line in a row with 16 points between its paddings. The\n * line is the paragraph's own or a taller one of a run in it, `run`, which is scaled already. With it goes what is\n * around the text and inside the height Yoga gives a view, its padding and border above and\n * below, but for a content box. Only where a line height is a length, and nothing gives the\n * paragraph a height of its own.\n *\n * The line is as the system text size draws it: native scales a line height with the text, so\n * a line held to its points at a smaller size is shorter than its box and sits at the top of\n * it, over what a row centres it beside.\n */\nfunction lineTall(\n props: Record<string, unknown>,\n run: number,\n fontScale: number | undefined,\n): void {\n const own = props['lineHeight'];\n const line = Math.max(typeof own === 'number' ? own * textScale(props, fontScale) : 0, run);\n if (line <= 0) return;\n const unset = (value: unknown): boolean => value == null || value === 'auto';\n if (!unset(props['height']) || !unset(props['minHeight'])) return;\n const around = props['boxSizing'] === 'content-box' ? 0 : aroundALine(props);\n // To a thousandth of a point: a product of two fractions is rarely the number it reads as.\n props['minHeight'] = Math.round((line + around) * 1000) / 1000;\n}\n\n/** The points of padding and border above and below a view's content, where each is a length. */\nfunction aroundALine(props: Record<string, unknown>): number {\n return around(props, 'Height');\n}\n\n/**\n * The props each side's padding and border are read from, across a height and across a width,\n * the first set winning, as React Native and then Yoga read them: an alias of React Native's over\n * Yoga's own, a logical side over the physical one, and the start on the left unless the box is\n * right to left. A block's start and end are under the top and bottom.\n */\nfunction sides(props: Record<string, unknown>, size: 'Height' | 'Width'): string[][] {\n if (size === 'Height') {\n const block = ['paddingBlock', 'paddingVertical', 'padding'];\n return [\n ['paddingTop', 'paddingBlockStart', ...block],\n ['borderTopWidth', 'borderWidth'],\n ['paddingBottom', 'paddingBlockEnd', ...block],\n ['borderBottomWidth', 'borderWidth'],\n ];\n }\n const rtl = props['direction'] === 'rtl';\n const inline = ['paddingInline', 'paddingHorizontal', 'padding'];\n return (['Left', 'Right'] as const).flatMap((physical, at) => {\n const logical = (at === 0) !== rtl ? 'Start' : 'End';\n return [\n [`paddingInline${logical}`, `padding${logical}`, `padding${physical}`, ...inline],\n [`border${logical}Width`, `border${physical}Width`, 'borderWidth'],\n ];\n });\n}\n\n/** The points of padding and border across a view's height or width, where each is a length. */\nfunction around(props: Record<string, unknown>, size: 'Height' | 'Width'): number {\n let total = 0;\n for (const keys of sides(props, size)) {\n const found = keys.map((key) => props[key]).find((value) => value != null);\n if (typeof found === 'number') total += found;\n }\n return total;\n}\n\n/** The most and the least of each size, by name: asked of every node merged. */\nconst MOST = { Height: 'maxHeight', Width: 'maxWidth' } as const;\nconst LEAST = { Height: 'minHeight', Width: 'minWidth' } as const;\n\n/**\n * A most size under the least: under a `min-height`, or a border box's padding and border, which\n * CSS lets win (CSS 2.2, 10.7). React Native's Yoga holds the box to its most, and the box around\n * it to that, so the most is raised to the least. A most and a least in points: a share on either\n * side is left to Yoga.\n */\nfunction leastWins(props: Record<string, unknown>, size: 'Height' | 'Width'): void {\n const most = props[MOST[size]];\n if (typeof most !== 'number') return;\n const written = props[LEAST[size]];\n let least = typeof written === 'number' ? written : 0;\n if (props['boxSizing'] !== 'content-box') least = Math.max(least, around(props, size));\n if (most < least) props[MOST[size]] = least;\n}\n\n/**\n * Where a line may break: at a space, after a hyphen, and anywhere in a script written without\n * spaces. A soft hyphen and a zero-width space are places to break that draw nothing.\n */\nconst BREAKS = /[\\s\\-\\u00ad\\u200b\\u2010\\u2e80-\\u9fff\\uac00-\\ud7af\\uf900-\\ufaff\\uff00-\\uffef]/;\n\n/** Whether a paragraph's text, all its runs together, is one word: something, with no break. */\nfunction unbroken(node: EngineNode): boolean {\n let text = '';\n const collect = (from: EngineNode): void => {\n for (const child of from.children) {\n if (child.kind === 'text') text += child.text;\n else if (isTextElement(child)) collect(child);\n }\n };\n collect(node);\n const words = trimEnds(text);\n return words !== '' && !BREAKS.test(words);\n}\n\n/**\n * Resolve a paragraph's `text-align` against its direction, as CSS does.\n *\n * React Native reads `left` and `right` relative to the layout direction: in a right-to-left\n * layout `RCTAttributedTextUtils` swaps them, so its `left` is the start edge. `start` and `end`\n * are therefore `left` and `right` whatever the direction. Where the app set a direction, the\n * default is `start`, as on the web, rather than native's natural alignment, which follows the\n * app's language and not the subtree; a physical `left` or `right` is swapped back so it stays on\n * that side; and the paragraph's base writing direction follows unless a `writing-direction` says\n * otherwise, which is what puts neutral characters such as punctuation on the right side.\n */\nfunction alignText(props: Record<string, unknown>, direction: TextDirection | undefined): void {\n const align = props['textAlign'] as string | undefined;\n if (!direction) {\n if (align !== undefined) props['textAlign'] = LOGICAL_ALIGN.get(align) ?? align;\n return;\n }\n props['textAlign'] = TEXT_ALIGN[direction].get(align ?? 'start') ?? align;\n props['writingDirection'] ??= direction;\n}\n\n/** React Native's `textAlign` for CSS's logical values, which means the same in either direction. */\nconst LOGICAL_ALIGN = new Map([\n ['start', 'left'],\n ['end', 'right'],\n]);\n\n/** React Native's `textAlign` for each CSS value, in a layout of each direction. */\nconst TEXT_ALIGN: Readonly<Record<TextDirection, ReadonlyMap<string, string>>> = {\n ltr: new Map([...LOGICAL_ALIGN, ['auto', 'left'], ['left', 'left'], ['right', 'right']]),\n rtl: new Map([...LOGICAL_ALIGN, ['auto', 'left'], ['left', 'right'], ['right', 'left']]),\n};\n\n/** The native modal host, which is left out of a commit while `visible` is false. */\nconst MODAL_HOST = 'ModalHostView';\n\n/**\n * A screen's `gestureResponseDistance` that no touch is within: how far from each edge a swipe\n * back may start, with -1 for no limit, and none at all from the leading edge. It is what\n * `react-native-screens` reads as the swipe is about to begin; whether the swipe is enabled it\n * read when the finger came down, before anything here had heard of the touch.\n */\nconst NO_SWIPE = Object.freeze({ start: -1, end: 0, top: -1, bottom: -1 });\n\n/** A screen of a native stack, which is what the swipe back is a gesture of. */\nconst STACK_SCREEN = 'RNSScreen';\n\n/** What an element's `touch-action` is: bound on it, or from the rules it matches. */\nfunction touchActionOf(node: EngineNode): unknown {\n return inlineOf(node)['touchAction'] ?? node.styleCache?.style['touchAction'];\n}\n\n/** Where a touch is on the screen: its own point, or its first finger's. */\nfunction pointOf(nativeEvent: unknown): { x: number; y: number } {\n const event = (nativeEvent ?? {}) as TouchPayload & { touches?: readonly TouchPayload[] };\n const touch = event.pageX === undefined ? event.touches?.[0] : event;\n return { x: touch?.pageX ?? 0, y: touch?.pageY ?? 0 };\n}\n\n/**\n * What a touch on a node leaves to the browser: the `touch-action` of it, or of the nearest\n * element over it that says. Nothing where none does, which leaves everything.\n */\nfunction touchActions(node: EngineNode): readonly string[] | undefined {\n for (let up: EngineNode | null = node; up; up = up.parent) {\n const said = up.kind === 'element' ? touchActionOf(up) : undefined;\n if (typeof said === 'string') return said.split(' ');\n }\n return undefined;\n}\n\nconst PANS_ACROSS = ['auto', 'manipulation', 'pan-x', 'pan-left', 'pan-right'];\nconst PANS_ALONG = ['auto', 'manipulation', 'pan-y', 'pan-up', 'pan-down'];\n\n/** Whether an element keeps a drag in one direction: its `touch-action` leaves no pan that way. */\nconst keeps = (actions: readonly string[] | undefined, pans: readonly string[]): boolean =>\n actions !== undefined && !actions.some((action) => pans.includes(action));\n\n/** How far a finger moves before a browser has settled which way a drag is going. */\nconst DRAG_SLOP = 4;\n\n/**\n * Register a codegen'd third-party Fabric component, e.g.\n * `registerViewName('rns-screen', 'RNSScreen')`, which is how the router reaches\n * react-native-screens.\n *\n * `defaultProps` is for a component whose React wrapper supplies a base style in JS, the way\n * `ScrollView` and `Modal` do below. Driving the native component directly skips that wrapper,\n * and skipping it is not cosmetic: `RNSScreenStackHeaderConfig` without its `position: absolute`\n * joins the screen's flex layout and pushes every page down by the height of the header.\n */\nexport function registerViewName(\n elementName: string,\n viewName: string | PlatformViewName,\n defaultProps?: Record<string, unknown>,\n options?: ViewNameOptions,\n): void {\n VIEW_NAMES[elementName] = viewName;\n if (options?.yieldsToComponents) YIELDING.add(elementName);\n else YIELDING.delete(elementName);\n // A name the app registers is the app's: no longer decided by what the element holds.\n TEXT_ELEMENTS.delete(elementName);\n for (const name of typeof viewName === 'string' ? [viewName] : [viewName.ios, viewName.android]) {\n if (defaultProps) DEFAULT_PROPS[name] = defaultProps;\n if (options?.textContent) TEXT_CONTENT_PROPS[name] = options.textContent;\n if (options?.looseText) LOOSE_TEXT[name] = options.looseText;\n else delete LOOSE_TEXT[name];\n if (options?.fontNames) FONT_NAMES[name] = options.fontNames;\n else delete FONT_NAMES[name];\n }\n}\n\n/** What else a registered view needs the engine to know about it. */\nexport interface ViewNameOptions {\n /**\n * The prop the view reads its text from, where it takes no children: SwiftUI's `Text` through\n * `@expo/ui` reads `text`. The text written inside the element becomes that prop, as `<text>`\n * takes its own content, and is not committed as children. An explicit prop wins over it.\n */\n readonly textContent?: string;\n /**\n * Whether the name gives way to a component of the app's own with the same selector, whose host\n * is then a plain view. For a set of views registered under a prefix an app may also use for\n * its design system, as `@expo/ui`'s are under `ui-`. A component that is the view itself, a\n * typed wrapper for it, says so with `keepNativeView`.\n */\n readonly yieldsToComponents?: boolean;\n /**\n * The element a run of text written straight into the view is drawn by, where that is not a\n * paragraph: an SVG text draws its words by a span, which is no child a template wrote. The\n * element is the engine's own, as the paragraph a view is given for its loose text is.\n */\n readonly looseText?: string;\n /**\n * Where a view's own props name a font that must reach native by another name, as SwiftUI's\n * `font` modifier must name a face by its file's PostScript name: rewrites `props` in place,\n * given that name for each name the app's `@font-face` faces are registered under. Called on\n * every commit of the view, and again for each view when the faces change.\n */\n readonly fontNames?: (props: Record<string, unknown>, postScriptName: PostScriptNames) => void;\n}\n\n/** The PostScript name of the face a name is registered under, where the build read it. */\nexport type PostScriptNames = (name: string) => string | undefined;\n\n/** How each view that names fonts in its own props rewrites them. See `ViewNameOptions`. */\nconst FONT_NAMES: Record<string, NonNullable<ViewNameOptions['fontNames']>> = {};\n\n/** Rewrites the fonts a view's own props name, for a view that says how. See `ViewNameOptions`. */\nfunction renameFonts(\n viewName: string,\n props: Record<string, unknown>,\n postScriptName: PostScriptNames,\n): void {\n FONT_NAMES[viewName]?.(props, postScriptName);\n}\n\n/** The element loose text in a view is drawn by, for the views that say. See `ViewNameOptions`. */\nconst LOOSE_TEXT: Record<string, string> = {};\n\n/** The registered names that give way to a component's own host. See `ViewNameOptions`. */\nconst YIELDING = new Set<string>();\n\n/** The prop each view that takes its text content as a prop reads it from. See `ViewNameOptions`. */\nconst TEXT_CONTENT_PROPS: Record<string, string> = {};\n\n/** Whether `node` takes its text content as a prop rather than as text children. */\nfunction takesTextAsProp(node: EngineNode): boolean {\n return node.kind === 'element' && TEXT_CONTENT_PROPS[viewNameOf(node)] !== undefined;\n}\n\n/** Sets a view's text prop from its content, unless the prop is set explicitly. */\nfunction withTextContent(node: EngineNode, viewName: string, props: Record<string, unknown>): void {\n const prop = TEXT_CONTENT_PROPS[viewName];\n if (!prop || node.props[prop] !== undefined) return;\n const text = textContent(node);\n if (text) props[prop] = text;\n}\n\n/**\n * The whitespace a paragraph drops at its ends is what CSS collapses: spaces, tabs and line\n * breaks. A no-break space is text, as in a browser, so ` ` is how a value keeps a space at\n * its end; `String.prototype.trim` would take that too.\n */\nconst trimStart = (text: string): string => text.replace(/^[ \\t\\n\\r\\f]+/, '');\nconst trimEnd = (text: string): string => text.replace(/[ \\t\\n\\r\\f]+$/, '');\nconst trimEnds = (text: string): string => trimEnd(trimStart(text));\n\n/**\n * The text written inside a view that takes it as a prop: every run joined, with the whitespace at\n * the two ends dropped as a paragraph drops it, and kept inside. A nested view is drawn after the\n * text, as SwiftUI's `Text` through `@expo/ui` draws a child `Text`, so the space before it stays.\n */\nfunction textContent(node: EngineNode): string {\n let text = '';\n let nested = false;\n for (const child of node.children) {\n if (child.kind === 'text') text += child.text;\n else if (child.kind === 'element') nested = true;\n }\n return nested ? trimStart(text) : trimEnd(trimStart(text));\n}\n\n/**\n * A view whose native name differs by platform. Chosen when the view is looked up rather than when\n * it is registered, so it does not matter which ran first: an app's imports register the router's\n * views before its `main.ts` gets to report the platform.\n */\nexport interface PlatformViewName {\n readonly ios: string;\n readonly android: string;\n}\n\n/** An element's registered view name, for the platform the host reported. */\nfunction registeredViewName(elementName: string): string | undefined {\n const name = VIEW_NAMES[elementName];\n if (name === undefined || typeof name === 'string') return name;\n return platformOS === 'android' ? name.android : name.ios;\n}\n\n/**\n * The views Fabric measures from their text, which a change of the system text size resizes:\n * a paragraph, and a text input on either platform. See `Engine.remeasureText`.\n */\nconst MEASURED_VIEWS = new Set(['Paragraph', 'TextInput', 'AndroidTextInput']);\n\n/** Leave a family that is still loading out of `style`, remembering it. See `loadingFamilies`. */\nfunction holdLoadingFamily(node: EngineNode, style: Record<string, unknown>): void {\n const family = style['fontFamily'];\n if (typeof family === 'string' && loadingFamilies.has(family)) {\n delete style['fontFamily'];\n node.heldFamily = family;\n } else if (node.heldFamily !== undefined) {\n node.heldFamily = undefined;\n }\n}\n\n/** What each mounted app does when faces register. See `fontsRegistered`. */\nconst fontListeners = new Set<(families: ReadonlySet<string>) => void>();\n\n/** Hear about faces registering with the platform, until the returned function is called. */\nexport function onFontsRegistered(listener: (families: ReadonlySet<string>) => void): () => void {\n fontListeners.add(listener);\n return () => fontListeners.delete(listener);\n}\n\n/**\n * Faces just registered with the platform, by the family names text asks for them by. Every\n * mounted app lays out again the paragraphs and text inputs that name one: see\n * `Engine.fontsRegistered`.\n */\nexport function fontsRegistered(families: Iterable<string>): void {\n const names = new Set(families);\n if (!names.size) return;\n for (const listener of [...fontListeners]) listener(names);\n}\n\n/**\n * Families a load has asked the platform for and not yet settled, by how many loads asked. Text\n * naming one is laid out in the fallback without the name until it settles: native caches a\n * text's measurement by its family name, so a fallback measurement under the face's name would\n * outlast the face arriving.\n */\nconst loadingFamilies = new Map<string, number>();\n\n/** Faces a load is about to ask the platform for. See `loadingFamilies`. */\nexport function fontsLoading(families: Iterable<string>): void {\n for (const family of families)\n loadingFamilies.set(family, (loadingFamilies.get(family) ?? 0) + 1);\n}\n\n/** What each mounted app does when a load settles. See `fontsSettled`. */\nconst settleListeners = new Set<(families: ReadonlySet<string>) => void>();\n\n/** Hear about loads settling, until the returned function is called. */\nexport function onFontsSettled(listener: (families: ReadonlySet<string>) => void): () => void {\n settleListeners.add(listener);\n return () => settleListeners.delete(listener);\n}\n\n/**\n * Faces a load asked for and has finished with, registered or not, before `fontsRegistered`.\n * Text held back for one that no load still asks for is laid out with the name again: see\n * `Engine.fontsSettled`.\n */\nexport function fontsSettled(families: Iterable<string>): void {\n const settled = new Set<string>();\n for (const family of families) {\n const left = (loadingFamilies.get(family) ?? 1) - 1;\n if (left > 0) loadingFamilies.set(family, left);\n else {\n loadingFamilies.delete(family);\n settled.add(family);\n }\n }\n if (settled.size) for (const listener of [...settleListeners]) listener(settled);\n}\n\n/** Whether a paragraph, or a span in it, was committed asking for one of these families. */\nfunction namesFamily(node: EngineNode, families: ReadonlySet<string>): boolean {\n const family = node.committed?.props['fontFamily'];\n if (typeof family === 'string' && families.has(family)) return true;\n return node.children.some((child) => namesFamily(child, families));\n}\n\n/** A text size cap far above any a platform offers, so it caps nothing. See `fontsRegistered`. */\nconst UNCAPPED = 1000;\n/**\n * How far a paragraph's cap moves each time a face it names registers: just past the 0.005 React\n * Native compares text attributes to, so the layout it cached is not found, and too little for\n * an app's own cap to cap anything visibly differently.\n */\nconst FONT_REFRESH_STEP = 0.006;\n\n/** The views that take a cursor, on either platform. */\nconst TEXT_INPUTS = new Set(['TextInput', 'AndroidTextInput']);\n\n/** The views that scroll their content, which `focus` brings a field into view within. */\nconst SCROLL_VIEWS = new Set(['ScrollView', 'AndroidHorizontalScrollView']);\n\n/** Element name -> the element name of the ancestor it commits into. See `registerHoist`. */\nconst HOISTS: Record<string, string> = {};\n/** The `ancestorName`s, so a commit asks only those nodes what to hoist into them. */\nconst HOIST_TARGETS = new Set<string>();\n/** The `ancestorName`s that commit only what is hoisted into them. See `HoistOptions.only`. */\nconst HOIST_ONLY = new Set<string>();\n/** Element name -> the ancestor names it never hoists past. See `HoistOptions.stopAt`. */\nconst HOIST_STOPS: Record<string, ReadonlySet<string>> = {};\n\n/**\n * Commit every `elementName` as a direct child of its nearest `ancestorName`, wherever the\n * template put it, e.g. `registerHoist('native-header', 'screen')`.\n *\n * For a native component that reads a configuration node from its own direct children and\n * nowhere else. `RNSScreen.mm` finds its header that way, so a header written inside a\n * `safe-area-view`, or inside any component a page wraps itself in, was never found: no title,\n * no back button, and nothing said why. The retained tree keeps the node where Angular put it,\n * so styles, `@if` and removal all behave as written; only what reaches Fabric moves. It lands\n * just after the ancestor's child it was written in, or after all of them when it was written in\n * the ancestor itself, which keeps a page's scroll view ahead of its header as UIKit's large\n * title wants. A node with no such ancestor commits where it is.\n */\nexport function registerHoist(\n elementName: string,\n ancestorName: string,\n options: HoistOptions = {},\n): void {\n HOISTS[elementName] = ancestorName;\n HOIST_TARGETS.add(ancestorName);\n if (options.standIn) STAND_INS[elementName] = options.standIn;\n if (options.only) HOIST_ONLY.add(ancestorName);\n if (options.stopAt) HOIST_STOPS[elementName] = new Set(options.stopAt);\n else delete HOIST_STOPS[elementName];\n}\n\nexport interface HoistOptions {\n /**\n * Props for a native view the ancestor keeps once the element has committed into it.\n *\n * For a configuration node the native side reads when it arrives but never forgets when it\n * leaves. `RNSScreen` hides its navigation bar when a header config it holds says `hidden`, and\n * does nothing at all when the config is taken away, so the last bar it was told about stays on\n * screen. With a stand-in, removing the element commits these props onto the same native view,\n * children dropped, and the next element of that name adopts the view rather than creating\n * another, so what the native side sees is one config that is updated, never one that goes.\n */\n standIn?: Record<string, unknown>;\n /**\n * Have the ancestor commit the elements hoisted into it and nothing else, in the order they\n * were written.\n *\n * For a native component that takes children of one type only. `RNSScreenStackHeaderConfig`\n * takes `RNSScreenStackHeaderSubview`s: iOS logs an error and drops any other child, and Android\n * throws. A header item written inside a component of the header reached it inside that\n * component's host view.\n */\n only?: boolean;\n\n /**\n * Ancestor names the element never hoists past: met before the ancestor it commits into, it\n * commits where it is, as one with no such ancestor does.\n *\n * For an ancestor the target is not meant to reach through. A tab's page with no stack of its\n * own has no screen of its own, and the screen above its tab is the one that holds the whole\n * tab bar, so a header written in that page must not configure it.\n */\n stopAt?: readonly string[];\n}\n\n/** Element name -> the props it leaves behind in its ancestor. See `HoistOptions.standIn`. */\nconst STAND_INS: Record<string, Record<string, unknown>> = {};\n\n/** A native view an ancestor keeps for a hoisted name with a stand-in, and who it is for now. */\ninterface KeptHoist {\n /** The element committed as this view, or null while the stand-in props are. */\n node: EngineNode | null;\n committed: Committed;\n}\n\n/**\n * Unregistered names commit as a plain RCTView, because that is what an **Angular component\n * host element** is. Angular always creates one (`<x-card>` is a real node in the tree), and\n * it carries the component's host bindings, so it cannot be elided. Guessing a native view\n * name from the element name instead produces `Unimplemented component: <XCard>` on device.\n *\n * The cost is that a typo'd element name would render as an empty view without a word, and\n * Angular's own unknown-element check cannot help (it no-ops without a DOM). So in dev the\n * engine reports a name that nothing accounts for: not a view name, not a component host (see\n * `markComponentHost`), and not an element selector any template declared (`declareElement`).\n * Use an attribute selector (`selector: '[card]'`) on a component to avoid the extra view.\n */\n/**\n * A run of text as a paragraph shows it: without the space at the paragraph's very start or end.\n *\n * Angular collapses template whitespace to a single space rather than removing it, so\n * `<text>\\n {{ name }}\\n</text>` arrives as ` Ada `. A browser drops that space where a line\n * starts or ends; React Native's Text draws it, and every label written across two lines, which\n * a formatter will do to any long one, comes out indented. Spaces between runs are left alone,\n * as they are in HTML.\n *\n * ponytail: worked out when the run itself changes. A run that stops being the first or last\n * because a sibling arrived keeps its old trim until it next changes, which is a space at most.\n */\nfunction paragraphText(node: EngineNode): string {\n let root = node.parent;\n // Text written straight into a view is a paragraph of its own, and all of it.\n if (root === null || !isTextElement(root)) return node.box ? trimEnds(node.text) : node.text;\n // A text element a view stands in for, which places what it holds: no paragraph runs past it.\n const inParagraph = (above: EngineNode | null) =>\n isTextElement(above) && !aligningText(above as EngineNode);\n // The commonest paragraph by far: one run and nothing else, so it is both the first and last.\n if (root.children.length === 1 && !inParagraph(root.parent)) return trimEnds(node.text);\n while (inParagraph(root.parent)) root = root.parent!;\n const runs: EngineNode[] = [];\n const collect = (from: EngineNode) => {\n for (const child of from.children) {\n if (child.kind === 'text') {\n if (child.text) runs.push(child);\n } else if (isTextElement(child)) collect(child);\n }\n };\n collect(root);\n let text = node.text;\n if (runs[0] === node) text = trimStart(text);\n if (runs[runs.length - 1] === node) text = trimEnd(text);\n return text;\n}\n\n/** The part of a node `viewNameOf` reads: an engine node, or any host's mirror of one. */\nexport interface ViewNameNode {\n readonly kind: string;\n readonly tag: string;\n readonly parent: ViewNameNode | null;\n /** Whether a component is mounted on it, and whether that component is the native view. */\n readonly componentHost?: boolean;\n readonly nativeView?: boolean;\n /** What it holds, which decides whether one of HTML's text elements is text or a view. */\n readonly children?: readonly ViewNameNode[];\n /** Set on the paragraph the engine makes for a run of text written straight into a view. */\n readonly anonymous?: boolean;\n}\n\n/**\n * Whether an element is text: a `<text>`, or one of HTML's text elements that holds only text and\n * other such elements. Worked out each time, from the tree as it is, so nothing can go stale.\n */\nfunction isTextElement(node: ViewNameNode | null): boolean {\n if (node === null || node.kind !== 'element') return false;\n if (node.tag === 'text') return true;\n // One lookup settles nearly every other element, which is a view.\n if (registeredViewName(node.tag) !== PARAGRAPH) return false;\n return !TEXT_ELEMENTS.has(node.tag) || holdsOnlyText(node);\n}\n\n/** Whether a text element holds text and nothing else. One that holds nothing holds no text. */\nfunction holdsOnlyText(node: ViewNameNode): boolean {\n const children = node.children ?? [];\n for (const child of children) {\n if (child.kind === 'element' && !isTextElement(child)) return false;\n }\n return children.length > 0;\n}\n\nconst ALIGNS = new Set(['center', 'flex-end', 'space-around', 'space-evenly']);\n\n/**\n * Whether one of HTML's text elements is a flex container that aligns the one run of text it\n * holds, as an avatar's initials are centred: `<span class=\"flex items-center justify-center\">`.\n *\n * A browser makes the run a flex item and places it. A paragraph's text is its content, which no\n * alignment moves, so such an element commits as a view, and its text as the paragraph any view's\n * loose text is. Read from the node's own style on each reconcile, which a change to it brings\n * about, so nothing is kept to go stale. The run can be a text element of its own, a label in a\n * span, which is then the item placed. So is a column of text elements, each an item under the\n * last. A `<text>` is a paragraph whatever its style, and any other element holding more than\n * the one run is left as it was.\n */\nfunction aligningText(node: EngineNode): boolean {\n if (node.kind !== 'element' || node.tag === 'text' || !TEXT_ELEMENTS.has(node.tag)) {\n return false;\n }\n const stacked = stacksRuns(node);\n if (!stacked && (node.children.length !== 1 || !oneRun(node.children[0]!))) return false;\n // Under a text element it is a span of that paragraph, unless that one is a view placing it.\n if (isTextElement(node.parent) && !aligningText(node.parent as EngineNode)) return false;\n return placesByFlex(node, stacked);\n}\n\n/** Whether a flex container's own style places the run it holds, or stacks the runs it holds. */\nfunction placesByFlex(node: EngineNode, stacked: boolean): boolean {\n if (ownLayout(node, 'display') !== 'flex') return false;\n // A column of them: each a line of its own, where one paragraph would run them on.\n if (stacked) return String(ownLayout(node, 'flexDirection') ?? 'column').startsWith('column');\n return (\n ALIGNS.has(ownLayout(node, 'alignItems') as string) ||\n ALIGNS.has(ownLayout(node, 'justifyContent') as string)\n );\n}\n\n/**\n * Whether a text element holds two or more text elements and nothing else but whitespace and\n * the anchors control flow leaves: a label around a name and a hint, which a flex column has one under the other.\n */\nfunction stacksRuns(node: EngineNode): boolean {\n let runs = 0;\n for (const child of node.children) {\n if (child.kind === 'element' && TEXT_ELEMENTS.has(child.tag)) runs++;\n else if (child.kind === 'text' ? trimEnds(child.text) : child.kind !== 'anchor') return false;\n }\n return runs > 1;\n}\n\n/** One run of text to place: text itself, or a text element around some, a label in a span. */\nconst oneRun = (child: EngineNode): boolean =>\n child.kind === 'text' || (child.kind === 'element' && TEXT_ELEMENTS.has(child.tag));\n\n/** The view a node is committed as: `viewNameOf`, but for a text element that aligns its text. */\nconst committedViewName = (node: EngineNode): string =>\n aligningText(node) ? DEFAULT_VIEW : viewNameOf(node);\n\n/**\n * The native view a node commits as: `Paragraph` for a `<text>`, `VirtualText` for one nested in\n * another, `RawText` for a run of text, and `View` for anything unregistered, which is what an\n * Angular component's host element is.\n *\n * Exported for tools that show a template beside what it becomes, such as the X-ray in the\n * documentation's course, which labels `@ng-native/web`'s DOM with these names. It reads the same\n * table the commit does, so after `registerPlatformComponents('android')` it answers for Android.\n */\nexport function viewNameOf(node: ViewNameNode): string {\n if (node.kind === 'text') return RAW_TEXT;\n // RN models nested text as a span inside a paragraph: `Paragraph > [RawText, Text > RawText]`.\n // Committing a nested `<text>` as another Paragraph gives a paragraph inside a paragraph,\n // which lays out as a separate block instead of flowing inline.\n // A component of the app's own under a name a view set registered: its host is a plain view.\n if (node.componentHost && !node.nativeView && YIELDING.has(node.tag)) return DEFAULT_VIEW;\n const registered = registeredViewName(node.tag);\n // Nearly every element: a view of some kind, by its name alone.\n if (registered !== PARAGRAPH) return registered ?? DEFAULT_VIEW;\n // One of HTML's text elements that holds something other than text: a view.\n if (node.tag !== 'text' && TEXT_ELEMENTS.has(node.tag) && !holdsOnlyText(node)) {\n return DEFAULT_VIEW;\n }\n // The paragraph the engine makes for a view's loose text is under a view, whatever the name\n // of the element that view is.\n return nestedText(node) ? VIRTUAL_TEXT : PARAGRAPH;\n}\n\n/**\n * Whether a text element is a span of the paragraph above it: under another text element, but\n * not one that is a view for placing this one (see `aligningText`), nor the engine's own box.\n */\nconst nestedText = (node: ViewNameNode): boolean =>\n !node.anonymous && isTextElement(node.parent) && !placesText(node.parent);\n\n/** Whether a node's parent is a text element committed as a view, to place the run it holds. */\nconst placesText = (parent: ViewNameNode | null | undefined): boolean =>\n parent != null && 'props' in parent && aligningText(parent as unknown as EngineNode);\n\n/**\n * The props every native view reads as a boolean: the `bool` fields of React Native's\n * `BaseViewProps`, `AccessibilityProps` and `HostPlatformViewProps`, by the names JavaScript sends.\n *\n * An attribute arrives as text. A component that declares the prop as an input turns it into a\n * boolean itself, but an element nothing claims, such as a component's own host, holds what it\n * was given, and Android refuses a string where it reads a boolean: `focusable=\"false\"` is\n * `java.lang.String cannot be cast to java.lang.Boolean` at the first commit. iOS ignores it.\n *\n * So the text is made a boolean as it is committed, `\"false\"` false and anything else true, as an\n * attribute reads in HTML. The node keeps the text, which is what `[focusable=\"false\"]` in a\n * stylesheet matches against.\n */\nconst BOOLEAN_VIEW_PROPS = new Set([\n 'accessibilityElementsHidden',\n 'accessibilityIgnoresInvertColors',\n 'accessibilityRespondsToUserInteraction',\n 'accessibilityShowsLargeContentViewer',\n 'accessibilityViewIsModal',\n 'accessible',\n 'collapsable',\n 'collapsableChildren',\n 'focusable',\n 'hasTVPreferredFocus',\n 'needsOffscreenAlphaCompositing',\n // The flags native reads to know an event has a listener, which are booleans as well.\n 'onAccessibilityAction',\n 'onAccessibilityEscape',\n 'onAccessibilityMagicTap',\n 'onAccessibilityTap',\n 'onLayout',\n 'removeClippedSubviews',\n 'renderToHardwareTextureAndroid',\n 'screenReaderFocusable',\n 'shouldRasterizeIOS',\n]);\n\n/**\n * Whether `node` holds nothing `:empty` sees besides `moved`: so it was empty before `moved` came,\n * or is now that it has gone. What `:empty` does not see is `fills` in css.ts to say.\n */\nfunction wasOrIsEmptyWithout(node: EngineNode, moved: EngineNode): boolean {\n if (!fills(moved)) return false;\n return !node.children.some((child) => child !== moved && fills(child));\n}\n\n/**\n * Have the child that paints a node's background merged again with the node: nothing of the\n * child's own moved, and what it paints may have.\n */\nfunction repaint(node: EngineNode): void {\n if (node.paintsOn?.parent === node) node.paintsOn.propsDirty = true;\n}\n\n/** A sixtieth of a second: how far apart the frames native is given for an animation are. */\nconst NATIVE_FRAME = 1000 / 60;\n/**\n * What native eases a set of transitions on one clock by: a colour by its own channels, opacity\n * and a transform as an animation of them is. Nothing where any of them is no value native can\n * ease, which leaves them all to JavaScript.\n */\nfunction easedChannels(\n tracks: ReadonlyMap<string, readonly TrackPoint[]>,\n spec: AnimationSpec,\n props: Record<string, unknown>,\n): DrivenChannels | null {\n const tinted = new Map([...tracks].filter(([key]) => EASED_COLOURS.has(key)));\n const moved = new Map([...tracks].filter(([key]) => !EASED_COLOURS.has(key)));\n const colors = colourChannels(tinted, spec);\n const { channels, held } = clockChannels(moved, spec, props);\n if (!colors || held.length) return null;\n const any = channels.opacity || channels.transform.length || tinted.size;\n return any ? { ...channels, colors } : null;\n}\n\n/** The sides a length is written for, and the two it is written for at once. */\nconst EDGES = ['', 'Top', 'Right', 'Bottom', 'Left', 'Horizontal', 'Vertical'];\n/**\n * The properties of a transition that resize or move a box, which native eases by laying the\n * view out where it ends: see `layEased`.\n */\nconst LAID_OUT = new Set([\n ...['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight'],\n ...['top', 'right', 'bottom', 'left', 'flexBasis'],\n ...EDGES.map((edge) => `margin${edge}`),\n]);\n/** Every prop that can resize or move a box, a view's own or another's. */\nconst MOVES_BOXES = new Set([\n ...LAID_OUT,\n ...EDGES.map((edge) => `padding${edge}`),\n ...['borderWidth', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n ...['flex', 'flexGrow', 'flexShrink', 'flexDirection', 'flexWrap', 'alignItems', 'alignSelf'],\n ...['alignContent', 'justifyContent', 'gap', 'rowGap', 'columnGap', 'display', 'position'],\n ...['aspectRatio', 'fontSize', 'lineHeight', 'fontFamily', 'fontWeight', 'letterSpacing'],\n ...['numberOfLines', 'start', 'end'],\n]);\n\n/** Whether native is moving a view to a prop's value, by a transition or an animation it laid out. */\nfunction laidByNative(node: EngineNode, key: string): boolean {\n const eased = node.transitions?.get(key);\n if (eased?.laid && !eased.done) return true;\n return node.playing?.laid === true && node.playing.tracks.has(key);\n}\n\n/** Whether an animation plays once through, forwards, with no wait before it. */\nconst playedOnce = (spec: AnimationSpec): boolean =>\n spec.delay === 0 && spec.duration > 0 && spec.iterations === 1 && !spec.direction;\n\n/** Whether a track is two frames on one curve, the first of them where the view is drawn. */\nfunction fromWhereDrawn(track: readonly TrackPoint[], drawn: unknown): boolean {\n const [first, last] = track;\n if (track.length !== 2 || first!.easing || last!.value == null) return false;\n // One that ends where it starts moves nothing: there is nothing for native to lay out.\n return Object.is(first!.value, drawn) && !Object.is(first!.value, last!.value);\n}\n\n/** The curves a layout animation has, as the timing function each is. */\nconst LAYOUT_CURVES: readonly (readonly [string, readonly number[]])[] = [\n ['linear', [0, 0, 1, 1]],\n ['easeIn', [0.42, 0, 1, 1]],\n ['easeOut', [0, 0, 0.58, 1]],\n ['easeInEaseOut', [0.42, 0, 0.58, 1]],\n];\n\n/** The curve of a layout animation nearest a timing function, by where each is along the way. */\nfunction layoutCurve(easing: readonly number[]): string {\n const along = [0.2, 0.4, 0.6, 0.8];\n const apart = (curve: readonly number[]) =>\n along.reduce((sum, at) => sum + (bezier(curve, at) - bezier(easing, at)) ** 2, 0);\n let nearest = LAYOUT_CURVES[0]!;\n for (const curve of LAYOUT_CURVES) if (apart(curve[1]) < apart(nearest[1])) nearest = curve;\n return nearest[0];\n}\n\n/** The properties of a transition native can play: see `easeNatively`. */\nconst EASED_COLOURS = new Set([\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n]);\nconst NATIVELY_EASED = new Set(['opacity', 'transform', ...EASED_COLOURS]);\n\n/** What a node that hands its background colour over has handed so far: nothing. */\nconst UNREPORTED = Symbol('unreported');\n\n/** The style keys that are a view's background. */\nconst PAINT_KEYS = [\n 'backgroundColor',\n 'experimental_backgroundImage',\n 'experimental_backgroundSize',\n 'experimental_backgroundPosition',\n 'experimental_backgroundRepeat',\n];\n\n/** Note a prop written on a node that keeps `writes`: see there. */\nfunction noteWrite(node: EngineNode, key: string, value: unknown): void {\n if (!node.writes) return;\n if (value === undefined || value === null) node.writes.delete(key);\n else node.writes.add(key);\n}\n\n/**\n * A node's own props onto what it commits with. No native prop has a hyphen: `data-*` and `aria-*`\n * attributes stay on the node for selectors to match, and an `aria-*` one is mapped to the prop\n * native reads. The node's `attributeOnly` names stay on it the same way.\n */\nfunction writeOwnProps(\n own: Record<string, unknown>,\n props: Record<string, unknown>,\n attributeOnly?: ReadonlySet<string>,\n): void {\n let aria = false;\n for (const key of Object.keys(own)) {\n if (attributeOnly?.has(key)) continue;\n if (key.includes('-')) aria ||= key.startsWith('aria-');\n else if (key !== 'style' && key !== INTRINSIC_SIZE && key !== STYLE_OVERRIDE) {\n props[key] = committedProp(key, own[key]);\n }\n }\n if (!aria) return;\n // An attribute-only `aria-*` is not mapped to the prop native reads either.\n const mapped = attributeOnly?.size\n ? Object.fromEntries(Object.entries(own).filter(([key]) => !attributeOnly.has(key)))\n : own;\n applyAria(mapped, props);\n}\n\n/** A prop as it is committed: a boolean view prop held as text is the boolean the text says. */\nfunction committedProp(key: string, value: unknown): unknown {\n return typeof value === 'string' && BOOLEAN_VIEW_PROPS.has(key) ? value !== 'false' : value;\n}\n\n/**\n * The `pointer-events` an element ends up with, in the order its props are merged: its inline\n * style's, then its `pointerEvents` prop, then what the sheets resolve. The inline one is read for\n * itself because an element no rule matches resolves to what it inherits, with its own inline\n * value only in what it hands down.\n */\nfunction pointerEventsOf(node: EngineNode, resolved: Record<string, unknown>): unknown {\n const inline = node.inlineInherits ? inlineInherited(node.props['style']) : null;\n const own = inline?.['pointerEvents'];\n // Merged over the prop, so its `inherit` is what the sheets and the parent settled, not the prop.\n if (own === 'inherit') return resolved['pointerEvents'];\n return own ?? node.props['pointerEvents'] ?? resolved['pointerEvents'];\n}\n/**\n * A node's `pointer-events` as native takes it, once its props and styles are merged.\n *\n * In CSS `none` is the element alone, and a descendant's `auto` takes touches again, which native\n * calls `box-none`: what a `none` with something inside to open it is committed as. Native's own\n * `none` is the whole subtree. It is what a `none` with nothing inside to open it stays, because\n * Android's text and images take no `pointerEvents` of their own and only an ancestor's `none`\n * keeps touches off them. It is also what the `pointerEvents` prop means, so a `none` that is the\n * prop's is left as it is.\n *\n * An inline `inherit` is what the element has without it, which is `resolved`: what the sheets\n * and its parent settled.\n */\nfunction nativePointerEvents(\n node: EngineNode,\n style: Record<string, unknown>,\n resolved: unknown,\n): void {\n let value = style['pointerEvents'];\n if (value === undefined) return;\n if (value === 'inherit') {\n value = resolved;\n if (value === undefined) delete style['pointerEvents'];\n else style['pointerEvents'] = value;\n }\n if (value === 'none' && node.touchWithin && node.props['pointerEvents'] !== 'none') {\n style['pointerEvents'] = 'box-none';\n }\n}\n/** Whether `node`, whose `pointer-events` is `value`, takes touches or holds something that does. */\nfunction takesTouches(node: EngineNode, value: unknown, prop: unknown): boolean {\n if (value === undefined) return false;\n // The prop's `none` is native's: the whole subtree, whatever is inside it.\n if (value === 'none' && prop === 'none') return false;\n // CSS's `none` and native's `box-none` take no touches themselves: their children answer.\n if (value === 'none' || value === 'box-none') {\n return node.children.some((child) => child.touchWithin);\n }\n return true;\n}\n\n/**\n * Records on `node` whether it, or something inside it, takes touches where it would inherit\n * `none`. When that changes a `none` element's own answer, its props are marked to be committed\n * again.\n *\n * Called as a node is reconciled, after its children, so theirs are already current: a child that\n * was skipped as clean has nothing beneath it that changed, and a change beneath marks every\n * ancestor to come back through here.\n */\nfunction noteTouches(node: EngineNode, style: StyleCache | null): void {\n if (!style) return;\n // Nearly every node: no `pointer-events` in any sheet, style or prop, and nothing recorded.\n const resolved = style.style['pointerEvents'];\n const prop = node.props['pointerEvents'];\n if (resolved === undefined && prop === undefined && !node.inlineInherits && !node.touchWithin) {\n return;\n }\n const value = pointerEventsOf(node, style.style);\n const within = takesTouches(node, value, prop);\n if (within === !!node.touchWithin) return;\n node.touchWithin = within;\n if (value === 'none') node.propsDirty = true;\n}\n\nconst hasClasses = (node: EngineNode, names: readonly string[]): boolean =>\n names.every((name) => node.classes?.has(name));\n\n/** Whether `node` is `ancestor` or somewhere under it. */\nfunction isWithin(node: EngineNode | null, ancestor: EngineNode): boolean {\n for (let at = node; at; at = at.parent) if (at === ancestor) return true;\n return false;\n}\n\n/**\n * The DOM events Angular's `@defer (on interaction)` and `(on hover)` listen for on the trigger\n * element, as the engine events that mean the same thing here.\n *\n * Interaction is `click` and `keydown`: a touch that lifts on the trigger or anything inside it,\n * and focus reaching it, which is what a keyboard or a screen reader does before acting on it.\n * Hover is `mouseenter`, `mouseover` and `focusin`: a pointer entering, which only a trackpad or a\n * mouse produces, and focus. Anything else is not a trigger and is ignored.\n */\nconst DEFER_TRIGGER_EVENTS: Readonly<Record<string, readonly string[]>> = {\n click: ['topTouchEnd'],\n keydown: ['topFocus'],\n mouseenter: ['topPointerEnter'],\n focusin: ['topFocus'],\n};\n\n/** Each trigger listener's teardowns, by DOM event name. Off the node, which rarely has one. */\nconst triggerListeners = new WeakMap<\n object,\n Map<(event: unknown) => void, Map<string, () => void>>\n>();\n\n/**\n * The react tag of the next view any engine creates.\n *\n * Even, because surface root tags are odd (1, 11, 21, ...): an odd view tag eventually collides\n * with a root, and UIKit throws inside `-[RCTViewComponentView mountChildComponentView:]` while\n * adding a view to itself, a native crash with no JS error at all.\n *\n * And far above 2, where React starts. Native keeps one registry of views by tag for every\n * surface, and React numbers its own views 2, 4, 6... on any surface it renders; a development\n * build always has one, LogBox, which renders the first `console.warn` on a surface of its own.\n * Starting where React starts put two views under one tag, and the app crashed natively in\n * `-[RCTComponentViewRegistry dequeueComponentViewWithComponentHandle:tag:]`. One counter for\n * every engine, so two Angular surfaces do not collide with each other either.\n *\n * ponytail: room for about 530 million views in one run of the app before a tag would pass\n * int32, which native keeps them as; recycled and cloned views take no new tag. Wrapping would\n * need to skip tags still mounted.\n */\nconst FIRST_TAG = 2 ** 30;\nlet lastTag = FIRST_TAG - 2;\nconst nextTag = (): number => (lastTag += 2);\n\nlet hoverReported = false;\n\n/**\n * Said once, in development, the first time a `@defer (on hover)` trigger is registered: a phone\n * has no pointer, so on one the block waits for focus alone.\n */\nfunction reportHover(host: HostEngine): void {\n if (hoverReported || !(host instanceof Engine) || !host.dev) return;\n hoverReported = true;\n console.warn(\n '[angular-native] @defer (on hover) fires when a pointer enters the trigger, which takes a trackpad or a mouse (an iPad, or an Android device with one), or when the trigger takes focus. On a phone it waits for focus alone; add another trigger, such as on interaction or on viewport.',\n );\n}\n\n/** A bound value the cascade works out from tokens: a `var()`, a `color-mix()`, a relative colour. */\nconst BOUND_TOKEN =\n /^[ \\t\\n\\r\\f]*(?:var|color-mix)\\(|^[ \\t\\n\\r\\f]*[a-z]+\\([ \\t\\n\\r\\f]*from[ \\t\\n\\r\\f]/i;\n\n/**\n * A bound value kept as a declaration the cascade settles: a `var()`, a colour made of tokens, or\n * a relative length.\n */\nfunction boundFrom(prop: string, text: string, on: string): DeferredDeclaration | null {\n return BOUND_TOKEN.test(text)\n ? boundDeclaration(prop, tokenFromValue(text), on)\n : boundRelativeLength(prop, text, on);\n}\n\n/** Whether a value is one of the engine's own nodes. */\nexport function isEngineNode(value: unknown): value is EngineNode {\n return value instanceof RetainedNode;\n}\n\n/**\n * A retained node, as a class so every node has one shape from its first line: Hermes lays a\n * constructed object out once, where the object-spread this replaced built a literal and copied\n * eighteen fields across for each of the thousands of nodes a screen makes.\n *\n * The first three methods are what Angular's `animate.enter` and `animate.leave` ask an element\n * for directly, rather than through `Renderer2`; everything else those instructions do goes through\n * the renderer. `getAnimations` answers from the transitions the engine is actually running,\n * which is what tells Angular how long to wait before removing a leaving element.\n */\n/**\n * What the Metro preset's `Node` stand-in recognises an engine node by, so that Angular's\n * `instanceof Node` checks pass for these and for nothing else.\n */\nconst ENGINE_NODE = Symbol.for('ng-native.node');\n\nclass RetainedNode {\n static {\n Object.defineProperty(RetainedNode.prototype, ENGINE_NODE, { value: true });\n }\n\n props: Record<string, unknown> = {};\n text = '';\n children: EngineNode[] = [];\n parent: EngineNode | null = null;\n listeners: Map<string, Set<(event: unknown) => void>> | null = null;\n classes: Set<string> | null = null;\n sheet: StyleSheet | null = null;\n hostSheet: StyleSheet | null = null;\n customProperties: Record<string, TokenValue> | null = null;\n styleCache: StyleCache | null = null;\n styleDirty = true;\n ownDirty = false;\n styleCommitted: StyleCache | null = null;\n fitContainer: string | undefined = undefined;\n heightBasis: boolean | undefined = undefined;\n hasDirty = false;\n stateDirty = false;\n ownStyle: object | undefined = undefined;\n claimed: true | undefined = undefined;\n dormantHoists: EngineNode[] | null = null;\n committed: Committed | null = null;\n committedUnder: EngineNode | null = null;\n kept: Map<string, KeptHoist> | undefined = undefined;\n remeasure: true | undefined = undefined;\n oneWord: boolean | undefined = undefined;\n raised: number | undefined = undefined;\n propsDirty = false;\n structureDirty = false;\n subtreeDirty = false;\n touchWithin: boolean | undefined = undefined;\n box: EngineNode | undefined = undefined;\n anonymous: true | undefined = undefined;\n styled: true | undefined = undefined;\n transitions?: Map<string, Transition>;\n playing?: RunningAnimation;\n scrolled?: ScrollAnimation;\n owned?: { readonly tag: number; readonly keys: Set<string> };\n\n readonly kind: NodeKind;\n readonly tag: string;\n /** See `HostNode.host`. */\n readonly host: HostEngine;\n\n constructor(kind: NodeKind, tag: string, host: HostEngine) {\n this.kind = kind;\n this.tag = tag;\n this.host = host;\n }\n\n get tagName(): string {\n return this.tag;\n }\n\n /** Angular's dev-mode assertion compares this against `Node.ELEMENT_NODE`. */\n get nodeType(): number {\n return 1;\n }\n\n getAnimations(): unknown[] {\n const running: unknown[] = [];\n const playing = this.playing;\n if (playing && !playing.done) {\n running.push({\n animationName: playing.spec.name,\n effect: {\n // `animate.enter` reads this to know how long to wait. A null count is `infinite`,\n // which is what the Web Animations shape spells as Infinity.\n getTiming: () => ({\n duration: playing.spec.duration * (playing.spec.iterations ?? Infinity),\n delay: playing.spec.delay,\n iterations: playing.spec.iterations ?? Infinity,\n }),\n },\n });\n }\n for (const [property, transition] of this.transitions ?? []) {\n if (transition.done) continue;\n running.push({\n transitionProperty: property,\n effect: {\n getTiming: () => ({ duration: transition.duration, delay: 0, iterations: 1 }),\n },\n });\n }\n return running;\n }\n\n /**\n * Where another node is relative to this one, as the DOM's `compareDocumentPosition` answers:\n * the bits for preceding (2), following (4), containing (8) and contained (16), in tree order.\n * Signal Forms asks, to focus the first of a form's fields in the order the screen shows them.\n */\n compareDocumentPosition(other: RetainedNode): number {\n if (other === this) return 0;\n const path = (node: RetainedNode): RetainedNode[] => {\n const chain: RetainedNode[] = [];\n for (let at: RetainedNode | null = node; at; at = at.parent as RetainedNode | null) {\n chain.unshift(at);\n }\n return chain;\n };\n const mine = path(this);\n const theirs = path(other);\n if (mine[0] !== theirs[0]) return 1 | 32 | 4;\n let depth = 0;\n while (depth < mine.length && depth < theirs.length && mine[depth] === theirs[depth]) depth++;\n if (depth === mine.length) return 4 | 16;\n if (depth === theirs.length) return 2 | 8;\n const siblings = mine[depth - 1]!.children as unknown as RetainedNode[];\n return siblings.indexOf(theirs[depth]!) < siblings.indexOf(mine[depth]!) ? 2 : 4;\n }\n\n /**\n * What Signal Forms' `focusBoundControl()` calls on a field's element, and what a DOM element\n * would do: see `HostEngine.focus`.\n */\n focus(): void {\n this.host.focus(this as unknown as EngineNode);\n }\n\n get classList(): { contains(name: string): boolean } {\n const classes = this.classes;\n return { contains: (name: string): boolean => classes?.has(name) ?? false };\n }\n\n /**\n * What `@defer (on interaction)` and `(on hover)` call on their trigger element, the one place\n * Angular listens on an element directly rather than through `Renderer2`. See\n * `DEFER_TRIGGER_EVENTS`.\n */\n addEventListener(type: string, listener: (event: unknown) => void): void {\n const events = DEFER_TRIGGER_EVENTS[type];\n if (!events) return;\n let byListener = triggerListeners.get(this);\n if (!byListener) triggerListeners.set(this, (byListener = new Map()));\n let byType = byListener.get(listener);\n if (!byType) byListener.set(listener, (byType = new Map()));\n if (byType.has(type)) return;\n if (type === 'mouseenter') reportHover(this.host);\n const stops = events.map((event) =>\n this.host.setEventListener(this as unknown as EngineNode, event, listener),\n );\n byType.set(type, () => {\n for (const stop of stops) stop();\n });\n }\n\n removeEventListener(type: string, listener: (event: unknown) => void): void {\n const byType = triggerListeners.get(this)?.get(listener);\n byType?.get(type)?.();\n byType?.delete(type);\n }\n}\n\n/**\n * RN-specific helpers, injected rather than imported so the engine stays runnable under Node.\n */\nexport interface EngineOptions {\n /**\n * React Native's `NativeAnimatedHelper`, which lets native move a view by a scroll with no\n * JavaScript in between: how sticky headers stay pinned on a fast fling. The platform supplies it\n * on a device; without it, the components move those views from JavaScript as before.\n */\n nativeAnimated?: NativeAnimated | null;\n /**\n * RN's `processColor`. Narrower than `unknown` on purpose: it is only ever handed the value of\n * a `*color` prop, and typing it that way is what lets an app pass RN's function straight in\n * rather than casting at every call site.\n */\n processColor?: (value: string | number) => unknown;\n /**\n * RN's `resolveAssetSource`. `require('./x.png')` compiles to an asset *id*, and only this\n * turns it into `{uri, width, height, scale}`. Without it local images cannot work at all,\n * while remote `{uri}` objects pass through and appear to prove the prop is fine.\n */\n resolveAssetSource?: (value: unknown) => unknown;\n /**\n * The application-level sheet, compiled at build time. The one set of rules allowed to match a\n * node whatever component created it, which is what resets, utility classes and `:root` tokens\n * all need.\n */\n globalStyles?: StyleSheet | null;\n /**\n * What media queries are evaluated against. Pushed in rather than read, because the engine\n * imports nothing from React Native and a host may have its own idea of the viewport.\n */\n conditions?: Conditions;\n /**\n * Custom properties the device knows and the stylesheet cannot: the hairline width, and\n * whatever else is settled before the first frame. Seeded on the root, below `:root`, so an\n * app's own sheet still overrides them. Values that only arrive later - the safe-area insets,\n * which nothing knows until a view has been laid out - come through `updateTokens` instead.\n */\n tokens?: Readonly<Record<string, TokenValue>>;\n /**\n * Report host primitives used without their component (see `claimHost`). Defaults to RN's\n * `__DEV__`, so a release build never looks.\n */\n dev?: boolean;\n /**\n * The clock CSS transitions run on. Pushed in for the same reason everything else is: the\n * engine imports nothing, and a test drives time rather than waiting for it.\n */\n now?: () => number;\n /**\n * Called when the tree goes from clean to dirty. The host uses it to schedule a commit for a\n * change that arrives outside change detection, which is where Angular's animation queue puts\n * the classes for `animate.enter` and `animate.leave`.\n */\n onDirty?: () => void;\n /**\n * Where an error thrown while a native event is being dispatched goes, with the event's name.\n * The platform adapter points it at the app's `ErrorHandler`. Without one it is logged, and\n * either way it is never rethrown: see `dispatchEvent` for why.\n */\n onError?: (error: unknown, topLevelType: string) => void;\n}\n\n/**\n * A prop whose value is a colour, and so has to go through `processColor` before native reads it.\n *\n * The `Android` suffix is part of the test because React Native names its platform-specific props\n * that way round: `underlineColorAndroid` is a colour and does not end in `color`, and Android's\n * `ColorPropConverter` takes a number or a platform-colour map and refuses a string, so an unnamed\n * one arrives as the wrong type. `iOS`-suffixed props are not in the set because none of them are\n * colours - `shouldRasterizeIOS` is a boolean.\n */\nconst IS_COLOR_PROP = /color(android)?$/i;\n/**\n * Colour props React Native does not name with a `color` suffix: `<switch>`'s pair ends in the\n * state each one paints - `trackColorForTrue` and `trackColorForFalse`. They are the same type\n * problem the `Android` suffix causes: Android's `ColorPropConverter` takes a number or a\n * platform-colour map, refuses a string, and throws rather than approximating one.\n */\nconst STATE_COLOR_PROPS = new Set(['trackColorForTrue', 'trackColorForFalse']);\n/** Answers per key name, once: the regex ran for every prop of every node in every commit. */\nconst colorProps = new Map<string, boolean>();\nfunction isColorProp(key: string): boolean {\n let answer = colorProps.get(key);\n if (answer === undefined) {\n colorProps.set(\n key,\n (answer = IS_COLOR_PROP.test(key) || STATE_COLOR_PROPS.has(key) || BRUSH_PROPS.has(key)),\n );\n }\n return answer;\n}\nconst ASSET_PROPS = new Set(['source', 'defaultSource', 'loadingIndicatorSource']);\n\n/**\n * Props whose value is a list of objects with a `color` inside.\n *\n * Colour processing keys off the *property name*, which cannot see a colour nested in an array.\n * That matters more than it sounds: with `enableNativeCSSParsing` off, which is the default,\n * Fabric does not parse a colour string either, so an unprocessed nested colour is not\n * approximated, it is dropped.\n */\nconst NESTED_COLOR_LIST_PROPS = new Set(['boxShadow']);\n\n/** The props of an SVG shape that take a brush, not a colour. */\nconst BRUSH_PROPS = new Set(['fill', 'stroke']);\n\n/** Styles arrive as objects, arrays, nested arrays and nulls. Reduce to one object. */\n/**\n * A bound transform is still the CSS string: see `inline-transform.ts`. One CSS cannot read\n * leaves the transform the rules set, as a browser drops it.\n */\nfunction boundTransform(\n node: EngineNode,\n style: Record<string, unknown>,\n cascaded: unknown,\n): Record<string, unknown> {\n const text = style['transform'];\n if (typeof text !== 'string') return style;\n // The same list for the same string, commit after commit: a transition compares the two ends\n // it is given, and a list made afresh each time reads as a new place to go.\n if (node.boundTransform?.text !== text) node.boundTransform = { text, list: transformList(text) };\n const list = node.boundTransform.list ?? cascaded;\n if (list === undefined) delete style['transform'];\n else style['transform'] = list;\n return style;\n}\n\n/** A transform string as the list native reads, and none for one CSS cannot read. */\nconst transformOf = (value: string): unknown[] => transformList(value) ?? [];\n\nfunction flattenStyle(value: unknown, into: Record<string, unknown>): Record<string, unknown> {\n if (!value) return into;\n if (Array.isArray(value)) {\n for (const entry of value) flattenStyle(entry, into);\n return into;\n }\n if (typeof value === 'object') Object.assign(into, value);\n return into;\n}\n\n/** The timing a rule can set apart from a property list, and the part of the spec each sets. */\nconst TRANSITION_TIMING = {\n $transitionDuration: 'duration',\n $transitionDelay: 'delay',\n $transitionEasing: 'easing',\n} as const;\n/** Listed once, as `ANIMATION_ENTRIES` is. */\nconst TRANSITION_ENTRIES = Object.entries(TRANSITION_TIMING);\n\n/**\n * The transition spec, with any timing set by a rule of its own laid over it: `.duration-700`\n * beside `.transition`. A rule that writes the timing itself compiles it to `null`, which is how\n * a stronger transition keeps its own.\n *\n * Every key is taken out of `props`: they are instructions for this engine, and nothing native\n * has ever heard of them. See `animated` for why each `delete` is guarded.\n */\nfunction transitionSpec(\n props: Record<string, unknown>,\n): Record<string, TransitionSpec> | undefined {\n // Keyed `$transition` by the compiler, so a view's own `transition` prop reaches it.\n let spec = props['$transition'] as Record<string, TransitionSpec> | undefined;\n if (spec !== undefined) delete props['$transition'];\n for (const [key, part] of TRANSITION_ENTRIES) {\n if (!(key in props)) continue;\n const value = props[key];\n delete props[key];\n if (value === null || spec === undefined) continue;\n const timed: Record<string, TransitionSpec> = {};\n for (const name of Object.keys(spec)) timed[name] = { ...spec[name]!, [part]: value };\n spec = timed;\n }\n return spec;\n}\n\n/**\n * The keys CSS's `translate`, `rotate` and `scale` compile to, in the order they apply. The\n * compiler's `INDIVIDUAL_TRANSFORMS` in `packages/metro/css/properties.cjs` writes the same three.\n */\nconst INDIVIDUAL_TRANSFORMS = ['__translate', '__rotate', '__scale'] as const;\n\n/**\n * Fold the individual transform properties into the one list native has.\n *\n * They cascade, transition and animate as properties of their own, so this runs last, on what\n * the node is about to paint. CSS Transforms 2 applies translate, then rotate, then scale, then\n * `transform`, and a list applies left to right, so that is the order they are written in.\n */\nfunction composeTransform(\n node: EngineNode,\n props: Record<string, unknown>,\n): Record<string, unknown> {\n const [translate, rotate, scale] = INDIVIDUAL_TRANSFORMS.map((key) => props[key]);\n if (translate === undefined && rotate === undefined && scale === undefined) return props;\n // Guarded, as `animated` guards its own: a `delete` is what sends an object to Hermes's slow\n // dictionary layout, and most nodes have none of these.\n for (const key of INDIVIDUAL_TRANSFORMS) if (key in props) delete props[key];\n\n const transform = props['transform'];\n const parts = [translate, rotate, scale, transform];\n const last = node.composedTransform;\n let value: unknown[];\n if (last && last.parts.every((part, i) => part === parts[i])) {\n value = last.value;\n } else {\n // A bound style's transform is still the CSS string: see `inline-transform.ts`.\n const own = typeof transform === 'string' ? transformOf(transform) : transform;\n value = [translate, rotate, scale, own].flatMap((part) => (Array.isArray(part) ? part : []));\n node.composedTransform = { parts, value };\n }\n\n if (value.length) props['transform'] = value;\n else delete props['transform'];\n return props;\n}\n\n/**\n * Fabric *merges* the raw props handed to a clone onto the node's existing props, so a prop\n * that has gone away has to be sent explicitly as `null`. Sending the whole prop object would\n * silently keep removed props alive.\n */\nfunction diffProps(\n prev: Record<string, unknown>,\n next: Record<string, unknown>,\n): Record<string, unknown> | null {\n let payload: Record<string, unknown> | null = null;\n for (const key of Object.keys(next)) {\n if (!Object.is(prev[key], next[key])) (payload ??= {})[key] = next[key];\n }\n for (const key of Object.keys(prev)) {\n if (!(key in next)) (payload ??= {})[key] = null;\n }\n return payload;\n}\n\n/**\n * The prop a replaced element, an image, puts its own pixel size in: `{ width, height }`.\n *\n * Not a style, because a style binding is inline style and beats every rule, so a picture's own\n * 600 by 600 would override `class=\"size-11\"`. CSS gives a replaced element's natural size the\n * lowest precedence of all, below any rule and any bound style, and that is what this is for.\n * It never reaches native.\n */\nconst INTRINSIC_SIZE = 'intrinsicSize';\n\n/**\n * The prop a component puts the style it must have the last word on in, over the caller's.\n *\n * The other end of the scale from `intrinsicSize`. Angular merges a component's host style\n * binding under the template's, so a caller's `[style]=\"{flex: 1}\"` beats the host's own\n * `flex: 0`; that is the right order for a default and the wrong one for an adjustment the\n * component is making on the caller's behalf, which RN composes after the caller's style. A\n * keyboard-avoiding view's padding, height and flex are that. Applied after inline style, a key\n * at a time, so every other property the caller wrote still applies. It never reaches native.\n */\nconst STYLE_OVERRIDE = 'styleOverride';\n\ninterface IntrinsicSize {\n readonly width: number;\n readonly height: number;\n}\n\nconst isSet = (value: unknown): boolean => value !== undefined && value !== null;\n\n/**\n * Size a box from its content's natural size, where nothing else did, as CSS sizes an `<img>`.\n *\n * Neither dimension set: the natural size, or the natural width alone when the author gave an\n * aspect ratio for Yoga to take the height from. One dimension set: the other follows the\n * picture's proportions, through `aspectRatio`, unless the author gave one of their own.\n */\nfunction applyIntrinsicSize(props: Record<string, unknown>, size: IntrinsicSize): void {\n const width = isSet(props['width']);\n const height = isSet(props['height']);\n if (width && height) return;\n const ownRatio = isSet(props['aspectRatio']);\n if (!width && !height) {\n props['width'] = size.width;\n if (!ownRatio) props['height'] = size.height;\n return;\n }\n if (!ownRatio && size.width > 0 && size.height > 0) {\n props['aspectRatio'] = size.width / size.height;\n }\n}\n\nconst now = (): number => globalThis.performance?.now?.() ?? Date.now();\n\n/** How many boxes `node` is under. */\n/**\n * How deep a node is, with the depth of every box on its way up kept in `known`: the boxes that\n * changed beneath are a node and its ancestors, so each is counted once, not once a box.\n */\nfunction depthOf(node: EngineNode, known: Map<EngineNode, number>): number {\n const path: EngineNode[] = [];\n let depth = -1;\n for (let up: EngineNode | null = node; up; up = up.parent) {\n const found = known.get(up);\n if (found !== undefined) {\n depth = found;\n break;\n }\n path.push(up);\n }\n for (let i = path.length - 1; i >= 0; i--) known.set(path[i]!, ++depth);\n return depth;\n}\n\nfunction sameHandles(a: readonly FabricNode[], b: readonly FabricNode[]): boolean {\n return a.length === b.length && a.every((handle, i) => handle === b[i]);\n}\n\n/** Whether two sets of the same classes hold them in the same order. */\nfunction inOrder(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean {\n const other = b.values();\n for (const name of a) if (other.next().value !== name) return false;\n return true;\n}\n\n/**\n * Whether a node could be the element a compound is written for, by its classes alone: its own,\n * and those of one alternative of each `:is()` on it, which is where Tailwind names a group or\n * a peer. A compound with no class in either could be any element.\n */\nfunction couldBe(compound: Compound, node: EngineNode): boolean {\n if (!compound.classes.every((name) => node.classes?.has(name))) return false;\n return (compound.is ?? []).every((alternatives) =>\n alternatives.some((option) => couldBe(option, node)),\n );\n}\n\n/** Dev-time commit accounting, so a slow frame can be attributed rather than guessed at. */\nexport interface EngineStats {\n commits: number;\n lastCommitMs: number;\n /** The initial mount, which is a different animal from a steady-state update. */\n firstCommitMs: number;\n /** Worst commit *after* the mount. This is the number that matters for frame rate. */\n worstCommitMs: number;\n /** Commits that took longer than 8ms, a frame at 120Hz, excluding the mount. */\n slowCommits: number;\n /**\n * Worst `begin()`..`end()` span, excluding the mount. This brackets Angular's whole render\n * pass - template execution, bindings, the commit - so comparing it against `worstCommitMs`\n * says whether time is going into the renderer or into change detection around it.\n */\n worstRenderMs: number;\n createdNodes: number;\n clonedNodes: number;\n}\n\nconst FRAME_BUDGET_MS = 8;\n\n/** A solid brush with no colour in it, which stops react-native-svg. */\nconst emptyBrush = (value: unknown): boolean =>\n typeof value === 'object' &&\n value !== null &&\n (value as { type?: unknown }).type === 0 &&\n (value as { payload?: unknown }).payload == null;\n\nexport class Engine implements HostEngine {\n /** Scopes the CSS resolver's memo. Bumped once per commit. */\n private styleEpoch = 0;\n\n /** The node `:focus` currently applies to. */\n private focusedNode: EngineNode | null = null;\n\n readonly stats: EngineStats = {\n commits: 0,\n lastCommitMs: 0,\n firstCommitMs: 0,\n worstCommitMs: 0,\n slowCommits: 0,\n worstRenderMs: 0,\n createdNodes: 0,\n clonedNodes: 0,\n };\n\n private eventsRegistered = false;\n\n readonly root: EngineNode = new RetainedNode('element', 'root', this);\n\n private readonly fabric: FabricUIManager;\n private readonly rootTag: number;\n private readonly styles: StyleResolver;\n /** Whether to run the development checks, which a release build skips. */\n readonly dev: boolean;\n private readonly now: () => number;\n private onDirty: (() => void) | undefined;\n private onError: ((error: unknown, topLevelType: string) => void) | undefined;\n /** Nodes with at least one transition in flight, so a frame walks those and nothing else. */\n private readonly running = new Set<EngineNode>();\n /** Nodes playing a `@keyframes` animation. */\n private readonly playing = new Set<EngineNode>();\n /**\n * Elements of a hoisted name (`registerHoist`) that are in the tree, so a commit need not search\n * for them. Only those in the tree: see `releaseDetached`.\n */\n private readonly hoisted = new Set<EngineNode>();\n /** The nodes taken out of a child list since the last commit. See `releaseDetached`. */\n private readonly removedSinceCommit = new Set<EngineNode>();\n /**\n * `@keyframes` by name, across every sheet registered. One registry rather than one per sheet,\n * because that is the scope CSS gives them: a name defined in a global stylesheet is usable\n * from a component's. The cost is that two components defining the same name collide, last one\n * in wins, exactly as two stylesheets in a document would.\n */\n private readonly keyframes = new Map<string, readonly Keyframe[]>();\n /** Every sheet registered, in the order a document would hold them. See `sheetReplaced`. */\n private readonly sheetOrder: StyleSheet[] = [];\n /** The `@keyframes` each playing animation was started from. See `startPlaying`. */\n private readonly playedFrames = new WeakMap<RunningAnimation, readonly Keyframe[]>();\n /** Element names already reported as unclaimed, so a list of a thousand rows reports once. */\n private readonly reported = new Set<string>();\n private readonly processColor: (value: string | number) => unknown;\n /**\n * Whether any sheet seen so far asks about a node's position among its siblings. Until one\n * does, a child list can move without anything else needing to be looked at again.\n */\n private structuralSheets = false;\n /** How many children after a change in a list one of them reaches. See `siblingReach`. */\n private structuralAfter = 0;\n /** Whether one of them reaches the children before it. */\n private structuralBefore = false;\n /** The compounds of theirs that read an element's place from under it. See `markPlace`. */\n private readonly placeElsewhere = new Set<PlaceReader>();\n /** The sheets `watchStructure` has read, which it is asked about once an element. */\n private readonly watchedStructure = new WeakSet<StyleSheet>();\n /** Whether any sheet uses `:has()`. See `markBeneath`. */\n private hasSheets = false;\n private readonly resolveAssetSource: (value: unknown) => unknown;\n\n constructor(fabric: FabricUIManager, rootTag: number, options: EngineOptions = {}) {\n this.fabric = fabric;\n this.rootTag = rootTag;\n const conditions = options.conditions ?? { width: 0, height: 0, colorScheme: 'light' };\n this.styles = new StyleResolver(options.globalStyles ?? null, conditions);\n this.viewportSize = { width: conditions.width, height: conditions.height };\n this.fontScale = conditions.fontScale;\n if (options.tokens) this.styles.setRootTokens(options.tokens);\n this.watchStructure(options.globalStyles);\n this.watchHas(options.globalStyles);\n this.watchActive(options.globalStyles);\n this.dev = options.dev ?? (globalThis as { __DEV__?: boolean }).__DEV__ === true;\n if (this.dev) {\n this.styles.onUndefinedToken = (name, props, on) =>\n this.reportUndefinedToken(name, props, on);\n this.styles.onUnreadDisplay = (name, value) => this.reportUnreadDisplay(name, value);\n }\n this.now = options.now ?? (() => globalThis.performance?.now?.() ?? Date.now());\n this.onDirty = options.onDirty;\n this.onError = options.onError;\n this.registerSheet(options.globalStyles);\n this.processColor = options.processColor ?? ((value) => value);\n this.resolveAssetSource = options.resolveAssetSource ?? ((value) => value);\n this.scrollDriver = options.nativeAnimated\n ? new NativeScrollDriver(options.nativeAnimated, (view, tag, keys) =>\n this.touchedNatively(view as EngineNode, tag, keys),\n )\n : null;\n // Eagerly, not on the first listener. Fabric holds exactly one event handler and\n // `ReactFabric` installs React's at module scope, so until we claim it every native event\n // lands in React's event plugins. Those look the name up in a view config registry we never\n // populate and throw `Unsupported top level event type` from inside the native dispatch, or\n // read `instanceHandle.stateNode.canonical` off our own node and throw on `canonical`.\n // Nothing here emits events until a component asks for one, so waiting looks safe; it is not.\n // `RNSScreen` fires `onWillAppear`/`onHeaderHeightChange` on its own during a push, with no\n // listener anywhere, and the throw unwinds through the mounting transaction that pushed it.\n // The next commit then reads freed props and the process dies in `updateProps`.\n this.registerEventHandler();\n }\n\n /**\n * A rotation, a window resize, or the system switching to dark mode.\n *\n * None of those change a single node, so nothing would be dirty and nothing would re-render.\n * Marking the root is what gets the tree walked again; every cached style is already invalid,\n * because each carries the conditions version it was resolved under.\n */\n /**\n * Move `:focus`, invalidating only the two nodes involved.\n *\n * Precise rather than by generation: unlike a rotation, the engine knows exactly which nodes\n * changed, and a keystroke's worth of focus movement should not invalidate the tree.\n */\n private setFocused(node: EngineNode | null): void {\n if (this.focusedNode === node) return;\n if (this.focusedNode) {\n this.focusedNode.focused = false;\n this.markProps(this.focusedNode);\n }\n this.focusedNode = node;\n if (node) {\n node.focused = true;\n this.markProps(node);\n }\n this.commit();\n }\n\n /**\n * Set or clear `:active` along a responder chain, marking each node so its style re-resolves.\n *\n * Returns whether anything moved, because the caller has to commit: a gesture changes no\n * binding, so nothing marks an Angular view dirty and no change-detection pass would follow.\n */\n private setActiveChain(from: EngineNode | null, active: boolean): boolean {\n let changed = false;\n const set = (node: EngineNode) => {\n if (node.active === active) return;\n node.active = active;\n this.markActive(node);\n changed = true;\n };\n for (let node = from; node; node = node.parent) {\n set(node);\n if (active) this.activeNodes.add(node);\n }\n if (!active) {\n // Every node the press set, too: one the pressed node was moved or removed from mid-press\n // is no longer above it.\n for (const node of this.activeNodes) set(node);\n this.activeNodes.clear();\n }\n return changed;\n }\n\n /** The nodes a press has set `:active` on, to clear whatever happens to the tree meanwhile. */\n private readonly activeNodes = new Set<EngineNode>();\n\n /** Whether any sheet styles a pressed element, and each compound that asks about one from another. */\n private activeUse: { own: boolean; elsewhere: readonly Compound[] } = {\n own: false,\n elsewhere: [],\n };\n\n /** What each sheet in play asks about a pressed element: `activeUse` is all of them together. */\n private readonly activeBySheet = new Map<StyleSheet, ReturnType<typeof usesActive>>();\n\n /** Note what a sheet in play asks about a pressed element. See `markActive`. */\n private watchActive(sheet: StyleSheet | null | undefined): void {\n // Asked for every element a component's sheet is given to: noted once a sheet.\n if (!sheet || this.activeBySheet.has(sheet)) return;\n const use = usesActive(sheet);\n this.activeBySheet.set(sheet, use);\n if (!use.own && !use.elsewhere.length) return;\n this.countActive();\n if (this.styles.tracksHas) return;\n // What a pressed element is compared with is the rules it matched, which no cache kept until\n // a sheet asked. Nothing is resolved yet when the sheet is the one the engine was made with.\n this.styles.tracksHas = true;\n if (!this.root) return;\n this.root.styleDirty = true;\n this.markPath(this.root);\n }\n\n /** A sheet has left play, by a hot swap or by being removed: what it asked goes with it. */\n private unwatchActive(sheet: StyleSheet): void {\n if (this.activeBySheet.delete(sheet)) this.countActive();\n }\n\n private countActive(): void {\n const all = [...this.activeBySheet.values()];\n this.activeUse = {\n own: all.some((use) => use.own),\n elsewhere: all.flatMap((use) => use.elsewhere),\n };\n }\n\n /**\n * A press began or ended on `node` or under it, which is all that changed about it. A press\n * reaches every ancestor up to the root, and marking each as restyled would style the whole\n * screen again, twice a press. So each is only matched again, and keeps its style and all\n * that is under it unless it now matches other rules. An element a rule asks about from\n * inside or beside it, `.card:active .title`, changes more than itself, and is restyled with\n * everything under it as any other change is. With no rule for a pressed element at all there\n * is nothing to match.\n */\n private markActive(node: EngineNode): void {\n const { own, elsewhere } = this.activeUse;\n if (!own && !elsewhere.length) return;\n if (elsewhere.some((compound) => couldBe(compound, node))) return this.markProps(node);\n node.stateDirty = true;\n this.markPath(node.parent ?? node);\n }\n\n /**\n * Custom properties the device knows and the stylesheet cannot, once they change.\n *\n * Merged rather than replaced: the insets come from a view and the hairline from the device, so\n * a caller owns the properties it names and nothing else. Each owner writes all of its own at\n * once - four insets together, never one - so nothing is left over from a previous rotation.\n */\n /**\n * Match `sheet` against every node from now on, after the global sheet the engine was made\n * with, and restyle everything; false, and nothing done, when it already is. How a platform\n * applies a component whose CSS is not scoped, such as Angular's `ViewEncapsulation.None`.\n * `replacing` is a sheet added before that this one takes the place of, after a hot swap.\n */\n addGlobalSheet(sheet: StyleSheet, replacing?: StyleSheet): boolean {\n if (!this.styles.addGlobalSheet(sheet, replacing)) return false;\n if (replacing) this.sheetReplaced(replacing, sheet);\n else this.registerSheet(sheet);\n this.watchStructure(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.markPath(this.root);\n this.markWrittenFor(sheet, this.root);\n return true;\n }\n\n /**\n * Have styled again each node a sheet just added could match. The rest keep the style they\n * have, which the resolver lets stand for a node none of the sheet's rules is written for,\n * so a commit steps over them: the walk here is what finds the ones it must not step over.\n */\n private markWrittenFor(sheet: StyleSheet, node: EngineNode): void {\n if (node.kind === 'element' && this.styles.couldMatch(sheet, node)) {\n node.styleDirty = true;\n this.markPath(node);\n }\n for (const child of node.children) this.markWrittenFor(sheet, child);\n }\n\n /**\n * Stop matching a sheet `addGlobalSheet` added, and restyle everything; false, and nothing\n * done, when it is not one. A hot swap that leaves a None component no rules, or makes it scoped.\n */\n removeGlobalSheet(sheet: StyleSheet): boolean {\n if (!this.styles.removeGlobalSheet(sheet)) return false;\n this.sheetReplaced(sheet, null);\n this.markPath(this.root);\n return true;\n }\n\n updateTokens(next: Readonly<Record<string, TokenValue>>): void {\n this.styles.setRootTokens({ ...this.styles.rootTokens, ...next });\n this.root.subtreeDirty = true;\n this.commit();\n }\n\n /**\n * The system text size changed: measure every text and text input again, and commit.\n *\n * React Native's surface re-measures its text when the content size category changes, on a\n * commit of its own. The next commit from here is built from the handles the engine holds,\n * which are the nodes from before that, laid out at the old size, and Yoga keeps a clean node's\n * layout: every text whose content had not changed kept its old box, with its glyphs drawn at\n * the new size inside it, clipped. So each one is committed again, cloned with its children,\n * which is what makes Fabric dirty a measured node and measure it at the size now in effect.\n */\n remeasureText(): void {\n const again = (measured: EngineNode): void => {\n measured.remeasure = true;\n this.markProps(measured, false);\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.children) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.kind === 'text' && child.box?.committed) again(child.box);\n if (child.kind !== 'element') continue;\n if (child.committed && MEASURED_VIEWS.has(committedViewName(child))) again(child);\n visit(child);\n }\n };\n visit(this.root);\n this.commit();\n }\n\n /** Whether any text has been laid out again for a face. See `fontsRegistered`. */\n private fontsRefreshed = false;\n /** How many times each paragraph or text input has been laid out again for a face. */\n private readonly fontRefreshes = new WeakMap<EngineNode, number>();\n /** The text inputs whose `fontFamily` the next commit sends again. See `fontsRegistered`. */\n private readonly fontResends = new WeakSet<EngineNode>();\n\n /**\n * Faces registered after text naming them was laid out: lay that text out again, and commit.\n *\n * Native keeps a paragraph's text layout, face included, keyed by what the paragraph asks for.\n * iOS caches the attributed string it built and the size it measured, so text laid out before\n * its face registered stays in the fallback face, and committing it again unchanged hits the\n * same cache. What it asks for has to change, and nothing visible can: each paragraph naming\n * one of the families is committed with its text size cap raised by a step too small to see, or\n * set far above any size the platform offers where it had none. Its view, and everything native\n * holds for it, stays where it is. Android keys its text layout the same way and applies the\n * cap the same way, so the same change works there.\n *\n * A text input takes its font another way. iOS sets it on the field again only when the input's\n * text attributes change, which the same cap does. Android sets it only when `fontFamily` is in\n * the props it is sent, and the engine sends only what changed, so it is sent again once.\n */\n /**\n * Loads have settled for these families: every node held back for one, a span inside a\n * paragraph included, is laid out with the name again, registered or not. See `loadingFamilies`.\n */\n fontsSettled(families: ReadonlySet<string>): void {\n let held = false;\n const release = (node: EngineNode | undefined): void => {\n if (node?.heldFamily === undefined || !families.has(node.heldFamily)) return;\n this.markProps(node, false);\n held = true;\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.children) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n release(child.kind === 'text' ? child.box : child);\n visit(child);\n }\n };\n visit(this.root);\n if (held) this.commit();\n }\n\n fontsRegistered(families: ReadonlySet<string>): void {\n /** Lay `node` out again where it is text naming one of the families, saying whether it was. */\n const refresh = (node: EngineNode): boolean => {\n // As it is drawn: a text element placing its text is a view, with the paragraph inside it.\n const viewName = committedViewName(node);\n const input = TEXT_INPUTS.has(viewName);\n const named = (viewName === PARAGRAPH || input) && namesFamily(node, families);\n if (!node.committed || !named) return false;\n this.fontRefreshes.set(node, (this.fontRefreshes.get(node) ?? 0) + 1);\n if (input) this.fontResends.add(node);\n this.fontsRefreshed = true;\n this.markProps(node, false);\n return true;\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.children) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.kind === 'text' && child.box) refresh(child.box);\n if (child.kind === 'element' && !refresh(child)) visit(child);\n }\n };\n visit(this.root);\n this.commit();\n }\n\n /**\n * Put the cursor in a text input; bring anything else on screen, in the scroll view it is in.\n * A form sends the user to the first field that needs fixing this way, and a toggle or a picker\n * has no cursor to take, so it is scrolled to instead.\n */\n focus(node: EngineNode): void {\n if (TEXT_INPUTS.has(viewNameOf(node))) this.dispatchCommand(node, 'focus');\n else this.reveal(node);\n }\n\n /**\n * Scroll the nearest scroll view the node is in by as little as brings the node fully on\n * screen, with `margin` to spare - UIKit's `scrollRectToVisible`. `visibleBottom` is where in\n * the window the visible area ends when something covers the bottom of the scroll view: the\n * keyboard's top edge, for a field the keyboard would otherwise hide.\n *\n * Measured in the window, all of it, so the scroll view's offset needs no tracking: it is how\n * far its content's top edge is above its own.\n */\n reveal(node: EngineNode, options: { visibleBottom?: number; margin?: number } = {}): void {\n // The nearest scroll view that scrolls up and down: a sideways carousel on a page is not\n // what moves a field clear of the bottom of the screen.\n let scroll = node.parent;\n while (\n scroll &&\n !(SCROLL_VIEWS.has(viewNameOf(scroll)) && scroll.props['horizontal'] !== true)\n ) {\n scroll = scroll.parent;\n }\n const content = scroll && this.visibleChildren(scroll)[0];\n if (!scroll || !content) return;\n const margin = options.margin ?? 16;\n this.measure(scroll, (view) => {\n this.measure(content, (inner) => {\n this.measure(node, (target) => {\n const offset = view.y - inner.y;\n const top = view.y + margin;\n const bottom = Math.min(view.y + view.height, options.visibleBottom ?? Infinity) - margin;\n let by = 0;\n if (target.y + target.height > bottom) by = target.y + target.height - bottom;\n else if (target.y < top) by = target.y - top;\n if (by !== 0)\n this.dispatchCommand(scroll, 'scrollTo', [0, Math.max(0, offset + by), true]);\n });\n });\n });\n }\n\n /**\n * Commit one measured node again, cloned with its children, so Fabric measures it once more.\n *\n * A text input is measured from its native state, and a text set from JavaScript reaches that\n * state only in the layout after the measurement, so the commit carrying the text sizes the\n * field for the text it had before. This is the commit that sizes it for the new one: one of\n * the exceptions to a commit per pass, because waiting for the next pass would leave the field\n * the wrong height until something else changed.\n */\n remeasure(node: EngineNode): void {\n if (!node.committed) return;\n node.remeasure = true;\n this.markProps(node, false);\n this.commit();\n }\n\n /**\n * A node's component rules are its creating sheet's, so this matches it against `like`'s, or\n * against the one it was created with once `like` is null.\n */\n adoptScope(node: EngineNode, like: EngineNode | null): void {\n if (like && !this.ownSheets.has(node)) this.ownSheets.set(node, node.sheet);\n const sheet = like ? like.sheet : this.ownSheets.get(node);\n if (sheet === undefined || node.sheet === sheet) return;\n node.sheet = sheet;\n this.styles.noteSheet(sheet, true);\n this.watchStructure(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.markProps(node);\n }\n\n /** The sheet each node given another's scope was created with. */\n private readonly ownSheets = new WeakMap<EngineNode, StyleSheet | null>();\n\n /** The window's size, from the conditions media queries use. Zero until the platform says. */\n get viewport(): { readonly width: number; readonly height: number } {\n return this.viewportSize;\n }\n\n private viewportSize: { readonly width: number; readonly height: number };\n /** The system text size, from the conditions. See `Conditions.fontScale`. */\n private fontScale: number | undefined;\n\n private readonly viewportWatchers = new Set<() => void>();\n\n /** Calls `listener` after each change of conditions, which is when `viewport` can change. */\n watchViewport(listener: () => void): () => void {\n this.viewportWatchers.add(listener);\n return () => this.viewportWatchers.delete(listener);\n }\n\n updateConditions(next: Conditions): void {\n this.viewportSize = { width: next.width, height: next.height };\n this.fontScale = next.fontScale;\n this.styles.setConditions(next);\n this.root.subtreeDirty = true;\n // Committed here rather than left to the next change-detection pass, because there may not\n // be one: no view is dirty, so a tick does no work and never reaches the renderer at all.\n this.commit();\n for (const watcher of this.viewportWatchers) watcher();\n }\n\n // --- mutation API -----------------------------------------------------\n\n createElement(name: string, sheet: StyleSheet | null = null): EngineNode {\n const node = new RetainedNode('element', name, this);\n node.sheet = sheet;\n this.styles.noteSheet(sheet, true);\n const html = HTML_ELEMENTS.get(name);\n if (html !== undefined) {\n if (html.role) node.props['accessibilityRole'] = html.role;\n node.styled = html.styled;\n }\n this.watchStructure(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n if (HOISTS[name]) this.hoisted.add(node);\n return node;\n }\n\n addClass(node: EngineNode, name: string): void {\n (node.classes ??= new Set()).add(name);\n this.markClasses(node, [name]);\n }\n\n removeClass(node: EngineNode, name: string): void {\n node.classes?.delete(name);\n this.markClasses(node, [name]);\n }\n\n /**\n * Mark a node whose classes changed, by what the rules that name those classes can restyle.\n *\n * A class no selector names changes no style: a library's own marker, of an overlay that is\n * animating or a control that was touched. One a rule is for the element of, `.on`, has that\n * element matched again, and one named as what a rule's element is inside, `.animating .close`\n * or `.close:is(.animating *)`, the elements under the node that such rules are for. What is\n * under any of those is styled again from the rules it matched, for what it inherits: a `dark`\n * class on the root finds no rule again for an element no `dark` rule is for. One named in\n * `:has()`, or answering a test of the class attribute there, has the boxes above the node\n * 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\n * other change to it does.\n *\n * A sheet that names a class later restyles what it is for as it arrives, and a node not yet\n * committed is styled when it is, with the class as it is then.\n */\n private markClasses(node: EngineNode, changed: Iterable<string>): void {\n // An element still being built, in no tree and never styled: nothing is styled by it yet,\n // and it is styled when it is committed, with the classes it has then. Every element of a\n // screen is given its classes this way, so what they reach is not asked for each.\n if (node.parent === null && node.styleCache === null) return this.markProps(node, false);\n const reach = this.styles.reachOf(changed);\n if (reach === true) return this.markProps(node);\n this.markProps(node, false);\n if (!reach) return;\n if (reach.own) node.ownDirty = true;\n if (this.hasSheets && reach.beneath) this.markBeneath(node.parent);\n // `:has(> .on)`: only the box right above the node can answer it.\n else if (this.hasSheets && reach.parentHas) this.markBeneath(node.parent, node.parent?.parent);\n if (this.styles.reachesUnder(reach)) {\n this.classesAbove += 1;\n this.markUnder(node, reach);\n }\n }\n\n /**\n * How many class changes have restyled what is under an element. `markUnder` walks the tree as\n * it is, so an element out of it then is not reached: one that comes back after any is matched\n * again, with all that is under it.\n */\n private classesAbove = 0;\n /**\n * The count when each element went out of the tree, for the ones still out. `detach` sets it\n * for a node that only moves too, so `markReturned` runs after it and clears that.\n */\n private readonly outSince = new WeakMap<EngineNode, number>();\n\n /** Have matched again a node coming back into the tree that missed a class change above it. */\n private markReturned(child: EngineNode): void {\n const since = this.outSince.get(child);\n if (since === undefined) return;\n this.outSince.delete(child);\n if (since !== this.classesAbove) this.markAllUnder(child);\n }\n\n private markAllUnder(node: EngineNode): void {\n if (node.kind !== 'element') return;\n node.ownDirty = true;\n this.markPath(node);\n for (const child of node.children) this.markAllUnder(child);\n }\n\n /**\n * Have matched again each element under a node that one of `subjects`' rules could be for. One\n * under another is marked too: what is under an element marked this way keeps its rules.\n */\n private markUnder(node: EngineNode, subjects: Subjects): void {\n for (const child of node.children) {\n if (child.kind !== 'element') continue;\n if (this.styles.isFor(subjects, child)) {\n child.ownDirty = true;\n this.markPath(child);\n }\n this.markUnder(child, subjects);\n }\n }\n\n /**\n * The sheet of the component `node` hosts, whose `:host` rules it matches. Set again when a hot\n * swap replaces the component's sheet, which recreates the views inside but not the host, so the\n * host is styled afresh here.\n */\n setHostSheet(node: EngineNode, sheet: StyleSheet | null): void {\n if (node.hostSheet === sheet) return;\n node.hostSheet = sheet;\n this.styles.noteSheet(sheet, true);\n this.watchStructure(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.markProps(node);\n }\n\n /**\n * Style for `node` that any matched rule or inline style overrides, as a browser's own default\n * for an element is. `mount` gives the root component's host the surface's height this way, as\n * the web's mount point has, unless the app's `:host` sizes it otherwise.\n */\n setDefaultStyle(node: EngineNode, style: Readonly<Record<string, unknown>> | undefined): void {\n this.noteEasing(style);\n node.defaultStyle = style;\n // Under what the cascade comes to, and read by no selector: nothing is matched again.\n this.markProps(node, false);\n }\n\n /**\n * `class=\"a b\"` from a template. Replaces the set rather than adding to it. The same classes in\n * another order are a change too, to a selector that reads the class attribute, `[class^=\"a\"]`.\n */\n setClasses(node: EngineNode, value: string): void {\n // By HTML's spaces, which are CSS's: a vertical tab or a no-break space is part of a name.\n const names = value.split(CSS_SPACE).filter(Boolean);\n const before = node.classes;\n node.classes = names.length ? new Set(names) : null;\n // Each class that came or went: one in both changes nothing.\n const changed = [...names.filter((name) => !before?.has(name))];\n for (const name of before ?? []) if (!node.classes?.has(name)) changed.push(name);\n const reordered =\n !changed.length && !!before && !!node.classes && !inOrder(before, node.classes);\n this.markClasses(node, reordered ? node.classes! : changed);\n }\n\n /** Angular's `@if`/`@for`/`ViewContainerRef` markers. Ordered, never committed. */\n createAnchor(): EngineNode {\n return new RetainedNode('anchor', '#anchor', this);\n }\n\n createText(value: string): EngineNode {\n const node = new RetainedNode('text', '#text', this);\n node.text = value;\n return node;\n }\n\n appendChild(parent: EngineNode, child: EngineNode): void {\n this.markAdopted(child, parent);\n this.detach(child);\n this.markReturned(child);\n child.parent = parent;\n parent.children.push(child);\n if (child.dormantHoists) this.wakeHoists(child);\n this.markStructure(parent, child, parent.children.length - 1);\n this.markTextContent(parent, child);\n }\n\n insertBefore(parent: EngineNode, child: EngineNode, ref: EngineNode | null): void {\n this.markAdopted(child, parent);\n this.detach(child);\n this.markReturned(child);\n child.parent = parent;\n const at = ref ? parent.children.indexOf(ref) : -1;\n if (at < 0) parent.children.push(child);\n else parent.children.splice(at, 0, child);\n if (child.dormantHoists) this.wakeHoists(child);\n this.markStructure(parent, child, at < 0 ? parent.children.length - 1 : at);\n this.markTextContent(parent, child);\n }\n\n /**\n * A node coming under a parent other than the one it is under, or under any once it has been\n * taken out: what is over it may be other than it was styled under. The resolver sees that for\n * itself by the parent's cache, except between two boxes that share one, where it is told here.\n * Moved within its own parent, a row of a list reordered, it is styled as it was.\n */\n private markAdopted(child: EngineNode, parent: EngineNode): void {\n if (child.parent !== parent && this.styles.styledUnderShared(child)) child.styleDirty = true;\n }\n\n removeChild(parent: EngineNode | null, child: EngineNode): void {\n const target = parent ?? child.parent;\n if (!target) return;\n const at = target.children.indexOf(child);\n if (at < 0) return;\n target.children.splice(at, 1);\n child.parent = null;\n this.outSince.set(child, this.classesAbove);\n this.removedSinceCommit.add(child);\n this.markStructure(target, child, at);\n this.markTextContent(target, child);\n }\n\n /**\n * A child came or went under a view that takes its text as a prop: that prop changed. A span\n * changes it too, by keeping or dropping the space before it.\n */\n private markTextContent(parent: EngineNode, child: EngineNode): void {\n if (child.kind === 'anchor') return;\n if (takesTextAsProp(parent)) this.markProps(parent);\n else if (isTextElement(parent)) this.markWords(parent, child.kind === 'element');\n }\n\n /**\n * Text came, went or changed in a paragraph: where it has become one word, or stopped being\n * one, the paragraph is merged again, since that is one line or as many as it takes. Asked\n * of the paragraph's outermost element, which is the view; any other change leaves it be.\n */\n private markWords(within: EngineNode, run = false): void {\n let root = within;\n while (isTextElement(root.parent)) root = root.parent!;\n // A run that came or went can be the tallest line of the paragraph: see `lineTall`.\n // ponytail: one restyled to another line height is not; mark its paragraph if seen cut.\n const words = root.oneWord !== undefined && unbroken(root) !== root.oneWord;\n if (run || words) this.markProps(root, false);\n }\n\n /** A subtree that went out of the tree is back in: its hoisted nodes commit again. */\n private wakeHoists(node: EngineNode): void {\n for (const hoisted of node.dormantHoists!) this.hoisted.add(hoisted);\n node.dormantHoists = null;\n }\n\n /**\n * Let go of everything the engine holds for nodes that have left the tree.\n *\n * Removal is the only signal a destroyed subtree reliably sends. Angular calls `destroyNode` for\n * the top-level nodes of the view it destroys and not for anything inside a child component's\n * view, so a screen's own template is never told it is gone. A reference the engine keeps to any\n * one node of such a subtree keeps all of it, because a node reaches every other node of its\n * subtree through its parent and children, and each of those holds its committed Fabric handle,\n * which keeps its native shadow node alive. A screen with a header was retained in full that way,\n * every native node of it, for as long as the app ran.\n *\n * Removal is not destruction, though: a detached screen can be put back, and must come back\n * whole. So a hoisted node moves to the root of the subtree it left with, which is garbage along\n * with it if the subtree never returns, and is handed back when it does. An animation on a node\n * out of the tree stops rather than running a frame loop for something nobody can see, and\n * starts again if the node returns. And a node out of the tree when the commit runs forgets its\n * committed views, as a withheld modal does: the commit unmounts them, Fabric never re-enables an\n * unmounted view's events (`EventEmitter::setEnabled`), and committed again they would ignore\n * every touch. It comes back created afresh, as React creates an element it mounts again. One\n * put back before the commit never left, and keeps its views.\n *\n * Once per commit, and only after a removal: the walks are the depth of a handful of nodes, and\n * forgetting walks each subtree that left once.\n */\n private releaseDetached(): void {\n this.forgetDetached();\n for (const node of this.hoisted) {\n const top = this.topOf(node);\n if (top === this.root) continue;\n this.hoisted.delete(node);\n (top.dormantHoists ??= []).push(node);\n }\n for (const node of this.playing) {\n if (this.topOf(node) === this.root) continue;\n this.playing.delete(node);\n node.playing = undefined;\n this.markProps(node, false);\n }\n this.releasePlayedNatively();\n for (const nodes of this.scrollTimelines.values()) {\n for (const node of nodes) {\n if (this.topOf(node) === this.root) continue;\n this.stopScrolled(node);\n this.markProps(node, false);\n }\n }\n if (this.focusedNode && this.topOf(this.focusedNode) !== this.root) this.dropFocus();\n this.dropDetachedPress();\n }\n\n /** A pressed node out of the tree gets no release: native has no view to end the touch on. */\n private dropDetachedPress(): void {\n const pressed = this.currentResponder;\n if (!pressed || this.topOf(pressed) === this.root) return;\n this.setActiveChain(pressed, false);\n this.currentResponder = null;\n }\n\n /**\n * Forget the focused node, which has left the tree without a blur: off the node as well as the\n * engine, or a `:focus` rule styles it again when it is put back.\n */\n private dropFocus(): void {\n const node = this.focusedNode!;\n node.focused = false;\n this.markProps(node);\n this.focusedNode = null;\n }\n\n /** Forget the committed views of each node removed since the last commit that is still out. */\n private forgetDetached(): void {\n for (const node of this.removedSinceCommit) {\n if (node.committed && this.topOf(node) !== this.root) this.forgetCommitted(node);\n }\n this.removedSinceCommit.clear();\n }\n\n /** The root of the tree a node is in: the engine's root while it is attached. */\n private topOf(node: EngineNode): EngineNode {\n let top = node;\n while (top.parent) top = top.parent;\n return top;\n }\n\n /**\n * Angular calls this per node on view destroy, but only when `Renderer2.destroyNode` is\n * non-null. Without it the listener sets on discarded nodes stay reachable from the\n * closures Angular hands us, which is a slow leak on any screen that churns views.\n */\n destroyNode(node: EngineNode): void {\n node.listeners?.clear();\n node.listeners = null;\n // With what it holds: a node Angular destroys can be put back, as content projected into\n // an `@if` is, and its children's views would then be handed to the view it is made again\n // as. Native gives a view one parent for its life, and aborts on a second.\n if (node.committed) this.forgetCommitted(node);\n this.stopEased(node);\n node.transitions = undefined;\n if (node.playing) this.stopNative(node, node.playing);\n node.playing = undefined;\n this.stopScrolled(node);\n // And what follows it, where it is the scroll view: each starts again if it is put back.\n for (const follower of this.scrollTimelines.get(node) ?? []) {\n this.stopScrolled(follower);\n this.markProps(follower, false);\n }\n this.running.delete(node);\n this.playing.delete(node);\n this.hoisted.delete(node);\n node.kept = undefined;\n // A field popped with the keyboard up never sends its blur.\n if (this.focusedNode === node) this.dropFocus();\n }\n\n parentNode(node: EngineNode): EngineNode | null {\n return node.parent;\n }\n\n nextSibling(node: EngineNode): EngineNode | null {\n const siblings = node.parent?.children;\n if (!siblings) return null;\n return siblings[siblings.indexOf(node) + 1] ?? null;\n }\n\n /**\n * Whether any declaration the engine was given transitions or animates: until one does, a\n * node's style is committed as it is, with nothing asked of what eases it. See `eased`.\n */\n private eases = false;\n\n private noteEasing(declarations: Readonly<Record<string, unknown>> | null | undefined): void {\n if (this.eases || !declarations) return;\n for (const key in declarations) {\n if (key.startsWith('$transition') || key.startsWith('$animation')) this.eases = true;\n }\n }\n\n /** A node's style as its transitions and animation have it: a declaration asks for one. */\n private eased(node: EngineNode, style: Record<string, unknown>): Record<string, unknown> {\n if (!this.eases) return style;\n return this.animated(node, this.transitioned(node, style));\n }\n\n /** Note a sheet any of whose rules transitions or animates: see `eases`. */\n private noteSheetEasing(sheet: StyleSheet): void {\n for (const rule of this.eases ? [] : sheet.rules) {\n this.noteEasing(rule.declarations);\n this.noteEasing(rule.important);\n // One a token holds: `animation: var(--motion)`.\n for (const deferred of rule.deferred ?? []) {\n this.noteEasing(Object.fromEntries(deferred.props.map((key) => [key, true])));\n }\n }\n }\n\n /** Note a prop, or a style set as one, that transitions or animates: see `eases`. */\n private noteEasingProp(key: string, value: unknown): void {\n this.noteEasing({ [key]: value });\n if (key === 'style' || key === STYLE_OVERRIDE) this.noteEasing(flattenStyle(value, {}));\n }\n\n setProp(node: EngineNode, key: string, value: unknown): void {\n if (!this.eases) this.noteEasingProp(key, value);\n noteWrite(node, key, value);\n // A prop written again is a binding's, and is committed as any other is.\n if (node.attributeOnly?.delete(key)) this.markProps(node, false);\n if (value === undefined || value === null) {\n // Nothing to remove, so nothing changed. Worth its own branch because it is the common\n // case, not a rare one: a host primitive carries a host binding for every prop React Native\n // reads, so every element on screen writes some thirty of these on every pass, and the\n // work being skipped is a walk to the root marking ancestors dirty.\n if (!(key in node.props)) return;\n delete node.props[key];\n } else {\n if (node.props[key] === value) return;\n node.props[key] = value;\n }\n // Inline style is applied after the cascade and inherited by nothing, so it cannot change\n // what any node matches or inherits. Every other prop can: `[disabled]` is a selector. An\n // inline `direction` is the exception, because the paragraphs below it align by it.\n // And a child that takes one of this node's own values, an `inherit`, follows it.\n const heirs = node.styleCache?.heirs === true;\n // And only a prop some selector names: `aria-valuenow` on every tick of a progress bar, a\n // field's text on every key, match nothing they did not.\n const read = key === 'style' ? this.inlineReachesStyle(node) : this.styles.reads(key);\n // And restyles the elements after it only where a rule asks the prop of an element before\n // another, `[data-on] ~ .x`: a point of a chart set as a finger moves leaves those after it.\n this.markProps(node, read || heirs, this.styles.readsBeside(key));\n if (SIZES_A_RUN.has(key)) this.markParagraph(node);\n }\n\n /**\n * Have the paragraph a run of text is in merged again: it is as tall as the tallest line of\n * its runs, by a line height or a text scaling set on one of them. See `lineTall`.\n */\n private markParagraph(run: EngineNode): void {\n let paragraph = run;\n while (paragraph.parent && isTextElement(paragraph.parent)) paragraph = paragraph.parent;\n if (paragraph !== run) this.markProps(paragraph, false);\n }\n\n /**\n * Paint a node's background on one of its children instead of on the node: the node keeps its\n * `background-color` and `background-image` in the cascade, where a stylesheet wrote them, and\n * the child is the view that draws them. What a view that masks its children and not itself\n * needs, as `<gradient-text>` is.\n */\n paintOn(node: EngineNode, child: EngineNode): void {\n node.paintsOn = child;\n this.markProps(node, false);\n this.markProps(child, false);\n }\n\n /**\n * Hand a node's background colour to `listener` instead of painting it: what its stylesheets,\n * tokens and inline style resolve `background-color` to, or undefined for none. Called after\n * each commit that changes it, the first one included. What a component needs whose colour is\n * drawn by a native view the node is not, from a prop of that view's, as a bottom sheet's is.\n * The function returned stops it, and the node paints its own background again.\n */\n takePaint(node: EngineNode, listener: (color: unknown) => void): () => void {\n node.paintTaker = listener;\n node.paintTaken = UNREPORTED;\n this.markProps(node, false);\n return () => {\n if (node.paintTaker !== listener) return;\n node.paintTaker = undefined;\n this.paintReports.delete(node);\n this.markProps(node, false);\n };\n }\n\n /** Nodes whose background colour is to be handed over once the commit running ends. */\n private readonly paintReports = new Set<EngineNode>();\n\n private reportPaint(): void {\n const nodes = [...this.paintReports];\n this.paintReports.clear();\n // One listener that throws stops neither the rest nor what the commit does after them.\n for (const node of nodes) {\n try {\n node.paintTaker?.(node.paintTaken);\n } catch (error) {\n this.reportEventError(error, 'paint');\n }\n }\n }\n\n /**\n * Keep a prop the node already has as an attribute: on the node for a selector such as\n * `:host([variant='primary'])` to match, and left out of what is committed to the native view.\n * It is committed again once the prop is next written. What the platform adapter does with a\n * static attribute that is an input of the host's component.\n */\n keepAsAttribute(node: EngineNode, key: string): void {\n if (!(key in node.props)) return;\n (node.attributeOnly ??= new Set()).add(key);\n this.markProps(node, false);\n }\n\n /**\n * Whether a node's inline style can change what it or anything below it resolves to: it sets,\n * or until now set, a property its children inherit.\n */\n private inlineReachesStyle(node: EngineNode): boolean {\n const inherits = setsInherited(node.props['style']);\n const inherited = node.inlineInherits === true;\n node.inlineInherits = inherits;\n return this.noteInlineDirection(node) || inherits || inherited;\n }\n\n /** Whether a node's inline style sets `direction`, remembering that one has. */\n private noteInlineDirection(node: EngineNode): boolean {\n const style = node.props['style'];\n if (!style || (typeof style === 'object' && !Array.isArray(style) && !('direction' in style))) {\n return false;\n }\n if (flattenStyle(style, {})['direction'] === undefined) return false;\n this.inlineDirection = true;\n return true;\n }\n\n /**\n * The style object a node already holds has been changed in place.\n *\n * Angular's styling instructions set one property at a time, so a style of ten properties would\n * otherwise mean ten copies of a growing object per element. The adapter owns the object it put\n * there and may write into it; this is how it says so, since nothing about the object's identity\n * has changed for the props diff to notice.\n */\n styleChanged(node: EngineNode): void {\n if (!this.eases) this.noteEasingProp('style', node.props['style']);\n // As `setProp` restyles for a new style object: a child that takes one of its values, an\n // `inherit`, follows the one changed in place too.\n this.markProps(node, this.inlineReachesStyle(node) || node.styleCache?.heirs === true);\n this.markParagraph(node);\n }\n\n /**\n * A bound declaration, `[style.color]`, whose value may be a `var()`, or a length in `em` or a\n * viewport unit. One that is, is kept as a declaration the cascade settles with the node's\n * tokens, font size and viewport, as a rule's is, and true is answered: the text is no value to\n * put in the node's style. A negative `line-height` is dropped, with a warning, and true is\n * answered too. Any other value forgets what was kept.\n */\n setBoundStyle(node: EngineNode, prop: string, value: unknown): boolean {\n const text = typeof value === 'string' ? value : undefined;\n const refused = text !== undefined && this.refusedBound(node, prop, text);\n const bound = text === undefined || refused ? null : boundFrom(prop, text, node.tag);\n if (!bound && !node.boundByProp?.has(prop)) return refused;\n const byProp = (node.boundByProp ??= new Map());\n if (bound) byProp.set(prop, bound);\n else byProp.delete(prop);\n node.boundStyle = byProp.size ? [...byProp.values()] : null;\n // Settled by the cascade as the node is styled, and asked about by no selector: nothing after\n // the node matches otherwise for it.\n this.markProps(node, true, false);\n return bound !== null || refused;\n }\n\n /** Whether a bound value is one CSS has none of, which is dropped with a warning. */\n private refusedBound(node: EngineNode, prop: string, text: string): boolean {\n if (!isNegativeLineHeight(prop, text)) return false;\n this.reportDroppedDeclaration('line-height', text, node.tag, 'it is negative');\n return true;\n }\n\n /**\n * Set a custom property on a node, `--tint` from `[style.--tint]`, or remove it with `null`.\n *\n * Not a prop: Fabric has no such thing, and would be sent one. It is a token for the cascade,\n * converted from the value here because nothing built it ahead of time (`inline-token.ts`), and\n * changing it re-resolves the node and so everything under it.\n */\n setCustomProperty(node: EngineNode, name: string, value: unknown): void {\n const token = value === null || value === undefined ? undefined : tokenFromValue(value);\n const current = node.customProperties;\n if (!token) {\n if (!current || !(name in current)) return;\n const { [name]: _removed, ...rest } = current;\n node.customProperties = Object.keys(rest).length ? rest : null;\n } else {\n node.customProperties = { ...current, [name]: token };\n }\n // In scope for the node's own rules and for what is under it, and read by no selector: the\n // node is styled again, and those under it from the rules they matched.\n this.markProps(node, false);\n node.ownDirty = true;\n }\n\n setText(node: EngineNode, value: string): void {\n const filled = (node.text === '') !== (value === '');\n node.text = value;\n this.markProps(node);\n if (!node.parent) return;\n this.markTextContent(node.parent, node);\n // Text of no length is nothing to `:empty`: its first character and its last change what\n // the element it is in matches, and what comes after that element.\n if (filled && this.structuralSheets) this.markFilled(node.parent);\n }\n\n private markFilled(node: EngineNode): void {\n node.styleDirty = true;\n this.markLaterSiblings(node);\n this.markPath(node);\n }\n\n setEventListener(\n node: EngineNode,\n topLevelType: string,\n fn: (event: unknown) => void,\n ): () => void {\n this.registerEventHandler();\n\n const optIn =\n EVENT_OPT_IN_PROPS[topLevelType] ?? VIEW_EVENT_OPT_IN_PROPS[viewNameOf(node)]?.[topLevelType];\n if (optIn && node.props[optIn] !== true) this.setProp(node, optIn, true);\n\n const listeners = (node.listeners ??= new Map());\n let set = listeners.get(topLevelType);\n if (!set) listeners.set(topLevelType, (set = new Set()));\n set.add(fn);\n return () => set.delete(fn);\n }\n\n // --- dirty marking ----------------------------------------------------\n\n private markProps(node: EngineNode, affectsStyle = true, beside = true): void {\n node.propsDirty = true;\n // Classes, `nativeID` and anything else a selector can read live in props, so any of them\n // changing can change what this node matches, and through it what its whole subtree does.\n // Marking only when it can is what keeps an animated `[style]` from re-cascading everything\n // beneath it on every frame.\n if (affectsStyle) {\n node.styleDirty = true;\n // `.peer:focus ~ .label`: what a later sibling matches can hang on this node's classes and\n // state, though nothing about the sibling moved. Only sheets that ask about siblings pay.\n // Not for a change `beside` says no rule asks of an element before another.\n if (this.structuralSheets && beside) this.markLaterSiblings(node);\n if (this.hasSheets) this.markBeneath(node.parent);\n }\n // The root has no parent to carry the mark, so it carries its own: `.dark` on the root alone\n // restyles everything beneath it.\n this.markPath(node.parent ?? node);\n }\n\n /** Start matching ancestors again on a change, once a sheet that uses `:has()` is in play. */\n private watchHas(sheet: StyleSheet | null | undefined): void {\n if (!sheet?.has) return;\n if (!this.hasReaders.has(sheet)) this.hasReaders.set(sheet, hasAbove(sheet));\n if (this.hasSheets) return;\n this.hasSheets = true;\n this.styles.tracksHas = true;\n // What is already resolved kept no record of the rules it matched: resolve it again. Nothing\n // is, when the sheet is the one the engine was made with.\n if (!this.root) return;\n this.root.styleDirty = true;\n this.markPath(this.root);\n }\n\n /**\n * Something at or beneath `from` changed: every node from there up may match a `:has()` rule\n * it did not, or stop matching one, up to `upTo` and not it. They are matched again rather than\n * marked for restyling, which would restyle everything under them. Only sheets that use\n * `:has()` pay.\n */\n private markBeneath(from: EngineNode | null, upTo: EngineNode | null = null): void {\n for (let node = from; node && node !== upTo; node = node.parent) {\n node.hasDirty = true;\n if (this.hasReaders.size) this.changedBeneath.add(node);\n }\n }\n\n /**\n * The boxes rules ask `:has()` of above the node they style, `.card:has(.x) .title`, by the\n * sheet that asks: a sheet replaced or taken away asks no more.\n */\n private readonly hasReaders = new Map<StyleSheet, readonly HasAbove[]>();\n /** The nodes something changed beneath since the last commit, where any sheet has such a rule. */\n private readonly changedBeneath = new Set<EngineNode>();\n\n /**\n * Have matched again what is under each box that changed beneath and that such a rule could\n * be asking: the nodes the rule is for, and no other. Once for a commit, however many changes\n * there were beneath the box: a table gains its rows one at a time.\n *\n * A rule asked of a box above is walked under the highest box that asks it, which reaches what\n * is under the boxes beneath that one as well: a rule `:has()` asks of any box is asked by every\n * box from the change up to the root, and walked once, from the root. The rules a box asks are\n * walked together, the tree beneath it once.\n */\n private markUnderHas(): void {\n if (!this.changedBeneath.size) return;\n const readers = [...this.hasReaders.values()].flat();\n const depths = new Map<EngineNode, number>();\n for (const node of this.changedBeneath) depthOf(node, depths);\n const boxes = [...this.changedBeneath].sort((a, b) => depths.get(a)! - depths.get(b)!);\n // By box walked, the rules walked under it and under every box above it.\n const walked = new Map<EngineNode, ReadonlySet<HasAbove>>();\n for (const node of boxes) {\n let above: ReadonlySet<HasAbove> | undefined;\n for (let up = node.parent; up && !above; up = up.parent) above = walked.get(up);\n const all = this.markUnderBox(node, readers, above);\n if (all) walked.set(node, all);\n }\n this.changedBeneath.clear();\n }\n\n /**\n * `markUnderHas` for one box: the rules it asks that no box above it was walked for, walked\n * together. What was walked under it and above it, which is `above` where it asks no more.\n */\n private markUnderBox(\n node: EngineNode,\n readers: readonly HasAbove[],\n above: ReadonlySet<HasAbove> | undefined,\n ): ReadonlySet<HasAbove> | undefined {\n const asked: HasAbove[] = [];\n for (const reader of readers) {\n if (above?.has(reader) || !reader.classes.every((name) => node.classes?.has(name))) continue;\n asked.push(reader);\n }\n if (!asked.length) return above;\n const subjects = asked.map((reader) => reader.subjects);\n this.markUnder(node, subjects.length === 1 ? subjects[0]! : joinSubjects(subjects));\n return new Set([...(above ?? []), ...asked]);\n }\n\n /**\n * What `node` matches changed, which the elements after it can read: as many of them as a rule\n * steps along from one, every one for a `~`, and none where no sheet steps at all.\n */\n private markLaterSiblings(node: EngineNode): void {\n let left = this.structuralAfter;\n const siblings = left > 0 ? node.parent?.children : undefined;\n if (!siblings) return;\n // Each matched again, and left as it was with all under it where it matches what it did:\n // see `markPlace`.\n for (let i = siblings.indexOf(node) + 1; i < siblings.length && left > 0; i++) {\n const sibling = siblings[i]!;\n this.markPlace(sibling);\n if (sibling.kind === 'element') left--;\n }\n }\n\n /** `node`'s child list changed: `moved` came into it at `at`, or went out of it from there. */\n private markStructure(node: EngineNode, moved: EngineNode, at: number): void {\n node.structureDirty = true;\n // A child list that moved changes what its members match, though nothing about them did:\n // the old last row is no longer the last. Only sheets that ask about position pay for this.\n if (this.structuralSheets) {\n moved.styleDirty = true;\n this.markRepositioned(node.children, at, moved);\n // What the node itself matches hangs on its child list only through `:empty`, which only\n // its first child arriving or its last one leaving changes: and then what a later sibling\n // matches can too, `.box:empty + .spacer`. Styled again for any other change, everything\n // under it would be resolved again with it.\n if (wasOrIsEmptyWithout(node, moved)) {\n node.styleDirty = true;\n this.markLaterSiblings(node);\n }\n }\n if (this.hasSheets) this.markBeneath(node);\n this.markPath(node.parent);\n }\n\n /**\n * Mark the children whose place in a child list that changed at `at` a sheet could read\n * differently. The two at each end always, which are the old first and last and the new. Those\n * from `at` on where some sheet counts from the start or asks about any one before, since a\n * child's place from the start hangs only on those before it; and those before `at` where one\n * counts from the end. Styling one again resolves everything under it again, so a long list\n * gaining a row at its end is not the whole list.\n *\n * Where the sheets ask no further than the element just before (`+`), a rule steps a known\n * number of elements along from one whose own match changed, and those are all there is to\n * mark: that many after the change, and that many after the two at the start, either of which\n * may have stopped or started being first. Nothing comes after the two at the end.\n */\n private markRepositioned(children: readonly EngineNode[], at: number, moved: EngineNode): void {\n const steps = this.structuralAfter;\n const pastFirst = steps === Infinity ? 0 : steps;\n for (const child of elementsAtEnd(children, 2 + pastFirst, false)) this.markPlace(child);\n for (const child of elementsAtEnd(children, 2, true)) this.markPlace(child);\n if (this.structuralBefore) for (let i = 0; i < at; i++) this.markPlace(children[i]!);\n // The elements after the change, not counting the one that came, which is marked already.\n let left = steps;\n for (let i = at; i < children.length && left > 0; i++) {\n const child = children[i]!;\n this.markPlace(child);\n if (child.kind === 'element' && child !== moved) left--;\n }\n }\n\n /**\n * A child's place in its list changed, which is all that changed about it. It is matched\n * again, and keeps its style and all that is under it unless it now matches other rules: its\n * place is read by the rules that style it and by no other. Not where a rule reads the place\n * of an element like it from under it, `.row:nth-child(odd) .label`: that changes more than\n * the element itself, which is then styled again with everything under it, as is a child\n * that is no element.\n */\n private markPlace(child: EngineNode): void {\n if (child.kind !== 'element' || this.placeReadFromUnder(child)) child.styleDirty = true;\n else child.stateDirty = true;\n }\n\n /**\n * Whether a rule could read this element's place from another element. By its classes alone,\n * which every such compound it could be asks for: a compound with none could be any element.\n */\n private placeReadFromUnder(node: EngineNode): boolean {\n for (const { compound, above, child } of this.placeElsewhere) {\n if (!hasClasses(node, compound.classes)) continue;\n // And by what the rule has it in, which a compound with no class is told from.\n if (!above?.length) return true;\n for (let up = node.parent; up; up = child ? null : up.parent) {\n if (hasClasses(up, above)) return true;\n }\n }\n return false;\n }\n\n /** Note what a sheet coming into play asks about a child list. None is unset: see `structural`. */\n private watchStructure(sheet: StyleSheet | null | undefined): void {\n if (!sheet?.structural || this.watchedStructure.has(sheet)) return;\n this.watchedStructure.add(sheet);\n this.structuralSheets = true;\n const reach = siblingReach(sheet);\n this.structuralAfter = Math.max(this.structuralAfter, reach.after);\n if (reach.before) this.structuralBefore = true;\n for (const compound of placeReadElsewhere(sheet)) this.placeElsewhere.add(compound);\n // What a child whose place changed is compared with is the rules it matched, which a cache\n // keeps from here on. One made before has none, and is styled again the first time, as it\n // was before any sheet asked.\n this.styles.tracksHas = true;\n }\n\n /** Walk up until we hit a node already known to have a dirty subtree. */\n private markPath(node: EngineNode | null): void {\n const wasClean = !this.root.structureDirty && !this.root.subtreeDirty;\n for (let current = node; current && !current.subtreeDirty; current = current.parent) {\n current.subtreeDirty = true;\n }\n // The tree has just gone from clean to dirty. Inside a change-detection pass that means\n // nothing, because the pass ends in a commit; outside one it means the change has no commit\n // coming, and the host has to arrange a frame.\n if (wasClean && this.root.subtreeDirty) this.onDirty?.();\n }\n\n private isClean(node: EngineNode): boolean {\n return (\n node.committed !== null && !node.propsDirty && !node.structureDirty && !node.subtreeDirty\n );\n }\n\n // --- commit -----------------------------------------------------------\n\n /**\n * Incremental: clone only what changed and reuse untouched subtrees by reference. A full\n * rebuild would mint fresh shadow nodes for every node on every tick, which drops scroll\n * offset, text cursor and keyboard focus. That is a correctness requirement, not an\n * optimisation.\n */\n commit(): boolean {\n if (this.removedSinceCommit.size) this.releaseDetached();\n // The root is never reconciled itself, so it has no `committed` record and `isClean` would\n // always say dirty. Ask the flags directly, or every change-detection pass ends in a\n // completeRoot that changes nothing: during a fling that is one wasted native commit per\n // frame, since any listener firing marks the view for refresh.\n this.settleCreated();\n this.markUnderHas();\n if (!this.root.structureDirty && !this.root.subtreeDirty) return false;\n\n const started = now();\n // One epoch per commit. Node props do not change while a commit runs, so every node can be\n // resolved once and shared with each of its descendants for the length of this walk.\n this.styleEpoch++;\n // Faces registered before the walk, the global sheet's among them, reach every node in it.\n this.facesAdded = false;\n const set = this.fabric.createChildSet(this.rootTag);\n let handles = this.rootHandles();\n // Again, where transitions it laid out where they end are to be eased from JavaScript.\n if (this.layOut()) {\n handles = this.rootHandles();\n // What that found resized is the transitions themselves, at the frame they are eased to.\n this.movesOthers = false;\n }\n for (const handle of handles) this.fabric.appendChildToSet(set, handle);\n this.clearFlags(this.root);\n this.announceCommit();\n this.fabric.completeRoot(this.rootTag, set);\n\n const elapsed = now() - started;\n this.stats.commits++;\n this.stats.lastCommitMs = elapsed;\n if (this.stats.commits === 1) {\n this.stats.firstCommitMs = elapsed;\n } else {\n if (elapsed > this.stats.worstCommitMs) this.stats.worstCommitMs = elapsed;\n if (elapsed > FRAME_BUDGET_MS) this.stats.slowCommits++;\n }\n\n this.flushTransitionEvents();\n this.reportPaint();\n this.playSized();\n this.scrollDriver?.afterCommit();\n // Read first: the commit that settles keyframes starts by clearing it.\n const facesAdded = this.facesAdded;\n if (this.awaitingKeyframes.size) this.settleKeyframes();\n if (facesAdded) this.rematchFonts();\n this.blurHidden();\n return true;\n }\n\n /** A field went out of view focused, in the commit running: see `undisplayed`. */\n private blurAfterCommit = false;\n\n private blurHidden(): void {\n if (!this.blurAfterCommit) return;\n this.blurAfterCommit = false;\n this.setFocused(null);\n }\n\n private beforeCommit: (() => void) | null = null;\n\n private announceCommit(): void {\n const run = this.beforeCommit;\n this.beforeCommit = null;\n run?.();\n }\n\n /**\n * Run `run` once, as the next commit hands its tree to the host and before the host has it: the\n * moment for something the host applies to its next commit, which is only this one from here.\n * A pass that changes nothing commits nothing and runs nothing, so a request waits until it is\n * taken back with the function returned. A later request replaces an earlier one.\n */\n beforeNextCommit(run: () => void): () => void {\n this.beforeCommit = run;\n return () => {\n if (this.beforeCommit === run) this.beforeCommit = null;\n };\n }\n\n /** The first commit whose new views have not been drawn yet, while `commitUnseen` runs. */\n private unseen = Infinity;\n\n /**\n * A commit for what changed after earlier commits, before a frame has drawn them. `since` is\n * how many commits there had been before the first of them (`stats.commits`).\n *\n * A view those commits created has not been seen in the style they gave it, so what this one\n * gives it is where it starts, and no transition runs toward it. That is what a browser does\n * with a class added to an element before the frame after it was inserted, and what\n * `animate.enter` is built on: Angular adds the enter class after the render pass that created\n * the element, and takes it off a frame later, which is the one change the transition is for.\n */\n commitUnseen(since: number): boolean {\n this.unseen = since;\n try {\n return this.commit();\n } finally {\n this.unseen = Infinity;\n }\n }\n\n /** Nodes that asked for `@keyframes` this commit had not met, by the name they asked for. */\n private readonly awaitingKeyframes = new Map<EngineNode, string>();\n\n /**\n * A sheet is registered when the first node it styles is committed, so a node committed before\n * it can name keyframes that arrive later in the same commit. Those nodes play them from another\n * commit straight away, as a browser applies keyframes however the sheets arrived; a name still\n * unknown once the commit is over is reported.\n */\n private settleKeyframes(): void {\n const waiting = [...this.awaitingKeyframes];\n this.awaitingKeyframes.clear();\n let found = false;\n for (const [node, name] of waiting) {\n if (this.keyframes.has(name)) {\n this.markProps(node, false);\n found = true;\n } else if (this.dev) {\n this.reportMissingKeyframes(name);\n }\n }\n if (found) this.commit();\n }\n\n private readonly scrollDriver: NativeScrollDriver | null;\n\n /** Whether native can move a view by a scroll with no JavaScript in between. */\n get drivesScroll(): boolean {\n return this.scrollDriver !== null;\n }\n\n /** See `HostEngine.driveByScroll`. The connection waits for a commit of both views. */\n driveByScroll(\n view: EngineNode,\n scroll: EngineNode,\n axis: ScrollAxis,\n range: ScrollRange,\n statics: readonly StaticTransform[] = [],\n ): ScrollDrive | null {\n const property = axis === 'x' ? 'translateX' : 'translateY';\n return this.driveByEvent(view, scroll, scrollFeed(axis), property, range, statics);\n }\n\n /** See `HostEngine.driveByEvent`. */\n driveByEvent(\n view: EngineNode,\n source: EngineNode,\n feed: EventFeed,\n property: DrivenProperty,\n range: ScrollRange,\n statics: readonly StaticTransform[] = [],\n shift: number | null = null,\n ): ScrollDrive | null {\n if (!this.scrollDriver) return null;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move.\n this.setProp(view, 'collapsable', false);\n return this.scrollDriver.drive(\n view,\n source,\n feed,\n property,\n range,\n statics,\n (node) => (node as EngineNode).committed?.tag ?? null,\n shift,\n );\n }\n\n /**\n * `transitionstart` and `transitionend`, for anything listening.\n *\n * Angular's `animate.enter` and `animate.leave` are built on these: they add a class, wait for\n * the transition it starts, and clean up when it ends. Nothing native emits them - there is no\n * CSS animation in React Native to emit them - so the engine that runs the transition is what\n * says when one began and ended.\n */\n /** Created since the last commit and waiting to settle. See `HostEngine.settle`. */\n private unsettled: Settling[] = [];\n\n settle(target: Settling): void {\n this.unsettled.push(target);\n }\n\n /**\n * Let every element created since the last commit write what its inputs say. One that was\n * checked already has, and answers at once; one whose view is detached writes its props here,\n * so the commit that first mounts it carries them.\n */\n private settleCreated(): void {\n if (this.unsettled.length === 0) return;\n const created = this.unsettled;\n this.unsettled = [];\n for (const target of created) target.settleProps();\n }\n\n private readonly transitionEvents: { node: EngineNode; type: string; property: string }[] = [];\n\n private emitTransition(node: EngineNode, type: string, property: string): void {\n if (!node.listeners?.has(type)) return;\n this.transitionEvents.push({ node, type, property });\n }\n\n /**\n * After the commit, never during it: a listener is free to add a class or drop an element, and\n * a tree that changes halfway through being walked is the one thing a commit cannot survive.\n */\n private flushTransitionEvents(): void {\n if (this.transitionEvents.length === 0) return;\n for (const { node, type, property } of this.transitionEvents.splice(0)) {\n // One listener that throws stops neither the rest nor the node being let go.\n for (const listener of [...(node.listeners?.get(type) ?? [])]) {\n try {\n listener(animationEvent(type, node, property));\n } catch (error) {\n this.reportEventError(error, type);\n }\n }\n if (type === 'topAnimationend') this.letGo(node);\n }\n }\n\n /**\n * The nodes whose animation has ended with no fill and is still held at its last frame, until\n * its `animationend` has been heard. A browser runs that listener before it paints again, and\n * an exit animation's listener takes the element away: it is never seen back at rest. Here the\n * listener runs after the commit, so the commit that ends the animation paints the last frame,\n * and the element goes back to rest once the listener has run and left it there.\n */\n private readonly lettingGo = new Set<EngineNode>();\n\n private letGo(node: EngineNode): void {\n if (!this.lettingGo.delete(node)) return;\n const running = node.playing;\n if (!running?.done) return;\n running.values = {};\n this.markProps(node, false);\n }\n\n /** Anchors take part in sibling ordering but never reach Fabric. */\n private visibleChildren(node: EngineNode): EngineNode[] {\n // A view that takes its text as a prop has no text children to commit. See `ViewNameOptions`.\n const textAsProp = takesTextAsProp(node);\n return node.children.filter(\n (child) => child.kind !== 'anchor' && !(textAsProp && child.kind === 'text'),\n );\n }\n\n /**\n * Everything a node renders with, unprocessed. Precedence, weakest first: native defaults, the\n * node's `defaultStyle`, matched CSS, explicit props, inline style, a component's\n * `styleOverride`. Inline wins over CSS as it does on the web, but for a declaration marked\n * `!important`, which stands over it: see `inlineOf`.\n *\n * Raw, because this is what the next commit diffs against. Colours and asset ids are converted\n * on the way out instead (`processed`), and only for the keys that changed: the converters\n * return fresh objects, so diffing their output would re-send every image and shadow on every\n * unrelated change.\n */\n /** What a touch on an element that keeps a drag holds off, while it lasts: see `holdSwipe`. */\n private heldFor(node: EngineNode, merged: Record<string, unknown>): void {\n if (node === this.swipeHeld) merged['gestureResponseDistance'] = NO_SWIPE;\n if (node === this.scrollHeld) merged['scrollEnabled'] = false;\n }\n\n private mergeProps(node: EngineNode, viewName: string): Record<string, unknown> {\n if (node.kind === 'text') return { text: paragraphText(node) };\n if (this.dev) this.checkProps(node);\n this.registerSheet(node.sheet);\n this.registerSheet(node.hostSheet);\n const props: Record<string, unknown> = { ...DEFAULT_PROPS[viewName], ...node.defaultStyle };\n Object.assign(props, this.styles.resolve(node, this.styleEpoch).style);\n const resolved = props['pointerEvents'];\n writeOwnProps(node.props, props, node.attributeOnly);\n withTextContent(node, viewName, props);\n truncatedAs(node, props);\n const cascaded = props['transform'];\n const inline = inlineOf(node);\n const style = boundTransform(node, Object.assign(props, inline), cascaded);\n if (inline !== NO_STYLE) this.styles.overOtherForms(inline, style);\n nativePointerEvents(node, style, resolved);\n // Before an image's own size: `fit-content` is no size, so the image's is what it gets.\n fitContent(node, style);\n percentHeight(node, style);\n placeholderFaded(style);\n const intrinsic = node.props[INTRINSIC_SIZE] as IntrinsicSize | undefined;\n if (intrinsic) applyIntrinsicSize(style, intrinsic);\n flattenStyle(node.props[STYLE_OVERRIDE], style);\n this.fontFaces.apply(style);\n holdLoadingFamily(node, style);\n // Once the face is matched: a family a view's own font names is the face its weight chose.\n renameFonts(viewName, style, this.postScriptName);\n if (viewName === PARAGRAPH) {\n alignText(style, this.directionOf(node, style));\n this.wholeWords(node, style);\n lineTall(style, this.tallestRun(node, style, 0), this.fontScale);\n }\n if (this.fontsRefreshed) this.capForFonts(node, style);\n alignMultiline(viewName, style);\n rowsTall(viewName, style, this.fontScale);\n const merged = composeTransform(node, this.eased(node, style));\n // On iOS: Android's field says the baseline of the line it is sized and centred by.\n // Still under the row that marked it: a row taken away is not committed again to unmark it.\n const row = node.onBaseline;\n const onBaseline = viewName === 'TextInput' && row !== undefined && isWithin(node, row);\n centreSingleLine(viewName, merged, this.fontScale, onBaseline);\n // After a transition, which eases the basis as the basis it was written as.\n basisAsSize(node, merged);\n // After the basis, which is a size given where it is committed as one.\n ratioForAutoSize(merged);\n wrappedLinesStretch(merged);\n stretchedOverRatio(node, merged);\n leastWins(merged, 'Height');\n leastWins(merged, 'Width');\n noOutline(merged);\n this.borderInText(node, merged);\n // Last, on what is committed: an override or an animation can hide a box, or place it.\n hiddenOutOfFlow(merged);\n delete merged['touchAction'];\n if (this.responders.has(node)) stillTouched(merged);\n this.heldFor(node, merged);\n this.movePaint(node, merged);\n if (node.raised !== undefined) merged['zIndex'] ??= node.raised;\n keptForNative(node, merged);\n return merged;\n }\n\n /**\n * The z-index a view is drawn at for the boxes in it: the highest of theirs. A browser draws a\n * box with a z-index over what follows the boxes it is in, and a native view is ordered among\n * the views beside it and no further, so each view the box is in is raised as far. Read from\n * what its children committed, which for a raised child is what raised it. A child with a\n * z-index of its own answers with that and nothing from inside it, as the stacking context it\n * is. Only a plain view is raised: a scroll view clips what is in it, and a screen is ordered\n * by its stack.\n *\n * ponytail: a z-index is the one thing read as making a stacking context. Opacity and a\n * transform make one in a browser too; read them here if a box is ever raised past one.\n */\n private raisedBy(node: EngineNode, viewName: string): number | undefined {\n if (viewName !== DEFAULT_VIEW) return undefined;\n let over = 0;\n for (const child of node.children) {\n const z = child.committed?.props['zIndex'];\n if (typeof z !== 'number' || z <= over) continue;\n if (!this.committedElsewhere(child) && !this.withheld(child)) over = z;\n }\n return over || undefined;\n }\n\n /** Read how far a view is raised, once its children are committed: its props are, if it moved. */\n private raise(node: EngineNode, viewName: string): void {\n const raised = this.raisedBy(node, viewName);\n if (raised === node.raised) return;\n node.raised = raised;\n node.propsDirty = true;\n }\n\n /**\n * Draw a border that has a width and no colour in the colour of the text, as a browser does:\n * `border-color` starts as `currentColor`, and native starts it as black. Each side with a\n * width, where nothing gave that side a colour. Left to native where there is no text colour\n * to take, which is black in a browser too.\n */\n private borderInText(node: EngineNode, props: Record<string, unknown>): void {\n let text: unknown;\n // The side a logical colour is for is the other one where text is read right to left.\n const flipped =\n (props['borderStartColor'] != null || props['borderEndColor'] != null) &&\n this.styles.readsRightToLeft(props);\n for (const side of BORDER_SIDES) {\n if (!colourless(props, side, flipped)) continue;\n text ??= props['color'] ?? this.styles.resolve(node, this.styleEpoch).inherited['color'];\n if (text == null) return;\n props[side.color] = text;\n }\n }\n\n /**\n * The tallest line, as the system text size draws it, of the runs of text in a paragraph:\n * none is 0. A run scales as what it is in does, `within`, but for what it says of that\n * itself: one that does not scale, or stops at a size, beside text that does.\n */\n private tallestRun(node: EngineNode, within: Record<string, unknown>, tallest: number): number {\n for (const child of node.children) {\n if (!isTextElement(child)) continue;\n const scaling = {\n allowFontScaling: child.props['allowFontScaling'] ?? within['allowFontScaling'],\n maxFontSizeMultiplier:\n child.props['maxFontSizeMultiplier'] ?? within['maxFontSizeMultiplier'],\n };\n const line =\n inlineOf(child)['lineHeight'] ??\n this.styles.resolve(child, this.styleEpoch).style['lineHeight'];\n const drawn = typeof line === 'number' ? line * textScale(scaling, this.fontScale) : 0;\n tallest = this.tallestRun(child, scaling, Math.max(tallest, drawn));\n }\n return tallest;\n }\n\n /**\n * Keep a paragraph whose text has nowhere to wrap on one line, as a browser does: a word is\n * not broken inside, and what does not fit is past the edge. Native breaks a word wider than\n * its line between any two letters. Cut at the edge, where no rule says how it ends.\n */\n private wholeWords(node: EngineNode, props: Record<string, unknown>): void {\n // Remembered, for its text changing to be told from its text changing what this answers.\n node.oneWord = props['numberOfLines'] == null ? unbroken(node) : undefined;\n if (!node.oneWord) return;\n props['numberOfLines'] = 1;\n const ended = [\n this.styles.resolve(node, this.styleEpoch).style,\n node.props,\n inlineOf(node),\n flattenStyle(node.props[STYLE_OVERRIDE], {}),\n ];\n if (ended.every((from) => from['ellipsizeMode'] == null)) props['ellipsizeMode'] = 'clip';\n }\n\n /**\n * Leave a node's background out of what it commits when a child paints it, and give that child\n * its parent's: the cascade's, and over it the parent's inline style.\n */\n private movePaint(node: EngineNode, merged: Record<string, unknown>): void {\n if (node.paintTaker) {\n // Only the colour is handed over: a background image stays painted on the node.\n this.takenPaint(node, merged['backgroundColor']);\n delete merged['backgroundColor'];\n }\n if (node.paintsOn) for (const key of PAINT_KEYS) delete merged[key];\n const from = node.parent?.paintsOn === node ? node.parent : null;\n if (!from) return;\n const paint = { ...this.styles.resolve(from, this.styleEpoch).style, ...inlineOf(from) };\n for (const key of PAINT_KEYS) if (paint[key] !== undefined) merged[key] = paint[key];\n }\n\n /** Note the background colour a node that hands it over resolves to, where it changed. */\n private takenPaint(node: EngineNode, color: unknown): void {\n if (color === node.paintTaken) return;\n node.paintTaken = color;\n this.paintReports.add(node);\n }\n\n /**\n * A container whose direction or alignment changed since a child with a `fit-content` size\n * read it, or whose height stopped or started being one a percentage is taken of since a child\n * with a percentage height asked: those children are merged again. A change to a container\n * marks nothing beneath it, since none of these is inherited.\n */\n private refitChildren(node: EngineNode): void {\n // Both are asked, and both remembered, before either has the children merged again.\n const basis = node.heightBasis;\n const based = basis !== undefined && definiteHeight(node) !== basis;\n const fitted = node.fitContainer !== undefined && containerOf(node) !== node.fitContainer;\n if (fitted) node.fitContainer = containerOf(node);\n if (based || fitted) this.refit(node);\n }\n\n /** Have a container's children merged again, through any `display: contents` among them. */\n private refit(container: EngineNode): void {\n for (const child of container.children) {\n if (child.kind !== 'element') continue;\n child.propsDirty = true;\n if (containerOf(child) === 'contents') this.refit(child);\n }\n }\n\n /**\n * The text size cap that lays a paragraph or text input out again once a face it names has\n * registered: a step per face above the app's own cap where it set one (below 1 is none, on\n * both platforms), or above any text size there is. Counted per view, so an app's cap moves by\n * a step for each face its text names and no further. See `fontsRegistered`.\n */\n private capForFonts(node: EngineNode, props: Record<string, unknown>): void {\n const refreshes = this.fontRefreshes.get(node);\n if (refreshes === undefined) return;\n const own = props['maxFontSizeMultiplier'];\n props['maxFontSizeMultiplier'] =\n (typeof own === 'number' && own >= 1 ? own : UNCAPPED) + refreshes * FONT_REFRESH_STEP;\n }\n\n /** Set once any node has had a `direction` in its inline style. See `directionOf`. */\n private inlineDirection = false;\n\n /**\n * The direction a paragraph is laid out in, where the app wrote one: its own, or the nearest\n * ancestor's. Undefined when nothing above it says, which leaves the platform's own.\n *\n * A stylesheet's `direction` is inherited through the cascade, so it is already in `props`. An\n * inline one is not, and is found by walking up, which only happens once some node has had one.\n */\n private directionOf(node: EngineNode, props: Record<string, unknown>): TextDirection | undefined {\n const own = textDirection(props['direction']);\n if (!this.inlineDirection) return own;\n for (let at: EngineNode | null = node; at; at = at.parent) {\n const inline = textDirection(inlineOf(at)['direction']);\n if (inline) return inline;\n const cascaded = textDirection(at.styleCache?.style['direction']);\n if (cascaded && cascaded !== textDirection(at.parent?.styleCache?.style['direction'])) {\n return cascaded;\n }\n }\n return own;\n }\n\n /**\n * Hold back what a transition is meant to ease into.\n *\n * Called with everything the node would otherwise commit with, so a property is compared\n * against the last value aimed at rather than the last one painted: a transition redirected\n * halfway carries on from where it had got to instead of snapping.\n *\n * A property seen for the first time is recorded and left alone. That is CSS's own rule, and\n * without it every element would fade in from whatever the previous value happened to be.\n */\n /**\n * Take a sheet's `@keyframes` and `@font-face` rules into the registries. Cheap and idempotent;\n * sheets are few.\n */\n private registerSheet(sheet: StyleSheet | null | undefined): void {\n if (!sheet || this.knownSheets.has(sheet)) return;\n this.knownSheets.add(sheet);\n this.noteSheetEasing(sheet);\n this.styles.noteSheet(sheet);\n this.sheetOrder.push(sheet);\n for (const name of Object.keys(sheet.keyframes ?? {})) {\n this.keyframes.set(name, sheet.keyframes![name]!);\n }\n if (sheet.fonts && this.fontFaces.add(sheet.fonts)) this.facesAdded = true;\n }\n\n /**\n * A hot swap edited a component's sheet into `next`, or took it away with null: `sheet`'s\n * `@keyframes` go, and `next`'s take its place among the others, as an edited stylesheet keeps\n * its place in a document. A name another sheet also defines falls back to that one. Every\n * animation re-resolves the name it plays, so one whose keyframes went stops, as in a browser.\n * A `sheet` already gone, such as a global sheet removed, leaves `next` registered last.\n */\n sheetReplaced(sheet: StyleSheet, next: StyleSheet | null): void {\n if (sheet === next && this.knownSheets.has(sheet)) return;\n this.hasReaders.delete(sheet);\n this.watchHas(next);\n this.unwatchActive(sheet);\n this.watchActive(next);\n const at = this.sheetOrder.indexOf(sheet);\n if (at === -1) {\n this.registerSheet(next);\n return;\n }\n this.knownSheets.delete(sheet);\n if (next && !this.knownSheets.has(next)) {\n this.knownSheets.add(next);\n this.noteSheetEasing(next);\n this.styles.noteSheet(next);\n this.sheetOrder[at] = next;\n } else {\n this.sheetOrder.splice(at, 1);\n }\n if (sheet.keyframes || next?.keyframes) this.reindexKeyframes();\n if (sheet.fonts || next?.fonts) this.reindexFonts();\n }\n\n /**\n * Every sheet's `@font-face` rules again, in order, and every text that names a family matched\n * again: a face whose rule went is no longer matched, though the platform keeps it registered.\n */\n private reindexFonts(): void {\n this.fontFaces.clear();\n for (const sheet of this.sheetOrder) if (sheet.fonts) this.fontFaces.add(sheet.fonts);\n this.markFontText(this.root);\n }\n\n /** Every sheet's `@keyframes` again, in order, and every animation told to look them up. */\n private reindexKeyframes(): void {\n this.keyframes.clear();\n for (const sheet of this.sheetOrder) {\n for (const name of Object.keys(sheet.keyframes ?? {})) {\n this.keyframes.set(name, sheet.keyframes![name]!);\n }\n }\n this.markAnimated(this.root);\n }\n\n /** Mark every node under `node` with an animation, so it looks its keyframes up again. */\n private markAnimated(node: EngineNode): void {\n for (const child of node.children) {\n if (child.playing || child.scrolled) this.markProps(child, false);\n this.markAnimated(child);\n }\n }\n\n /** Every `@font-face` seen, global as on the web: a face declared in one sheet serves all. */\n private readonly fontFaces = new FontFaces();\n private readonly postScriptName: PostScriptNames = (name) => this.fontFaces.postScriptName(name);\n /** Whether a sheet first used in this commit declared a face. See `rematchFonts`. */\n private facesAdded = false;\n\n /**\n * Faces a sheet declared partway through a commit: text resolved before it, in this commit or\n * an earlier one, matched without them. Resolve every text naming a family again, and commit.\n * Once per sheet that declares faces, so walking the tree costs nothing that matters.\n */\n private rematchFonts(): void {\n this.markFontText(this.root);\n this.commit();\n }\n\n /** Mark every element under `node` committed with a family, so it is matched again. */\n private markFontText(node: EngineNode): void {\n const named = (text: EngineNode | undefined): void => {\n if (typeof text?.committed?.props['fontFamily'] === 'string') this.markProps(text, false);\n };\n for (const child of node.children) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.kind === 'text') named(child.box);\n if (child.kind !== 'element') continue;\n if (child.committed && FONT_NAMES[child.committed.viewName]) this.markProps(child, false);\n else named(child);\n this.markFontText(child);\n }\n }\n\n private readonly knownSheets = new WeakSet<StyleSheet>();\n\n /**\n * Start, advance or stop the `@keyframes` animation a node's style asks for.\n *\n * Unlike a transition this does not need anything to have changed: an animation plays from its\n * own frames, which is what lets an element animate in without differing from anything.\n */\n private animated(node: EngineNode, props: Record<string, unknown>): Record<string, unknown> {\n const spec = animationOf(props);\n\n // One played by a scroll that is no longer asked for, whatever is asked for instead.\n if (node.scrolled && !spec?.timeline) this.stopScrolled(node);\n if (!spec) {\n if (node.playing) {\n this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n }\n return props;\n }\n\n const written = this.keyframesOf(node, spec.name);\n const frames = written && this.framesFor(node, written);\n if (!frames) {\n // Keyframes a hot swap deleted, from under an animation that was playing them, or ones a\n // sheet later in this commit has: see `settleKeyframes`.\n this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n this.stopScrolled(node);\n this.awaitingKeyframes.set(node, spec.name);\n return props;\n }\n if (spec.timeline) return this.scrollAnimated(node, spec, frames, props);\n this.startPlaying(node, spec, frames, props);\n return Object.assign(props, playedOver(node));\n }\n\n /**\n * The keyframes a node's animation names: those of its own component's sheet where it has\n * some by that name, as Angular scopes a component's keyframes in a browser, and otherwise\n * whichever sheet has them, since any other is global.\n *\n * ponytail: a host is asked of the sheet it is written in before its own component's, so\n * a `:host` animation is played by its parent's frames where both have the name.\n */\n private keyframesOf(node: EngineNode, name: string): readonly Keyframe[] | undefined {\n const own = node.sheet?.keyframes?.[name] ?? node.hostSheet?.keyframes?.[name];\n return own ?? this.keyframes.get(name);\n }\n\n /** Each node's frames as they settle on it, kept for as long as they settle the same. */\n private readonly settledFrames = new WeakMap<\n EngineNode,\n { of: readonly Keyframe[]; styled: unknown; key: string; frames: readonly Keyframe[] }\n >();\n\n /**\n * An animation's frames for the node playing it: those with a value that waits for the node,\n * a `var()` it sets, settled against it. The same frames are answered while they settle the\n * same, and others once a variable changes, which is what an animation under way is played\n * on from: see `reframe`.\n */\n private framesFor(node: EngineNode, frames: readonly Keyframe[]): readonly Keyframe[] {\n if (!frames.some((frame) => frame.deferred)) return frames;\n const kept = this.settledFrames.get(node);\n // Styled as it was, it settles as it did: a commit a frame asks, and most change nothing.\n const styled = node.styleCache;\n if (kept?.of === frames && kept.styled === styled) return kept.frames;\n const settled = frames.map(\n (frame) => frame.deferred && this.styles.settleFor(node, frame.deferred, this.styleEpoch),\n );\n const key = JSON.stringify(settled);\n if (kept?.of === frames && kept.key === key) {\n kept.styled = styled;\n return kept.frames;\n }\n const made = frames.map((frame, at) => {\n const values = Object.entries(settled[at] ?? {}).filter(([, value]) => value !== undefined);\n return values.length\n ? { ...frame, declarations: { ...frame.declarations, ...Object.fromEntries(values) } }\n : frame;\n });\n this.settledFrames.set(node, { of: frames, styled, key, frames: made });\n return made;\n }\n\n /**\n * A clock animation the scroll plays instead: the same animation where only the timeline moved,\n * and one cancelled where the name changed.\n */\n private handOverToScroll(node: EngineNode, spec: AnimationSpec): void {\n if (!node.playing) return;\n this.stopNative(node, node.playing);\n if (node.playing.spec.name !== spec.name) this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n }\n\n /**\n * `animationcancel` for an animation stopped before it ended: the element no longer asks for it,\n * asks for another by name, or its keyframes went, as a browser fires it.\n */\n private cancelPlaying(node: EngineNode): void {\n const running = node.playing;\n if (running) this.stopNative(node, running);\n if (running && !running.done)\n this.emitTransition(node, 'topAnimationcancel', running.spec.name);\n }\n\n /** Stop on native each animation and transition whose view has left the tree. */\n private releasePlayedNatively(): void {\n for (const node of [...this.playedNatively]) {\n if (this.topOf(node) === this.root) continue;\n this.stopNative(node, node.playing!);\n node.playing = undefined;\n this.markProps(node, false);\n }\n for (const node of [...this.easedNatively]) {\n if (this.topOf(node) !== this.root) this.stopEased(node);\n }\n }\n\n /** Every node whose animation native is playing, with no frame of it in JavaScript. */\n private readonly playedNatively = new Set<EngineNode>();\n\n /**\n * Hand an animation that has just started to native, where native can play it: one that moves\n * only opacity and transforms, starts at once, and repeats a whole number of times. Native then\n * runs it frame by frame, and JavaScript hears of it again when it ends. Anything else is\n * played from here, a commit a frame. See `NativeScrollDriver.play`.\n */\n /**\n * The nodes whose animation moves them by a share of their own size and had no size yet when\n * it started, each with the style it rests at: asked again once the commit has laid them out.\n */\n private readonly unsized = new Map<EngineNode, Record<string, unknown>>();\n\n /**\n * An animation's frames as native can interpolate them: a move by a share of the box,\n * `translateX(200%)`, as the points that is of the size the view is laid out at. Nothing where\n * the view has no size yet, which is every view until its first commit: it is played from\n * JavaScript, and handed over once that commit has laid it out. See `playSized`.\n *\n * ponytail: the size it had when it started. A box that changes size goes on moving by the\n * points of the old one until the animation starts again; restart it from the box's layout\n * event if a bar that resizes mid-animation comes up.\n */\n private sized(\n node: EngineNode,\n running: RunningAnimation,\n props: Record<string, unknown>,\n ): { tracks: RunningAnimation['tracks']; resting: Record<string, unknown> } | null {\n // One that waits, or takes no time, is played from here whatever it moves by.\n if (running.spec.delay !== 0 || running.spec.duration <= 0) return null;\n if (!movesByShare(running.tracks, props)) return { tracks: running.tracks, resting: props };\n let size: { width: number; height: number } | undefined;\n this.measure(node, (frame) => (size = frame));\n if (size) return sharesAsPoints(running.tracks, props, size);\n this.unsized.set(node, props);\n return null;\n }\n\n /**\n * Hand to native each animation that was waiting for its view to have a size. The commit just\n * made painted its first frame, so its clock starts here: no frame of it has been seen move.\n */\n private playSized(): void {\n if (!this.unsized.size) return;\n const waiting = [...this.unsized];\n this.unsized.clear();\n for (const [node, props] of waiting) {\n const running = node.playing;\n if (!running || running.done || running.native || !this.playing.has(node)) continue;\n // Native plays it from its first frame, so its clock starts here: but only where native\n // takes it. Left in JavaScript, it goes on from the clock it started on.\n const started = running.start;\n running.start = this.now();\n if (this.playNatively(node, running, props)) {\n this.playing.delete(node);\n // `collapsable`, which keeps a view for native to move, is in what it holds now.\n this.markProps(node, false);\n } else {\n running.start = started;\n }\n }\n // One with no size after its commit is not laid out at all, and is played from JavaScript.\n this.unsized.clear();\n }\n\n private playNatively(\n node: EngineNode,\n running: RunningAnimation,\n props: Record<string, unknown>,\n ): boolean {\n const { spec } = running;\n const sized = this.scrollDriver ? this.sized(node, running, props) : null;\n if (!this.scrollDriver || !sized) return false;\n const pinned = pinnedIn(node, sized.tracks);\n const tracks = unpinned(sized.tracks, pinned);\n const { channels, held, span } = clockChannels(tracks, spec, sized.resting);\n if (held.length || !(channels.opacity || channels.transform.length)) return false;\n // There and back is one native animation: an odd number of ways has no whole number of them.\n const count = spec.iterations === null ? -1 : spec.iterations / span;\n if (count !== -1 && !(Number.isInteger(count) && count > 0)) return false;\n const length = Math.max(2, Math.round((spec.duration * span) / NATIVE_FRAME) + 1);\n const frames = Array.from({ length }, (_, i) => i / (length - 1));\n const native = this.scrollDriver.play(\n node,\n channels,\n { frames, toValue: span, iterations: count },\n (view) => this.tagOf(view as EngineNode),\n () => this.endedNatively(node, running),\n );\n if (!native) return false;\n running.native = native;\n running.pinned = pinned;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move.\n running.values = { ...running.values, collapsable: false };\n this.playedNatively.add(node);\n return true;\n }\n\n /**\n * Native reached the end of an animation it was playing. The frame it ends at, or the resting\n * style where it does not fill, is committed, and set on native where the animation set the\n * prop (see `setOwned`). The view is let go first, which puts nothing back on Fabric: it is\n * drawn where the animation left it until then.\n */\n private endedNatively(node: EngineNode, running: RunningAnimation): void {\n if (node.playing !== running || !running.native) return;\n const { native, spec } = running;\n running.native = undefined;\n this.playedNatively.delete(node);\n const end = running.start + spec.duration * (spec.iterations ?? 1);\n native.stop();\n this.advancePlayer(node, Math.max(this.now(), end));\n this.commit();\n // The commit sets only what it changed, and the style the view rests at can be the frame it\n // was committed with as it played: native has drawn it elsewhere since.\n const committed = node.committed;\n if (node.owned && committed) this.setOwned(node, RESET_OWNED, committed.props);\n }\n\n /** A graph of native's was connected to a view: see `Touched`. */\n private touchedNatively(node: EngineNode, tag: number, keys: readonly string[]): void {\n const taken = keys.filter((key) => key === 'opacity' || key === 'transform');\n if (!taken.length) return;\n if (node.owned?.tag !== tag) node.owned = { tag, keys: new Set() };\n for (const key of taken) node.owned.keys.add(key);\n }\n\n /**\n * Set on native a change of a prop a graph of native's has set on the view before, while no\n * graph of its holds it: the commit cannot change it (see `Touched`). The payload is committed\n * as well, so the shadow node is as the view is drawn. A transform native cannot take as\n * numbers, a matrix, is left committed alone.\n */\n private setOwned(\n node: EngineNode,\n payload: Readonly<Record<string, unknown>>,\n props: Record<string, unknown>,\n ): void {\n const owned = node.owned!;\n const tag = node.committed?.tag;\n if (tag === undefined || owned.tag !== tag || !this.scrollDriver) return;\n const held = this.scrollDriver.held(node);\n const free = (key: string) => key in payload && owned.keys.has(key) && !held.has(key);\n const values: SetValues = {};\n if (free('opacity')) {\n const opacity = props['opacity'];\n values.opacity = typeof opacity === 'number' ? opacity : 1;\n }\n if (free('transform')) {\n const transform = heldTransform(props['transform'], () => this.boxSize(node));\n if (transform) values.transform = transform;\n }\n if (values.opacity !== undefined || values.transform) {\n this.scrollDriver.set(node, tag, values);\n }\n }\n\n /** The size a view is laid out at, where it has been. */\n private boxSize(node: EngineNode): { width: number; height: number } | undefined {\n let size: { width: number; height: number } | undefined;\n this.measure(node, (frame) => (size = frame));\n return size;\n }\n\n /** Forget the props native set on a node's view, which is gone or made again. */\n private disown(node: EngineNode): void {\n node.owned = undefined;\n this.scrollDriver?.forget(node);\n }\n\n /** Take an animation back from native, which stops it there. The caller plays it on, or not. */\n private stopNative(node: EngineNode, running: RunningAnimation): void {\n if (!running.native) return;\n running.native.stop();\n running.native = undefined;\n this.playedNatively.delete(node);\n }\n\n /**\n * Play on from JavaScript an animation native was playing, from where its clock has got to:\n * what a pause, other frames or a view made again need, none of which native can be told of.\n */\n private backToScript(node: EngineNode, running: RunningAnimation): void {\n if (!running.native) return;\n this.stopNative(node, running);\n running.values = sample(running, this.now()).values;\n if (!running.done && running.pausedAt === undefined) this.playing.add(node);\n }\n\n /** Start the clock on an animation, unless the node is already playing this one. */\n private startPlaying(\n node: EngineNode,\n spec: AnimationSpec,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n ): void {\n const current = node.playing;\n const inherited = this.inheritedColour(node, frames);\n if (!current || !sameAnimation(current.spec, spec)) {\n if (current && current.spec.name !== spec.name) this.cancelPlaying(node);\n else if (current) this.stopNative(node, current);\n const started: RunningAnimation = {\n spec,\n tracks: tracksOf(frames, props, inherited),\n inherited,\n start: this.now(),\n values: {},\n done: false,\n };\n // Sampled straight away, so the very commit that starts the animation paints its first\n // frame. Otherwise an element appears in its resting style for one frame and then jumps,\n // which is the flash this whole mechanism exists to avoid.\n //\n // A delayed animation therefore holds its first frame through the delay rather than the\n // resting style: `animation-fill-mode: backwards` behaviour, always. It is what an entrance\n // wants, and the alternative is the flash again.\n started.values = sample(started, this.now()).values;\n this.playedFrames.set(started, frames);\n node.playing = started;\n if (spec.paused) started.pausedAt = this.now();\n else this.playSomewhere(node, started, props);\n this.emitTransition(node, 'topAnimationstart', spec.name);\n return;\n }\n // A view made again is another view: the one native was moving is gone. And one whose\n // important declarations changed is moving what it now must not, or not what it now may.\n if (node.committed === null || pinsChanged(node, current)) this.backToScript(node, current);\n if (this.playedFrames.get(current) !== frames || inherited !== current.inherited) {\n this.backToScript(node, current);\n this.reframe(node, current, frames, props, inherited);\n }\n this.playOrPause(node, node.playing!, spec);\n }\n\n /** Play an animation that has just started: by native's layout, by native's driver, or here. */\n private playSomewhere(\n node: EngineNode,\n started: RunningAnimation,\n props: Record<string, unknown>,\n ): void {\n if (this.layPlayed(node, started)) this.laidPlayed.push({ node, running: started });\n else if (!this.playNatively(node, started, props)) this.playing.add(node);\n }\n\n /**\n * The colour `node` inherits, for frames that set `color: currentColor`, which is that colour\n * wherever the animation has got to, as in CSS. Undefined for frames that do not.\n */\n private inheritedColour(node: EngineNode, frames: readonly Keyframe[]): unknown {\n if (!readsInheritedColour(frames)) return undefined;\n const parent = node.parent && this.styles.resolve(node.parent, this.styleEpoch);\n return parent?.inherited['color'] ?? 'black';\n }\n\n /**\n * The name an animation plays now has other frames: a hot swap edited them, or took away the\n * sheet whose copy won. Or the colour its `color: currentColor` stands for has changed. It\n * carries on along the new tracks, on its own clock, as a browser does, paused or not.\n */\n private reframe(\n node: EngineNode,\n current: RunningAnimation,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n inherited: unknown,\n ): void {\n const tracks = tracksOf(frames, props, inherited);\n // One native was laying out goes on from JavaScript, by the clock it started on.\n const reframed: RunningAnimation = { ...current, tracks, inherited, laid: undefined };\n const { values, finished } = sample(reframed, current.pausedAt ?? this.now());\n const holds = current.spec.fill === 'forwards' || current.spec.fill === 'both';\n reframed.values = finished && !holds ? {} : values;\n this.playedFrames.set(reframed, frames);\n node.playing = reframed;\n // One that had nothing to paint was let go of: with frames that say something it plays on.\n const stopped = reframed.done || reframed.pausedAt !== undefined || reframed.native;\n if (!stopped) this.playing.add(node);\n }\n\n /**\n * `animation-play-state` changed on an animation already playing: pausing holds the frame it\n * has reached, and running again carries on from there, the paused time left out of its clock.\n * Neither starts it over, as a change of play state does not in CSS.\n */\n private playOrPause(node: EngineNode, current: RunningAnimation, spec: AnimationSpec): void {\n current.spec = spec;\n const now = this.now();\n if (spec.paused && current.pausedAt === undefined && !current.done) {\n this.backToScript(node, current);\n current.pausedAt = now;\n this.playing.delete(node);\n } else if (!spec.paused && current.pausedAt !== undefined) {\n current.start += now - current.pausedAt;\n current.pausedAt = undefined;\n this.playing.add(node);\n }\n }\n\n /** Every node playing a scroll-driven animation, by the scroll view that plays it. */\n private readonly scrollTimelines = new Map<EngineNode, Set<EngineNode>>();\n /** How far each such scroll view scrolls, along each axis, once one of its events has said. */\n private readonly scrollExtents = new WeakMap<EngineNode, { x: number; y: number }>();\n\n /**\n * An animation played by the nearest scroll view's offset: `animation-timeline: scroll()`.\n *\n * Its keyframes are laid along the offset and handed to native, which plays them as the view\n * scrolls, with no JavaScript between (`scroll-animation.ts`, `NativeScrollDriver.animate`).\n * The frame at the offset the view starts at is committed once and then left alone: a prop that\n * changed on a later commit would reset what native is animating.\n */\n private scrollAnimated(\n node: EngineNode,\n spec: AnimationSpec,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n ): Record<string, unknown> {\n const current = node.scrolled;\n const inherited = this.inheritedColour(node, frames);\n const same = current?.frames === frames && sameAnimation(current.spec, spec);\n if (same && pinnedIn(node, current.tracks).join(' ') === current.pinned.join(' ')) {\n return Object.assign(props, this.rescrolled(node, current, frames, props, inherited));\n }\n this.stopScrolled(node);\n this.handOverToScroll(node, spec);\n\n const tracks = tracksOf(frames, props, inherited);\n const pinned = pinnedIn(node, tracks);\n const played = unpinned(tracks, pinned);\n const source = this.scrollSourceOf(node);\n const extent = source ? (this.scrollExtents.get(source)?.[spec.timeline!] ?? null) : null;\n const range = rangeOf(spec, extent);\n const first: Record<string, unknown> = firstFrame(played, spec, range);\n const resting = { ...props };\n if (!source && this.dev) this.reportUnscrolled(spec.name);\n const drive = source ? this.driveScrolled(node, source, spec, played, resting, range) : null;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move. Committed with the first frame, so it stays put.\n if (drive) first['collapsable'] = false;\n node.scrolled = { spec, frames, tracks, pinned, resting, first, source, drive, inherited };\n return Object.assign(props, first);\n }\n\n /**\n * The first frame of a scroll-driven animation already playing. When the colour its\n * `color: currentColor` stands for has changed, that frame's colour is taken from tracks built\n * again. Native drives opacity and transforms only, so a colour holds its first frame, and\n * nothing native animates is touched.\n */\n private rescrolled(\n node: EngineNode,\n current: ScrollAnimation,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n inherited: unknown,\n ): Record<string, unknown> {\n if (inherited === current.inherited) return current.first;\n // The element's own colour, which a track with no first frame starts at, may be the one it\n // inherits, so it is read again too.\n const resting = { ...current.resting, color: props['color'] };\n const tracks = tracksOf(frames, resting, inherited);\n const extent = current.source ? this.scrollExtents.get(current.source) : undefined;\n const range = rangeOf(current.spec, extent?.[current.spec.timeline!] ?? null);\n const first = { ...current.first };\n const colour = firstFrame(tracks, current.spec, range)['color'];\n if ('color' in first) first['color'] = colour;\n node.scrolled = { ...current, tracks, resting, first, inherited };\n return first;\n }\n\n /** Hand a scroll-driven animation's channels to native, fed by `source`'s scroll events. */\n private driveScrolled(\n node: EngineNode,\n source: EngineNode,\n spec: AnimationSpec,\n tracks: ScrollAnimation['tracks'],\n resting: Record<string, unknown>,\n range: readonly [number, number],\n ): ScrollAnimation['drive'] {\n if (!this.scrollDriver) return null;\n const { channels, held } = scrollChannels(tracks, spec, resting, range);\n if (held.length && this.dev) this.reportHeld(spec.name, held);\n let playing = this.scrollTimelines.get(source);\n if (!playing) this.scrollTimelines.set(source, (playing = new Set()));\n playing.add(node);\n return this.scrollDriver.animate(\n node,\n source,\n scrollFeed(spec.timeline!),\n channels,\n (one) => (one as EngineNode).committed?.tag ?? null,\n );\n }\n\n /** The scroll view a scroll-driven animation on `node` follows: the nearest one it is inside. */\n private scrollSourceOf(node: EngineNode): EngineNode | null {\n for (let up = node.parent; up; up = up.parent) {\n const name = viewNameOf(up);\n if (name === 'ScrollView' || name === 'AndroidHorizontalScrollView') return up;\n }\n return null;\n }\n\n private stopScrolled(node: EngineNode): void {\n const scrolled = node.scrolled;\n if (!scrolled) return;\n node.scrolled = undefined;\n scrolled.drive?.stop();\n const playing = scrolled.source && this.scrollTimelines.get(scrolled.source);\n if (!playing) return;\n playing.delete(node);\n // The last to follow this scroll view: a key left here keeps it, and all it is linked to.\n if (!playing.size) this.scrollTimelines.delete(scrolled.source!);\n }\n\n /**\n * A scroll view has said how far it scrolls. Every animation on it with a range that depends on\n * that - none written, or a percentage - is laid out again along the new extent.\n */\n private measuredScroll(source: EngineNode, event: unknown): void {\n const { contentSize, layoutMeasurement } = (event ?? {}) as {\n contentSize?: { width: number; height: number };\n layoutMeasurement?: { width: number; height: number };\n };\n if (!contentSize || !layoutMeasurement) return;\n const extent = {\n x: Math.max(0, contentSize.width - layoutMeasurement.width),\n y: Math.max(0, contentSize.height - layoutMeasurement.height),\n };\n const known = this.scrollExtents.get(source);\n if (known && known.x === extent.x && known.y === extent.y) return;\n this.scrollExtents.set(source, extent);\n for (const node of this.scrollTimelines.get(source) ?? []) {\n const scrolled = node.scrolled;\n if (!scrolled?.drive) continue;\n const range = rangeOf(scrolled.spec, extent[scrolled.spec.timeline!]);\n scrolled.drive.update(\n scrollChannels(\n unpinned(scrolled.tracks, scrolled.pinned),\n scrolled.spec,\n scrolled.resting,\n range,\n ).channels,\n );\n }\n }\n\n private reportUnscrolled(name: string): void {\n if (this.reported.has(`scroll ${name}`)) return;\n this.reported.add(`scroll ${name}`);\n console.error(\n `[angular-native] '${name}' plays by animation-timeline: scroll(), but the element is not ` +\n `inside a scroll view, so nothing moves it. It shows its first frame.`,\n );\n }\n\n private reportHeld(name: string, properties: readonly string[]): void {\n if (this.reported.has(`held ${name}`)) return;\n this.reported.add(`held ${name}`);\n console.error(\n `[angular-native] '${name}' plays by a scroll, which native drives for opacity and ` +\n `transforms only. ${properties.join(', ')} holds its first frame.`,\n );\n }\n\n private reportMissingKeyframes(name: string): void {\n if (this.reported.has(`@keyframes ${name}`)) return;\n this.reported.add(`@keyframes ${name}`);\n console.error(\n `[angular-native] no @keyframes named '${name}'. Nothing animates, and the element ` +\n `renders with its resting style. Keyframes are global across every stylesheet the app ` +\n `has loaded, so the block has to exist somewhere by the time the animation starts.`,\n );\n }\n\n private transitioned(node: EngineNode, props: Record<string, unknown>): Record<string, unknown> {\n this.unseenTransitions(node);\n const spec = transitionSpec(props);\n if (!spec && !node.transitions) return props;\n if (spec) keepForTransition(node, props, spec);\n\n const state = (node.transitions ??= new Map());\n const now = this.now();\n this.takeBackEased(node, state, props, spec, now);\n this.takeBackLaid(state, props, spec, now);\n const started: string[] = [];\n const before = spec && this.paintedBefore(node);\n\n for (const key of steppedKeys(props, spec, state)) {\n if (step(state, key, props, spec?.[key] ?? spec?.['all'], now, before)) {\n this.running.add(node);\n started.push(key);\n this.emitTransition(node, 'topTransitionstart', key);\n }\n }\n this.easeNatively(node, state, started, props, now);\n\n if (state.size === 0) node.transitions = undefined;\n return props;\n }\n\n /**\n * What a view was last painted with, by property, for a transition that arrives with the change\n * it eases: CSS takes the transition from the style after the change and eases from the value\n * before it. Nothing for a view nobody has seen yet, which starts where it is. The individual\n * transforms are read back from the parts the painted transform was put together from.\n */\n private paintedBefore(node: EngineNode): ((key: string) => unknown) | undefined {\n const painted = node.committed?.props;\n // A view that paints its background on a child does not commit it as its own.\n if (!painted || node.paintsOn) return undefined;\n if (node.bornIn !== undefined && node.bornIn >= this.unseen) return undefined;\n const composed = node.composedTransform;\n if (!composed || painted['transform'] !== composed.value) return (key) => painted[key];\n return (key) => {\n if (key === 'transform') return composed.parts[3];\n const part = (INDIVIDUAL_TRANSFORMS as readonly string[]).indexOf(key);\n return part === -1 ? painted[key] : composed.parts[part];\n };\n }\n\n /** Nobody saw what the last commit gave a view it created, so this is where the view starts. */\n private unseenTransitions(node: EngineNode): void {\n // One with no commit it was born in has been seen, whatever was committed since.\n if (node.bornIn === undefined || node.bornIn < this.unseen) return;\n this.stopEased(node);\n node.transitions = undefined;\n }\n\n /** The elements native is playing a transition of. */\n private readonly easedNatively = new Set<EngineNode>();\n\n /**\n * Hand to native each transition that just started and that it can play: opacity and\n * transforms, with no wait before they start. Those that start together, take as long and ease\n * alike share a clock. Nothing of them runs in JavaScript until native says they have ended:\n * a press that fades or slides something is a commit to start it and a commit to end it.\n *\n * ponytail: a colour is eased from JavaScript still, a commit a frame, and so is anything\n * that waits. Native has a colour node for the first; give the driver a channel for it.\n */\n private easeNatively(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n if (started.length) this.startEased(node, state, started, props, now);\n this.layEased(node, state, started, props, now);\n const inScript = [...state.values()].some(\n (eased) => !eased.done && !eased.native && !eased.laid,\n );\n if (!inScript) this.running.delete(node);\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for a transition to move.\n if (this.easedNatively.has(node)) props['collapsable'] = false;\n }\n\n /** The root's children as the views they are committed as, each reconciled. */\n private rootHandles(): FabricNode[] {\n const handles: FabricNode[] = [];\n for (const child of this.visibleChildren(this.root)) {\n if (!this.withheld(child)) handles.push(this.reconcileUnder(this.root, child));\n }\n return handles;\n }\n\n /** The transitions this commit lays out where they end, for native to move the views to. */\n private laying: { node: EngineNode; key: string; eased: Transition }[] = [];\n /** Whether this commit resizes or moves a box that is in no such transition. */\n private movesOthers = false;\n\n /**\n * Commit where it ends each transition of a size or a place that just started, for native to\n * move the view there: a layout animation, which the commit asks for once it is known that\n * nothing else in it moves. One still on its way is committed where it ends too. On a host\n * with no layout animation they are eased from JavaScript, but for one sent on again and again.\n *\n * A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.\n */\n private layEased(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n const native = this.fabric.configureNextLayoutAnimation !== undefined;\n for (const key of started) {\n const eased = state.get(key)!;\n if (!LAID_OUT.has(key) || eased.start > now || eased.duration <= 0) continue;\n if (this.sentOnAgain(node, key, eased, now)) {\n // Where it ends, at once: see `sentOnAgain`.\n Object.assign(eased, { current: eased.to, done: true });\n this.emitTransition(node, 'topTransitionend', key);\n props[key] = eased.to;\n continue;\n }\n if (!native) continue;\n eased.laid = true;\n this.laying.push({ node, key, eased });\n }\n for (const [key, eased] of state) if (eased.laid && !eased.done) props[key] = eased.to;\n }\n\n /** When each size in transition was last started, and how many starts in a row came soon. */\n private readonly laidStarts = new WeakMap<\n EngineNode,\n Map<string, { at: number; soon: number }>\n >();\n\n /**\n * Whether a transition of a size is one sent on again and again, each before the last had\n * ended: a progress bar that steps every 50ms and eases each step over 150. Native moves the\n * view, and lays the screen out, every frame while a layout animation runs, and JavaScript\n * commits every frame while it eases one, so one started at every step is one that never\n * stops. The first, and one sent back before it ends, are played; from the second sent on in\n * a row, each is committed where it ends, and the steps are the motion. Played again once the\n * size has been left alone for as long as it lasts.\n */\n private sentOnAgain(node: EngineNode, key: string, eased: Transition, now: number): boolean {\n const starts = this.laidStarts.get(node) ?? this.laidStarts.set(node, new Map()).get(node)!;\n const last = starts.get(key);\n const soon = last && now - last.at < eased.duration ? last.soon + 1 : 0;\n starts.set(key, { at: now, soon });\n return soon >= 2;\n }\n\n /** The animations this commit lays out at their last frame, for native to move the views to. */\n private laidPlayed: { node: EngineNode; running: RunningAnimation }[] = [];\n\n /**\n * Whether an animation that has just started is one native can play by laying the view out\n * at its last frame: two frames of sizes or places, played once from where the view is drawn\n * now, which is where native moves it from. It is then committed at that frame; see `layOut`.\n */\n private layPlayed(node: EngineNode, running: RunningAnimation): boolean {\n const drawn = node.committed?.props;\n const { spec, tracks } = running;\n if (!this.fabric.configureNextLayoutAnimation || !drawn || !tracks.size) return false;\n if (!playedOnce(spec)) return false;\n for (const [key, track] of tracks) {\n if (!LAID_OUT.has(key) || !fromWhereDrawn(track, drawn[key])) return false;\n }\n running.laid = true;\n running.values = Object.fromEntries([...tracks].map(([key, track]) => [key, track[1]!.value]));\n return true;\n }\n\n /** Go on from JavaScript with an animation native was to lay out, by the clock it started on. */\n private playLaidHere(node: EngineNode, running: RunningAnimation): void {\n running.laid = undefined;\n running.values = sample(running, this.now()).values;\n this.playing.add(node);\n }\n\n /** An animation native laid out has had its time: it is at its last frame, and says so. */\n private endLaidPlayed(node: EngineNode, running: RunningAnimation): void {\n if (!running.laid || running.done || node.playing !== running) return;\n Object.assign(running, { done: true, laid: undefined });\n if (!this.keeps(node, running)) {\n running.values = {};\n this.markProps(node, false);\n }\n this.emitTransition(node, 'topAnimationend', running.spec.name);\n this.flushTransitionEvents();\n if (this.pending) this.commit();\n }\n\n /**\n * Before a commit is handed over: ask native to move what it lays out, and take back to\n * ease from JavaScript whatever it cannot: all of it where the commit moves anything else,\n * and otherwise what would not take as long as the longest. Answers whether the tree has to\n * be reconciled again.\n */\n private layOut(): boolean {\n const laying = this.laying;\n const played = this.laidPlayed.filter(({ node, running }) => node.playing === running);\n const others = this.movesOthers;\n this.laying = [];\n this.laidPlayed = [];\n this.movesOthers = false;\n if (!laying.length && !played.length) return false;\n // Native takes one length of time for a commit: the longest asked of it, and whatever\n // would take another is eased from JavaScript. None of it, where anything else moves.\n const longest = Math.max(\n ...laying.map(({ eased }) => eased.duration),\n ...played.map(({ running }) => running.spec.duration),\n );\n const kept = (duration: number) => !others && duration === longest;\n const back: EngineNode[] = [];\n for (const { node, eased } of laying) {\n if (kept(eased.duration)) continue;\n eased.laid = undefined;\n this.running.add(node);\n back.push(node);\n }\n for (const { node, running } of played) {\n if (kept(running.spec.duration)) continue;\n this.playLaidHere(node, running);\n back.push(node);\n }\n for (const node of back) this.markProps(node, false);\n if (!others) this.askLayout(laying, played, longest);\n return back.length > 0;\n }\n\n /** Ask native to move what the commit lays out over `duration`, and end each when it is up. */\n private askLayout(\n laying: readonly { node: EngineNode; key: string; eased: Transition }[],\n played: readonly { node: EngineNode; running: RunningAnimation }[],\n duration: number,\n ): void {\n const easing =\n laying.find(({ eased }) => eased.laid)?.eased.easing ??\n played.find(({ running }) => running.laid)!.running.spec.easing;\n const nothing = () => undefined;\n this.fabric.configureNextLayoutAnimation!(\n { duration, update: { type: layoutCurve(easing) } },\n nothing,\n nothing,\n );\n for (const { node, key, eased } of laying) {\n if (eased.laid) setTimeout(() => this.endLaid(node, key, eased), duration);\n }\n for (const { node, running } of played) {\n if (running.laid) setTimeout(() => this.endLaidPlayed(node, running), duration);\n }\n }\n\n /**\n * Note a commit that resizes or moves a box in no transition native lays out: a prop of one\n * that moves boxes, children that came or went, text longer or shorter than it was.\n */\n private noteMoved(\n node: EngineNode,\n payload: Record<string, unknown> | null,\n resized: boolean,\n words: unknown,\n ): void {\n if (this.movesOthers) return;\n if (resized) this.movesOthers = true;\n for (const key in payload) {\n if (laidByNative(node, key)) continue;\n // Text as long as it was is taken to be as wide, as a grid takes it: see `shapeOf`.\n const longer = key === 'text' && String(payload[key]).length !== String(words).length;\n if (MOVES_BOXES.has(key) || longer) this.movesOthers = true;\n }\n }\n\n /** A transition native laid out has had its time: it is where it ends, and says so. */\n private endLaid(node: EngineNode, key: string, eased: Transition): void {\n if (!eased.laid || eased.done || node.transitions?.get(key) !== eased) return;\n Object.assign(eased, { current: eased.to, done: true, laid: undefined });\n this.emitTransition(node, 'topTransitionend', key);\n // No commit comes of it, which is what tells listeners otherwise: it is where it ends.\n this.flushTransitionEvents();\n // And what a listener did, taking away an element that has left, is committed.\n if (this.pending) this.commit();\n }\n\n /**\n * Bring a transition native laid out to where its clock has got to, where it is sent another\n * way or its rule has gone: that is where it goes on from.\n */\n private takeBackLaid(\n state: Map<string, Transition>,\n props: Record<string, unknown>,\n spec: Record<string, TransitionSpec> | undefined,\n now: number,\n ): void {\n for (const [key, eased] of state) {\n if (!eased.laid || eased.done) continue;\n const kept = spec?.[key] ?? spec?.['all'];\n if (kept && !aimsElsewhere(eased, key, props)) continue;\n const progress = Math.min(1, Math.max(0, (now - eased.start) / eased.duration));\n eased.current = interpolate(eased.from, eased.to, bezier(eased.easing, progress));\n eased.laid = undefined;\n }\n }\n\n private startEased(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n if (!this.scrollDriver) return;\n const clocks = new Map<string, string[]>();\n for (const key of started) {\n const eased = state.get(key)!;\n if (!NATIVELY_EASED.has(key) || eased.start > now || eased.duration <= 0) continue;\n const clock = `${eased.duration} ${eased.easing.join()}`;\n clocks.set(clock, [...(clocks.get(clock) ?? []), key]);\n }\n for (const keys of clocks.values()) this.playEased(node, state, keys, props);\n }\n\n private playEased(\n node: EngineNode,\n state: Map<string, Transition>,\n keys: readonly string[],\n props: Record<string, unknown>,\n ): void {\n const first = state.get(keys[0]!)!;\n // Where the view is committed: one that takes a touch stops short of no opacity.\n const touched = this.responders.has(node);\n const seen = (key: string, value: unknown) =>\n touched && key === 'opacity' ? stillTouched({ ...props, opacity: value })['opacity'] : value;\n const tracks = new Map(\n keys.map((key) => {\n const { current, to, easing } = state.get(key)!;\n return [\n key,\n [\n { offset: 0, value: seen(key, current), easing },\n { offset: 1, value: seen(key, to) },\n ],\n ] as const;\n }),\n );\n const spec: AnimationSpec = {\n name: '',\n duration: first.duration,\n delay: 0,\n easing: first.easing,\n iterations: 1,\n fill: 'both',\n };\n const channels = easedChannels(tracks, spec, props);\n if (!channels) return;\n const length = Math.max(2, Math.round(first.duration / NATIVE_FRAME) + 1);\n const frames = Array.from({ length }, (_, i) => i / (length - 1));\n const clock: { keys: readonly string[]; stop(): void } = { keys, stop: () => undefined };\n const native = this.scrollDriver!.play(\n node,\n channels,\n { frames, toValue: 1, iterations: 1 },\n (view) => this.tagOf(view as EngineNode),\n () => this.endedEased(node, clock),\n );\n if (!native) return;\n clock.stop = () => native.stop();\n for (const key of keys) state.get(key)!.native = clock;\n this.easedNatively.add(node);\n }\n\n /**\n * Native reached the end of the transitions on one clock. Where they end is committed before\n * the view is let go, so nothing shows of where they started, which is what it was committed\n * with.\n */\n private endedEased(node: EngineNode, clock: EasedNatively): void {\n const state = node.transitions;\n const keys = clock.keys.filter((key) => state?.get(key)?.native === clock);\n for (const key of keys) {\n const eased = state!.get(key)!;\n Object.assign(eased, { current: eased.to, done: true, native: undefined });\n this.emitTransition(node, 'topTransitionend', key);\n this.markProps(node, false);\n }\n this.forgetEased(node);\n if (keys.length) this.commit();\n clock.stop();\n }\n\n /** No longer one native is easing, once none of its transitions is native's. */\n private forgetEased(node: EngineNode): void {\n for (const eased of node.transitions?.values() ?? []) if (eased.native) return;\n this.easedNatively.delete(node);\n }\n\n /**\n * Take back from native each transition it can no longer play as it was started: one sent\n * another way, one whose rule has gone, any of a view that was made again. Each is brought to\n * where its clock has got to, which is where it goes on from, here or on native again.\n */\n private takeBackEased(\n node: EngineNode,\n state: Map<string, Transition>,\n props: Record<string, unknown>,\n spec: Record<string, TransitionSpec> | undefined,\n now: number,\n ): void {\n if (!this.easedNatively.has(node)) return;\n const remade = node.committed === null;\n for (const [key, eased] of state) {\n if (!eased.native) continue;\n const kept = spec?.[key] ?? spec?.['all'];\n if (remade || !kept || aimsElsewhere(eased, key, props)) {\n this.backToScriptEased(node, eased.native, now);\n }\n }\n }\n\n /** Stop a clock native runs, and go on from JavaScript with each transition it was playing. */\n private backToScriptEased(node: EngineNode, clock: EasedNatively, now: number): void {\n for (const key of clock.keys) {\n const eased = node.transitions?.get(key);\n if (eased?.native !== clock) continue;\n eased.native = undefined;\n const progress = Math.min(1, Math.max(0, (now - eased.start) / eased.duration));\n eased.current = interpolate(eased.from, eased.to, bezier(eased.easing, progress));\n this.running.add(node);\n }\n clock.stop();\n this.forgetEased(node);\n }\n\n /** Let go of what native is easing on an element that is going, or gone. */\n private stopEased(node: EngineNode): void {\n if (!this.easedNatively.delete(node)) return;\n const clocks = new Set<EasedNatively>();\n for (const eased of node.transitions?.values() ?? []) {\n if (eased.native) clocks.add(eased.native);\n eased.native = undefined;\n }\n for (const clock of clocks) clock.stop();\n }\n\n /**\n * Whether an animation that has finished goes on holding its last frame. With a forwards fill\n * it does, for good: without one the element falls back to whatever the cascade gives it, and\n * 'backwards' fills the start only. Heard, it holds until whoever listens has been told: see\n * `lettingGo`.\n */\n private keeps(node: EngineNode, running: RunningAnimation): boolean {\n if (running.spec.fill === 'forwards' || running.spec.fill === 'both') return true;\n // One that listened and has stopped leaves an empty set behind: nobody to hear it.\n if (!node.listeners?.get('topAnimationend')?.size) return false;\n this.lettingGo.add(node);\n return true;\n }\n\n /** Whether a node, or an element it is in, is `display: none`. */\n private boxless(node: EngineNode): boolean {\n for (let at: EngineNode | null = node; at; at = at.parent) {\n if (at.kind !== 'element') continue;\n this.styles.resolve(at, this.styleEpoch);\n if (ownLayout(at, 'display') === 'none') return true;\n }\n return false;\n }\n\n /** One `@keyframes` player, one frame on. */\n private advancePlayer(node: EngineNode, now: number): void {\n const running = node.playing;\n if (!running) {\n this.playing.delete(node);\n return;\n }\n\n if (running.pausedAt !== undefined) {\n this.playing.delete(node);\n return;\n }\n // One with no box, or in a box with none, paints nothing, and an endless one would keep the\n // frame loop going for good. It is cancelled, as a browser cancels it, and starts again when\n // the node is shown, as it is made again.\n if (this.boxless(node)) {\n this.cancelPlaying(node);\n this.playing.delete(node);\n node.playing = undefined;\n // A commit, for its `animationcancel` to be sent after, and to drop its last frame.\n this.markProps(node, false);\n return;\n }\n // Frames that say nothing paint nothing: a keyframe's one declaration refused at build time\n // leaves these. No frame of it is committed, and one that never ends has nothing left to do.\n const idle = running.tracks.size === 0;\n const { values, finished } = sample(running, now);\n // One of no time is finished already, endless or not, and ends as any other does.\n if (idle && !finished && running.spec.iterations === null) {\n this.playing.delete(node);\n return;\n }\n running.values = finished && !this.keeps(node, running) ? {} : values;\n // Its end is still a commit: that is what its `animationend` is sent after.\n if (!idle || finished) this.markProps(node, false);\n\n if (!finished) return;\n running.done = true;\n this.playing.delete(node);\n this.emitTransition(node, 'topAnimationend', running.spec.name);\n }\n\n /**\n * Late-bound because the host that wants the callback is usually built from this engine, so\n * neither can be constructed with the other in hand.\n */\n setOnDirty(fn: () => void): void {\n this.onDirty = fn;\n }\n\n /** Late-bound for the same reason: the app's `ErrorHandler` lives in an injector built later. */\n setOnError(fn: (error: unknown, topLevelType: string) => void): void {\n this.onError = fn;\n }\n\n /** Whether any transition or animation still has frames left to run. */\n get animating(): boolean {\n return this.running.size > 0 || this.playing.size > 0;\n }\n\n /**\n * Whether anything has changed since the last commit.\n *\n * The frame loop reads this because a `transitionend` listener runs after its commit has\n * finished, and what it does is often to remove the element that just finished leaving. That\n * change needs a commit of its own or the view stays on screen, fully transparent, forever.\n */\n get pending(): boolean {\n return this.root.structureDirty || this.root.subtreeDirty;\n }\n\n /**\n * Advance every transition to `now` and mark what changed. The caller commits afterwards; on a\n * device the platform pumps this from `requestAnimationFrame` for as long as it returns true.\n */\n advanceAnimations(now: number = this.now()): boolean {\n for (const node of [...this.playing]) this.advancePlayer(node, now);\n for (const node of [...this.running]) {\n let live = false;\n for (const [key, transition] of node.transitions ?? []) {\n if (transition.done) continue;\n const elapsed = now - transition.start;\n // Still inside the delay: nothing to paint yet, but the transition is not over.\n if (elapsed < 0) {\n live = true;\n continue;\n }\n const progress = transition.duration <= 0 ? 1 : Math.min(1, elapsed / transition.duration);\n if (progress >= 1) {\n transition.current = transition.to;\n transition.done = true;\n this.emitTransition(node, 'topTransitionend', key);\n } else {\n transition.current = interpolate(\n transition.from,\n transition.to,\n bezier(transition.easing, progress),\n );\n live = true;\n }\n this.markProps(node, false);\n }\n if (!live) this.running.delete(node);\n }\n return this.animating;\n }\n\n /**\n * The host's conversions, applied to a copy. A removed prop travels as `cleared` says, null for\n * nearly every one. On an update a colour dropped as unreadable is null too: JSI leaves out an\n * undefined key, and Fabric keeps what a clone leaves out.\n */\n private processed(props: Record<string, unknown>, update: boolean): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n const value = props[key];\n if (value === null) out[key] = cleared(key);\n else if (value === undefined) out[key] = value;\n else if (isColorProp(key)) out[key] = this.colourProp(key, value, update);\n // A list of sources has already been resolved by whoever built it, as RN's resolver\n // also assumes: it passes any object through and only turns a number into one.\n else if (ASSET_PROPS.has(key) && !Array.isArray(value))\n out[key] = this.resolveAssetSource(value);\n else if (NESTED_COLOR_LIST_PROPS.has(key)) out[key] = this.processNestedColors(value);\n else if (key === 'experimental_backgroundImage') out[key] = this.processGradients(value);\n else if (key === 'filter') out[key] = this.processFilters(value);\n // A bound style's transform is still the CSS string: see `inline-transform.ts`.\n else if (key === 'transform' && typeof value === 'string') out[key] = transformOf(value);\n else out[key] = value;\n }\n return out;\n }\n\n /** Copy a list of shadow-like objects, running each `color` through the host's converter. */\n private processNestedColors(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const item = entry as Record<string, unknown>;\n if (item?.['color'] === undefined) return entry;\n return { ...item, color: this.color(item['color'] as string | number) };\n });\n }\n\n /**\n * Copy a filter list, running a drop shadow's colour through the host's converter. Android reads\n * that colour as a number and throws on a string, taking the whole surface down with it.\n */\n private processFilters(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const shadow = (entry as { dropShadow?: Record<string, unknown> })?.dropShadow;\n if (shadow?.['color'] === undefined) return entry;\n return {\n dropShadow: { ...shadow, color: this.color(shadow['color'] as string | number) },\n };\n });\n }\n\n /**\n * Mark the text field each box of a row aligned by baseline takes its baseline from, before\n * the field is merged, and unmark it when the row is aligned another way.\n */\n private noteBaselineFields(row: EngineNode): void {\n const aligned = ownLayout(row, 'alignItems') === 'baseline';\n const before = row.baselineFields;\n if (!aligned && !before) return;\n const now = new Set(\n aligned ? row.children.filter(inFlow).map(fieldOnBaseline).filter(isNode) : [],\n );\n // One that is no longer this row's, and that no other row has marked since.\n for (const field of before ?? []) {\n if (!now.has(field) && field.onBaseline === row) this.onBaselineOf(field, undefined);\n }\n for (const field of now) if (field.onBaseline !== row) this.onBaselineOf(field, row);\n row.baselineFields = now.size ? now : undefined;\n }\n\n private onBaselineOf(field: EngineNode, row: EngineNode | undefined): void {\n field.onBaseline = row;\n this.markProps(field, false);\n }\n\n /**\n * Have the text a row aligned by baseline takes a baseline from measured again, where that\n * text is inside one of the row's boxes and the row is committed again. React Native keeps\n * what a paragraph measured on the one copy of its node that was measured, and Yoga copies a\n * node it lays out around: a row that is laid out again asks a box for its baseline, the box\n * asks the paragraph in it, and a copy that was never measured works it out then, on a node\n * that is by then not to be changed. A debug build stops there. Committed to be measured\n * again (`remeasure`), the paragraph is measured in this commit and has the answer.\n *\n * ponytail: the first box in the flow at each level, which is the one Yoga asks unless\n * another is aligned by baseline itself. A row a commit lays out again without the engine\n * cloning it, as its room changing does, is not reached: clone on a layout event if one is\n * seen to stop there.\n */\n private freshBaselines(row: EngineNode): void {\n if (!row.committed || ownLayout(row, 'alignItems') !== 'baseline') return;\n for (const item of row.children) {\n let at = firstInFlow(item);\n while (at?.committed && committedViewName(at) !== PARAGRAPH) at = firstInFlow(at);\n if (!at?.committed) continue;\n at.remeasure = true;\n for (let up: EngineNode | null = at; up && up !== row; up = up.parent) up.subtreeDirty = true;\n }\n }\n\n /**\n * Copy a list of gradients, running every stop's colour through the host's converter.\n *\n * A stop's colour is a colour like any other, but it is two levels down and nothing else looks\n * there: without this the device is handed the string `rgb(255, 0, 0)` where it wants a number,\n * and paints nothing. The stops are first rewritten so native's interpolation paints what\n * CSS's premultiplied one does (see `premultipliedStops`).\n */\n private processGradients(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const gradient = entry as { colorStops?: { color?: unknown }[] };\n if (!Array.isArray(gradient?.colorStops)) return entry;\n return {\n ...gradient,\n colorStops: premultipliedStops(gradient.colorStops).map((stop) => ({\n ...stop,\n color: this.color(stop.color),\n })),\n };\n });\n }\n\n private clearFlags(node: EngineNode): void {\n node.propsDirty = false;\n node.structureDirty = false;\n node.subtreeDirty = false;\n }\n\n private reconcile(node: EngineNode): FabricNode {\n // A clean node can still need re-rendering: if an ancestor's class changed, what this node\n // inherits changed with it, and nothing marked this node dirty. The resolver hands back the\n // very same cache object when nothing has changed, so one reference comparison settles it,\n // and a subtree whose inherited context is unmoved is skipped exactly as before.\n const style = node.kind === 'element' ? this.styles.resolve(node, this.styleEpoch) : null;\n const styleChanged = node.styleCommitted !== style;\n if (this.isClean(node) && !styleChanged) return node.committed!.handle;\n node.styleCommitted = style;\n repaint(node);\n this.refitChildren(node);\n\n const viewName = committedViewName(node);\n this.forgetRenamed(node, viewName);\n this.noteBaselineFields(node);\n this.freshBaselines(node);\n const childHandles = this.reconcileChildren(node, viewName, style);\n this.raise(node, viewName);\n noteTouches(node, style);\n const previous = node.committed;\n this.notePresented(node, viewName);\n if (!previous)\n return this.create(node, viewName, this.mergeProps(node, viewName), childHandles);\n\n // `propsDirty` is precise: Angular only calls setProperty when a binding actually changed.\n // It is not sufficient on its own, though. A node whose ancestor's class changed inherits\n // something new without any binding of its own having moved, so it is not propsDirty and\n // would never re-clone. `styleChanged` is the other half of that question. An ancestor that\n // is here only because something beneath it moved has the props it had.\n const propsMoved = node.propsDirty || styleChanged;\n const props = propsMoved ? this.mergeProps(node, viewName) : previous.props;\n const propsPayload = propsMoved ? this.propsPayload(node, previous.props, props) : null;\n\n const childrenChanged = this.childrenMoved(node, childHandles, previous.childHandles);\n this.noteMoved(\n node,\n propsPayload,\n childHandles.length !== previous.childHandles.length,\n previous.props['text'],\n );\n\n let handle = previous.handle;\n if (childrenChanged || propsPayload) {\n handle = this.clone(\n previous.handle,\n propsPayload && this.processed(propsPayload, true),\n childrenChanged ? childHandles : null,\n );\n // A clone is the same view, so it keeps the tag it was created with, not the newest tag\n // handed out, which is some other node's.\n node.committed = { handle, tag: previous.tag, props, childHandles, viewName };\n }\n this.clearFlags(node);\n return handle;\n }\n\n /** What a clone sends: the props that changed, and a text input's font once it registered. */\n private propsPayload(\n node: EngineNode,\n previous: Record<string, unknown>,\n props: Record<string, unknown>,\n ): Record<string, unknown> | null {\n const payload = diffProps(previous, props);\n if (payload) borderColoursAgain(payload, props);\n if (payload && node.owned) this.setOwned(node, payload, props);\n if (payload && this.fontsRefreshed && this.fontResends.delete(node)) {\n payload['fontFamily'] = props['fontFamily'];\n }\n return payload;\n }\n\n /**\n * Whether a node has to be committed with its children again.\n *\n * A child that re-cloned has a new handle, so the parent must re-clone too. This is the bubble\n * that persistent trees force, and it is why dirty marking propagates upwards. A node to be\n * measured again is cloned with its children even when they are the same ones: new children\n * is what makes Fabric dirty a measured node (`remeasureText`).\n */\n private childrenMoved(node: EngineNode, next: FabricNode[], previous: FabricNode[]): boolean {\n const remeasure = node.remeasure === true;\n node.remeasure = undefined;\n return remeasure || !sameHandles(next, previous);\n }\n\n /**\n * The handles of a node's children, reconciling only the ones that can have changed.\n *\n * One changed row in a list of a thousand makes the list re-clone, and the other 999 are asked\n * for their handle. A clean child whose style still holds under this node's is its committed\n * handle as it stands, so it is answered here without the call, the resolve and the walk -\n * which, per child, was most of what a one-row update cost.\n */\n private reconcileChildren(\n node: EngineNode,\n viewName: string,\n style: StyleCache | null,\n ): FabricNode[] {\n const context = style?.context;\n if (HOIST_ONLY.has(node.tag)) return this.reconcileOnlyHoisted(node);\n if (HOIST_TARGETS.has(node.tag)) return this.reconcileHoistTarget(node, context);\n const handles: FabricNode[] = [];\n for (const child of node.children) {\n const clean = this.cleanUnder(node, child, context);\n if (clean) {\n handles.push(clean);\n continue;\n }\n if (child.kind === 'anchor' || this.committedElsewhere(child) || this.withheld(child)) {\n continue;\n }\n if (child.kind === 'text') {\n const handle = this.reconcileText(node, child, viewName, context);\n if (handle) handles.push(handle);\n continue;\n }\n handles.push(this.reconcileUnder(node, child, context));\n }\n return handles;\n }\n\n /**\n * The paragraph a run of text written straight into a view is drawn in, or nothing for a run of\n * whitespace, which a browser draws nothing for between the items of a flex box either.\n *\n * It is the text's own, kept on the text node, and no part of the tree: its parent is the view,\n * so it inherits what the view's text would, and no rule matches it.\n */\n /**\n * A run of text under `parent`, which commits as `viewName`: the text itself inside a text, a\n * paragraph of its own inside any other view, and nothing where the view takes its text as a\n * prop (see `ViewNameOptions`) or the run is whitespace between a view's children.\n */\n private reconcileText(\n parent: EngineNode,\n text: EngineNode,\n viewName: string,\n context?: object,\n ): FabricNode | null {\n if (TEXT_CONTENT_PROPS[viewName] !== undefined) return null;\n if (viewName === PARAGRAPH || viewName === VIRTUAL_TEXT) {\n // Under a text element, the paragraph it had in a view is done with. Under that paragraph\n // itself, which is where a loose run is committed, it is the one to keep.\n if (text.box && text.box !== parent) text.box = undefined;\n return this.reconcileUnder(parent, text, context);\n }\n const box = this.looseText(parent, text, LOOSE_TEXT[viewName]);\n return box ? this.reconcileUnder(parent, box, context) : null;\n }\n\n private looseText(parent: EngineNode, text: EngineNode, drawnBy = 'text'): EngineNode | null {\n if (!trimEnds(text.text)) return null;\n let box = text.box;\n // One made for another element, before the view was registered again, is done with.\n if (box && box.tag !== drawnBy) {\n if (box.committed) this.forgetCommitted(box);\n box = undefined;\n }\n if (!box) {\n box = new RetainedNode('element', drawnBy, this);\n box.anonymous = true;\n box.children = [text];\n text.box = box;\n }\n box.parent = parent;\n // Merged before the view is, so the view's truncation is read here: see `truncatedAs`.\n if (truncationMoved(box, parent)) box.propsDirty = true;\n // The text is not under the box in the tree, so a change to it never marked the box.\n if (!this.isClean(text)) {\n box.subtreeDirty = true;\n // An element that says its words as a prop is merged again for them.\n if (drawnBy !== 'text') box.propsDirty = true;\n // Nor had it merged again where the text became one word, or stopped being one.\n if (box.oneWord !== undefined && unbroken(box) !== box.oneWord) box.propsDirty = true;\n }\n return box;\n }\n\n /** Remember an iOS modal host committed as showing, so hiding it waits for `topDismiss`. */\n private notePresented(node: EngineNode, viewName: string): void {\n if (viewName !== MODAL_HOST || node.props['visible'] === false) return;\n if (platformOS === 'ios') node.presented = true;\n }\n\n /**\n * Whether a child is left out of its parent's commit: a modal host whose `visible` is false.\n *\n * The native host covers the screen and takes every touch whether or not it presents anything,\n * which is why React Native's Modal.js renders null while hidden. This is the same thing, so a\n * hidden `<modal>` leaves the screen under it usable. On iOS a modal that was showing stays\n * committed, with `visible` false, until native reports `topDismiss`: Modal.js keeps it that\n * long so the dismissal animates and `(dismiss)` fires. Android drops it at once, as Modal.js\n * does there.\n *\n * A withheld host is unmounted, and Fabric drops an unmounted view's event target for good\n * (`EventEmitter::setEnabled`), so its committed handles are forgotten and it is created afresh\n * when it is shown again, as Modal.js creates it afresh. Committed again, it ignores every touch.\n */\n private withheld(child: EngineNode): boolean {\n if (this.undisplayed(child)) return true;\n if (child.props['visible'] !== false || child.presented) return false;\n if (viewNameOf(child) !== MODAL_HOST) return false;\n if (child.committed) this.forgetCommitted(child);\n return true;\n }\n\n /**\n * Whether an element is `display: none`, which has no box and so no view, nor has anything\n * in it. A view that is committed and not displayed looks the same, but Yoga marks one as\n * laid out each time it measures what holds it, and React Native clears the mark only where it\n * reads that parent's layout: a debug build stops at the mark, on a later commit that has the\n * parent's layout already. Shown again it is made again, as an element put back in the tree\n * is: what its views held of their own, a scroll offset, is not kept.\n */\n private undisplayed(child: EngineNode): boolean {\n if (child.kind !== 'element') return false;\n this.styles.resolve(child, this.styleEpoch);\n if (ownLayout(child, 'display') !== 'none') return false;\n if (child.committed) {\n this.forgetCommitted(child);\n // A field in it has no view to send its blur from. Blurred once this commit is done: a\n // `:focus` rule that hid it then no longer holds, and the commit that follows shows it.\n if (isWithin(this.focusedNode, child)) this.blurAfterCommit = true;\n }\n settlePaths(child);\n return true;\n }\n\n /**\n * Whether a node hoisted into `target` is not displayed where it was written: it, or a box\n * between it and the child of `target` it was written in. That child is asked before this is.\n */\n private undisplayedUnder(target: EngineNode, written: EngineNode): boolean {\n for (let at: EngineNode | null = written; at && at.parent !== target; at = at.parent) {\n if (!this.undisplayed(at)) continue;\n if (written.committed) this.forgetCommitted(written);\n return true;\n }\n return false;\n }\n\n /**\n * `reconcileChildren` for a node other nodes hoist into: its own children, each followed by\n * the hoisted nodes written inside it, then those written in it directly, then the views it\n * keeps for hoisted nodes that are gone.\n */\n private reconcileHoistTarget(node: EngineNode, context: object | undefined): FabricNode[] {\n const handles: FabricNode[] = [];\n const hoisted = this.hoistedInto(node);\n const landed = new Set<string>();\n // One written directly in the node goes after its siblings: a page writes its header first,\n // and UIKit collapses a large title against the scroll view down the screen's first subviews,\n // which RNS keeps clear by never letting the header config be the first.\n const direct: EngineNode[] = [];\n for (const child of node.children) {\n const taken = this.takenByTarget(node, child, context);\n if (taken === null) continue;\n if (taken === 'direct') direct.push(child);\n else handles.push(taken);\n const moved = hoisted?.get(child);\n for (const written of moved ?? []) {\n if (!this.undisplayedUnder(node, written)) handles.push(this.land(node, written, landed));\n }\n }\n for (const child of direct) handles.push(this.land(node, child, landed));\n if (node.kept) this.standIn(node, landed, handles);\n return handles;\n }\n\n /**\n * `reconcileHoistTarget` for a node that commits only what is hoisted into it\n * (`HoistOptions.only`): those nodes, in the order they were written, and none of its own.\n */\n private reconcileOnlyHoisted(node: EngineNode): FabricNode[] {\n const handles: FabricNode[] = [];\n const hoisted = this.hoistedInto(node);\n const landed = new Set<string>();\n for (const child of node.children) {\n if (child.kind === 'anchor' || this.committedElsewhere(child) || this.withheld(child)) {\n continue;\n }\n if (this.hoisted.has(child)) {\n handles.push(this.land(node, child, landed));\n continue;\n }\n for (const written of hoisted?.get(child) ?? []) {\n if (!this.undisplayedUnder(node, written)) handles.push(this.land(node, written, landed));\n }\n // Not committed, so the marks a change left on the way down to it are cleared here.\n settlePaths(child);\n }\n if (node.kept) this.standIn(node, landed, handles);\n return handles;\n }\n\n /**\n * A child's handle as a child of `parent`, created again when it was committed under another.\n *\n * Native gives a view one parent for as long as it lives: `ShadowNodeFamily::setParent`\n * asserts it in a debug build, and a release build keeps the first parent and measures and lays\n * the view out against the wrong ancestry. A node Angular moves - content projected into a\n * container that was mounted again, a scroll view Android wraps in its swipe layout - is\n * therefore created afresh, with everything under it, as React creates an element that moves.\n * Its native state goes with it, as it would there.\n */\n private reconcileUnder(parent: EngineNode, child: EngineNode, context?: object): FabricNode {\n if (child.committed && child.committedUnder !== parent) this.forgetCommitted(child);\n const handle = this.stillCommitted(child, context) ?? this.reconcile(child);\n child.committedUnder = parent;\n return handle;\n }\n\n /**\n * A node whose native view is no longer the one it was created as is created again: a text\n * element that came to hold a view, or stopped. A clone keeps the view it was made as.\n */\n private forgetRenamed(node: EngineNode, viewName: string): void {\n if (node.committed && node.committed.viewName !== viewName) this.forgetCommitted(node);\n }\n\n /**\n * Let a node and everything under it be created again at the next commit. The views it keeps\n * for hoisted names go too: they are children of the native view it is losing.\n */\n private forgetCommitted(node: EngineNode): void {\n node.committed = null;\n node.committedUnder = null;\n // Another view, with another tag, which no graph has set anything on.\n if (node.owned) this.disown(node);\n node.styleCommitted = null;\n node.kept = undefined;\n // A scroll-driven animation is bound to native views by their tags: its own, and its scroll\n // view's. Made again, each has another, so what drives it starts again with the new ones.\n if (node.scrolled?.drive) this.stopScrolled(node);\n for (const follower of this.scrollTimelines.get(node) ?? []) {\n this.stopScrolled(follower);\n this.markProps(follower, false);\n }\n if (node.box?.committed) this.forgetCommitted(node.box);\n for (const child of node.children) {\n if (child.committed || child.box?.committed) this.forgetCommitted(child);\n }\n }\n\n /** A hoisted node, which commits into an ancestor further up than the parent it is in. */\n private committedElsewhere(child: EngineNode): boolean {\n return this.hoisted.has(child) && this.hoistsAbove(child);\n }\n\n /**\n * Reconcile a hoisted element committing into `target`, into the native view `target` already\n * keeps for its name when it has one (`HoistOptions.standIn`), and keep the view it commits as.\n */\n private land(target: EngineNode, child: EngineNode, landed: Set<string>): FabricNode {\n if (!STAND_INS[child.tag]) return this.reconcileUnder(target, child);\n const kept = target.kept?.get(child.tag);\n if (kept && kept.node !== child && child.committed === null && !isWithin(kept.node, target)) {\n // A node taken out without being destroyed would otherwise come back holding this tag too.\n if (kept.node) kept.node.committed = null;\n child.committed = kept.committed;\n child.propsDirty = true;\n }\n const handle = this.reconcile(child);\n child.committedUnder = target;\n (target.kept ??= new Map()).set(child.tag, { node: child, committed: child.committed! });\n landed.add(child.tag);\n return handle;\n }\n\n /**\n * Commit the stand-in props onto every view `target` keeps whose element is gone, on the view\n * itself so the native side sees an update rather than a removal.\n */\n private standIn(target: EngineNode, landed: Set<string>, handles: FabricNode[]): void {\n for (const [name, kept] of target.kept!) {\n if (landed.has(name)) continue;\n if (kept.node) {\n const props = {\n ...DEFAULT_PROPS[registeredViewName(name) ?? DEFAULT_VIEW],\n ...STAND_INS[name],\n };\n const payload = diffProps(kept.committed.props, props);\n const handle = this.clone(\n kept.committed.handle,\n payload && this.processed(payload, true),\n [],\n );\n kept.committed = { ...kept.committed, handle, props, childHandles: [] };\n kept.node = null;\n }\n handles.push(kept.committed.handle);\n }\n }\n\n /**\n * What a hoist target takes of a child written in it: the child's handle, `direct` for one\n * hoisted into it, which goes after its siblings, or null for none.\n */\n private takenByTarget(\n node: EngineNode,\n child: EngineNode,\n context: object | undefined,\n ): FabricNode | 'direct' | null {\n if (this.hoisted.has(child)) {\n if (this.committedElsewhere(child) || this.withheld(child)) return null;\n return 'direct';\n }\n const clean = this.cleanUnder(node, child, context);\n if (clean) return clean;\n if (child.kind === 'anchor' || this.withheld(child)) return null;\n return this.reconcileUnder(node, child, context);\n }\n\n /**\n * A clean element's handle under `parent`, before anything else is asked of it: one committed\n * there and unchanged since was displayed and in its place, and is still. The siblings of what\n * changed are most of what a commit steps over: a list one row of which ticks.\n */\n private cleanUnder(\n parent: EngineNode,\n child: EngineNode,\n context: object | undefined,\n ): FabricNode | null {\n if (child.kind !== 'element' || child.committedUnder !== parent) return null;\n return this.stillCommitted(child, context);\n }\n\n /** A clean child's committed handle, when its style still holds under its parent's. */\n private stillCommitted(child: EngineNode, context: object | undefined): FabricNode | null {\n const committed = child.committed;\n if (\n committed === null ||\n context === undefined ||\n child.propsDirty ||\n child.structureDirty ||\n child.subtreeDirty\n ) {\n return null;\n }\n if (child.kind === 'text') return committed.handle;\n const holds = child.styleCache === child.styleCommitted && this.styles.holds(child, context);\n return holds ? committed.handle : null;\n }\n\n /**\n * The hoisted nodes that commit as direct children of `node`, keyed by the child of `node` each\n * was written inside. Null when there are none, which is nearly always.\n */\n private hoistedInto(node: EngineNode): Map<EngineNode, EngineNode[]> | null {\n let found: Map<EngineNode, EngineNode[]> | null = null;\n for (const candidate of this.hoisted) {\n if (candidate.parent === node || HOISTS[candidate.tag] !== node.tag) continue;\n let written: EngineNode = candidate;\n let above = candidate.parent;\n while (above && above !== node && above.tag !== node.tag) {\n if (HOIST_STOPS[candidate.tag]?.has(above.tag)) break;\n written = above;\n above = above.parent;\n }\n if (above !== node) continue;\n found ??= new Map();\n const list = found.get(written);\n if (list) list.push(candidate);\n else found.set(written, [candidate]);\n }\n return found;\n }\n\n /** Whether a hoisted node commits further up than the parent it was written in. */\n private hoistsAbove(node: EngineNode): boolean {\n const target = HOISTS[node.tag];\n if (node.parent?.tag === target) return false;\n for (let above = node.parent; above; above = above.parent) {\n if (above.tag === target) return true;\n if (HOIST_STOPS[node.tag]?.has(above.tag)) return false;\n }\n return false;\n }\n\n private create(\n node: EngineNode,\n viewName: string,\n props: Record<string, unknown>,\n childHandles: FabricNode[],\n ): FabricNode {\n if (this.dev) {\n this.checkClaimed(node);\n this.checkKnown(node);\n }\n const tag = nextTag();\n this.stats.createdNodes++;\n // instanceHandle is the retained node itself: it is what Fabric hands back on events.\n const handle = this.fabric.createNode(\n tag,\n viewName,\n this.rootTag,\n this.processed(props, false),\n node,\n );\n for (const child of childHandles) this.fabric.appendChild(handle, child);\n node.committed = { handle, tag, props, childHandles, viewName };\n node.bornIn = this.stats.commits;\n this.clearFlags(node);\n return handle;\n }\n\n /**\n * Angular's own unknown-element check does not run in this pipeline, so a `<text>` in a\n * template that never imported `Text` compiles, draws without the component, and looks like a\n * layout bug. On the first commit of any known element with no component behind it, say so.\n */\n private checkClaimed(node: EngineNode): void {\n // The paragraph the engine wraps loose text in is its own: no template wrote it.\n if (node.kind !== 'element' || node.claimed || node.anonymous) return;\n if (!PRIMITIVE_NAMES.has(node.tag)) return;\n if (this.reported.has(node.tag)) return;\n this.reported.add(node.tag);\n console.error(\n `[angular-native] <${node.tag}> is used in a template that does not import ` +\n `${className(node.tag)}. Add it to the component's \\`imports\\` from ` +\n `'@ng-native/components'; without it the element has none of the component's inputs ` +\n `or behavior, so a prop written on it stays the text it was written as.`,\n );\n }\n\n /**\n * The misspelt-prop check. Angular's own \"Can't bind to\" check needs a DOM to run, so a\n * `[numberofLines]` on a `<text>`, or a static `iosBackgroundColor` on a `<switch>`, went to\n * native as a prop no view reads, and nothing said so. A prop on a host primitive that its\n * component did not declare is reported once per element name and prop, with the declared name\n * it most likely meant when there is one.\n */\n private readonly undefinedTokens = new Set<string>();\n\n /** Said once per name: a phone has no inspector to show the declaration struck out. */\n private reportUndefinedToken(name: string, props: readonly string[], on?: string): void {\n if (this.undefinedTokens.has(name)) return;\n this.undefinedTokens.add(name);\n // A bound declaration has no rule to be found by, so it says which element it is on.\n const where = on === undefined ? props.join(', ') : `${props.join(', ')}, bound on <${on}>,`;\n console.warn(\n `[angular-native] var(${name}) in ${where} names a custom property nothing in` +\n ` scope defines, so the declaration is dropped, as a browser drops it. Define ${name} on` +\n ` :root or an ancestor, or give the var() a fallback.`,\n );\n }\n\n private readonly droppedDeclarations = new Set<string>();\n\n /**\n * A declaration in a style, written or bound, that is no value its property takes, so it is\n * dropped as a browser drops it. Said once per element name and declaration, in development.\n */\n reportDroppedDeclaration(prop: string, value: string, on: string, why: string): void {\n const report = `${on} ${prop}: ${value}`;\n if (!this.dev || this.droppedDeclarations.has(report)) return;\n this.droppedDeclarations.add(report);\n console.warn(\n `[angular-native] ${prop}: ${value}, in a style on <${on}>, is no value ${prop} takes:` +\n ` ${why}. The declaration is dropped, as a browser drops it.`,\n );\n }\n\n private readonly unreadDisplays = new Set<string>();\n\n /**\n * Said once per token and value: the compiler refuses `display: grid` written out, but a token\n * is only known here, and without this the view lays out as flex with nothing said.\n */\n private reportUnreadDisplay(name: string, value: string | undefined): void {\n const report = `${name} ${value}`;\n if (this.unreadDisplays.has(report)) return;\n this.unreadDisplays.add(report);\n console.warn(\n `[angular-native] display: var(${name}) is ${value ?? 'no keyword'}, which is no display` +\n ` native has, so display is unset and the view lays out as flex. Native has flex, none` +\n ` and contents, and reads block, inline, inline-block, flow-root and inline-flex as flex.`,\n );\n }\n\n private checkProps(node: EngineNode): void {\n if (!node.claimed || !PRIMITIVE_NAMES.has(node.tag)) return;\n const declared = DECLARED_PROPS.get(node.tag);\n if (!declared) return;\n for (const key of Object.keys(node.props)) {\n if (this.isDeclared(declared, key, node.props[key])) continue;\n const report = `${node.tag} ${key}`;\n if (this.reported.has(report)) continue;\n this.reported.add(report);\n const meant = [...declared].find((name) => name.toLowerCase() === key.toLowerCase());\n console.warn(\n `[angular-native] <${node.tag}> has no prop '${key}', so native ignores it.` +\n (meant ? ` Did you mean '${meant}'?` : '') +\n ` Check the spelling against the ${className(node.tag)} page, or declare it with` +\n ` declareNativeProps('${node.tag}', ['${key}']) if the native view does read it.`,\n );\n }\n }\n\n private isDeclared(declared: Set<string>, key: string, value: unknown): boolean {\n return (\n declared.has(key) ||\n ENGINE_PROPS.has(key) ||\n this.declaredAttributes.has(key) ||\n // A forms directive's input has a report of its own, naming the import it is missing.\n isFormsInput(key) ||\n key.includes('-') ||\n // A bare marker attribute, `<text listHeader>`, is there for a selector to match.\n value === ''\n );\n }\n\n /**\n * Element names some template's directives select by tag: every component with an element\n * selector, and directives such as Angular's `router-outlet` that own an element without\n * hosting a component. Declared by the platform adapter, which sees each template's directive\n * registry as the component is created.\n */\n private readonly declaredElements = new Set<string>();\n\n /** An element name a directive or component selects, and so is not a typo. */\n declareElement(name: string): void {\n this.declaredElements.add(name);\n }\n\n /**\n * Attribute names that belong to Angular rather than to a native view: what a directive selects\n * on or takes as an input, and what a component's `<ng-content select>` projects by. Angular\n * writes a static attribute to the node whatever consumes it, so without these a\n * `nativeRouterLink` or a `listHeader` marker would read as a misspelt prop. See `checkProps`.\n */\n private readonly declaredAttributes = new Set<string>();\n\n declareAttribute(name: string): void {\n this.declaredAttributes.add(name);\n }\n\n /**\n * The typo check. The set a name is looked up in is app-wide rather than per template, so a\n * directive imported in one template also quiets its name in another that forgot it. That is\n * the trade for not holding a registry per component, and the typo is the case that matters.\n */\n private checkKnown(node: EngineNode): void {\n if (node.kind !== 'element' || node.componentHost || node.tag in VIEW_NAMES) return;\n if (this.declaredElements.has(node.tag) || this.reported.has(node.tag)) return;\n this.reported.add(node.tag);\n console.error(\n `[angular-native] <${node.tag}> is not a known element: no component, directive or ` +\n `registered native view claims it, so it renders as an empty view. Check the spelling, ` +\n `or import the component that owns it.`,\n );\n }\n\n // --- responder system -------------------------------------------------\n\n private readonly responders = new WeakMap<EngineNode, ResponderHandlers>();\n private currentResponder: EngineNode | null = null;\n\n /** Register a node as a candidate responder. Returns an unsubscribe. */\n setResponder(node: EngineNode, handlers: ResponderHandlers): () => void {\n this.registerEventHandler();\n this.responders.set(node, handlers);\n // A fade native is playing was given to it as a view that takes no touch fades: to\n // nothing. From here it is eased to where the view is committed.\n const fade = node.transitions?.get('opacity')?.native;\n if (fade) this.backToScriptEased(node, fade, this.now());\n this.keepNative(node, true);\n // What it is committed with can hang on whether it takes a touch: see `stillTouched`.\n this.markProps(node);\n return () => {\n this.responders.delete(node);\n this.keepNative(node, false);\n this.markProps(node);\n if (this.currentResponder !== node) return;\n // Torn down under the finger: no release is coming, so the chain it marked is cleared\n // here or it stays `:active` for good.\n const changed = this.setActiveChain(node, false);\n this.tellNative(node, false);\n this.currentResponder = null;\n if (changed) this.commit();\n };\n }\n\n /**\n * Keep a native view for this node, or stop keeping one.\n *\n * Fabric flattens a view whose props say nothing visual and nothing interactive: no native view\n * is created and its layout is folded into the parent. Responders live here, in JavaScript, and\n * Fabric cannot see them - so a transparent touch-catcher looks exactly like a view worth\n * flattening, and gets flattened, and never receives the touch it exists to catch.\n *\n * That is a popover that will not close. The full-screen catcher over the app has no background\n * and nothing else on it; the dialog's backdrop survived the same treatment only because\n * `bg-black/50` happened to make it visual.\n *\n * Only plain views: flattening is `ViewShadowNode`'s, so a paragraph, a scroll view or a text\n * input is already a native view and marking it would be a prop on every text node in the tree\n * that buys nothing.\n *\n * A floor rather than an override: `collapsable=\"true\"` written on an element is left alone,\n * because someone who writes it means it.\n */\n private keepNative(node: EngineNode, keep: boolean): void {\n if (viewNameOf(node) !== DEFAULT_VIEW) return;\n if (keep) {\n if (node.props['collapsable'] === undefined) this.setProp(node, 'collapsable', false);\n return;\n }\n if (node.props['collapsable'] === false) this.setProp(node, 'collapsable', null);\n }\n\n /**\n * A view command, by name: `focus` and `blur` on a text input, `scrollTo` on a scroll view.\n * Fabric addresses the committed shadow node, so a node that has not reached a commit yet has\n * nothing to receive it and the call is dropped.\n */\n dispatchCommand(node: EngineNode, name: string, args: readonly unknown[] = []): void {\n const handle = node.committed?.handle;\n if (handle && this.fabric.dispatchCommand) this.fabric.dispatchCommand(handle, name, args);\n }\n\n /**\n * Where a node is, in window coordinates.\n *\n * `(layout)` reports a frame in the parent's coordinates, which sizes a view and says nothing\n * about where it is relative to anything else. This is what an anchored overlay needs: a\n * popover and its trigger live in different parts of the tree and can only be compared in the\n * window's frame.\n *\n * The callback is the platform's own shape rather than a promise, and on the new architecture\n * it fires before this returns - so a caller that needs the value immediately can capture it,\n * and one that does not is unaffected if that ever changes.\n *\n * Silent when the node has never been committed, or when the host has no `measureInWindow`.\n * Reporting zeroes would be worse than reporting nothing: a zero frame is a position, and an\n * overlay would believe it and place itself in the corner.\n */\n measure(node: EngineNode, into: (frame: WindowFrame) => void): void {\n const handle = node.committed?.handle;\n if (!handle || !this.fabric.measureInWindow) return;\n this.fabric.measureInWindow(handle, (x, y, width, height) => into({ x, y, width, height }));\n }\n\n /**\n * The react tag a node was committed with, or null if it has never reached a commit.\n *\n * This is what the native animation driver writes to: `connectAnimatedNodeToView` takes a tag,\n * and `findNodeHandle` hands a number straight back, so an animated graph can point at one of\n * our nodes without a React instance existing anywhere.\n */\n tagOf(node: EngineNode): number | null {\n return node.committed?.tag ?? null;\n }\n\n /**\n * The shadow node Fabric currently holds for a node, or null before its first commit.\n *\n * A clone-on-write tree hands back a different object every time a node's props change, so\n * this is not an identity. What is stable is the family behind it, which is what native keys a\n * node by, and is why a UI-thread animation given one of these keeps writing to the right view\n * however many times the node is cloned afterwards.\n */\n shadowNodeOf(node: EngineNode): FabricNode | null {\n return node.committed?.handle ?? null;\n }\n\n /** The node currently owning the gesture, if any. */\n get responder(): EngineNode | null {\n return this.currentResponder;\n }\n\n /**\n * The node native last reported focused, if any: the text input the keyboard belongs to.\n *\n * Checked against the tree rather than trusted, because a focused node that outlives its view\n * is not a stale style - it is every tap in the application being swallowed. Every scroll view\n * reads this on every touch to decide whether the touch means \"dismiss the keyboard\", and one\n * that decides yes *captures* the touch before any child sees it. So a field left focused after\n * its view is gone makes the whole app untappable until it is restarted.\n *\n * Neither teardown hook can be relied on to clear it. `removeChild` unlinks the subtree's root\n * and leaves everything under it pointing at its own parent, so a focused descendant still looks\n * attached; and Angular calls `destroyNode` for the nodes it tracks, not for every node in a\n * removed subtree. An overlay closing with a field inside it misses both.\n *\n * So it is answered by looking: a node still in the tree reaches the root by walking up. That\n * costs the depth of one node, on a touch, and only while something is focused.\n */\n get focused(): EngineNode | null {\n if (this.focusedNode && !this.isAttached(this.focusedNode)) this.dropFocus();\n return this.focusedNode;\n }\n\n /** Whether a node is still part of the tree, rather than in a subtree that was removed. */\n private isAttached(node: EngineNode): boolean {\n let current: EngineNode | null = node;\n while (current) {\n if (current === this.root) return true;\n current = current.parent;\n }\n return false;\n }\n\n /** The host's `resolveAssetSource`, for a component that needs an asset's size up front. */\n resolveAsset(value: unknown): unknown {\n return this.resolveAssetSource(value);\n }\n\n /** A colour prop as `processed` sends it: one dropped as unreadable is null on an update. */\n private colourProp(key: string, value: unknown, update: boolean): unknown {\n const painted = this.painted(key, value);\n return painted === undefined && update ? null : painted;\n }\n\n /**\n * A colour prop as native takes it. A shape's `fill` or `stroke` the cascade settled from a\n * token is the solid brush react-native-svg takes, `none` no paint at all, and one the host\n * reads no colour in no paint of the shape's own.\n */\n private painted(key: string, value: unknown): unknown {\n if (!BRUSH_PROPS.has(key)) return this.color(value);\n // Already a brush, as the icon wrote it: only one the cascade settled is still text. An\n // icon's solid brush holds whatever the host read, which is nothing for an unreadable colour.\n if (typeof value !== 'string') return emptyBrush(value) ? undefined : value;\n if (value === 'none') return null;\n // A colour the host cannot read is dropped, as a browser drops it: a solid brush with no\n // colour in it stops the app.\n const payload = this.color(value);\n return payload == null ? undefined : { type: 0, payload };\n }\n\n /**\n * The host's `processColor`, and the one place a platform colour becomes one.\n *\n * Props are processed by name - anything ending in `color` - which covers every colour that is\n * a prop. A colour *nested* inside a prop native parses itself is invisible to that rule: a tab\n * bar's appearance carries eight of them, and unprocessed they arrive as strings native reads\n * as nothing at all. So this is public, and the commit walk uses it too.\n *\n * `platform-color(label)` cannot be resolved at build time - the same declaration is\n * `{semantic}` on iOS and `{resource_paths}` on Android - so the names travel and the shape is\n * put on here. `processColor` understands both, exactly as it does for RN's own `PlatformColor`.\n */\n color(value: unknown): unknown {\n if (value === undefined) return undefined;\n\n const names = (value as { platformColor?: readonly string[] })?.platformColor;\n if (!names) return this.processColor(value as string | number);\n\n const key = nativePlatform() === 'android' ? 'resource_paths' : 'semantic';\n return this.processColor({ [key]: [...names] } as never);\n }\n\n /** Root-first, so a capture pass reads forwards and a bubble pass reads backwards. */\n private pathTo(node: EngineNode): EngineNode[] {\n const path: EngineNode[] = [];\n for (let current: EngineNode | null = node; current; current = current.parent)\n path.push(current);\n return path.reverse();\n }\n\n private negotiate(\n target: EngineNode,\n event: ResponderEvent,\n phase: 'Start' | 'Move',\n ): EngineNode | null {\n const path = this.pathTo(target);\n const capture = `on${phase}ShouldSetResponderCapture` as const;\n const bubble = `on${phase}ShouldSetResponder` as const;\n\n // Capture runs root -> target, so an ancestor can claim before its children see it.\n for (const node of path) {\n if (this.responders.get(node)?.[capture]?.(event, target)) return node;\n }\n // Bubble runs target -> root: the innermost interested node wins.\n for (let i = path.length - 1; i >= 0; i--) {\n if (this.responders.get(path[i]!)?.[bubble]?.(event, target)) return path[i]!;\n }\n return null;\n }\n\n private grant(node: EngineNode, event: ResponderEvent): void {\n const previous = this.currentResponder;\n if (previous === node) return;\n\n if (previous) {\n const handlers = this.responders.get(previous);\n // An undefined handler means \"yes\": RN's default is to allow the takeover.\n if (handlers?.onResponderTerminationRequest?.(event) === false) return;\n this.tellNative(previous, false);\n handlers?.onResponderTerminate?.(event);\n }\n\n // After the takeover is agreed, not before: a refusal would otherwise leave `:active` on a\n // node that never became the responder. Both calls run, so neither is short-circuited away.\n const cleared = this.setActiveChain(previous, false);\n const marked = this.setActiveChain(node, true);\n\n this.currentResponder = node;\n this.tellNative(node, true);\n this.responders.get(node)?.onResponderGrant?.(event);\n if (cleared || marked) this.commit();\n }\n\n private release(event: ResponderEvent, terminated: boolean): void {\n const node = this.currentResponder;\n if (!node) return;\n const changed = this.setActiveChain(node, false);\n this.currentResponder = null;\n this.tellNative(node, false);\n const handlers = this.responders.get(node);\n // Before the handler is told: what it does is for the render pass after it to commit\n // whole, and not to be drawn part made with the view no longer pressed.\n if (changed) this.commit();\n if (terminated) handlers?.onResponderTerminate?.(event);\n else handlers?.onResponderRelease?.(event);\n }\n\n private tellNative(node: EngineNode, isResponder: boolean): void {\n const handle = node.committed?.handle;\n if (!handle || !this.fabric.setIsJSResponder) return;\n const asked = this.responders.get(node)?.blockNativeResponder ?? false;\n // And for a drag an element's `touch-action` keeps from the page: see `holdSwipe`.\n const block = asked || this.drag?.held === true;\n this.fabric.setIsJSResponder(handle, isResponder, block);\n }\n\n /** Runs before listener propagation, as React's responder plugin does. */\n private runResponder(target: EngineNode, type: string, event: ResponderEvent): void {\n if (type === TOUCH_START) {\n const elected = this.negotiate(target, event, 'Start');\n if (elected) this.grant(elected, event);\n return;\n }\n if (type === TOUCH_MOVE) {\n if (this.currentResponder) {\n this.responders.get(this.currentResponder)?.onResponderMove?.(event);\n } else {\n const elected = this.negotiate(target, event, 'Move');\n if (elected) this.grant(elected, event);\n }\n return;\n }\n if (type === TOUCH_END) this.release(event, false);\n else if (type === TOUCH_CANCEL) this.release(event, true);\n }\n\n // --- events -----------------------------------------------------------\n\n private registerEventHandler(): void {\n if (this.eventsRegistered || !this.fabric.registerEventHandler) return;\n this.eventsRegistered = true;\n this.fabric.registerEventHandler((instanceHandle, topLevelType, nativeEvent) =>\n this.dispatchEvent(instanceHandle, topLevelType, nativeEvent),\n );\n }\n\n /**\n * Fabric's `(instanceHandle, topLevelType, nativeEvent)` callback.\n *\n * **Events propagate up the retained tree.** Fabric hands JS only the hit target; React\n * implements two-phase propagation itself by walking the fiber tree, and so must we. Without\n * it a tap on a `<text>` label inside a `<pressable>` reaches the text node and stops, so the\n * button only responds on its padding. That reads as \"taps sometimes do not register\".\n *\n * ponytail: event priority (`unstable_getCurrentEventPriority` and the\n * `unstable_*EventPriority` constants) is read into the facade but not acted on. Angular's\n * zoneless scheduler already flushes on a microtask, which is soon enough for taps. It stops\n * being soon enough for a controlled TextInput, where the echo has to beat the next\n * keystroke. `mostRecentEventCount` covers that today by letting native reject a stale write;\n * a synchronous flush for discrete priority is the fix if it ever stops being enough.\n *\n * **Nothing thrown here may escape.** Fabric calls this synchronously from C++\n * (`UIManagerBinding::dispatchEventToJS`), often from inside a mounting transaction, and a throw\n * unwinds through that transaction: for a screen push the next commit then reads props freed on\n * the way out and the process dies with no JS stack at all. Angular\n * already catches what its own template listeners throw; everything else on this path - the\n * responder handlers, listeners registered on the engine directly, a commit started by a focus\n * change - is caught here and handed to `onError`, which the platform points at the app's\n * `ErrorHandler`. Each listener is guarded on its own, so one that throws does not stop the\n * bubble for the rest, as in the DOM.\n */\n dispatchEvent(instanceHandle: unknown, topLevelType: string, nativeEvent: unknown): void {\n const target = instanceHandle as EngineNode | null;\n this.trace(target, topLevelType);\n // What has the focus does not take it again: native answering a focus it was told of, where\n // whoever asked has already said so.\n if (topLevelType === 'topFocus' && target !== null && this.focusedNode === target) return;\n\n // Listeners get RN's documented shape, `{nativeEvent}`. Fabric hands us the payload bare;\n // React wraps it in a synthetic event and every RN API is written against `event.nativeEvent`,\n // so handlers ported from RN would silently read undefined otherwise.\n const event = new SyntheticEvent(nativeEvent, target);\n\n try {\n if (topLevelType === 'topDismiss' && target) this.dismissed(target);\n if (topLevelType === 'topScroll' && target && this.scrollTimelines.has(target)) {\n this.measuredScroll(target, nativeEvent);\n }\n this.holdSwipe(target, topLevelType, nativeEvent);\n this.trackFocus(target, topLevelType);\n if (target) this.cancelPressForScroll(target, topLevelType, event as ResponderEvent);\n if (target) this.runResponder(target, topLevelType, event as ResponderEvent);\n } catch (error) {\n this.reportEventError(error, topLevelType);\n }\n this.propagate(target, topLevelType, event);\n }\n\n /** The screen whose swipe back is held off while a finger is on what keeps a sideways drag. */\n private swipeHeld: EngineNode | null = null;\n\n /**\n * Hold a screen's swipe back off for a touch that starts on an element whose `touch-action`\n * keeps a drag to the side for itself, and give it back when the last finger lifts. From iOS\n * 26 the swipe starts anywhere on a screen once a finger has moved a little to the right, and\n * takes the touch from whatever was following it: a slider's thumb stops and the screen\n * leaves. The screen is told before the finger has moved that far.\n */\n private holdSwipe(target: EngineNode | null, type: string, nativeEvent: unknown): void {\n if (type === TOUCH_START) this.holdFrom(target, nativeEvent);\n else if (type === 'topTouchMove') this.settleDrag(nativeEvent);\n else if (type === 'topTouchEnd' || type === 'topTouchCancel') this.releaseSwipe(nativeEvent);\n }\n\n /**\n * A touch on an element that keeps a drag to the side: where it began, and whether native's\n * own gestures are held off for it. Held from the start where the element keeps a drag down\n * the page too (`none`); from the moment the finger sets off across where it leaves that one\n * to the page (`pan-y`), and never for that touch where it sets off down.\n */\n private drag: {\n x: number;\n y: number;\n settled: boolean;\n held: boolean;\n on: EngineNode;\n } | null = null;\n\n private holdFrom(target: EngineNode | null, nativeEvent: unknown): void {\n // A first finger down is a new touch: the last one's end never came where what it was on\n // went from under the finger.\n const fingers = (nativeEvent as { touches?: readonly unknown[] } | null)?.touches?.length;\n if (this.drag && fingers === 1) this.releaseSwipe(null);\n if (this.drag || !target) return;\n const actions = touchActions(target);\n if (!keeps(actions, PANS_ACROSS)) return;\n const all = keeps(actions, PANS_ALONG);\n this.drag = { ...pointOf(nativeEvent), settled: all, held: all, on: target };\n if (all) this.holdScroll(target);\n const screen = this.screenOf(target);\n if (!screen) return;\n this.swipeHeld = screen;\n this.tellScreen(screen);\n }\n\n /** The scroll view whose scrolling is off while a drag over it is an element's own. */\n private scrollHeld: EngineNode | null = null;\n\n /**\n * Stop the scroll view a node is in from scrolling, until the touch ends. Telling native who\n * holds the touch does this on Android. On iOS a scroll view is held off only by a responder\n * that is over it, never one inside it, so it is told not to scroll.\n */\n private holdScroll(node: EngineNode): void {\n for (let up = node.parent; up; up = up.parent) {\n if (up.kind !== 'element' || !SCROLL_VIEWS.has(viewNameOf(up))) continue;\n this.scrollHeld = up;\n this.tellScreen(up);\n return;\n }\n }\n\n /** Settle which way a drag set off, and hold native's own off one that set off across. */\n private settleDrag(nativeEvent: unknown): void {\n const drag = this.drag;\n if (!drag || drag.settled) return;\n const at = pointOf(nativeEvent);\n const [across, along] = [Math.abs(at.x - drag.x), Math.abs(at.y - drag.y)];\n if (Math.max(across, along) < DRAG_SLOP) return;\n drag.settled = true;\n drag.held = across > along;\n if (!drag.held) return;\n if (this.currentResponder) this.tellNative(this.currentResponder, true);\n this.holdScroll(drag.on);\n }\n\n /** Give the swipe back once the last finger has lifted. */\n private releaseSwipe(nativeEvent: unknown): void {\n const left = (nativeEvent as { touches?: readonly unknown[] } | null)?.touches?.length ?? 0;\n if (left > 0) return;\n this.drag = null;\n for (const held of [this.scrollHeld, this.swipeHeld]) {\n if (held === this.scrollHeld) this.scrollHeld = null;\n else this.swipeHeld = null;\n if (held) this.tellScreen(held);\n }\n }\n\n /**\n * Commit a screen or a scroll view again now, not with whatever next changes: the swipe begins\n * once the finger has moved ten points or so, which is a frame or two after it came down.\n */\n private tellScreen(screen: EngineNode): void {\n // Its props alone: nothing a selector reads moved, so nothing under it is styled again.\n this.markProps(screen, false);\n this.commit();\n }\n\n /** The screen of a native stack a node is on, or nothing where it is on none. */\n private screenOf(node: EngineNode): EngineNode | null {\n for (let up: EngineNode | null = node; up; up = up.parent) {\n if (up.kind === 'element' && viewNameOf(up) === STACK_SCREEN) return up;\n }\n return null;\n }\n\n /** A presented modal host has finished leaving, so a hidden one can come out of the tree. */\n private dismissed(target: EngineNode): void {\n if (!target.presented) return;\n target.presented = undefined;\n if (target.props['visible'] === false) this.markProps(target, false);\n }\n\n private reportEventError(error: unknown, topLevelType: string): void {\n if (this.onError) {\n this.onError(error, topLevelType);\n return;\n }\n console.error(`[angular-native] an error was thrown while dispatching ${topLevelType}`, error);\n }\n\n /**\n * A list that scrolls under a finger takes the touch away from whatever it started on.\n *\n * Distance alone cannot tell a scroll from a tap. The press rect is the control's own bounds\n * plus a retention offset, which is right - a 15pt threshold cancels an ordinary thumb tap on a\n * full-width button - but on a 72pt list row it means a 72pt drag still counts as a tap, and a\n * 72pt drag is unmistakably a scroll. So the list is asked instead of the arithmetic: it knows\n * it is scrolling, and every platform cancels the touch at that moment.\n *\n * Only a responder *inside* the thing that scrolled, so a scroll view moving does not cancel a\n * press somewhere else on screen. And only while a touch is in progress: momentum after the\n * finger has lifted, and programmatic scrolling, have no press to cancel.\n */\n private cancelPressForScroll(target: EngineNode, type: string, event: ResponderEvent): void {\n if (!SCROLL_CANCELS_PRESS.has(type)) return;\n const responder = this.currentResponder;\n if (!responder || responder === target) return;\n for (let node: EngineNode | null = responder; node; node = node.parent) {\n if (node === target) {\n this.release(event, true);\n return;\n }\n }\n }\n\n /**\n * Tell \"the native side never sent it\" from \"it arrived and nothing was listening\", which are\n * otherwise identical symptoms. One line per event, so it is off unless asked for.\n */\n private trace(target: EngineNode | null, topLevelType: string): void {\n if (!(globalThis as { __angularNativeEventLog?: boolean }).__angularNativeEventLog) return;\n let matched = 0;\n for (let n = target; n; n = DIRECT_EVENTS.has(topLevelType) ? null : n.parent) {\n matched += n.listeners?.get(topLevelType)?.size ?? 0;\n }\n console.log('[event]', topLevelType, target?.tag ?? '(no handle)', matched);\n }\n\n /**\n * `:focus` follows the native events rather than being inferred from a tap, so it is right for a\n * field focused programmatically or by the keyboard's next-field button.\n */\n private trackFocus(target: EngineNode | null, topLevelType: string): void {\n if (topLevelType === 'topFocus') this.setFocused(target);\n else if (topLevelType === 'topBlur' && this.focusedNode === target) this.setFocused(null);\n }\n\n /** Walk target to root. Fabric hands JS only the hit target; the propagation is ours to do. */\n private propagate(target: EngineNode | null, topLevelType: string, event: SyntheticEvent): void {\n for (let node = target; node; node = node.parent) {\n const listeners = node.listeners?.get(topLevelType);\n if (listeners) {\n for (const fn of [...listeners]) {\n try {\n fn(event);\n } catch (error) {\n this.reportEventError(error, topLevelType);\n }\n }\n }\n if (DIRECT_EVENTS.has(topLevelType) || event.isPropagationStopped()) return;\n }\n }\n\n /**\n * Clone a committed node with whatever changed. Fabric's persistent tree has no in-place edit:\n * a new revision is a new node, which is why a changed child forces its parent to clone too.\n *\n * `children` is null when the child list is unchanged, in which case Fabric keeps the previous\n * revision's children and there is nothing to append.\n *\n * Otherwise this clones the way React does: the no-children form, then `appendChild` per child.\n * Omitting the child list gives the clone *empty* children, not the old ones, and whether a\n * binding takes that argument cannot be feature-detected - `UIManagerBinding.cpp` registers\n * both clone methods with a fixed `paramCount` and argument validation is commented out - so\n * `fn.length` says nothing. One code path, no detection.\n */\n private clone(\n previous: FabricNode,\n props: Record<string, unknown> | null,\n children: FabricNode[] | null,\n ): FabricNode {\n this.stats.clonedNodes++;\n\n if (children === null) return this.fabric.cloneNodeWithNewProps(previous, props!);\n\n const handle = props\n ? this.fabric.cloneNodeWithNewChildrenAndProps(previous, props)\n : this.fabric.cloneNodeWithNewChildren(previous);\n for (const child of children) this.fabric.appendChild(handle, child);\n return handle;\n }\n\n private detach(child: EngineNode): void {\n if (child.parent) this.removeChild(child.parent, child);\n }\n}\n\n/**\n * Clear the marks that lead a commit down to a change, under a node no commit goes into: one with\n * no box. Left set, a later change under it stops climbing at them, as it stops at any mark already\n * there, and never reaches the root: nothing is committed, and an ancestor's `:has()` reading into\n * it is not asked again. What is under it has no views, so it is reconciled whole when it is shown.\n */\nfunction settlePaths(node: EngineNode): void {\n if (!node.subtreeDirty) return;\n node.subtreeDirty = false;\n for (const child of node.children) settlePaths(child);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,YAAY,EAUZ,WAAW,EACX,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,cAAc,EACd,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,MAAM,EACN,IAAI,EACJ,WAAW,EACX,QAAQ,GAQT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,kBAAkB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YACH,CAAC;YACD,IAAI,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,oBAAoB,EAAE;gBAAE,OAAO;QAC9E,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,KAAK,CACX,QAAoB,EACpB,KAAqC,EACrC,QAA6B;QAE7B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAEzB,IAAI,QAAQ,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,KAAM,CAAC,CAAC;QAElF,OAAO,KAAK;YACV,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,gCAAgC,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC;YACzE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAEO,MAAM,CAAC,KAAiB;QAC9B,IAAI,KAAK,CAAC,MAAM;YAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;CACF;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,IAAgB;IACnC,IAAI,CAAC,IAAI,CAAC,YAAY;QAAE,OAAO;IAC/B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC1B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,SAAS;QAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC","sourcesContent":["/**\n * Framework-agnostic retained tree + incremental Fabric commit.\n * Nothing Angular-specific may enter this file; lint bans the import (see docs/ARCHITECTURE.md).\n *\n * Angular mutates; Fabric is persistent. A committed node is never mutated, it is cloned with\n * new props and/or a new child set. Cloning a leaf therefore forces every ancestor to re-clone,\n * because a persistent parent holds references to specific child handles. That bubble is\n * inherent and is what React's own Fabric renderer does.\n */\n\nimport {\n boundDeclaration,\n boundRelativeLength,\n CSS_SPACE,\n isNegativeLineHeight,\n faded,\n fills,\n inlineInherited,\n setsInherited,\n attributeOf,\n handsDownPaint,\n StyleResolver,\n underOwnShorthands,\n usesActive,\n elementsAtEnd,\n hasAbove,\n couldAsk,\n hasBeside,\n forgetHasAnswers,\n keepHasAnswers,\n joinSubjects,\n placeReadElsewhere,\n siblingReach,\n type Compound,\n type HasAbove,\n type PlaceReader,\n type Conditions,\n type DeferredDeclaration,\n type StyleCache,\n type StyleSheet,\n type Subjects,\n type TokenValue,\n isGenerated,\n noteGeneratedBoxes,\n} from './css.ts';\nimport { applyAria } from './aria-props.ts';\nimport { STYLED_ELEMENTS } from './element-styles.ts';\nimport {\n aimsElsewhere,\n animationEvent,\n bezier,\n interpolate,\n readsInheritedColour,\n sample,\n step,\n steppedKeys,\n tracksOf,\n type AnimationSpec,\n type EasedNatively,\n type Keyframe,\n type RunningAnimation,\n type TrackPoint,\n type Transition,\n type TransitionSpec,\n} from './transition.ts';\nimport { isFormsInput } from './forms-inputs.ts';\nimport { transformList } from './inline-transform.ts';\nimport { tokenFromValue } from './inline-token.ts';\nimport {\n NativeScrollDriver,\n pinnedRange,\n scrollFeed,\n type ComposedDrive,\n type DrivenProperty,\n type EventFeed,\n type FollowingTransform,\n type NativeAnimated,\n type ScrollAxis,\n type ScrollDrive,\n type ScrollRange,\n type SetValues,\n type StaticTransform,\n} from './native-drive.ts';\nimport type { DrivenChannels } from './scroll-animation.ts';\n\nexport type FabricNode = { readonly __fabricNode: unique symbol } | object;\n\n/** Where a node is, in the window's coordinates. What `Engine.measure` reports. */\nimport type { HostEngine, HostNode, Settling } from './host.ts';\nimport {\n clockChannels,\n colourChannels,\n firstFrame,\n heldTransform,\n movesByShare,\n rangeOf,\n scrollChannels,\n sharesAsPoints,\n} from './scroll-animation.ts';\nimport { layOutGrid, type GridItem, type GridLayout, type Rect } from './grid.ts';\nimport {\n isBlockContainer,\n placeInFlow,\n planFlow,\n type FlowKey,\n type FlowPlan,\n type FlowTree,\n} from './flow.ts';\nimport { FontFaces } from './font-faces.ts';\nimport { premultipliedStops } from './premultiplied-stops.ts';\n\n/**\n * The animation a node's style asks for, with a play state from a rule of its own applied. Both\n * are instructions for this engine and nothing native has heard of them, so they come out of the\n * props; only when there, because a `delete` sends an object to Hermes's slow dictionary layout,\n * and this runs for every node that commits.\n */\nfunction animationOf(props: Record<string, unknown>): AnimationSpec | undefined {\n let spec = props['$animation'] as AnimationSpec | undefined;\n if (spec !== undefined) delete props['$animation'];\n for (const [key, field] of ANIMATION_ENTRIES) {\n if (!(key in props)) continue;\n const value = props[key];\n delete props[key];\n if (spec && value !== null) spec = { ...spec, ...animationPart(field, value) };\n }\n return spec;\n}\n\nconst ANIMATION_PARTS = {\n $animationDuration: 'duration',\n $animationDelay: 'delay',\n $animationEasing: 'easing',\n $animationIterations: 'iterations',\n $animationDirection: 'direction',\n $animationFill: 'fill',\n $playState: 'paused',\n} as const;\n/** Listed once: `animationOf` reads them for every node that commits. */\nconst ANIMATION_ENTRIES = Object.entries(ANIMATION_PARTS);\n\nfunction animationPart(\n field: (typeof ANIMATION_PARTS)[keyof typeof ANIMATION_PARTS],\n value: unknown,\n): Partial<AnimationSpec> {\n switch (field) {\n case 'iterations':\n return { iterations: value === 'infinite' ? null : (value as number) };\n case 'direction':\n return {\n direction: value === 'normal' ? undefined : (value as AnimationSpec['direction']),\n };\n case 'paused':\n return { paused: value === 'paused' ? true : undefined };\n default:\n return { [field]: value };\n }\n}\n\n/**\n * Whether two specs ask for the same animation. By what they say rather than which object they\n * are: a spec with a token in its timing is settled afresh each time the node's style is, and an\n * animation that started again on every such commit would never get past its first frame.\n */\nfunction sameAnimation(a: AnimationSpec, b: AnimationSpec): boolean {\n if (a === b) return true;\n return (\n SPEC_FIELDS.every((field) => a[field] === b[field]) &&\n a.easing.join() === b.easing.join() &&\n a.range?.start === b.range?.start &&\n a.range?.end === b.range?.end\n );\n}\n\nconst SPEC_FIELDS = [\n 'name',\n 'duration',\n 'delay',\n 'iterations',\n 'fill',\n 'direction',\n 'timeline',\n] as const satisfies readonly (keyof AnimationSpec)[];\n\n/** A node's scroll-driven animation: what it plays, what drives it, and the frame it commits. */\ninterface ScrollAnimation {\n readonly spec: AnimationSpec;\n /** The `@keyframes` it was laid out from, so a hot swap that edits them lays it out again. */\n readonly frames: readonly Keyframe[];\n readonly tracks: ReadonlyMap<string, readonly { offset: number; value: unknown }[]>;\n /** The properties among `tracks` declared `!important`, left where the rule puts them. */\n readonly pinned: readonly string[];\n readonly resting: Record<string, unknown>;\n readonly first: Record<string, unknown>;\n /** The colour the node inherits, which the tracks were built with, for frames that read it. */\n readonly inherited: unknown;\n readonly source: EngineNode | null;\n readonly drive: { update(channels: DrivenChannels): void; stop(): void } | null;\n}\n\nexport interface WindowFrame {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n}\nexport type FabricNodeSet = unknown;\n\n/** The slice of `global.nativeFabricUIManager` we actually use. */\nexport interface FabricUIManager {\n createNode(\n reactTag: number,\n viewName: string,\n rootTag: number,\n props: object,\n instanceHandle: unknown,\n ): FabricNode;\n /** Clone with the *given* children (omitting the argument means none) and the same props. */\n cloneNodeWithNewChildren(node: FabricNode, children?: readonly FabricNode[]): FabricNode;\n /** Clone with the given props and the *same* children. */\n cloneNodeWithNewProps(node: FabricNode, newProps: object): FabricNode;\n /** Clone with the given children and the given props. */\n cloneNodeWithNewChildrenAndProps(\n node: FabricNode,\n children: readonly FabricNode[],\n newProps: object,\n ): FabricNode;\n appendChild(parent: FabricNode, child: FabricNode): FabricNode;\n /**\n * Have native move each view whose frame the next commit changes to where it ends up, over a\n * time and by one of its own curves, with no frame of it in JavaScript.\n */\n configureNextLayoutAnimation?(\n config: { duration: number; update: { type: string } },\n ended: () => void,\n failed: () => void,\n ): void;\n createChildSet(rootTag: number): FabricNodeSet;\n appendChildToSet(set: FabricNodeSet, child: FabricNode): void;\n completeRoot(rootTag: number, set: FabricNodeSet): void;\n registerEventHandler?(\n handler: (instanceHandle: unknown, topLevelType: string, nativeEvent: unknown) => void,\n ): void;\n /** Tells the native side that JS owns the gesture, and whether to stop its own. */\n setIsJSResponder?(node: FabricNode, isResponder: boolean, blockNativeResponder: boolean): void;\n /** A view command: `focus` on a text input, `scrollTo` on a scroll view. */\n dispatchCommand?(node: FabricNode, name: string, args: readonly unknown[]): void;\n /**\n * A node's frame in window coordinates, which is the only frame two nodes can be compared in.\n *\n * Optional because an older host may not have it, and because the callback is the platform's\n * own shape: on the new architecture it fires before this returns, which is what lets an\n * overlay place itself in the same frame it was opened in.\n */\n measureInWindow?(\n node: FabricNode,\n onSuccess: (x: number, y: number, width: number, height: number) => void,\n ): void;\n /**\n * A node's box as the last commit laid it out: x, y, width, height. Fabric lays a commit out\n * before `completeRoot` returns, so this answers for a commit made a line earlier, and what\n * was read can be committed again before anything is drawn. That is how a grid is laid out.\n * Optional because a test's fabric has no layout to read.\n */\n getBoundingClientRect?(\n node: FabricNode,\n includeTransform: boolean,\n ): readonly [number, number, number, number] | undefined;\n}\n\n/**\n * The scroll events that mean a finger is dragging the list rather than tapping something in it.\n *\n * `topScrollBeginDrag` is the precise one; `topScroll` is here because a scroll view configured\n * without drag events still reports movement, and a press surviving that is the bug either way.\n */\nconst SCROLL_CANCELS_PRESS = new Set(['topScroll', 'topScrollBeginDrag']);\n\n/**\n * RN's `directEventTypes`: delivered to the target only, never up the tree. Everything else\n * bubbles, which matches RN's `bubblingEventTypes` for the touch and input events that matter.\n * The web host's engine reads this set too, so both hosts deliver an event the same way.\n *\n * ponytail: a hand-kept set rather than real ViewConfigs. It is wrong only for a nested\n * scroll view, where an ancestor listening for the same direct event would not fire (correct)\n * but a third-party component's custom direct event would bubble (harmless in practice).\n * Swap it for per-component ViewConfig metadata if that ever matters.\n */\nexport const DIRECT_EVENTS: ReadonlySet<string> = new Set([\n 'topScroll',\n 'topScrollBeginDrag',\n 'topScrollEndDrag',\n 'topMomentumScrollBegin',\n 'topMomentumScrollEnd',\n 'topScrollToTop',\n 'topContentSizeChange',\n 'topLayout',\n 'topLoad',\n 'topLoadStart',\n 'topLoadEnd',\n 'topError',\n 'topProgress',\n 'topRefresh',\n 'topTextLayout',\n // react-native-screens. `topDismissed` is how a swipe-back or a native back button reaches\n // JS, and it must not bubble: the stack above would see its child's pop as its own.\n 'topDismissed',\n 'topNativeDismissCancelled',\n 'topWillAppear',\n 'topAppear',\n 'topWillDisappear',\n 'topDisappear',\n 'topHeaderHeightChange',\n 'topTransitionProgress',\n 'topFinishTransitioning',\n // The tabs host reports its own selection, and only the host it happened in wants to know.\n 'topTabSelected',\n // Safe-area insets, reported by the provider that measured them.\n 'topInsetsChange',\n]);\n\n/**\n * What a listener receives. RN's synthetic event carries more, but `nativeEvent` is the part\n * every RN API is documented against, and `stopPropagation` is the part a nested control needs.\n *\n * `stopPropagation` ends the walk to the root after the current node, as it does in the DOM and\n * on RN's `SyntheticEvent`: the other listeners on the node that called it still run. It does not\n * touch the responder negotiation, which has already finished by the time a listener sees the\n * event, so it cannot take a press away from a pressable; the negotiation already keeps an inner\n * pressable's press from reaching the one around it.\n */\nexport interface NativeSyntheticEvent<T = unknown> {\n readonly nativeEvent: T;\n /**\n * The node the event happened on, which a listener further up can compare with its own: RN's\n * `event.target`. Null where a host has no node to name.\n */\n readonly target?: unknown;\n stopPropagation(): void;\n isPropagationStopped(): boolean;\n}\n\n/**\n * The event object a dispatch hands every listener along the path. Exported so another host can\n * hand its listeners the same shape rather than a bare `{ nativeEvent }` that lacks the methods\n * the type promises.\n */\nexport class SyntheticEvent<T = unknown> implements NativeSyntheticEvent<T> {\n readonly nativeEvent: T;\n readonly target: unknown;\n private stopped = false;\n\n constructor(nativeEvent: T, target: unknown = null) {\n this.nativeEvent = nativeEvent;\n this.target = target;\n }\n\n stopPropagation(): void {\n this.stopped = true;\n }\n\n isPropagationStopped(): boolean {\n return this.stopped;\n }\n}\n\n/**\n * The JS responder system: RN's second touch layer, and the renderer's job rather than the app's.\n *\n * Fabric delivers raw touches to whichever node was hit. On top of that, React runs a negotiation\n * deciding *who owns the gesture*: a capture pass from the root down, then a bubble pass from the\n * target up, electing a single responder that alone receives grant/move/release/terminate. When\n * ownership changes the renderer tells native through `setIsJSResponder`, which is how a JS\n * control stops a native scroll view from also scrolling.\n *\n * All of RN's `Pressability` sits on this, never on raw touch events. Without it there is no way\n * for a button and an enclosing scroll view to agree on who owns a drag.\n */\n/**\n * What a touch event carries. The responder system is touch-only, so its handlers are typed\n * against this rather than `unknown`: every consumer wants the coordinates and would otherwise\n * cast to get at them.\n */\nexport interface TouchPayload {\n readonly pageX?: number;\n readonly pageY?: number;\n readonly locationX?: number;\n readonly locationY?: number;\n readonly identifier?: number;\n readonly target?: number;\n readonly timestamp?: number;\n}\n\nexport type ResponderEvent = NativeSyntheticEvent<TouchPayload>;\n\nexport interface ResponderHandlers {\n /** The `target` is the node the touch landed on, which a capturing ancestor may inspect. */\n onStartShouldSetResponderCapture?(event: ResponderEvent, target: EngineNode): boolean;\n onStartShouldSetResponder?(event: ResponderEvent, target: EngineNode): boolean;\n onMoveShouldSetResponderCapture?(event: ResponderEvent, target: EngineNode): boolean;\n onMoveShouldSetResponder?(event: ResponderEvent, target: EngineNode): boolean;\n onResponderGrant?(event: ResponderEvent): void;\n onResponderMove?(event: ResponderEvent): void;\n onResponderRelease?(event: ResponderEvent): void;\n onResponderTerminate?(event: ResponderEvent): void;\n /** Return false to keep the gesture when something else asks for it. Defaults to allowing. */\n onResponderTerminationRequest?(event: ResponderEvent): boolean;\n /** Ask native to stop its own gesture while we hold the responder (a slider inside a list). */\n blockNativeResponder?: boolean;\n}\n\n/**\n * Events the native side will not emit unless a **prop** opts in, separately from anyone\n * listening. `ShadowTree.cpp` guards the layout notification with `if (viewProps->onLayout)`,\n * so a view that never sets the prop is never measured, however many listeners it has.\n *\n * React gets this for free: attaching a handler puts `onLayout` in the props object. A renderer\n * that keeps listeners in its own registry has to set the prop deliberately, and the failure is\n * silent - the callback simply never runs.\n */\nconst EVENT_OPT_IN_PROPS: Record<string, string> = {\n topLayout: 'onLayout',\n /*\n * Hover, which exists on this platform after all.\n *\n * React Native implements the W3C pointer events, and on iPadOS a connected trackpad or mouse\n * produces them: `onPointerEnter` and `onPointerLeave` fire as the cursor crosses a view. A\n * phone never sends them, so this costs a phone two props and nothing else, and it is what\n * makes a hover style reachable on the one device that has a pointer.\n */\n topPointerEnter: 'onPointerEnter',\n topPointerLeave: 'onPointerLeave',\n};\n\n/**\n * The same opt-in, for events one view type guards with a prop of its own. Android's\n * `ReactImageView` emits no load events at all unless `shouldNotifyLoadEvents` is set, which\n * `Image.android.js` does whenever any load handler is attached. iOS ignores the prop.\n */\nconst VIEW_EVENT_OPT_IN_PROPS: Record<string, Record<string, string>> = {\n Image: {\n topLoadStart: 'shouldNotifyLoadEvents',\n topLoad: 'shouldNotifyLoadEvents',\n topLoadEnd: 'shouldNotifyLoadEvents',\n topError: 'shouldNotifyLoadEvents',\n topProgress: 'shouldNotifyLoadEvents',\n },\n // `ReactTextInputManager` watches each of these only behind a prop of the handler's name,\n // which `TextInput.js` sets by passing the handler through. iOS's field sends them unasked.\n AndroidTextInput: {\n topContentSizeChange: 'onContentSizeChange',\n topScroll: 'onScroll',\n topKeyPress: 'onKeyPress',\n },\n};\n\n/**\n * Props the engine itself writes or reads off a node, so never a misspelling: the style, the\n * event opt-ins, and the bookkeeping keys that never reach native. See `checkProps`.\n */\nconst ENGINE_PROPS = new Set<string>([\n 'style',\n 'collapsable',\n // Read by the cascade for `:disabled`, whether or not the native view takes it.\n 'disabled',\n 'intrinsicSize',\n 'styleOverride',\n ...Object.values(EVENT_OPT_IN_PROPS),\n ...Object.values(VIEW_EVENT_OPT_IN_PROPS).flatMap((props) => Object.values(props)),\n]);\n\n/** Touch events that drive the responder negotiation. */\nconst TOUCH_START = 'topTouchStart';\nconst TOUCH_MOVE = 'topTouchMove';\nconst TOUCH_END = 'topTouchEnd';\nconst TOUCH_CANCEL = 'topTouchCancel';\n\nexport type NodeKind = 'element' | 'text' | 'anchor';\n\n/** What Fabric currently holds for a node. `null` until the node has been committed once. */\ninterface Committed {\n handle: FabricNode;\n /**\n * The react tag this node was created with. Kept because the native animation driver addresses\n * a view by tag and has no other way to find one of ours: `findNodeHandle` returns a number it\n * is given unchanged, so a tag is all an animated graph needs to point here.\n */\n tag: number;\n props: Record<string, unknown>;\n /** The child handles this node was committed with, in order. */\n childHandles: FabricNode[];\n /** The native view it was created as, which a clone cannot change. */\n viewName: string;\n}\n\nexport interface EngineNode extends HostNode {\n readonly nodeKind: NodeKind;\n /** Lowercase template spelling, e.g. `view`. Never the native view name. */\n readonly tag: string;\n /** `tag` again, for Angular 22.0, which reads it on a component's host element. */\n readonly tagName: string;\n /**\n * The element's name as a stylesheet's type selector reads it, where it is not `tag`: a\n * drawing's `text` is kept as `svg:text` and is still `text` to `.chart text`.\n */\n typeName?: string;\n /**\n * The namespace a renderer created the element in where an extension names elements in one,\n * as Angular creates what is written inside an `<svg>`: a library's drawing, whose shapes are\n * painted and given their font as a browser does. An icon's shapes are created by name alone\n * and have none, and commit as they always have.\n */\n namespace?: string;\n props: Record<string, unknown>;\n nodeText: string;\n childList: EngineNode[];\n parent: EngineNode | null;\n listeners: Map<string, Set<(event: unknown) => void>> | null;\n\n /** CSS classes on this node, for selector matching. */\n classes: Set<string> | null;\n /** The compiled stylesheet of the component that created this node, if any. */\n templateSheet: StyleSheet | null;\n /** The sheet of the component this node hosts, if it hosts one. What `:host` matches against. */\n hostSheet: StyleSheet | null;\n /** Custom properties set on the node itself; see `StyleTarget.customProperties`. */\n customProperties: Record<string, TokenValue> | null;\n /** Resolved style, memoised across commits. Owned by the CSS resolver. */\n styleCache: StyleCache | null;\n /** Set when something that could change what this node matches has changed. */\n styleDirty: boolean;\n /** See `StyleTarget.ownDirty`. */\n ownDirty: boolean;\n /** See `StyleTarget.hasDirty`. */\n hasDirty: boolean;\n /** See `StyleTarget.stateDirty`. */\n stateDirty: boolean;\n /** A family left out while it loads. See `loadingFamilies`. */\n heldFamily?: string;\n /** See `StyleTarget.inlineInherits`. */\n inlineInherits?: boolean;\n /** See `StyleTarget.boundStyle`: the declarations, and the same by the property each sets. */\n boundStyle?: readonly DeferredDeclaration[] | null;\n boundByProp?: Map<string, DeferredDeclaration>;\n /**\n * Whether this node, or one inside it, takes touches under a `pointer-events: none` it would\n * otherwise inherit. Kept as each node is reconciled, children first. See `noteTouches`.\n */\n touchWithin?: boolean;\n /**\n * The paragraph the engine makes around a run of text written straight into a view. It is in no\n * template and in no node's `childList`: it holds the text, and commits where the text would.\n */\n box?: EngineNode;\n /**\n * The paragraphs of a run of text beside a box in a line, one a word: see `wordBoxes`. In no\n * node's `childList` either, and kept on the text as its one paragraph is.\n */\n words?: EngineNode[];\n /** A node the engine made, which no rule matches: it only inherits. */\n anonymous?: true;\n /** See `StyleTarget.styled`. */\n styled?: true;\n /** `:focus`, from the native focus and blur events. */\n focused?: boolean;\n /** `:active`, set on the responder and every ancestor of it. */\n active?: boolean;\n /**\n * The style object the platform adapter made for this node, and may therefore write into.\n *\n * Angular sets style properties one at a time, so building a fresh object per property means a\n * style of ten properties costs ten copies of a growing object, for every element that has one.\n * An object the adapter created is its to mutate; one that arrived any other way is copied,\n * once. A field rather than a `WeakSet` of such objects, which Hermes makes slow to consult.\n */\n ownStyle?: object;\n /** The resolved style this node was last committed with, for the skip check in `reconcile`. */\n styleCommitted: StyleCache | null;\n /**\n * How this node laid its children out when one of them last had a `fit-content` size, as\n * `containerOf` says it. Set by such a child, and compared on each reconcile so the children\n * are worked out again when the direction or alignment changes. Unset on every other node.\n */\n fitContainer?: string;\n /**\n * Whether a browser lays this element out inline, with no display of its own: `always`, as a\n * span is, which is what the box that holds it reads; or `unless-block`, as a custom element\n * is, which the engine lays out as an inline-block or as a block by what it holds. Set with\n * `setInline`. Unset on every other node.\n */\n inlineLevel?: 'always' | 'unless-block';\n /** Set by `scrollsOverflow`: with `overflow: auto` or `scroll` this element is a scroll view. */\n scrollsOverflow?: true;\n /** Set while this element is one: see `Engine.settleScrolling`. */\n scrollView?: true;\n /** The view a scrolling element's children are in, as it was last committed. */\n inside?: { handle: FabricNode; childHandles: FabricNode[] };\n /** Set while `settleLine` has given an always-inline element a line for the boxes it holds. */\n lined?: true;\n /** Set while an always-inline element is a flex box or a grid by its own style. */\n boxed?: true;\n /**\n * How this node lays its children out as a block container, and which of them are in its flow:\n * made on each reconcile from its children's styles, so a child added, removed or restyled is\n * followed. Unset on every node that is not a block container. See `flow.ts`.\n */\n flow?: Flow;\n /**\n * What an out-of-flow box is committed with in place of what Yoga cannot resolve: its `auto`\n * margins as lengths, or the place it would have had in the flow. A null takes the prop away.\n * See `settleAbsolute`.\n */\n resolved?: Readonly<Record<string, number | null>>;\n /** Where a `position: sticky` box sticks, and how far it is moved now. See `settleSticky`. */\n sticky?: StickyState;\n /**\n * The node a `position: fixed` box is committed under in place of its parent: the page it is\n * on, or the root. Unset on every node that is not fixed.\n */\n fixedTo?: EngineNode;\n /**\n * Set once a child of this node has had an `order`: its children are then committed in that\n * order, which Yoga has no property for. Left set, since sorting children with none is nothing.\n */\n ordered?: boolean;\n /**\n * A box in a line of a block, which is as wide as its content: the width that came to, read\n * back with the percentages inside it set aside, and whether it has to be read again. See\n * `settleFits`.\n */\n fit?: { dirty: boolean; width?: number; room?: number; grown?: EngineNode[] };\n /**\n * The least width a box is held to because a fitted box in it overflows its room: a browser's\n * flex item is no narrower than its content, which Yoga's is. See `growAround`.\n */\n fitMin?: number;\n /** Set on a box inside one being fitted, while its percentage width and zero basis are off. */\n fitOff?: boolean;\n /**\n * The declarations of this node that are a percentage with a length added, `calc(100% - 2rem)`,\n * what each came to against the box the percentage is of, and that box's size then. See\n * `settleMixed`. Set on `mixedOff` while that box is measured with them set aside.\n */\n mixed?: MixedState;\n mixedOff?: boolean;\n /** The line box this node is the first box of, as it was last committed. See `inLines`. */\n line?: LineBox;\n /**\n * Set on an item in a row whose automatic minimum width is read from what it holds: whether\n * text in it has somewhere to wrap. Anything changing under it has it asked again.\n */\n autoMin?: boolean;\n /**\n * The narrowest an item that takes a share of its row goes, read from a commit of it at its\n * content's width with its words a line each, or nothing until it is read: see\n * `settleMinimums`. Set while `shareMin` says the item's minimum is to be measured.\n */\n shareMin?: { width?: number; share?: number };\n /** Set while that commit is made: the item is as wide as its content, with no share. */\n shareOff?: boolean;\n /** Whether this node's children were last laid out along a row. See `autoMinimum`. */\n row?: boolean;\n /** How this node lays its children out as a grid. Unset on every node that is not one. */\n grid?: GridState;\n /** The grid this node was last an item of. Its `grid` says whether it still is. */\n gridIn?: EngineNode;\n /** The block container whose flow this node was last in. Its `flow` says whether it still is. */\n flowIn?: EngineNode;\n /**\n * Whether this node had a height a percentage could be taken of, when a box beneath it with a\n * percentage height last asked, as `definiteHeight` says it. Compared on each reconcile so its\n * children are worked out again when it changes. Unset on every other node.\n */\n heightBasis?: boolean;\n /**\n * The height a box as tall as its content is committed at, so that a percentage height in it\n * is of that height, and the width it had then. See `settleHeld`.\n */\n heldAt?: { height: number; width: number; inner: number };\n /**\n * Per-property transition state, for every property this node has ever seen a `transition` for.\n * A finished entry stays, because its target is what the next change is measured against.\n */\n transitions?: Map<string, Transition>;\n /** The `@keyframes` animation this node is playing, if any. One at a time. */\n playing?: RunningAnimation;\n /** An animation played by a scroll view's offset rather than the clock. See `scrollAnimated`. */\n scrolled?: ScrollAnimation;\n /**\n * The props a native animated graph has set on the view with this tag, which no commit\n * changes again: see `Touched`. A view made again has another tag, and starts with none.\n */\n owned?: { readonly tag: number; readonly keys: Set<string> };\n /**\n * The last `transform` built from the individual transform properties, and what it was built\n * from. Reused while the parts are the same objects, so an unrelated change does not re-send it.\n */\n composedTransform?: { parts: readonly unknown[]; value: unknown[] };\n /** The commit that created this node's view, by its number: see `Engine.commitUnseen`. */\n bornIn?: number;\n /** The last bound `transform` string and the list it reads as, undefined where CSS cannot. */\n boundTransform?: { text: string; list: unknown[] | undefined };\n /**\n * Set by the component that owns this element. A host primitive that reaches a commit without it\n * was written in a template that never imported the component, which is reported in dev.\n */\n claimed?: true;\n /**\n * Set by the platform adapter when Angular mounts a component on this element. What makes an\n * `<x-card>` host legitimate where a `<veiw>` typo is not, since both are names no view table\n * knows. See `markComponentHost`.\n */\n componentHost?: true;\n /** See `keepNativeView`. */\n nativeView?: true;\n /** Props kept for selectors to match and left out of what is committed. See `keepAsAttribute`. */\n attributeOnly?: Set<string>;\n /** Attributes a package keeps apart from props, for selectors alone. See `keepAttribute`. */\n keptAttributes: Record<string, string> | undefined;\n /**\n * Set by whoever needs to know which props have been written: each `setProp` with a value adds\n * its key, even one equal to the value already there, and one with `undefined` or `null` takes\n * it out. The native stack outlet tells a page's own binding from a value it carried this way.\n */\n writes?: Set<string>;\n /** The child this node's background is painted on instead of itself. See `paintOn`. */\n paintsOn?: EngineNode;\n /** What this node's background colour is handed to instead of painted. See `takePaint`. */\n paintTaker?: (color: unknown) => void;\n /** The background colour `paintTaker` was last handed, or is about to be. */\n paintTaken?: unknown;\n /**\n * Style weaker than every sheet, where no rule and no inline style says otherwise. What lets the\n * root component's host fill the surface by default and still give way to its own `:host`. See\n * `setDefaultStyle`.\n */\n defaultStyle?: Readonly<Record<string, unknown>>;\n\n /**\n * Hoisted nodes (`registerHoist`) inside this subtree while it is out of the tree, held here\n * rather than by the engine. See `Engine.releaseDetached`.\n */\n dormantHoists?: EngineNode[] | null;\n\n committed: Committed | null;\n /** The node this one was committed as a child of, which native holds it to for its life. */\n committedUnder: EngineNode | LineBox | null;\n /** The hoisted views this node keeps committed for, by element name. See `HoistOptions`. */\n kept?: Map<string, KeptHoist>;\n /** On a text field, the row aligned by baseline that takes a baseline from it: `lineBaseline`. */\n onBaseline?: EngineNode;\n /** On such a row, the fields it has marked, which it unmarks when they are no longer its own. */\n baselineFields?: Set<EngineNode>;\n /** Commit this node again with its children so Fabric measures it again. `remeasureText`. */\n remeasure?: true;\n /** On a paragraph, whether its text was one word when it was last merged: `wholeWords`. */\n oneWord?: boolean;\n /** The z-index this view is drawn at for a box in it, where it has none: `Engine.raise`. */\n raised?: number;\n /**\n * A modal host committed as visible on iOS whose dismissal native has not yet reported. It\n * stays committed after `visible` goes false until `topDismiss`, as React Native's Modal.js\n * keeps it for the dismissal animation. See `Engine.withheld`.\n */\n presented?: true;\n /** This node's own props changed. */\n propsDirty: boolean;\n /** This node's child list changed. */\n structureDirty: boolean;\n /** Something below this node is dirty, so the walk must descend. */\n subtreeDirty: boolean;\n}\n\n/**\n * Canonical Fabric component names, taken from `RCTFabricComponentsPlugins.mm` and the C++\n * `ComponentName[]` declarations rather than guessed. Legacy `RCT`-prefixed names also work\n * today, but only through `componentNameByReactViewName`, a documented transition-period shim\n * that strips the prefix and maps `Text` to `Paragraph`.\n */\nconst VIEW_NAMES: Record<string, string | PlatformViewName> = {\n view: 'View',\n text: 'Paragraph',\n image: 'Image',\n 'scroll-view': 'ScrollView',\n 'safe-area-view': 'SafeAreaView',\n modal: 'ModalHostView',\n switch: 'Switch',\n 'text-input': 'TextInput',\n 'activity-indicator': 'ActivityIndicatorView',\n 'refresh-control': 'PullToRefreshView',\n 'input-accessory-view': 'InputAccessoryView',\n // Composites from the components package. Their host is a plain view; they are listed so a\n // template that uses one without importing it is reported like any other host primitive.\n pressable: 'View',\n 'touchable-opacity': 'View',\n 'image-background': 'View',\n 'keyboard-avoiding-view': 'View',\n // The windowing component; its host really is a native scroll view.\n 'virtual-list': 'ScrollView',\n};\n\n/**\n * The element names above, as they were before any app registered its own.\n *\n * Only these have a component in `@ng-native/components` to forget to import, which is what\n * the dev-mode check below is about. A name added by `registerViewName` may have nothing behind\n * it on purpose: an Expo view driven as a plain element is the whole point of\n * `@ng-native/expo`, and warning about it would be noise.\n */\nconst PRIMITIVE_NAMES = new Set(Object.keys(VIEW_NAMES));\n\n/**\n * HTML's text elements, which a template can write as it would for a browser.\n *\n * Each is text when it holds only text and other text elements, and a view when it holds anything\n * else: a box inside a paragraph has no layout, so `<span>Inbox<view class=\"dot\" /></span>` is a\n * view with its text in a paragraph of its own. Decided as the element is committed, by\n * `viewNameOf`. They have no component to import, so they are not `PRIMITIVE_NAMES`.\n */\nconst TEXT_ELEMENTS = new Set([\n ...['span', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'label', 'strong', 'b', 'em', 'i'],\n ...['u', 's', 'small', 'code', 'mark', 'abbr', 'cite', 'time'],\n]);\n\n/** HTML's layout elements, each a plain view, as a browser's are boxes with a name. */\nconst LAYOUT_ELEMENTS = [\n ...['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'],\n];\n\nfor (const name of TEXT_ELEMENTS) VIEW_NAMES[name] = 'Paragraph';\nfor (const name of LAYOUT_ELEMENTS) VIEW_NAMES[name] = 'View';\n\n/**\n * What an HTML element has for its name alone, given to the node as it is made: a heading's role,\n * which a binding can replace as it can any prop, and whether the engine has styles for it.\n */\nconst HTML_ELEMENTS = new Map<string, { role?: string; styled?: true }>([\n ...['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map((name) => [name, { role: 'header' }] as const),\n ...[...STYLED_ELEMENTS].map((name) => [name, { styled: true }] as const),\n]);\n\n/**\n * The props each host primitive's native view is sent, by element name, as the components\n * declare them: every input the element's component has, and the props it writes that no input\n * carries. What the development check for a misspelt prop compares against. See\n * `declareNativeProps`.\n */\nconst DECLARED_PROPS = new Map<string, Set<string>>();\n\n/**\n * Declare props the native view behind an element accepts. `@ng-native/components` calls this\n * once per host primitive with the component's inputs; an app driving a primitive's native view\n * with a prop the component has no input for can declare that prop too.\n */\nexport function declareNativeProps(elementName: string, props: Iterable<string>): void {\n let declared = DECLARED_PROPS.get(elementName);\n if (!declared) DECLARED_PROPS.set(elementName, (declared = new Set()));\n for (const prop of props) declared.add(prop);\n}\n\n/**\n * Mark a host element as owned by its component. The components package calls this from each\n * host primitive's constructor; see `EngineNode.claimed`.\n */\nexport function claimHost(node: HostNode): void {\n node.claimed = true;\n}\n\n/**\n * Say that an element scrolls what overflows it, as a browser's does: with `overflow: auto` or\n * `scroll` it is committed as a scroll view, around one view that holds what it holds. For a\n * package that gives elements a browser's behaviour. Any other element keeps the view it is,\n * and its `overflow` is layout alone.\n */\nexport function scrollsOverflow(node: EngineNode): void {\n node.scrollsOverflow = true;\n}\n\n/** What a scrolling element lays out what it holds by, which its content view takes. */\nconst CONTENT_KEYS = new Set([\n ...['padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n ...['paddingHorizontal', 'paddingVertical', 'paddingStart', 'paddingEnd'],\n ...['paddingInline', 'paddingBlock', 'paddingInlineStart', 'paddingInlineEnd'],\n ...['paddingBlockStart', 'paddingBlockEnd'],\n ...['flexDirection', 'flexWrap', 'alignItems', 'alignContent', 'justifyContent'],\n ...['gap', 'rowGap', 'columnGap'],\n]);\n\n/** A scrolling element's props split between its two views: see `scrollerProps`. */\nfunction splitScroller(props: Record<string, unknown>): {\n box: Record<string, unknown>;\n content: Record<string, unknown>;\n} {\n const box: Record<string, unknown> = {};\n const content: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) {\n (CONTENT_KEYS.has(key) ? content : box)[key] = value;\n }\n // A scroll view clips only as `scroll`: native reads `auto`, which an inline style can say, as\n // visible.\n if (box['overflow'] === 'auto') box['overflow'] = 'scroll';\n return { box, content };\n}\n\n/**\n * A scrolling element's props as its two views take them: the box it is, on the scroll view,\n * and how it lays out what it holds, on the content. The content is a view of its own whatever\n * is in it: a scroll view scrolls one child.\n */\nfunction scrollerProps(props: Record<string, unknown>): {\n box: Record<string, unknown>;\n content: Record<string, unknown>;\n} {\n const { box, content } = splitScroller(props);\n // Nested: on Android a scroll view inside another is passed over for the outer one unless it\n // asks, and a web element that scrolls is as often as not inside a page that does.\n return {\n box: { nestedScrollEnabled: true, ...box },\n content: { collapsable: false, ...content },\n };\n}\n\n/** The props of a payload, or null where there are none. */\nconst someProps = (props: Record<string, unknown>): Record<string, unknown> | null =>\n Object.keys(props).length ? props : null;\n\n/**\n * Mark an element as the host of a component. The platform adapter calls this from\n * `RendererFactory2.createRenderer`, which Angular calls once for every component it mounts,\n * with the host element in hand, whatever the component's selector.\n */\nexport function markComponentHost(node: HostNode): void {\n (node as EngineNode).componentHost = true;\n}\n\n/**\n * Say that a component's host is the native view its element name is registered as: a typed\n * wrapper for the view, where a component of the app's own with the same selector is a plain view.\n * Called from the component's constructor. See `ViewNameOptions.yieldsToComponents`.\n */\nexport function keepNativeView(node: HostNode): void {\n (node as EngineNode).nativeView = true;\n}\n\n/** `text-input` -> `TextInput`: how the components package names the class for an element. */\nconst className = (element: string): string =>\n element.replace(/(^|-)([a-z])/g, (_, __, c: string) => c.toUpperCase());\n\n/** Names Android registers differently. */\nexport const ANDROID_VIEW_NAMES: Record<string, string> = {\n switch: 'AndroidSwitch',\n 'text-input': 'AndroidTextInput',\n 'activity-indicator': 'AndroidProgressBar',\n 'refresh-control': 'AndroidSwipeRefreshLayout',\n // Neither exists on Android; RN's own wrappers render a plain view there too.\n 'safe-area-view': 'View',\n 'input-accessory-view': 'View',\n};\n\n/**\n * iOS's names for the elements Android names differently, so reporting iOS after Android puts\n * them back.\n */\nconst IOS_VIEW_NAMES: Record<string, string> = Object.fromEntries(\n Object.keys(ANDROID_VIEW_NAMES).map((element) => [element, VIEW_NAMES[element] as string]),\n);\n\n/**\n * The platform the host reported at startup. Defaults to iOS, which is what the view-name table\n * above assumes too.\n *\n * Exposed because a few of React Native's JavaScript wrappers behave differently per platform in\n * ways nothing native can infer: `Text.js` makes a text an accessibility element on iOS always,\n * and on Android only when it can be pressed.\n */\nlet platformOS = 'ios';\n\nexport function nativePlatform(): string {\n return platformOS;\n}\n\n/**\n * Call once at startup with `Platform.OS`. The view names above are the iOS/canonical ones, so\n * only the mapping half is a no-op elsewhere.\n */\nexport function registerPlatformComponents(platform: string): void {\n platformOS = platform;\n const names = platform === 'android' ? ANDROID_VIEW_NAMES : IOS_VIEW_NAMES;\n for (const [element, viewName] of Object.entries(names)) registerViewName(element, viewName);\n}\n\n/**\n * Props RN's JS wrappers apply before the caller's, per native view name.\n *\n * The native ScrollView does not clip on its own; RN's `ScrollView.js` supplies\n * `{flexGrow, flexShrink, flexDirection, overflow: 'scroll'}` as a base style. Omit it and the\n * content spills straight out of the scroll view's bounds, which reads as a layout bug in the\n * content rather than a missing default.\n *\n * Caller props and styles are applied on top, so any of this can be overridden.\n */\nconst DEFAULT_PROPS: Record<string, Record<string, unknown>> = {\n ScrollView: { flexGrow: 1, flexShrink: 1, flexDirection: 'column', overflow: 'scroll' },\n // Its `baseHorizontal`, for the view a horizontal scroll view is on Android.\n AndroidHorizontalScrollView: {\n flexGrow: 1,\n flexShrink: 1,\n flexDirection: 'row',\n overflow: 'scroll',\n },\n // RN's Image.ios.js: without it a border radius rounds the view but not the picture.\n Image: { overflow: 'hidden' },\n // RN's Modal.js gives the native host this; without it the modal does not lay out.\n ModalHostView: { position: 'absolute' },\n // RN's InputAccessoryView.js does the same for the keyboard bar.\n InputAccessoryView: { position: 'absolute' },\n // RN's Text.js ends truncated text in an ellipsis; native's own default is to clip. A default\n // rather than a prop the component writes, so `text-overflow` in a stylesheet can change it.\n Paragraph: { ellipsizeMode: 'tail' },\n};\n\n/**\n * What an element that scrolls its overflow has of a scroll view's defaults: it clips, and lays\n * out in a column. Not the grow and shrink of `ScrollView.js`, which a CSS box has none of: an\n * element with `overflow: auto` and a height is as tall as it says, not as the room it is in.\n */\nconst OVERFLOW_SCROLLER = { flexDirection: 'column', overflow: 'scroll' };\n\nconst RAW_TEXT = 'RawText';\n/**\n * A `<text>` nested inside another `<text>` is a span, not a paragraph.\n *\n * Note the name: the C++ component really is called `Text`, but that name is **unreachable\n * from JS**. `ComponentDescriptorRegistry::at` puts every lookup through\n * `componentNameByReactViewName`, which rewrites `Text` to `Paragraph` and `VirtualText` to\n * `Text`. Sending the canonical `Text` therefore yields a Paragraph nested inside a Paragraph,\n * which Fabric treats as an inline view attachment: the run renders top-aligned and does not\n * inherit the parent's text attributes. It looks like a superscript.\n */\nconst VIRTUAL_TEXT = 'VirtualText';\nconst DEFAULT_VIEW = 'View';\n/** A top-level text, the one view that aligns its lines. A nested text is a `VirtualText`. */\nconst PARAGRAPH = 'Paragraph';\n\n/** Whether text written into a view of this name is drawn in a paragraph the engine makes. */\nconst holdsParagraphs = (viewName: string): boolean =>\n viewName !== PARAGRAPH && viewName !== VIRTUAL_TEXT && TEXT_CONTENT_PROPS[viewName] === undefined;\n\n/**\n * The box Yoga takes a view's baseline from where the view has none of its own: its first child\n * that is laid out in its flow. Words written straight into the view are the paragraph the\n * engine makes around them, and a child that is not displayed has no view to ask.\n */\n/**\n * A view with a transition is a native view for as long as it has one, as an `Animated.View` is.\n *\n * React Native gives a view a native view of its own for an opacity under 1, a transform or a\n * background, and takes it away when the last such reason goes. A wrapper that fades in was one\n * for the length of the fade and none after, and Fabric moved everything inside it to the view\n * above as the fade ended. Being moved takes a focused field out of the window for a moment, and\n * it lost its focus: a field focused as its container faded in blurred when the fade finished.\n *\n * A floor, as `keepNative` is: a `collapsable` written on the element is left alone. Not for\n * `transition: none`, which transitions nothing.\n */\nfunction keepForTransition(\n node: EngineNode,\n props: Record<string, unknown>,\n spec: Readonly<Record<string, unknown>>,\n): void {\n if (viewNameOf(node) !== DEFAULT_VIEW || props['collapsable'] !== undefined) return;\n if (Object.keys(spec).length > 0) props['collapsable'] = false;\n}\n\nfunction firstInFlow(node: EngineNode): EngineNode | undefined {\n for (const child of node.childList ?? []) {\n // Not the paragraph itself, which holds the words it was made around.\n if (child.nodeKind === 'text' && child.box) return child.box === node ? undefined : child.box;\n if (child.nodeKind !== 'element' || readStyle(child, 'display') === 'none') continue;\n if (!OUT_OF_FLOW.has(readStyle(child, 'position') as string)) return child;\n }\n return undefined;\n}\n\n/** A box and every box in it that is a grid, the outermost first. */\nfunction gridsIn(box: EngineNode): EngineNode[] {\n const inside = box.childList.flatMap((child) =>\n child.nodeKind === 'element' ? gridsIn(child) : [],\n );\n return box.grid ? [box, ...inside] : inside;\n}\n\nconst isNode = (node: EngineNode | undefined): node is EngineNode => node !== undefined;\n\n/**\n * Whether a text field is one a row aligned by baseline takes its baseline from, and is still\n * under that row: a row taken away is not committed again to unmark it.\n */\nfunction isOnBaseline(node: EngineNode, viewName: string): boolean {\n const row = node.onBaseline;\n return viewName === 'TextInput' && row !== undefined && isWithin(node, row);\n}\n\n/** Whether a row lays a child out among its others, and so can take its baseline from it. */\nconst inFlow = (child: EngineNode): boolean =>\n child.nodeKind === 'element' && ownLayout(child, 'position') !== 'absolute';\n\n/** The text field a row's box takes its baseline from: itself, or the first in its flow down. */\nfunction fieldOnBaseline(item: EngineNode): EngineNode | undefined {\n let at: EngineNode | undefined = item;\n while (at?.nodeKind === 'element' && !TEXT_INPUTS.has(viewNameOf(at))) at = firstInFlow(at);\n return at?.nodeKind === 'element' ? at : undefined;\n}\n\ntype TextDirection = 'ltr' | 'rtl';\n\nconst textDirection = (value: unknown): TextDirection | undefined =>\n value === 'ltr' || value === 'rtl' ? value : undefined;\n\n/**\n * What iOS scales a text's `lineHeight` by: the system text size, capped by the text's own\n * `maxFontSizeMultiplier` where it is at least 1, and 1 without font scaling\n * (`RCTEffectiveFontSizeMultiplierFromTextAttributes`).\n */\nfunction textScale(props: Record<string, unknown>, fontScale = 1): number {\n if (props['allowFontScaling'] === false) return 1;\n const cap = props['maxFontSizeMultiplier'];\n return typeof cap === 'number' && cap >= 1 ? Math.min(fontScale, cap) : fontScale;\n}\n\n/** A field's padding and border on its top or bottom edge, as they are written. */\nconst blockEdge = (\n props: Record<string, unknown>,\n side: 'Top' | 'Bottom',\n logical: 'Start' | 'End',\n): unknown[] => [\n props[`padding${side}`] ??\n props[`paddingBlock${logical}`] ??\n props['paddingBlock'] ??\n props['paddingVertical'] ??\n props['padding'] ??\n 0,\n props[`border${side}Width`] ?? props['borderWidth'] ?? 0,\n];\n\n/**\n * A multiline field's `rows` as its height, where it was given none: that many lines of its\n * line height at the system text size, inside its padding and border, as a browser sizes a `<textarea>`. A native field\n * is as tall as its text, which is one line before anything is typed. Taken off the props once\n * read: neither platform's native field has a prop of that name.\n */\nfunction rowsTall(\n viewName: string,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n): void {\n if (!TEXT_INPUTS.has(viewName)) return;\n const rows = Number(props['rows']);\n delete props['rows'];\n const line = props['lineHeight'];\n if (props['multiline'] !== true || !(rows > 0) || typeof line !== 'number') return;\n if (isSet(props['height']) && props['height'] !== 'auto') return;\n // A content box's height is its lines alone: Yoga adds the padding and border itself.\n const edges =\n props['boxSizing'] === 'content-box'\n ? []\n : [...blockEdge(props, 'Top', 'Start'), ...blockEdge(props, 'Bottom', 'End')];\n if (!edges.every((part) => typeof part === 'number')) return;\n // At the system text size, which the field's lines are drawn at.\n const lines = rows * line * textScale(props, fontScale);\n props['height'] = edges.reduce<number>((sum, part) => sum + (part as number), lines);\n}\n\n/** A field's padding and border on its left or right edge, as they are written. */\nconst inlineEdge = (\n props: Record<string, unknown>,\n side: 'Left' | 'Right',\n logical: 'Start' | 'End',\n): unknown[] => [\n props[`padding${side}`] ??\n props[`padding${logical}`] ??\n props[`paddingInline${logical}`] ??\n props['paddingInline'] ??\n props['paddingHorizontal'] ??\n props['padding'] ??\n 0,\n props[`border${side}Width`] ?? props[`border${logical}Width`] ?? props['borderWidth'] ?? 0,\n];\n\n/** The size a browser draws a field's text at where no stylesheet gives it one. */\nconst FIELD_FONT_SIZE = 13.3333;\n/**\n * How wide a browser counts a character of a field as, against the font's size: what Chrome\n * makes of `size=\"20\"`, 175 points of a 16 point font and 146 of a browser's own.\n */\nconst CHARACTER = 0.546;\n/** And a column of a text area, which is counted wider: 183 points for twenty at 16. */\nconst COLUMN = 0.572;\n\n/**\n * A field's `size` as its width, where it was given none: that many characters of its font,\n * inside its padding and border, as a browser sizes an `<input>`. A native field has no width\n * of its own.\n */\nfunction columnsWide(props: Record<string, unknown>, size: unknown): void {\n const columns = Number(size);\n if (!(columns > 0) || (isSet(props['width']) && props['width'] !== 'auto')) return;\n const font = typeof props['fontSize'] === 'number' ? props['fontSize'] : FIELD_FONT_SIZE;\n // A content box's width is its characters alone: Yoga adds the padding and border itself.\n const edges =\n props['boxSizing'] === 'content-box'\n ? []\n : [...inlineEdge(props, 'Left', 'Start'), ...inlineEdge(props, 'Right', 'End')];\n if (!edges.every((part) => typeof part === 'number')) return;\n const characters = columns * (props['multiline'] === true ? COLUMN : CHARACTER) * font;\n props['width'] = edges.reduce<number>((sum, part) => sum + (part as number), characters);\n}\n\n/**\n * A text field's `size` as its width, and off what is sent: it is the field's own, and no prop\n * of the native one. Another view's `size` is that view's, and is left.\n */\nfunction sizedField(viewName: string, props: Record<string, unknown>): void {\n if (!TEXT_INPUTS.has(viewName)) return;\n columnsWide(props, props[FIELD_SIZE]);\n delete props[FIELD_SIZE];\n}\n\n/** What a text field alone is styled with, asked of none of the views that are not one. */\nfunction fieldStyled(\n viewName: string,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n): void {\n alignMultiline(viewName, props);\n rowsTall(viewName, props, fontScale);\n sizedField(viewName, props);\n}\n\n/** A field's own minimum height: none where it says `auto`, which a web element starts with. */\nconst ownMinimum = (minHeight: unknown): unknown => (minHeight === 'auto' ? 0 : (minHeight ?? 0));\n\n/**\n * How tall a field is by its line: the line, padding and border of a border-box field, Yoga's\n * default, and its content alone for a content-box one, which Yoga adds the padding and border\n * to itself. In a row aligned by baseline some of the line is kept as padding: `lineBaseline`.\n */\nfunction lineBox(\n props: Record<string, unknown>,\n box: readonly number[],\n onBaseline: boolean,\n fontScale: number | undefined,\n): number {\n const half = onBaseline ? lineBaseline(props, box[0]!, box, fontScale) : 0;\n if (props['boxSizing'] === 'content-box') return box[0]! - 2 * half;\n return box.reduce((sum, part) => sum + part, 0);\n}\n\n/**\n * `lineBaseline` for a field a height sizes: the room is what the height leaves its text, and\n * the field stays that height. A content-box field's height is its content's, so what is now\n * padding comes out of it.\n */\nfunction heightBaseline(\n props: Record<string, unknown>,\n height: number,\n onBaseline: boolean,\n fontScale: number | undefined,\n): void {\n if (!onBaseline) return;\n const edges = [...blockEdge(props, 'Top', 'Start'), ...blockEdge(props, 'Bottom', 'End')];\n if (!edges.every((part) => typeof part === 'number')) return;\n const content = props['boxSizing'] === 'content-box';\n const room = content ? height : (edges as number[]).reduce((left, part) => left - part, height);\n const half = lineBaseline(props, room, [room, ...(edges as number[])], fontScale);\n if (content) props['height'] = height - 2 * half;\n}\n\n/**\n * Give a field with its line height left out the baseline of a paragraph in a line as tall, for\n * a field in a row aligned by baseline: half the room the line has over the font is kept as\n * padding over and under the text. React Native says a field's baseline from its text and its\n * top padding, so without this it is the font's own, and the row lifts the paragraphs beside the\n * field to it: a form field's prefix and suffix sit higher than what is typed. Answers the half.\n *\n * ponytail: the font is taken to be as tall as the system's, `FONT_ASCENT` and `FONT_DESCENT` of\n * its size. Read from the font if a field in another face is seen a point off its prefix.\n */\nfunction lineBaseline(\n props: Record<string, unknown>,\n line: number,\n [, top, , bottom]: readonly number[],\n fontScale: number | undefined,\n): number {\n const size = props['fontSize'];\n if (typeof size !== 'number') return 0;\n const font = size * textScale(props, fontScale) * (FONT_ASCENT + FONT_DESCENT);\n const half = Math.max(0, (line - font) / 2);\n props['paddingTop'] = top! + half;\n props['paddingBottom'] = bottom! + half;\n return half;\n}\n\n/**\n * Centre the text of a single-line text field that has a line height, as Chrome centres an\n * input's, keeping the height the line height gives it.\n *\n * Where a `height` in points sizes the field, the line height has nothing left to do, and is left\n * out on both platforms: on Android, `EditText` centres a line box taller than the font's own\n * about 1.7pt high of centre in a 44pt field, and centres the font's own exactly. A percentage\n * height sizes the field only where its parent's height is definite, which is known at layout\n * alone, so on Android such a field is left as it was. Elsewhere Android sizes the field by the\n * line height and centres the text in it itself, and keeps it.\n *\n * On iOS, React Native's field sets `lineHeight` as the paragraph's minimum and maximum line\n * height and, unlike a paragraph (`RCTApplyBaselineOffset`), never offsets the baseline, so the\n * glyphs sit at the bottom of a line box taller than the font. One line has nothing to space, so\n * the line height is left out. What it does in Chrome, and on Android, is set the field's height:\n * line height, padding and border. That is kept as a `minHeight`, the larger of it and the field's\n * own, within its `maxHeight`: the whole sum for a border-box field, Yoga's default, and the line\n * height alone for a content-box one. A null `height` is no height. A value that is not a number\n * cannot be added up, and leaves the field as it was.\n */\nfunction centreSingleLine(\n viewName: string,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n onBaseline = false,\n): void {\n const lineHeight = props['lineHeight'];\n if (!TEXT_INPUTS.has(viewName) || typeof lineHeight !== 'number') return;\n if (props['multiline'] === true) return;\n const height = props['height'];\n if (typeof height === 'number') {\n delete props['lineHeight'];\n heightBaseline(props, height, onBaseline, fontScale);\n return;\n }\n // Android sizes the field by its line height, and centres the text in it, itself. A\n // percentage is a fixed height only where the parent's is definite, known at layout alone:\n // there too the line height is left out on iOS, and kept as the least the field is tall.\n if (viewName !== 'TextInput') return;\n const edge = (side: 'Top' | 'Bottom', logical: 'Start' | 'End') =>\n blockEdge(props, side, logical);\n const line = lineHeight * textScale(props, fontScale);\n const box = [line, ...edge('Top', 'Start'), ...edge('Bottom', 'End')];\n const own = ownMinimum(props['minHeight']);\n const max = props['maxHeight'] ?? Infinity;\n if (![...box, own, max].every((part) => typeof part === 'number')) return;\n delete props['lineHeight'];\n const content = lineBox(props, box as number[], onBaseline, fontScale);\n props['minHeight'] = Math.max(own as number, Math.min(content, max as number));\n}\n\nconst NO_STYLE: Readonly<Record<string, unknown>> = {};\n\n/**\n * An element's inline style, less each property a rule it matches declared `!important`: an\n * inline style is the last of the plain declarations, under every important one.\n *\n * ponytail: by the name a property is committed under, so an inline `padding` is not taken out\n * by an important `padding-top`. Expand the inline shorthand here if one is ever written so.\n */\nfunction inlineOf(node: EngineNode): Readonly<Record<string, unknown>> {\n if (!node.props['style']) return NO_STYLE;\n const inline = flattenStyle(node.props['style'], {});\n for (const key of node.styleCache?.important ?? []) delete inline[key];\n return inline;\n}\n\n/**\n * What a node's `@keyframes` animation sets this frame, less each property a rule it matches\n * declared `!important`: an important author declaration is above the animation in the cascade.\n * A transition is above both, so `transitioned` takes no such care.\n */\nfunction playedOver(node: EngineNode): Readonly<Record<string, unknown>> {\n const values = node.playing?.values;\n const important = node.styleCache?.important;\n if (!values || !important) return values ?? NO_STYLE;\n const played = { ...values };\n for (const key of important) delete played[key];\n return played;\n}\n\n/**\n * The properties among an animation's tracks that a rule `node` matches declared `!important`,\n * which native is not handed: what native plays it sets on the view, over what the rule says.\n */\nfunction pinnedIn(node: EngineNode, tracks: ReadonlyMap<string, unknown>): string[] {\n const important = node.styleCache?.important;\n return important ? [...tracks.keys()].filter((key) => important.has(key)) : [];\n}\n\n/** Whether native is playing an animation whose important properties are no longer the ones left out. */\nfunction pinsChanged(node: EngineNode, running: RunningAnimation): boolean {\n if (!running.native) return false;\n return pinnedIn(node, running.tracks).join(' ') !== running.pinned?.join(' ');\n}\n\n/** `tracks` less the properties named. */\nfunction unpinned<T>(\n tracks: ReadonlyMap<string, T>,\n pinned: readonly string[],\n): ReadonlyMap<string, T> {\n if (!pinned.length) return tracks;\n const kept = new Map(tracks);\n for (const key of pinned) kept.delete(key);\n return kept;\n}\n\n/**\n * What a container's own style says for `key`, in the order `mergeProps` applies them: a\n * component's override, inline, a prop, its stylesheet, its default.\n */\nfunction ownLayout(node: EngineNode, key: string): unknown {\n // With no rule marked `!important` on the node, its inline style stands whole, and `readStyle`\n // answers the same without flattening a style into a new object: this is asked of every child\n // a commit reconciles.\n if (node.styleCache?.important === undefined) return readStyle(node, key);\n return (\n flattenStyle(node.props[STYLE_OVERRIDE], {})[key] ??\n inlineOf(node)[key] ??\n node.props[key] ??\n node.styleCache?.style[key] ??\n node.defaultStyle?.[key]\n );\n}\n\n/**\n * A container's main axis and how it aligns across it, as `row` or `column` and a keyword. A\n * `display: contents` node is no container: its children are laid out in the one above it. With\n * no direction of its own, the axis is its view's default, as Android's horizontal scroll view\n * commits a row.\n */\nfunction containerOf(node: EngineNode): string {\n if (ownLayout(node, 'display') === 'contents') return 'contents';\n const direction = String(\n ownLayout(node, 'flexDirection') ??\n DEFAULT_PROPS[viewNameOf(node)]?.['flexDirection'] ??\n 'column',\n );\n return `${direction.startsWith('row') ? 'row' : 'column'} ${ownLayout(node, 'alignItems') ?? 'stretch'}`;\n}\n\n/**\n * The node a box is laid out in: its parent, or the one above every `display: contents` ancestor.\n * Each of those is told a `fit-content` child passed through, so that when it stops being\n * `contents`, and is the container, the child is worked out again.\n */\nfunction layoutParent(node: EngineNode): EngineNode | null {\n let parent = node.parent;\n while (parent && containerOf(parent) === 'contents') {\n parent.fitContainer = 'contents';\n parent = parent.parent;\n }\n return parent;\n}\n\nconst STRETCHES = new Set([undefined, null, 'auto', 'stretch']);\n\n/**\n * `width: fit-content` and `height: fit-content`, which Yoga has no size for.\n *\n * Along its container's main axis a box is as big as its content already, so the size is\n * dropped. Across it a box stretches, where a browser keeps it at its content's size and at the\n * start: `align-self: flex-start` does both. An alignment the container or the box asked for is\n * kept, since it stops the stretch already.\n */\nfunction fitContent(node: EngineNode, props: Record<string, unknown>): void {\n const capped = {\n row: capAtContent(props, 'width', 'maxWidth'),\n column: capAtContent(props, 'height', 'maxHeight'),\n };\n const width = props['width'] === 'fit-content';\n const height = props['height'] === 'fit-content';\n if (!width && !height) return;\n if (width) delete props['width'];\n if (height) delete props['height'];\n const parent = layoutParent(node);\n if (!parent) return;\n const container = containerOf(parent);\n parent.fitContainer = container;\n const [direction, align] = container.split(' ');\n if (capped[direction === 'row' ? 'row' : 'column']) withoutGrowth(props);\n const across = direction === 'row' ? height : width;\n if (across && align === 'stretch' && STRETCHES.has(props['alignSelf'] as string)) {\n props['alignSelf'] = 'flex-start';\n }\n}\n\n/**\n * A box capped at its content along its container's main axis, where it would grow: a browser\n * clamps a growing item by its maximum, and there is no such cap to hand Yoga. So it does not\n * grow, and starts from its content, which is as far as the cap would let it get. It may still\n * shrink.\n */\nfunction withoutGrowth(props: Record<string, unknown>): void {\n if (typeof props['flex'] === 'number' && props['flex'] > 0) {\n delete props['flex'];\n props['flexShrink'] ??= 1;\n }\n delete props['flexGrow'];\n delete props['flexBasis'];\n}\n\n/**\n * `max-width: max-content`, and the same of a height: no bigger than its content, which for a\n * box that would fill its container is `fit-content`. Yoga has no such cap. Answers whether the\n * box is the size of its content for it: one that would fill, or one that was `fit-content` as\n * written.\n *\n * ponytail: a size in points is left as it is, since nothing here knows how big the content\n * is. Measure it if a box is ever given both.\n */\nfunction capAtContent(props: Record<string, unknown>, size: string, cap: string): boolean {\n if (props[cap] !== 'max-content') return false;\n delete props[cap];\n const own = props[size];\n const fills = own == null || own === 'auto' || (typeof own === 'string' && own.endsWith('%'));\n if (fills) props[size] = 'fit-content';\n return fills || own === 'fit-content';\n}\n\nconst isPercent = (value: unknown): boolean => typeof value === 'string' && value.endsWith('%');\n/** A percentage, or a `calc()` of one and a length: a share of the box it is of either way. */\nconst isShareOrSum = (value: unknown): boolean =>\n isPercent(value) || mixedParts(value) !== undefined;\n\n/** Whether a `flex-basis` is a length or a percentage of something: not zero, and not `auto`. */\nconst isSizedBasis = (basis: unknown): boolean =>\n isPercent(basis)\n ? Number.parseFloat(basis as string) !== 0\n : typeof basis === 'number' && basis !== 0;\n\n/**\n * A `flex-basis` that is a length or a percentage, as the size it is along its container's main\n * axis: a width in a row and a height in a column, over one written for that axis.\n *\n * Yoga works a `flexBasis` out once for a view and keeps the answer, and React Native never has\n * it forgotten when the view's props change (`computedFlexBasis`, cleared only by\n * `markDirtyAndPropagate`). A basis that changes after the first layout is not read again, and\n * a percentage does not follow the box it is a share of. A size is worked out on every pass, and\n * with no basis Yoga takes the size along the main axis as the basis: the same sum.\n *\n * A basis of zero is left as it is, which is every `flex: 1`: under a container with no size on\n * its main axis Yoga passes over a basis and sizes the box by its content, where a size of zero\n * would be zero. A box out of the flow is no flex item, and keeps its own size.\n */\nfunction basisAsSize(node: EngineNode, props: Record<string, unknown>): void {\n const basis = props['flexBasis'];\n if (!isSizedBasis(basis) || props['position'] === 'absolute') return;\n // A grid places its items, and reads no basis: see `gridItem`.\n if (gridOver(node)) return;\n const parent = layoutParent(node);\n if (!parent) return;\n const container = containerOf(parent);\n // Remembered on the container, so the box is merged again when the direction changes.\n parent.fitContainer = container;\n delete props['flexBasis'];\n if (container.startsWith('row')) props['width'] = basis;\n else {\n props['height'] = basis;\n percentHeight(node, props);\n }\n}\n\n/**\n * Whether a box has a height a percentage can be taken of, as CSS defines one: a height of its\n * own, or one the layout around it gives it. A box as tall as what it holds has none.\n *\n * Asked of each box on the way up, and remembered on it, so a change to any of them works out\n * again the boxes beneath it. Where the answer is not known for certain it is yes, which leaves\n * the percentage to Yoga as before: a view native sizes itself, or one placed out of the flow.\n */\nfunction definiteHeight(node: EngineNode): boolean {\n return (node.heightBasis = hasDefiniteHeight(node));\n}\n\nfunction hasDefiniteHeight(node: EngineNode): boolean {\n // The root is the screen, and only a plain view is sized by its content alone.\n if (!node.parent || node.nodeKind !== 'element' || viewNameOf(node) !== 'View') return true;\n const parent = layoutParent(node);\n if (!parent) return true;\n const height = ownLayout(node, 'height');\n if (isPercent(height)) return definiteHeight(parent);\n return sizesItself(node, height) || node.heldAt !== undefined || heightFromLayout(node, parent);\n}\n\n/**\n * Whether a box with no height of its own has one once flex layout has sized it (CSS Flexbox\n * 9.8): an item of a column whose height is definite, or one a row with a definite height\n * stretches. A box in a block's flow or a grid, or out of the flow, has none.\n */\nfunction sizedByFlex(node: EngineNode): boolean {\n if (node.nodeKind !== 'element' || viewNameOf(node) !== 'View') return false;\n const position = ownLayout(node, 'position');\n if (position === 'absolute' || position === 'fixed') return false;\n const parent = layoutParent(node);\n if (!parent || parent.flow !== undefined || parent.grid !== undefined) return false;\n const [direction, align] = containerOf(parent).split(' ');\n const self = ownLayout(node, 'alignSelf') as string | undefined;\n if (direction === 'row' && !(STRETCHES.has(self) && align === 'stretch')) return false;\n return definiteHeight(parent) || sizedByFlex(parent);\n}\n\n/**\n * Whether a box holds one in the flow whose height is a percentage of it: a height, a least\n * height, or a basis down a column.\n */\nfunction holdsShares(node: EngineNode): boolean {\n const column = !isRow(node);\n return node.childList.some(\n (child) =>\n child.nodeKind === 'element' &&\n ownLayout(child, 'position') !== 'absolute' &&\n (isShareOrSum(ownLayout(child, 'height')) ||\n isShareOrSum(ownLayout(child, 'minHeight')) ||\n (column && isShareOrSum(ownLayout(child, 'flexBasis')))),\n );\n}\n\nconst NO_HEIGHT = new Set([undefined, null, 'auto', 'fit-content']);\n\n/** Whether a box has a height from its own style: written, or placed, or kept in proportion. */\nfunction sizesItself(node: EngineNode, height: unknown): boolean {\n if (!NO_HEIGHT.has(height as string)) return true;\n return ownLayout(node, 'position') === 'absolute' || ownLayout(node, 'aspectRatio') != null;\n}\n\n/**\n * Whether the container a box is in gives it a height: a row's, or a share of a column's, or a\n * grid's area that stretches it, which a browser takes a percentage of once the rows are sized.\n */\nfunction heightFromLayout(node: EngineNode, parent: EngineNode): boolean {\n if (parent.grid !== undefined) {\n const margins = ['marginTop', 'marginBottom', 'marginVertical', 'margin'];\n return stretched(node, parent) && margins.every((key) => ownLayout(node, key) !== 'auto');\n }\n const [direction, align] = containerOf(parent).split(' ');\n if (direction === 'row') {\n // Stretched across a row, it is as tall as the row, where the row has a height to be. One\n // as tall as its content gives none: Yoga takes the percentage of the space on offer there\n // too, the screen's, where a browser takes it of the row once its content has sized it.\n const self = ownLayout(node, 'alignSelf') as string | undefined;\n return STRETCHES.has(self) && align === 'stretch' && definiteHeight(parent);\n }\n // In a column it has the height it grows to, where the column has one to share out.\n const grows = Number(ownLayout(node, 'flexGrow') ?? ownLayout(node, 'flex') ?? 0) > 0;\n return grows && definiteHeight(parent);\n}\n\nconst NO_INSETS = { Top: 0, Right: 0, Bottom: 0, Left: 0 };\nconst MARGIN_KEYS = [\n ...['margin', 'marginHorizontal', 'marginVertical'],\n ...['marginLeft', 'marginRight', 'marginTop', 'marginBottom'],\n];\n\n/** The two axes an out-of-flow box is resolved on, as the props and the box indexes of each. */\nconst ABSOLUTE_AXES = [\n { start: 'Left', end: 'Right', across: 'Horizontal', at: 0, size: 2 },\n { start: 'Top', end: 'Bottom', across: 'Vertical', at: 1, size: 3 },\n] as const;\n\n/**\n * What a removed prop travels as: null, which native resets the prop on, except `pointerEvents`,\n * which react-native-svg's Android root reads as a string and stops the app on a null. `auto` is\n * what no value means.\n */\nconst cleared = (key: string): unknown => (key === 'pointerEvents' ? 'auto' : null);\n\n/** A length of a box, or a percentage of `whole`, or nothing where it is `auto` or unset. */\nfunction resolveLength(value: unknown, whole: number): number | undefined {\n if (typeof value === 'number') return value;\n if (typeof value !== 'string' || !value.endsWith('%')) return undefined;\n return (Number.parseFloat(value) / 100) * whole;\n}\n\n/**\n * The `auto` margins of an out-of-flow box on one axis, as lengths (CSS 2.2, 10.3.7 and 10.6.4):\n * between two insets they take the room left over, shared when both are auto, and without both\n * insets they are nothing. `room` is the container's padding box on the axis and `size` the\n * box's own.\n */\nconst INSETS: ReadonlySet<string> = new Set(['top', 'right', 'bottom', 'left']);\n\n/**\n * What a percentage is a share of a width for, and of a height: a size, its limits, an inset. A\n * margin is a share of the width on either axis (CSS 2.2, 8.3), where Yoga takes a margin down\n * an out-of-flow box of the height.\n */\nconst SHARED_SIZES = [\n ...(['width', 'minWidth', 'maxWidth', 'left', 'right'] as const).map((key) => [key, 2] as const),\n ...(['margin', 'marginVertical', 'marginTop', 'marginBottom'] as const).map(\n (key) => [key, 2] as const,\n ),\n ...(['height', 'minHeight', 'maxHeight', 'top', 'bottom'] as const).map(\n (key) => [key, 3] as const,\n ),\n];\n\n/** A box's layout styles with the sizes and insets set on the element itself over them. */\nfunction withOwnSizes(node: EngineNode, style: Record<string, unknown>): Record<string, unknown> {\n const own: Record<string, unknown> = {};\n for (const [key] of SHARED_SIZES) if (node.props[key] != null) own[key] = node.props[key];\n return { ...style, ...own };\n}\n\n/**\n * Stretch the lines of a wrapping flex container that says nothing of `align-content`, as CSS\n * starts them (`normal`, which is `stretch` in a flex container). Yoga starts them at\n * `flex-start`, as tall as what is in them, where an item that stretches across its line has\n * no size. A container that does not wrap has one line, which Yoga stretches already.\n */\nfunction wrappedLinesStretch(props: Record<string, unknown>): void {\n const wraps = props['flexWrap'] === 'wrap' || props['flexWrap'] === 'wrap-reverse';\n if (wraps && props['alignContent'] == null) props['alignContent'] = 'stretch';\n}\n\n/**\n * A flex item that stretches across its line, with its size across the line `auto`, as CSS has\n * it: as wide as a column, or as tall as a row, where Yoga takes the ratio over the stretch. In a\n * column, a height given leaves the ratio nothing to work out. In a row, the line is as tall as\n * the ratio makes the item from its width, at least, which is then the item's least height.\n *\n * ponytail: a width in points that does not grow, in a row, with any least or most height in\n * points. One that grows, or is a share, keeps the ratio, as Yoga has it. A plain view only: an image keeps its picture's proportions.\n */\nfunction stretchedOverRatio(node: EngineNode, props: Record<string, unknown>): void {\n if (!isSet(props['aspectRatio']) || OUT_OF_FLOW.has(props['position'] as string)) return;\n if (viewNameOf(node) !== DEFAULT_VIEW) return;\n const parent = layoutParent(node);\n if (!parent || parent.flow !== undefined || parent.grid !== undefined) return;\n const container = containerOf(parent);\n // Remembered on the container, so the item is merged again when its direction changes.\n parent.fitContainer = container;\n const [direction, align] = container.split(' ');\n if (align !== 'stretch' || !stretchesAcross(props, direction === 'row')) return;\n if (direction === 'row') ratioAsLeast(props);\n else if (isSet(props['height']) && props['height'] !== 'auto') delete props['aspectRatio'];\n}\n\n/** Whether an item stretches across its line: its own size and margins across it are `auto`. */\nfunction stretchesAcross(props: Record<string, unknown>, row: boolean): boolean {\n if (!STRETCHES.has(props['alignSelf'] as string)) return false;\n const size = row ? 'height' : 'width';\n if (isSet(props[size]) && props[size] !== 'auto') return false;\n const sides = row\n ? MARGINS_ACROSS_ROW\n : props['direction'] === 'rtl'\n ? MARGINS_ACROSS_COLUMN_RTL\n : MARGINS_ACROSS_COLUMN;\n return sides.every((keys) => keys.map((key) => props[key]).find(isSet) !== 'auto');\n}\n\n/** The margins across a line, a side each, as Yoga reads them: the first set wins. */\nconst MARGINS_ACROSS_ROW = [\n ['marginTop', 'marginVertical', 'margin'],\n ['marginBottom', 'marginVertical', 'margin'],\n];\nconst MARGINS_ACROSS_COLUMN = [\n ['marginStart', 'marginLeft', 'marginHorizontal', 'margin'],\n ['marginEnd', 'marginRight', 'marginHorizontal', 'margin'],\n];\n/** Right to left, where the start is the right side. */\nconst MARGINS_ACROSS_COLUMN_RTL = [\n ['marginEnd', 'marginLeft', 'marginHorizontal', 'margin'],\n ['marginStart', 'marginRight', 'marginHorizontal', 'margin'],\n];\n\n/** In a row, the height a ratio gives a width in points, as the item's least height. */\nfunction ratioAsLeast(props: Record<string, unknown>): void {\n const [width, ratio] = [props['width'], props['aspectRatio']];\n if (typeof width !== 'number' || typeof ratio !== 'number' || ratio <= 0) return;\n const [least, most] = [props['minHeight'], props['maxHeight']];\n const inPoints = (bound: unknown) => !isSet(bound) || typeof bound === 'number';\n if (props['boxSizing'] === 'content-box' || !inPoints(least) || !inPoints(most)) return;\n if (sizedAlong(props)) return;\n props['minHeight'] = heldTo(width / ratio, least, most);\n delete props['aspectRatio'];\n}\n\n/** Whether an item's width is not what it is along its line: it has a basis, or it grows. */\nfunction sizedAlong(props: Record<string, unknown>): boolean {\n const basis = props['flexBasis'];\n return (isSet(basis) && basis !== 'auto') || Number(props['flexGrow'] ?? props['flex'] ?? 0) > 0;\n}\n\n/** A height held to the least and most given, which CSS keeps: the least wins over the most. */\nfunction heldTo(height: number, least: unknown, most: unknown): number {\n const under = typeof most === 'number' ? Math.min(height, most) : height;\n return typeof least === 'number' ? Math.max(under, least) : under;\n}\n\n/**\n * Leave `aspect-ratio` out for a box with both a width and a height. CSS takes the ratio only\n * for a size that is `auto`; Yoga takes it over one of two that are given, the height in a\n * column and the width in a row.\n */\nfunction ratioForAutoSize(props: Record<string, unknown>): void {\n if (!isSet(props['aspectRatio'])) return;\n const given = (size: unknown) => isSet(size) && size !== 'auto';\n if (given(props['width']) && given(props['height'])) delete props['aspectRatio'];\n}\n\nconst OUTLINE_KEYS = ['outlineWidth', 'outlineStyle', 'outlineColor', 'outlineOffset'];\n\n/** Whether a side of a border has a width and nothing that gives it a colour. */\nfunction colourless(\n props: Record<string, unknown>,\n side: (typeof BORDER_SIDES)[number],\n flipped: boolean,\n): boolean {\n const width = props[side.width] ?? props['borderWidth'];\n if (typeof width !== 'number' || width <= 0) return false;\n const given = [side.color, flipped ? side.flipped : side.logical, 'borderColor'];\n return given.every((key) => props[key] == null);\n}\n\n/**\n * Each side a border has: its width, its colour, and the logical colour React Native takes for\n * it too, read left to right and, `flipped`, right to left.\n */\nconst BORDER_DRAWN = /^border\\w*(Width|Style)$/;\nconst BORDER_COLOUR = /^border\\w*Color$/;\n\n/**\n * Send a border's colours again with an update that gives it a width or a style: Android draws\n * the border black when that update does not carry its colour, though it was given one before.\n * A box made without a border and given one later, a file attachment that is done, has one.\n */\nfunction borderColoursAgain(payload: Record<string, unknown>, props: Record<string, unknown>) {\n if (!Object.keys(payload).some((key) => BORDER_DRAWN.test(key))) return;\n for (const key in props)\n if (BORDER_COLOUR.test(key) && !(key in payload)) payload[key] = props[key];\n}\n\nconst BORDER_SIDES = [\n ['Top', 'BlockStart', 'BlockStart'],\n ['Right', 'End', 'Start'],\n ['Bottom', 'BlockEnd', 'BlockEnd'],\n ['Left', 'Start', 'End'],\n].map(([side, logical, flipped]) => ({\n width: `border${side}Width`,\n color: `border${side}Color`,\n logical: `border${logical}Color`,\n flipped: `border${flipped}Color`,\n}));\n\n/**\n * Send nothing for an outline of no width, which is what `outline: none` is: it draws nothing,\n * and a view with no outline is the same view. Sent, it is an update that is not one, and on\n * Android a text field given an outline prop after it is first drawn has its background set\n * again, with which the padding Android gives a text field comes back over the padding it was\n * laid out with: a field as tall as its line clips its text away. A stylesheet takes a\n * browser's focus ring off a field with `outline: none` for the focused field alone.\n */\nfunction noOutline(props: Record<string, unknown>): void {\n if (props['outlineWidth'] !== 0) return;\n for (const key of OUTLINE_KEYS) delete props[key];\n}\n\n/**\n * A percentage size or inset of an out-of-flow box, as the length it is: a share of the\n * padding box of the box it is placed against (CSS 2.2, 10.2 and 10.5). Yoga takes it of what\n * is inside its parent's padding, which is a different box under a parent with padding and\n * another one altogether under a parent that is not positioned.\n *\n * ponytail: only for a box the engine places itself, in a block or under a parent that is not\n * positioned. One in a flex container with padding keeps Yoga's share; note it in `reabsolute`\n * if a stylesheet depends on the difference.\n */\nfunction shareOfBlock(\n style: Record<string, unknown>,\n against: readonly number[],\n insets: boolean,\n): Record<string, number> {\n const out: Record<string, number> = {};\n for (const [key, at] of SHARED_SIZES) {\n if (!insets && INSETS.has(key)) continue;\n const share = style[key];\n if (isPercent(share)) out[key] = (against[at]! * Number.parseFloat(String(share))) / 100;\n }\n return out;\n}\n\nfunction autoMargins(\n style: Record<string, unknown>,\n axis: (typeof ABSOLUTE_AXES)[number],\n room: number,\n size: number,\n width: number,\n): Record<string, number | null> | null {\n const margin = (side: string) =>\n firstOf(style, [`margin${side}`, `margin${axis.across}`, 'margin']);\n // A share of a margin is of the width on either axis (CSS 2.2, 8.3), an inset's of the room.\n const points = (value: unknown) => resolveLength(value, width) ?? 0;\n const [before, after] = [margin(axis.start), margin(axis.end)];\n if (before !== 'auto' && after !== 'auto') return null;\n const start = resolveLength(style[axis.start.toLowerCase()], room);\n const end = resolveLength(style[axis.end.toLowerCase()], room);\n // Without both insets an auto margin is nothing, and a length written beside it stays.\n const written = { [`margin${axis.start}`]: points(before), [`margin${axis.end}`]: points(after) };\n if (start === undefined || end === undefined) return written;\n const left = room - start - end - points(before) - points(after);\n // An auto size between two insets is what they leave, clamped (CSS 2.2, 10.3.7 and 10.6.4):\n // unclamped, it stretches between both with no room for the margins to share.\n const own = clampedBetween(style, axis, left, room, width);\n if (own?.border === left) return written;\n const free = left - (own?.border ?? size);\n // Two auto margins centre the box, unless it overflows: then the start edge holds.\n const lead = before !== 'auto' ? points(before) : after === 'auto' ? Math.max(free / 2, 0) : free;\n return {\n ...written,\n [`margin${axis.start}`]: lead,\n // The start inset and the margin place it now, at its size, and both would stretch it.\n [axis.end.toLowerCase()]: null,\n ...(own ? { [AXIS_SIZES[axis.at]]: own.size } : null),\n };\n}\n\nconst AXIS_SIZES = ['width', 'height'] as const;\n\n/** Whether a box has a size on the axis: its own, or one an aspect ratio takes from the other. */\nfunction hasSize(style: Record<string, unknown>, axis: (typeof ABSOLUTE_AXES)[number]): boolean {\n const set = (key: string) => style[key] != null && style[key] !== 'auto';\n return set(AXIS_SIZES[axis.at]) || (set('aspectRatio') && set(AXIS_SIZES[1 - axis.at]!));\n}\n\n/**\n * The size of an out-of-flow box with an auto size on the axis, between two insets, and none\n * for one with a size there: `left`, the room they and its margins leave, clamped by its min and\n * max sizes (shares of `room`) and no smaller than its padding and border. `border` is its border\n * box, `size` the size Yoga is given, which is without its padding and border for a content-box\n * one.\n */\nfunction clampedBetween(\n style: Record<string, unknown>,\n axis: (typeof ABSOLUTE_AXES)[number],\n left: number,\n room: number,\n width: number,\n): { border: number; size: number } | undefined {\n if (hasSize(style, axis)) return undefined;\n const key = AXIS_SIZES[axis.at];\n const caps = `${key[0]!.toUpperCase()}${key.slice(1)}`;\n const edges = insets(style, width);\n const frame = edges[axis.start] + edges[axis.end];\n const extra = style['boxSizing'] === 'content-box' ? frame : 0;\n const most = resolveLength(style[`max${caps}`], room);\n const least = resolveLength(style[`min${caps}`], room);\n let border = left;\n if (most !== undefined) border = Math.min(border, most + extra);\n if (least !== undefined) border = Math.max(border, least + extra);\n border = Math.max(border, frame);\n return { border, size: border - extra };\n}\n\n/**\n * A fixed box's insets and percentage sizes, which are of its page, as lengths against the box\n * Yoga positions it by: each inset moved by how far the two boxes' edges are apart. `by` and\n * `page` are those boxes inside their borders, in the window.\n */\nfunction againstPage(\n style: Record<string, unknown>,\n by: readonly number[],\n page: readonly number[],\n): Record<string, number> {\n const out: Record<string, number> = {};\n for (const axis of ABSOLUTE_AXES) {\n const [start, end, size] = [axis.start.toLowerCase(), axis.end.toLowerCase(), axis.size];\n const room = page[size]!;\n const [near, far] = [resolveLength(style[start], room), resolveLength(style[end], room)];\n if (near !== undefined) out[start] = near + page[axis.at]! - by[axis.at]!;\n if (far !== undefined) out[end] = far + by[axis.at]! + by[size]! - page[axis.at]! - room;\n const key = axis.at === 0 ? 'width' : 'height';\n if (typeof style[key] === 'string') {\n const length = resolveLength(style[key], room);\n if (length !== undefined) out[key] = length;\n }\n }\n return out;\n}\n\n/** Keep what was read of a grid item at a width. */\nfunction noteAt(\n all: Map<EngineNode, Map<number, number>>,\n member: EngineNode,\n width: number,\n value: number,\n): void {\n const read = all.get(member) ?? new Map<number, number>();\n read.set(width, value);\n all.set(member, read);\n}\n\nconst sameBase = (\n a: readonly [number, number | undefined],\n b: readonly [number, number | undefined] | undefined,\n): boolean => a[0] === b?.[0] && a[1] === b?.[1];\n\n/** The props an animation can move without moving any box: what a frame of it only paints. */\nconst PAINT_ONLY_KEYS = new Set([\n ...['transform', 'opacity', 'color', 'backgroundColor', 'tintColor', 'filter', 'boxShadow'],\n // A rotate, a translate or a scale of its own, folded into the transform it paints.\n ...['__translate', '__rotate', '__scale'],\n ...['borderColor', 'borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n ...['shadowColor', 'shadowOpacity', 'shadowRadius', 'shadowOffset', 'outlineColor'],\n ...['textDecorationColor', 'textShadowColor'],\n]);\n\nconst LINE_KEYS = ['gridColumnStart', 'gridColumnEnd', 'gridRowStart', 'gridRowEnd'];\n/**\n * Whether the props a node is cloned with change nothing about where any box is: none, or only\n * how it is painted and what a screen reader is told of it.\n */\nfunction paintsOnly(payload: Record<string, unknown> | null): boolean {\n for (const key in payload) {\n if (!PAINT_ONLY_KEYS.has(key) && !key.startsWith('accessib') && !key.startsWith('aria-')) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Whether a box is laid out at a size of its own whatever it holds: out of the flow, with a\n * width and a height in points. See `Engine.heldIn`.\n */\nfunction holdsItsContent(node: EngineNode): boolean {\n const props = node.committed?.props;\n return (\n props?.['position'] === 'absolute' &&\n typeof props['width'] === 'number' &&\n typeof props['height'] === 'number'\n );\n}\n\n/** Whether a box's placement names a grid line on any side. */\nconst namesLines = (read: (key: string) => unknown): boolean =>\n LINE_KEYS.some((key) => read(key) != null && read(key) !== 'auto');\n\n/**\n * Where an out-of-flow box with no inset on an axis sits in the grid area it is placed against,\n * as Chrome places it: at the area's start, or moved within it by its `justify-self` across and\n * its `align-self` down, or the grid's items' where its own is `auto`. `by` is the box Yoga\n * positions it by, and `box` its own as last laid out.\n */\nfunction startOfArea(\n style: Record<string, unknown>,\n grid: Record<string, unknown>,\n boxes: { by: readonly number[]; area: readonly number[]; box: readonly number[] },\n): Record<string, number> {\n const { by, area, box } = boxes;\n const out: Record<string, number> = {};\n for (const axis of ABSOLUTE_AXES) {\n const [start, end] = [axis.start.toLowerCase(), axis.end.toLowerCase()];\n if (style[start] != null || style[end] != null) continue;\n const [self, items] =\n axis.at === 0 ? ['justifySelf', 'justifyItems'] : ['alignSelf', 'alignItems'];\n const own = isAuto(style[self]) || style[self] === 'normal' ? grid[items] : style[self];\n // Its margins are added to the inset where it is placed, and take from the room left over.\n const margins = marginOf(style, axis.start) + marginOf(style, axis.end);\n const free = area[axis.size]! - box[axis.size]! - margins;\n out[start] = area[axis.at]! - by[axis.at]! + free * alignedAt(own);\n }\n return out;\n}\n\n/** A box's margin on one side, in points: nothing where it is a share or `auto`. */\nfunction marginOf(style: Record<string, unknown>, side: (typeof SIDES)[number]): number {\n const value = firstOf(style, [`margin${side}`, `margin${AXIS[side]}`, 'margin']);\n return typeof value === 'number' ? value : 0;\n}\n\n/** How far into the room left over an alignment puts a box: none, half or all of it. */\nfunction alignedAt(align: unknown): number {\n const word = typeof align === 'string' ? align.replace(/^(safe|unsafe)\\s+/, '') : '';\n if (word === 'center') return 0.5;\n return ['end', 'flex-end', 'self-end'].includes(word) ? 1 : 0;\n}\n\nconst sameResolved = (\n a: Readonly<Record<string, number | null>> | undefined,\n b: Readonly<Record<string, number | null>> | undefined,\n): boolean => {\n const keys = Object.keys(a ?? {});\n return keys.length === Object.keys(b ?? {}).length && keys.every((key) => a![key] === b?.[key]);\n};\n\n/** A sticky box: the scroll offsets it moves between, and what moves it. */\ninterface StickyState {\n scroll: EngineNode;\n axis: ScrollAxis;\n /** The offset it starts moving at, and the one it stops at: the end of its parent. */\n start: number;\n stop: number;\n /** How far it is moved, as written on its transform. */\n shift: number;\n drive: ComposedDrive | null;\n /** Its own transform as a transition native plays has it, which the drive applies after it. */\n lent?: readonly FollowingTransform[];\n}\n\n/**\n * How long scrolling pauses before a natively moved box's shift is written to its transform, so\n * the shadow tree a touch is hit-tested against catches up. React Native's own sticky headers\n * wait as long.\n */\nconst STICKY_SETTLE_MS = 64;\n\n/**\n * A grid container between the commit that changed it and the commit that places its items.\n *\n * Yoga has no grid, so its items are taken out of the flow and placed by the engine, from sizes\n * read back from Fabric. `measuring` commits each item with no size, to be read at the size its\n * content wants; `sizing` commits the items whose height at a column's width is wanted, at that\n * width; `placed` commits each where the grid puts it.\n */\ninterface GridState {\n phase: 'measuring' | 'words' | 'sizing' | 'placed';\n /** Laid out since it or anything in it last changed. */\n settled: boolean;\n members: readonly EngineNode[];\n /** Each item's size with its content as wide as it wants. */\n content: Map<EngineNode, { width: number; height: number }>;\n /**\n * Each item's width with its content as narrow as it goes, read where the layout asked: its\n * text is committed one word to a line, `words`, and the widest of them is that width.\n */\n narrow: Map<EngineNode, number>;\n /** Set by a layout that asked for a width `narrow` does not have yet. */\n wantsNarrow: boolean;\n /** Each item's height at a width, for the widths the layout asked about. */\n heights: Map<EngineNode, Map<number, number>>;\n /** The widths being asked about, while `sizing`. */\n widths: Map<EngineNode, number>;\n /** Where each item goes, against the container's padding box, once `placed`. */\n rects: Map<EngineNode, Rect>;\n /** The width of the box it was last laid out in, and the height it then came to, if its own. */\n width?: number;\n height?: number;\n /** The width its tracks came to, where nothing else gives it one. */\n ownWidth?: number;\n /**\n * How far down each item's baseline is at a width, read as Yoga lines items up in a row: see\n * `gridWithHeights`. Set on `inRow` while the items are committed that way to be read.\n */\n baselines: Map<EngineNode, Map<number, number>>;\n /** Each item whose baseline the last layout asked for, and the width it asked at. */\n asked: Map<EngineNode, number>;\n wantsBaseline?: boolean;\n inRow?: boolean;\n /** The grid lines a placement names, from the last layout: what an out-of-flow child is against. */\n area?: GridLayout['area'];\n stopListening?: () => void;\n /** Its style and each item's as it was last laid out, and what each item held: see `follows`. */\n styled?: string;\n styles?: Map<EngineNode, string>;\n shapes?: Map<EngineNode, string>;\n /**\n * The items changed in or beneath since it was laid out, with no cause yet to lay it out\n * again, and how far the content of each reached before the change.\n */\n followed?: Map<EngineNode, Reach>;\n /** How far each of those reached after the last such change, which is before the next. */\n reached?: Map<EngineNode, Reach>;\n}\n\n/** How far down an item's content reaches in it, and whether it reaches past its right edge. */\ninterface Reach {\n bottom: number;\n over: boolean;\n}\n\n/** A style as a grid is laid out from it: what is only paint moves nothing, and is left out. */\nconst asAKey = (style: Record<string, unknown>): string =>\n JSON.stringify(style, (key, value: unknown) => (PAINT_ONLY_KEYS.has(key) ? undefined : value));\n\n/**\n * How much an item holds: its elements, and the letters of its text. Text as long as it was is\n * taken to be as wide, and a box neither added nor taken away to leave the others as they were.\n */\nfunction shapeOf(node: EngineNode): string {\n let elements = 0;\n let letters = 0;\n const count = (each: EngineNode): void => {\n if (each.nodeKind === 'text') letters += each.nodeText.length;\n else if (each.nodeKind === 'element') elements++;\n for (const child of each.childList) count(child);\n };\n for (const child of node.childList) count(child);\n return `${elements}:${letters}`;\n}\n\n/** The props only the engine's grid layout reads. None of them is a React Native style. */\nconst GRID_KEYS = [\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'gridTemplateAreas',\n 'gridAutoColumns',\n 'gridAutoRows',\n 'gridAutoFlow',\n 'gridColumnStart',\n 'gridColumnEnd',\n 'gridRowStart',\n 'gridRowEnd',\n 'justifyItems',\n 'justifySelf',\n];\n/** What places a box among its siblings, which the grid does for an item instead. */\nconst PLACING_KEYS = [\n ...['margin', 'marginVertical', 'marginHorizontal'],\n ...['marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginStart', 'marginEnd'],\n ...['top', 'right', 'bottom', 'left', 'start', 'end'],\n ...['flex', 'flexGrow', 'flexShrink', 'flexBasis', 'alignSelf'],\n];\nconst SIZE_LIMITS = ['minWidth', 'maxWidth', 'minHeight', 'maxHeight'];\n\n/** Every run of text under a node. */\nfunction textsUnder(node: EngineNode): EngineNode[] {\n return node.childList.flatMap((child) =>\n child.nodeKind === 'text' ? [child] : textsUnder(child),\n );\n}\n\n/** Whether a `display` is a grid, in a line or not: what it holds is laid out the same. */\nconst isGrid = (display: unknown): boolean => display === 'grid' || display === 'inline-grid';\n\n/** The grid a node is an item of, where it is still a child of that grid. */\nfunction gridOver(node: EngineNode): GridState | undefined {\n const container = node.gridIn;\n return container && node.parent === container && container.grid?.members.includes(node)\n ? container.grid\n : undefined;\n}\n\n/**\n * A grid container and its items, as the views Yoga lays out: the container a plain box as tall\n * as its rows, and each item out of the flow, at the size the grid's current phase wants.\n */\nfunction gridLayout(node: EngineNode, props: Record<string, unknown>): void {\n // Asked of every node, and read before it is deleted: most have none of these.\n for (const key of GRID_KEYS) if (props[key] !== undefined) delete props[key];\n if (isGrid(props['display'])) {\n props['display'] = 'flex';\n if (node.grid) gridContainer(node, node.grid, props);\n // Its items are placed out of the flow, and it is what they are placed in: a static box\n // would leave them to whatever further up is positioned.\n if (node.grid && props['position'] === 'static') props['position'] = 'relative';\n }\n const state = gridOver(node);\n if (state) gridItem(node, state, props);\n}\n\n/**\n * A grid container as a plain box. While it is measured it stacks its items at their content's\n * width, so a container nothing gives a width comes out as wide as its widest item, and one that\n * is given a width keeps it. Placed, it is the width and height its tracks came to where its own\n * were not set.\n */\nfunction gridContainer(node: EngineNode, state: GridState, props: Record<string, unknown>): void {\n if (state.phase === 'measuring' || state.phase === 'words') {\n props['flexDirection'] = 'column';\n props['flexWrap'] = 'nowrap';\n return;\n }\n if (state.phase === 'sizing' && state.inRow) {\n // Yoga knows a baseline, and lines items up by theirs in a row: where each lands says it.\n Object.assign(props, { flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'baseline' });\n return;\n }\n if (state.ownWidth !== undefined) props['width'] = state.ownWidth;\n if (state.height !== undefined) rowsHeight(node, state.height, props, state.width);\n}\n\n/**\n * A grid's rows' height, as the height of what it holds: its height down a column, which it\n * grows and shrinks from, and the least it is across a row, which stretches it taller. A basis\n * written as its height is its height, whatever its rows come to. With an aspect ratio, its\n * height is what the ratio gives its width, or its rows where they are taller.\n */\nfunction rowsHeight(\n node: EngineNode,\n rows: number,\n props: Record<string, unknown>,\n width?: number,\n): void {\n if (props['height'] != null && !NO_HEIGHT.has(props['height'] as string)) return;\n const ratio = props['aspectRatio'];\n const sized = typeof ratio === 'number' && ratio > 0 && width !== undefined;\n const height = sized ? Math.max(rows, width / ratio) : rows;\n if (sized) delete props['aspectRatio'];\n if (!node.parent || !isRow(node.parent)) {\n props['height'] = height;\n return;\n }\n const least = props['minHeight'];\n props['minHeight'] = typeof least === 'number' ? Math.max(least, height) : height;\n}\n\n/** A grid item, in the flow at its content's width while its grid is measured, and out of it after. */\nfunction gridItem(node: EngineNode, state: GridState, props: Record<string, unknown>): void {\n const shift = relativeShift(props);\n for (const key of PLACING_KEYS) delete props[key];\n if (state.phase === 'placed') {\n props['position'] = 'absolute';\n for (const key of SIZE_LIMITS) delete props[key];\n const rect = state.rects.get(node);\n if (rect) Object.assign(props, asCommitted(rect, shift, props));\n return;\n }\n // A percentage is of the item's area, which is not known while it is measured.\n for (const key of ['width', 'height', ...SIZE_LIMITS]) {\n if (typeof props[key] === 'string') delete props[key];\n }\n if (state.phase === 'measuring' || state.phase === 'words') {\n props['position'] = 'relative';\n props['alignSelf'] = 'flex-start';\n return;\n }\n props['position'] = state.inRow ? 'relative' : 'absolute';\n const width = state.widths.get(node);\n if (width !== undefined) props['width'] = width - contentFrame(props).width;\n}\n\n/** How far an item's own offsets move it from its area, as a relative box. Static or sticky, nothing. */\nfunction relativeShift(props: Record<string, unknown>): { x: number; y: number } {\n // A sticky box's offsets are where it sticks in its scroll view: see `Engine.settleSticky`.\n if (props['position'] === 'static' || props['position'] === 'sticky') return { x: 0, y: 0 };\n const at = (start: string, end: string) => {\n const [from, to] = [props[start], props[end]];\n if (typeof from === 'number') return from;\n return typeof to === 'number' ? -to : 0;\n };\n return { x: at('left', 'right'), y: at('top', 'bottom') };\n}\n\n/**\n * The padding and border a size written on a box leaves out: all of them where its\n * `box-sizing` is `content-box`, and none otherwise.\n */\nfunction contentFrame(props: Record<string, unknown>): { width: number; height: number } {\n if (props['boxSizing'] !== 'content-box') return { width: 0, height: 0 };\n const edge = insets(props);\n return { width: edge.Left + edge.Right, height: edge.Top + edge.Bottom };\n}\n\n/** Where a grid puts an item's border box, as the props that put it there. */\nfunction asCommitted(\n rect: Rect,\n shift: { x: number; y: number },\n props: Record<string, unknown>,\n): Rect {\n const frame = contentFrame(props);\n return {\n left: rect.left + shift.x,\n top: rect.top + shift.y,\n width: Math.max(rect.width - frame.width, 0),\n height: Math.max(rect.height - frame.height, 0),\n };\n}\n\n/**\n * Whether a box out of the flow is as wide as what it holds: it has no width, and no inset on\n * each side to be stretched between. A browser shrinks it to fit, a panel in the body among\n * them, where Yoga takes a percentage inside it as one of the room.\n *\n * ponytail: the room it is fitted within is the box it is placed in, and not that less its\n * inset. Take the inset off if a panel placed far across the screen is ever too wide.\n */\nfunction shrunkOutOfFlow(node: EngineNode): boolean {\n if (!OUT_OF_FLOW.has(readStyle(node, 'position') as string)) return false;\n if (readStyle(node, 'width') != null) return false;\n const set = (...keys: string[]) => keys.some((key) => readStyle(node, key) != null);\n return !(set('left', 'start') && set('right', 'end'));\n}\n\n/** Whether a column makes an item as wide as itself: by the item's own alignment, or its own. */\nfunction stretched(node: EngineNode, column: EngineNode): boolean {\n const own = readStyle(node, 'alignSelf');\n const align = own == null || own === 'auto' ? readStyle(column, 'alignItems') : own;\n return align == null || align === 'stretch' || align === 'normal';\n}\n\n/** Whether a row's item is given its width by the row: it grows into it, or has a basis. */\nfunction sharesRow(node: EngineNode): boolean {\n const [grow, flex, basis] = ['flexGrow', 'flex', 'flexBasis'].map((key) => readStyle(node, key));\n if ((typeof grow === 'number' && grow > 0) || typeof flex === 'number') return true;\n return basis != null && basis !== 'auto';\n}\n\n/**\n * Whether a box in the flow is as wide as a share of the box it is in: a percentage. One out of\n * the flow is a share of a box it has no part in the width of, a focus ring over a chip.\n */\nfunction sharesWidth(node: EngineNode): boolean {\n if (!isShare(readStyle(node, 'width')) && !isShare(readStyle(node, 'minWidth'))) return false;\n return !OUT_OF_FLOW.has(readStyle(node, 'position') as string);\n}\n\n/** A percentage: of the box a node is in, for a width or the least it may be. */\nconst isShare = (value: unknown): boolean => typeof value === 'string' && value.endsWith('%');\n\n/** The parts of a table, which stick within the table and not within the part they are in. */\nconst TABLE_PARTS = new Set(['thead', 'tbody', 'tfoot', 'tr', 'th', 'td']);\n\n/**\n * The box a sticky box does not leave: its parent, or for a part of a table the table, since a\n * header row is no taller than the cells that stick in it. A web library's elements have these\n * names; an app's own views have none of them.\n */\nfunction stickyBlock(node: EngineNode): EngineNode {\n let block = node.parent!;\n if (!TABLE_PARTS.has(node.tag)) return block;\n while (block.parent && TABLE_PARTS.has(block.tag)) block = block.parent;\n return block;\n}\n\n/**\n * A sticky box as Yoga lays it out: where it is written, since its insets say where it sticks\n * and not where it sits, moved by however far its scroll view has pushed it.\n */\nfunction stickyLayout(node: EngineNode, props: Record<string, unknown>): void {\n props['position'] = 'relative';\n // Over what is written after it, as a browser paints a positioned box over the flow.\n props['zIndex'] ??= 1;\n // With no inset on the axis it moves along it sticks nowhere, whatever it moved by before.\n const state = node.sticky;\n const inset = props[state?.axis === 'x' ? 'left' : 'top'];\n for (const key of ['top', 'right', 'bottom', 'left', 'start', 'end']) {\n if (props[key] !== undefined) delete props[key];\n }\n if (!state?.shift || typeof inset !== 'number') return;\n moveBeforeOwn(props, { [state.axis === 'x' ? 'translateX' : 'translateY']: state.shift });\n}\n\n/** What a frame of an animation moved: its last gives back what it held, as a size may be. */\nconst frameKeys = (values: Readonly<Record<string, unknown>>, finished: boolean): string[] =>\n finished ? ['width'] : Object.keys(values);\n\n/** The moves the engine writes before a box's own transform: see `moveBeforeOwn`. */\nconst ENGINE_MOVES = new WeakSet<object>();\n\n/**\n * A move of the engine's written before a box's own transform, once: one already there, as on\n * a transform read back from what was committed, is taken off first.\n */\nfunction moveBeforeOwn(props: Record<string, unknown>, move: Record<string, number>): void {\n ENGINE_MOVES.add(move);\n const own = ownTransform(props['transform']);\n props['transform'] = Array.isArray(own) ? [move, ...own] : [move];\n}\n\n/**\n * A transform as the box's styles wrote it, without the moves the engine put before it: what a\n * transition eases from, where it reads what was committed. Nothing where that was all it had.\n */\nfunction ownTransform(value: unknown): unknown {\n if (!Array.isArray(value) || !ENGINE_MOVES.has(value[0] as object)) return value;\n const own = value.filter((entry) => !ENGINE_MOVES.has(entry as object));\n return own.length ? own : undefined;\n}\n\n/** The moves the engine put before a transform: see `moveBeforeOwn`. */\nconst engineMoves = (value: unknown): unknown[] =>\n Array.isArray(value) ? value.filter((entry) => ENGINE_MOVES.has(entry as object)) : [];\n\n/** Whether two transform lists hold the same operations, one for one. */\nconst sameEntries = (a: unknown, b: readonly unknown[]): boolean =>\n a === b || (Array.isArray(a) && a.length === b.length && a.every((entry, i) => entry === b[i]));\n\n/**\n * Take off what is read here and is no style of a native view: `order`, by the container in\n * `inOrder`, and `justify-self`, by the block a box is in.\n */\nfunction notNative(props: Record<string, unknown>): void {\n if (props['order'] !== undefined) delete props['order'];\n if (props['justifySelf'] !== undefined) delete props['justifySelf'];\n}\n\n/**\n * What the engine lays out in Yoga's place, written on a node's props last of all: a box sized\n * from what was read back, and a relative box in a line moved by its offset.\n */\nfunction engineLayout(node: EngineNode, props: Record<string, unknown>, asked: number): void {\n // Nothing of it is on a node until something asks, and an app of plain flex never does.\n if (asked !== 0) askedLayout(node, props, asked);\n // Asked of every node merged, so asked here first: nearly none has a most size.\n if (props['maxHeight'] !== undefined) leastWins(props, 'Height');\n if (props['maxWidth'] !== undefined) leastWins(props, 'Width');\n if (asked & CSS_LAYOUT) {\n notNative(props);\n if (node.resolved) resolvedOnto(node.resolved, props);\n }\n if (props['position'] !== undefined) positioned(node, props);\n}\n\n/** The part of `engineLayout` that a layout something asked for sets a node up for. */\nfunction askedLayout(node: EngineNode, props: Record<string, unknown>, asked: number): void {\n const css = (asked & CSS_LAYOUT) !== 0;\n if (css) gridLayout(node, props);\n if (asked & MIXED_SIZES) {\n mixedLayout(node, props);\n // A basis a sum came to is a size too, as one written is: see `basisAsSize`.\n basisAsSize(node, props);\n }\n // Before the minimum: a cell with its share of a row set aside is sized by its content, and\n // does not shrink under it while the box it is in is measured.\n if (node.fitOff) setAsideToFit(node, props);\n if (css) {\n autoMinimum(node, props);\n shareMinimum(node, props);\n }\n if (node.fit !== undefined || node.fitMin !== undefined) fitted(node, props);\n heldHeight(node, props);\n}\n\n/**\n * A box as tall as its content, at what that came to: see `Engine.settleHeld`. That is read as\n * the box's border box, and a height of `content-box` is without its padding and border.\n */\nfunction heldHeight(node: EngineNode, props: Record<string, unknown>): void {\n if (node.heldAt === undefined || !NO_HEIGHT.has(props['height'] as string)) return;\n const edge = props['boxSizing'] === 'content-box' ? insets(props) : NO_INSETS;\n const slack = wrapsDown(props) ? ROUNDING_SLACK : 0;\n props['height'] = Math.max(node.heldAt.height + slack - edge.Top - edge.Bottom, 0);\n}\n\n/**\n * How much taller than it was read a column that wraps is held. The height is read back rounded\n * to the screen's pixels, up to a pixel less than its content, and Yoga then breaks the column's\n * line where content that just fits overflows it, which a browser does not. A third of a point\n * is a pixel at three times the scale, and too little to keep content that does not fit on one\n * line. It is also too little to be seen, though a box that grows takes it up.\n *\n * ponytail: at a lower scale the height can still come out short by more than that.\n */\nconst ROUNDING_SLACK = 1 / 3;\n\n/** Whether a flex container is a column that wraps. */\nconst wrapsDown = (props: Record<string, unknown>): boolean =>\n (props['flexWrap'] === 'wrap' || props['flexWrap'] === 'wrap-reverse') &&\n !String(props['flexDirection'] ?? 'column').startsWith('row');\n\n/** A box with its share of a row set aside, while the box it is in is measured. */\nfunction setAsideToFit(node: EngineNode, props: Record<string, unknown>): void {\n contentSized(props);\n pictureWide(node, props);\n // A field with its share set aside is as wide as its own size makes it, as its content.\n columnsWide(props, node.props[FIELD_SIZE]);\n}\n\n/** A box fitted to its content: the width that came to, and the least it may be. */\nfunction fitted(node: EngineNode, props: Record<string, unknown>): void {\n if (node.fit?.width !== undefined) props['width'] = node.fit.width;\n if (node.fitMin === undefined) return;\n const own = typeof props['minWidth'] === 'number' ? props['minWidth'] : 0;\n props['minWidth'] = Math.max(own, node.fitMin);\n}\n\n/** What an out-of-flow box was resolved to, written on its props or taken off them. */\nfunction resolvedOnto(\n resolved: NonNullable<EngineNode['resolved']>,\n props: Record<string, unknown>,\n): void {\n for (const [key, value] of Object.entries(resolved)) {\n if (value === null) delete props[key];\n else props[key] = value;\n }\n}\n\n/** What a box's `position` needs of the engine, where Yoga does not do what CSS means by it. */\nfunction positioned(node: EngineNode, props: Record<string, unknown>): void {\n // Out of the flow is what fixed means, whether in place or committed under its page.\n if (props['position'] === 'fixed') props['position'] = 'absolute';\n if (props['position'] === 'sticky') stickyLayout(node, props);\n if (props['position'] === 'relative' && inWrappingRow(node)) offsetAcrossLines(props);\n}\n\nconst OUT_OF_FLOW = new Set(['absolute', 'fixed']);\nconst INLINE_DISPLAYS = new Set(['inline-block', 'inline-flex', 'inline-grid']);\n\n/** Whether a node is an element said to be always inline that is text in a browser: a span. */\nconst inlineText = (node: EngineNode): boolean =>\n node.inlineLevel === 'always' && TEXT_ELEMENTS.has(node.tag);\n\n/** Whether a box sits in a line: by its display, or with none, as text or an inline element. */\nfunction sitsInLine(node: EngineNode, display: unknown): boolean {\n if (INLINE_DISPLAYS.has(display as string)) return true;\n return display == null && (node.inlineLevel === 'always' || isTextElement(node));\n}\n\n/** Whether a box is laid out in a line of a block container's flow, as the plan for it has it. */\nfunction inALine(node: EngineNode): boolean {\n const plan = flowOver(node)?.plan;\n return plan !== undefined && (plan.kind === 'lines' || plan.inline.has(node));\n}\n\n/** Whether a box is an item of a row that wraps: lines the engine lays out, or a row written so. */\nfunction inWrappingRow(node: EngineNode): boolean {\n const flow = flowOver(node);\n if (flow?.plan.kind === 'lines' || flow?.lined.has(node)) return true;\n const parent = node.parent;\n if (!parent || readStyle(parent, 'flexWrap') !== 'wrap') return false;\n return String(readStyle(parent, 'flexDirection')).startsWith('row');\n}\n\n/**\n * A relative offset across the lines of a row that wraps, as a move of the box: Yoga places\n * each line's items again once the lines are sized, and leaves the offset out when it does. A\n * relative offset moves a box from where it was laid out and moves nothing else, which a\n * translate before its own transform does as well.\n *\n * ponytail: a length. A percentage is of the box it is in, which is not known here, and is left\n * to Yoga; read it back as the mixed sums are if a stylesheet offsets a line item by a share.\n */\nfunction offsetAcrossLines(props: Record<string, unknown>): void {\n const [top, bottom] = [props['top'], props['bottom']];\n const by = typeof top === 'number' ? top : typeof bottom === 'number' ? -bottom : undefined;\n if (by === undefined) return;\n delete props['top'];\n delete props['bottom'];\n moveBeforeOwn(props, { translateY: by });\n}\n\ninterface MixedState {\n /** Each declaration as its two parts: a percentage, and points added to it. */\n parts: Record<string, { percent: number; points: number }>;\n /** What each came to, or nothing before the box it is of has been read. */\n values?: Record<string, number>;\n /** The size of that box when they were worked out: a change in it works them out again. */\n base?: readonly [number, number | undefined];\n dirty: boolean;\n}\n\n/**\n * The props a percentage of the containing block's width is added to a length for, and those\n * where it is of its height. A margin and a padding are of the width on every side.\n */\nconst MIXED_OF_HEIGHT = new Set(['height', 'minHeight', 'maxHeight', 'top', 'bottom']);\nconst MIXED_KEYS = new Set([\n ...['width', 'minWidth', 'maxWidth', 'height', 'minHeight', 'maxHeight'],\n ...['top', 'right', 'bottom', 'left', 'start', 'end'],\n ...['margin', 'marginHorizontal', 'marginVertical', 'marginStart', 'marginEnd'],\n ...['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n ...['padding', 'paddingHorizontal', 'paddingVertical', 'paddingStart', 'paddingEnd'],\n ...['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n // What an item of a row or a column starts from: a share of whichever it is in.\n 'flexBasis',\n]);\nconst MIXED = /^calc\\(\\s*(-?[\\d.]+)(%|px)\\s*([+-])\\s*(-?[\\d.]+)(%|px)\\s*\\)$/;\n\n/** `calc(100% - 32px)` or `calc(32px + 50%)` as a percentage and the points added to it. */\nfunction mixedParts(value: unknown): { percent: number; points: number } | undefined {\n if (typeof value !== 'string' || !value.startsWith('calc(')) return undefined;\n const match = MIXED.exec(value);\n if (!match || match[2] === match[5]) return undefined;\n const second = Number(match[4]) * (match[3] === '-' ? -1 : 1);\n const [percent, points] =\n match[2] === '%' ? [Number(match[1]), second] : [second, Number(match[1])];\n return { percent, points };\n}\n\n/**\n * A percentage with a length added, which Yoga has no value for: committed as what it came to\n * against the box the percentage is of, and set aside until that box has been read, and while\n * it is measured. See `settleMixed`.\n */\nfunction mixedLayout(node: EngineNode, props: Record<string, unknown>): void {\n const parts = takeMixed(node, props);\n if (!parts) node.mixed = undefined;\n else if (!node.mixed || !sameParts(node.mixed.parts, parts)) node.mixed = { parts, dirty: true };\n}\n\n/** Each such declaration of a node, written on its props as what it came to or taken off them. */\nfunction takeMixed(\n node: EngineNode,\n props: Record<string, unknown>,\n): MixedState['parts'] | undefined {\n let parts: MixedState['parts'] | undefined;\n // Set aside too while a box it is in is fitted to its content: see `settleFits`.\n const values = node.mixedOff || node.fitOff ? undefined : node.mixed?.values;\n // Asked of every node: its own props are fewer than the ones this could be written on.\n for (const key in props) {\n const value = props[key];\n // Told from the rest here, and not by a call for each: nearly none is a sum.\n if (typeof value !== 'string' || !value.startsWith('calc(')) continue;\n const read = mixedParts(value);\n if (!read) continue;\n // A token can carry the sum to a property with no box for its percentage: not committed.\n if (MIXED_KEYS.has(key)) (parts ??= {})[key] = read;\n writeMixed(props, key, ofNoHeight(node, props, key) ? withNoHeight(key, read) : values?.[key]);\n }\n return takeMixedTranslate(props, values, parts);\n}\n\n/** A sum as what it came to, or taken off the props until it is known. */\nfunction writeMixed(props: Record<string, unknown>, key: string, to: number | undefined): void {\n if (to === undefined) delete props[key];\n else props[key] = to;\n}\n\n/**\n * Whether a sum is a share of a height the box it is in does not have: one as tall as its\n * content, which a column has not sized yet (see `Engine.settleHeld`). CSS takes its height\n * as `auto` then, and a basis down a column as its content.\n */\nfunction ofNoHeight(node: EngineNode, props: Record<string, unknown>, key: string): boolean {\n const tall = key === 'height' || key === 'minHeight' || key === 'maxHeight';\n if (!tall && key !== 'flexBasis') return false;\n if (props['position'] === 'absolute' || props['position'] === 'fixed') return false;\n const parent = layoutParent(node);\n if (!parent || (key === 'flexBasis' && isRow(parent))) return false;\n return !definiteHeight(parent);\n}\n\n/** What a sum of a share of no height comes to: a least height is its length alone, as Chrome has it. */\nconst withNoHeight = (key: string, { points }: { points: number }): number | undefined =>\n key === 'minHeight' && points > 0 ? points : undefined;\n\n/**\n * The same for a translate, whose percentage is of the element's own box. Until that has been\n * read the percentage alone is committed, which native takes, and is all but the length out.\n */\nfunction takeMixedTranslate(\n props: Record<string, unknown>,\n values: Record<string, number> | undefined,\n parts: MixedState['parts'] | undefined,\n): MixedState['parts'] | undefined {\n const transform = props['transform'];\n if (!Array.isArray(transform)) return parts;\n let found = parts;\n let changed = false;\n const resolved = (transform as Record<string, unknown>[]).map((entry) => {\n const [key, value] = Object.entries(entry)[0] ?? [];\n const read = key === 'translateX' || key === 'translateY' ? mixedParts(value) : undefined;\n if (!key || !read) return entry;\n (found ??= {})[key] = read;\n changed = true;\n return { [key]: values?.[key] ?? `${read.percent}%` };\n });\n if (changed) props['transform'] = resolved;\n return found;\n}\n\nfunction sameParts(a: MixedState['parts'], b: MixedState['parts']): boolean {\n const keys = Object.keys(a);\n return (\n keys.length === Object.keys(b).length &&\n keys.every((key) => a[key]!.percent === b[key]?.percent && a[key]!.points === b[key]?.points)\n );\n}\n\n/** What each declaration comes to against a box of this width and height. */\nfunction mixedValues(\n parts: MixedState['parts'],\n [width, height]: readonly [number, number | undefined],\n own: readonly number[] | undefined,\n inColumn = false,\n): Record<string, number> {\n const values: Record<string, number> = {};\n for (const [key, { percent, points }] of Object.entries(parts)) {\n // A translate is by a share of the element's own box.\n const self = key === 'translateX' ? own?.[2] : key === 'translateY' ? own?.[3] : null;\n // And a basis by a share of the box it is in, the way that box lays it out.\n const tall = key === 'flexBasis' ? inColumn : MIXED_OF_HEIGHT.has(key);\n const whole = self !== null ? self : tall ? height : width;\n // A percentage of a height nothing gave is of nothing: the declaration stays set aside.\n if (whole === undefined) continue;\n const value = (percent / 100) * whole + points;\n // Only an inset, a margin and a translate go below nothing.\n values[key] = /^(margin|top|right|bottom|left|start|end|translate)/.test(key)\n ? value\n : Math.max(value, 0);\n }\n return values;\n}\n\n/** The sizes CSS has keywords for, which a box is fitted to by the engine: `fit-content`. */\nconst SIZE_KEYS = new Set([\n ...['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'flexBasis'],\n]);\n/**\n * What only the engine reads, whatever it is set to: no native view lays out by any of them, or\n * draws by `visibility` or a clip to nothing (`seenByCss`).\n */\nconst LAID_OUT_HERE = new Set([...GRID_KEYS, 'order', 'visibility', 'clipped']);\nconst POSITIONS_HERE = new Set(['static', 'fixed', 'sticky']);\n\n/** What a declaration can ask of the engine that an app of plain flex does not: see `asks`. */\nconst CSS_LAYOUT = 1;\nconst MIXED_SIZES = 2;\nconst SHARED_WIDTHS = 4;\nconst TRANSITIONS = 8;\nconst SHARED_HEIGHTS = 16;\n/** What the engine lays out in Yoga's place, of those. */\nconst LAYOUTS = CSS_LAYOUT | MIXED_SIZES | SHARED_WIDTHS | SHARED_HEIGHTS;\nconst EVERYTHING = LAYOUTS | TRANSITIONS;\n/** What a value that may be a share or a sum, known only once a token is, asks for. */\nconst SHARES = MIXED_SIZES | SHARED_WIDTHS | SHARED_HEIGHTS;\n\n/**\n * What a declaration asks for that the engine works out in Yoga's place, each a bit:\n *\n * - a layout CSS has and Yoga has not: a block or a grid, a box in a line, a position that is\n * not a native view's, a size that is a keyword, an automatic minimum;\n * - a percentage with a length added, `calc(100% - 32px)`, which Yoga has no value for;\n * - a width that is a share of its box, which is fitted where that box is as wide as its\n * content;\n * - a height that is a share of its box, which is held at its content's height where it is as\n * tall as its content;\n * - a transition or an animation, which native lays out where nothing else in its commit\n * moves, so the boxes a commit moves are noted.\n *\n * See `Engine.asked`: a node is asked nothing of what no declaration in the app has asked for.\n */\nfunction asks(key: string, value: unknown): number {\n // A transition or an animation, as each of their declarations is kept: `$transition`.\n if (key.startsWith('$')) return TRANSITIONS;\n if (typeof value === 'string') return asksByText(key, value);\n if (LAID_OUT_HERE.has(key)) return CSS_LAYOUT;\n // A move by a share with a length added is inside a transform's own list of values, and\n // nothing else's: see `takeMixedTranslate`.\n if (key !== 'transform' || value === null || typeof value !== 'object') return 0;\n return JSON.stringify(value).includes('calc(') ? MIXED_SIZES : 0;\n}\n\nfunction asksByText(key: string, value: string): number {\n if (key === 'display') return value !== 'flex' && value !== 'none' ? CSS_LAYOUT : 0;\n if (key === 'position') return POSITIONS_HERE.has(value) ? CSS_LAYOUT : 0;\n if (LAID_OUT_HERE.has(key)) return CSS_LAYOUT;\n // A sum with a share of a height in it is held as a share of one is.\n if (value.startsWith('calc(')) return MIXED_SIZES | (value.includes('%') ? heightShare(key) : 0);\n return SIZE_KEYS.has(key) ? asksBySize(key, value) : 0;\n}\n\n/** What a share of its box asks for, by the size it is. */\nconst SHARES_OF: Record<string, number> = {\n width: SHARED_WIDTHS,\n minWidth: SHARED_WIDTHS,\n height: SHARED_HEIGHTS,\n minHeight: SHARED_HEIGHTS,\n flexBasis: SHARED_HEIGHTS,\n};\n\nconst heightShare = (key: string): number =>\n SHARES_OF[key] === SHARED_HEIGHTS ? SHARED_HEIGHTS : 0;\n\n/** What a size asks for: a share of its box, an automatic minimum, or a keyword of CSS's. */\nfunction asksBySize(key: string, value: string): number {\n const least = key === 'minWidth' || key === 'minHeight';\n if (value.endsWith('%')) return SHARES_OF[key] ?? 0;\n if (value === 'auto') return least ? CSS_LAYOUT : 0;\n return value.includes('content') ? CSS_LAYOUT : 0;\n}\n\n/**\n * Whether a box out of the flow asks for one by what it is merged as: a margin that is `auto`,\n * which Yoga does not centre such a box by. Read off the node, as no one declaration says it.\n */\nfunction asksOfPlaced(props: Record<string, unknown>): boolean {\n return props['position'] === 'absolute' && MARGIN_KEYS.some((key) => props[key] === 'auto');\n}\n\n/** What a node's own style would have the engine plan, of a layout of CSS's. */\nfunction unaskedPlan(node: EngineNode): string[] {\n const missed: string[] = [];\n const [display, position] = [readStyle(node, 'display'), readStyle(node, 'position')];\n if (isBlockContainer(display) || isGrid(display)) missed.push(`display ${String(display)}`);\n if (position === 'static' || position === 'fixed' || position === 'sticky') {\n missed.push(`position ${position}`);\n }\n if (readStyle(node, 'order') != null) missed.push('order');\n return missed;\n}\n\n/**\n * How a test run has every engine take what is asked of it, to prove that asking changes\n * nothing but the work done: `all` asks for everything from the start, as every app was laid\n * out before anything was left unasked, and `check` throws where a node would be laid out by\n * something nothing asked for.\n */\nconst askMode = (): 'all' | 'check' | undefined =>\n (globalThis as { ɵngNativeLayoutAsks?: 'all' | 'check' }).ɵngNativeLayoutAsks;\n\n/** Whether a key is a transition's or an animation's, as each of their declarations is kept. */\nconst easesBy = (key: string): boolean =>\n key.charCodeAt(0) === 36 && (key.startsWith('$transition') || key.startsWith('$animation'));\n\n/** Whether a style, an object or a list of them, transitions or animates. Allocates nothing. */\nfunction styleEases(style: unknown): boolean {\n if (!style || typeof style !== 'object') return false;\n if (Array.isArray(style)) return style.some(styleEases);\n for (const key in style) if (easesBy(key)) return true;\n return false;\n}\n\n/** What the declarations of a style ask for, together. */\nfunction styleAsks(style: unknown): number {\n if (style === null || typeof style !== 'object') return 0;\n let asked = 0;\n if (Array.isArray(style)) {\n for (const each of style) asked |= styleAsks(each);\n return asked;\n }\n for (const key in style) {\n const value = (style as Record<string, unknown>)[key];\n // A number asks for nothing but by a key the engine alone reads, as in `Engine.setProp`: told\n // here without the call, as most declarations are numbers.\n if (typeof value !== 'number' || LAID_OUT_HERE.has(key)) asked |= asks(key, value);\n }\n return asked;\n}\n\n/**\n * What a declaration asks for whose value is not known until a token is. A layout of CSS's\n * where the property could be given one, whatever the token turns out to hold. A share or a\n * sum only where it is written into the declaration itself, `calc(100% - var(--gap))`: one\n * that is the token's value and nothing more is asked for by the token, in `tokenAsks`.\n */\nfunction lateAsks(late: DeferredDeclaration): number {\n let asked = 0;\n for (const prop of late.props) {\n if (prop === 'display' || prop === 'position' || LAID_OUT_HERE.has(prop)) asked |= CSS_LAYOUT;\n if (prop.startsWith('$')) asked |= TRANSITIONS;\n }\n const text = JSON.stringify(late);\n if (text.includes('\"percent\"') || text.includes('%') || text.includes('calc(')) {\n asked |= SHARES;\n }\n return asked;\n}\n\n/** What a token asks for, by the value it holds: a share, a sum, or a keyword of a size. */\nfunction tokenAsks(token: TokenValue): number {\n let asked = 0;\n if (typeof token.length === 'string') asked |= SHARES;\n const several = token.lengths ?? token.deferredLengths;\n if (several?.some((each) => typeof each !== 'number')) asked |= SHARES;\n const keyword = token.keyword;\n if (keyword !== undefined && (keyword === 'auto' || keyword.includes('content'))) {\n asked |= CSS_LAYOUT;\n }\n if (token.transform && JSON.stringify(token.transform).includes('calc(')) asked |= MIXED_SIZES;\n return asked;\n}\n\nfunction tokensAsk(tokens: Readonly<Record<string, TokenValue>> | undefined): number {\n let asked = 0;\n for (const name in tokens) asked |= tokenAsks(tokens[name]!);\n return asked;\n}\n\n/** What the rules of a sheet ask for, together: stopped once it is everything. */\nfunction sheetAsks(sheet: StyleSheet): number {\n let asked = 0;\n for (const rule of sheet.rules) {\n asked |= styleAsks(rule.declarations) | styleAsks(rule.important);\n for (const late of rule.deferred ?? []) asked |= lateAsks(late);\n asked |= tokensAsk(rule.tokens);\n if (asked === EVERYTHING) return asked;\n }\n // A frame of an animation is a style too, for as long as it plays.\n for (const frames of Object.values(sheet.keyframes ?? {})) {\n for (const frame of frames) asked |= styleAsks(frame.declarations);\n }\n return asked;\n}\n\n/** The displays whose box lays out what it holds itself, as items. */\nconst LAYS_OUT_ITSELF = new Set(['flex', 'inline-flex', 'grid', 'inline-grid']);\n\n/** Whether a node lays its children out along a row: a flex row, or a block's lines. */\nfunction isRow(node: EngineNode): boolean {\n if (node.flow) return node.flow.plan.kind === 'lines';\n const direction = readStyle(node, 'flexDirection');\n return direction === 'row' || direction === 'row-reverse';\n}\n\n/**\n * Whether what a node holds has somewhere to wrap, which is what lets its content get narrower:\n * between two words of its text, or between two boxes of a line.\n */\nconst wraps = (node: EngineNode): boolean =>\n breaksBetweenBoxes(node) ||\n node.childList.some((child) =>\n child.nodeKind === 'text'\n ? /\\S\\s+\\S/.test(child.nodeText)\n : child.nodeKind === 'element' && wraps(child),\n );\n\n/** Whether a block holds a line of more than one box: all it holds, or a run among its blocks. */\nfunction breaksBetweenBoxes(node: EngineNode): boolean {\n const flow = node.flow;\n if (!flow) return false;\n if (flow.plan.kind === 'lines') return flow.members.size > 1;\n for (const line of flow.plan.lines.values()) if (line.boxes.length > 1) return true;\n return false;\n}\n\nconst isAuto = (value: unknown): boolean => value == null || value === 'auto';\n\n/**\n * `min-width: auto` and `min-height: auto`, which a browser gives every flex item: one that\n * shrinks stops at its content. Yoga's minimum is nothing, so the item is kept from shrinking\n * where its content cannot get smaller: down a column, and along a row when no text in it has\n * anywhere to wrap. Not for an item that clips, whose minimum is nothing in a browser too.\n *\n * ponytail: an item holding text that wraps still shrinks under its longest word, and one with\n * a size or a basis of its own under its content. Both need the content measured: commit the\n * item's text a word to a line, as a grid's min-content is read, if either turns up.\n */\nfunction autoMinimum(node: EngineNode, props: Record<string, unknown>): void {\n node.autoMin = undefined;\n const parent = node.parent;\n if (!parent || !staysInFlow(props)) return;\n const row = isRow(parent);\n if (props[row ? 'minWidth' : 'minHeight'] !== 'auto') return;\n if (!isAuto(props[row ? 'width' : 'height']) || !sizedByContent(props)) return;\n if (row) {\n node.autoMin = true;\n if (wraps(node)) return;\n }\n props['flexShrink'] = 0;\n}\n\n/**\n * The other half of `min-width: auto`: an item of a row with a share or a basis of its own,\n * `flex: 1`, which a browser stops at the narrowest its content goes. That has to be measured,\n * so the item is noted for `settleMinimums`, committed once as its content makes it, and given\n * the width that came to as its minimum from then on. Answers whether it is such an item.\n */\nfunction shareMinimum(node: EngineNode, props: Record<string, unknown>): boolean {\n if (!sharesFromContent(node, props)) {\n node.shareMin = undefined;\n return false;\n }\n node.shareMin ??= {};\n if (node.shareOff) {\n contentSized(props);\n delete props['flexBasis'];\n props['flexShrink'] = 0;\n } else if (node.shareMin.width !== undefined) {\n props['minWidth'] = node.shareMin.width;\n sharedOut(props, node.shareMin.share);\n }\n return true;\n}\n\n/** Whether an item's minimum is its content's and it takes a share of a row: see `shareMinimum`. */\nfunction sharesFromContent(node: EngineNode, props: Record<string, unknown>): boolean {\n const parent = node.parent;\n if (!parent || !staysInFlow(props) || !isRow(parent)) return false;\n if (props['minWidth'] !== 'auto' || !isAuto(props['width']) || sizedByContent(props))\n return false;\n return props['aspectRatio'] == null && (props['overflow'] ?? 'visible') === 'visible';\n}\n\n/**\n * Give an item the share of its line that `lineShares` worked out, as a width: Yoga hands out\n * what is left of a line after each item's minimum, where a browser hands out the whole line\n * and then holds an item to its minimum, so the two disagree wherever an item has one.\n */\nfunction sharedOut(props: Record<string, unknown>, share: number | undefined): void {\n if (share === undefined) return;\n props['width'] = share;\n props['flexGrow'] = 0;\n delete props['flex'];\n delete props['flexBasis'];\n}\n\n/** What a row's item brings to its line: how it grows, and the least it can be. */\ninterface Sharer {\n readonly grow: number;\n readonly least: number;\n /** Its margins along the row, which are room no item is given. */\n readonly around: number;\n}\n\n/**\n * The widths of a row's items, each growing from nothing into a line of `room`, as CSS lays a\n * line out: the items a line holds are those whose least widths fit it, the line's room is\n * shared by how each grows, and an item that comes out under its least is held at it while the\n * rest share what is left.\n */\nfunction lineShares(items: readonly Sharer[], room: number, gap: number, wraps: boolean): number[] {\n const widths: number[] = [];\n let line: Sharer[] = [];\n let taken = 0;\n const close = () => {\n widths.push(...sharedLine(line, room - gap * (line.length - 1)));\n line = [];\n taken = 0;\n };\n for (const item of items) {\n const needs = item.least + item.around;\n if (wraps && line.length && taken + gap + needs > room + 0.01) close();\n taken += (line.length ? gap : 0) + needs;\n line.push(item);\n }\n if (line.length) close();\n return widths;\n}\n\nfunction sharedLine(line: readonly Sharer[], room: number): number[] {\n const held = new Set<Sharer>();\n for (;;) {\n const free = line.filter((item) => !held.has(item));\n const left =\n room - line.reduce((sum, item) => sum + item.around + (held.has(item) ? item.least : 0), 0);\n const growth = free.reduce((sum, item) => sum + item.grow, 0);\n // Nothing left to grow: each is the least it can be.\n if (!growth) return line.map((item) => item.least);\n const under = free.filter((item) => (left * item.grow) / growth < item.least);\n if (!under.length) {\n return line.map((item) =>\n held.has(item) ? item.least : Math.max((left * item.grow) / growth, 0),\n );\n }\n for (const item of under) held.add(item);\n }\n}\n\n/** A node's margins along a row, in points: what a line has less of for it. */\nfunction marginsAlong(node: EngineNode): number {\n const margin = (side: string) => {\n const value =\n readStyle(node, side) ?? readStyle(node, 'marginHorizontal') ?? readStyle(node, 'margin');\n return typeof value === 'number' ? value : 0;\n };\n return margin('marginLeft') + margin('marginRight');\n}\n\nconst sameShare = (a: number | undefined, b: number | undefined): boolean =>\n a === b || (a !== undefined && b !== undefined && Math.abs(a - b) < 0.01);\n\nconst staysInFlow = (props: Record<string, unknown>): boolean =>\n props['position'] !== 'absolute' && props['position'] !== 'fixed';\n\n/** No basis, share or proportion of its own, and nothing clipped: its content is its size. */\nconst sizedByContent = (props: Record<string, unknown>): boolean =>\n props['flex'] == null &&\n isAuto(props['flexBasis']) &&\n props['aspectRatio'] == null &&\n (props['overflow'] ?? 'visible') === 'visible';\n\n/**\n * A box as its content makes it, while the box it is in is measured: a percentage width is of a\n * width not known yet, and a basis of nothing is what a share of that width starts from, so\n * neither says anything about how wide the content is. Nor does a share of the room left over,\n * which React Native's Yoga hands out of all the room a row could have.\n */\nfunction contentSized(props: Record<string, unknown>): void {\n if (typeof props['width'] === 'string') delete props['width'];\n // The least it may be, as a share, is of a width not known yet either.\n if (isShare(props['minWidth'])) delete props['minWidth'];\n delete props['flex'];\n delete props['flexGrow'];\n if (isNoBasis(props['flexBasis'])) delete props['flexBasis'];\n}\n\nconst isNoBasis = (value: unknown): boolean => value === 0 || value === '0%';\n\n/** A picture with its share set aside is as wide as it is itself, as its content. */\nfunction pictureWide(node: EngineNode, props: Record<string, unknown>): void {\n const own = node.props[INTRINSIC_SIZE] as IntrinsicSize | undefined;\n if (own && !isSet(props['width'])) props['width'] = own.width;\n}\n\n/** A length as the grid layout reads one: points with their unit, a percentage as written. */\n/** A length as `layOutGrid` reads one: a sum of a share and points as `50% + -8px`. */\nfunction cssLength(value: unknown): string | undefined {\n if (typeof value === 'number') return `${value}px`;\n if (typeof value !== 'string') return undefined;\n const sum = mixedParts(value);\n return sum ? `${sum.percent}% + ${sum.points}px` : value;\n}\n\n/** The first of these a style sets: a side, then the shorthands React Native reads it from. */\nfunction firstOf(style: Record<string, unknown>, keys: readonly string[]): unknown {\n for (const key of keys) if (style[key] != null) return style[key];\n return undefined;\n}\n\nconst SIDES = ['Top', 'Right', 'Bottom', 'Left'] as const;\nconst AXIS = { Top: 'Vertical', Bottom: 'Vertical', Left: 'Horizontal', Right: 'Horizontal' };\n\n/**\n * What the edges of a box take from its inside, on each side: its padding and its border, or\n * its padding alone. A padding written as a percentage is of `whole`, the width of the box it\n * is in, and nothing where that is not given.\n */\nfunction insets(\n style: Record<string, unknown>,\n whole = 0,\n border = true,\n): Record<(typeof SIDES)[number], number> {\n const points = (value: unknown) =>\n typeof value === 'number' ? value : (resolveLength(value, whole) ?? 0);\n const side = (name: (typeof SIDES)[number]) =>\n points(firstOf(style, [`padding${name}`, `padding${AXIS[name]}`, 'padding'])) +\n (border ? points(firstOf(style, [`border${name}Width`, 'borderWidth'])) : 0);\n return { Top: side('Top'), Right: side('Right'), Bottom: side('Bottom'), Left: side('Left') };\n}\n\n/** A grid container's style in the CSS terms `layOutGrid` reads. */\nfunction gridContainerStyle(style: Record<string, unknown>): Record<string, string> {\n const css: Record<string, string | undefined> = {\n 'grid-template-columns': style['gridTemplateColumns'] as string | undefined,\n 'grid-template-rows': style['gridTemplateRows'] as string | undefined,\n 'grid-template-areas': style['gridTemplateAreas'] as string | undefined,\n 'grid-auto-columns': style['gridAutoColumns'] as string | undefined,\n 'grid-auto-rows': style['gridAutoRows'] as string | undefined,\n 'grid-auto-flow': style['gridAutoFlow'] as string | undefined,\n 'column-gap': cssLength(style['columnGap'] ?? style['gap']),\n 'row-gap': cssLength(style['rowGap'] ?? style['gap']),\n 'justify-content': style['justifyContent'] as string | undefined,\n 'align-content': style['alignContent'] as string | undefined,\n 'justify-items': style['justifyItems'] as string | undefined,\n 'align-items': style['alignItems'] as string | undefined,\n direction: style['direction'] as string | undefined,\n };\n return defined(css);\n}\n\n/** A grid item's style in the CSS terms `layOutGrid` reads. */\nfunction gridItemStyle(style: Record<string, unknown>): Record<string, string> {\n const css: Record<string, string | undefined> = {\n 'grid-column-start': style['gridColumnStart'] as string | undefined,\n 'grid-column-end': style['gridColumnEnd'] as string | undefined,\n 'grid-row-start': style['gridRowStart'] as string | undefined,\n 'grid-row-end': style['gridRowEnd'] as string | undefined,\n 'justify-self': style['justifySelf'] as string | undefined,\n 'align-self': style['alignSelf'] as string | undefined,\n width: cssLength(style['width']),\n height: cssLength(style['height']),\n 'min-width': cssLength(style['minWidth']),\n 'max-width': cssLength(style['maxWidth']),\n 'min-height': cssLength(style['minHeight']),\n 'max-height': cssLength(style['maxHeight']),\n 'aspect-ratio': style['aspectRatio'] == null ? undefined : String(style['aspectRatio']),\n };\n for (const side of SIDES) {\n css[`margin-${side.toLowerCase()}`] = cssLength(\n firstOf(style, [`margin${side}`, `margin${AXIS[side]}`, 'margin']),\n );\n }\n return defined(css);\n}\n\n/** A grid item as `layOutGrid` reads it: its style, and its padding and border on each axis. */\ninterface GridItemOf {\n style: Record<string, string>;\n frame: { width: number; height: number };\n}\n\nfunction gridItemOf(style: Record<string, unknown>): GridItemOf {\n const edge = insets(style);\n const css = gridItemStyle(style);\n if (style['boxSizing'] === 'content-box') css['box-sizing'] = 'content-box';\n return { style: css, frame: { width: edge.Left + edge.Right, height: edge.Top + edge.Bottom } };\n}\n\n/**\n * Whether a box in the flow is as wide as the column it is in, which stretches it: no auto\n * margin across, nothing aligning it to a side, and not in a line.\n */\nfunction stretchedAcross(node: EngineNode, style: Record<string, unknown>): boolean {\n const parent = node.parent;\n if (!parent || OUT_OF_FLOW.has(style['position'] as string)) return false;\n if (style['display'] === 'inline-grid' || isRow(parent)) return false;\n if (style['marginLeft'] === 'auto' || style['marginRight'] === 'auto') return false;\n return parent.nodeKind !== 'element' || stretched(node, parent);\n}\n\n/** Whether an item of a grid is stretched down its area: aligned to nothing, with no auto margin. */\nfunction stretchedDown(node: EngineNode, style: Record<string, unknown>): boolean {\n if (style['marginTop'] === 'auto' || style['marginBottom'] === 'auto') return false;\n return isAuto(style['height']) && stretched(node, node.parent!);\n}\n\n/**\n * A width a box is given by its style, in points. A share of the box it is in may be of a box\n * as wide as what it holds, which is then the grid's tracks: that is left to `gridWidth`.\n */\nconst ownsWidth = (width: unknown): boolean => typeof width === 'number';\n\n/** The least and the most a box's content box may be, from the points its style writes. */\ninterface SizeLimits {\n minWidth: number;\n maxWidth: number;\n minHeight: number;\n maxHeight: number;\n}\n\n/** A box's limits as its content box's, `across` and `down` being its padding and border. */\nfunction sizeLimits(style: Record<string, unknown>, across: number, down: number): SizeLimits {\n const off = (frame: number) => (style['boxSizing'] === 'content-box' ? 0 : frame);\n const points = (key: string, none: number, frame: number) => {\n const value = style[key];\n return typeof value === 'number' ? Math.max(value - off(frame), 0) : none;\n };\n return {\n minWidth: points('minWidth', 0, across),\n maxWidth: points('maxWidth', Infinity, across),\n minHeight: points('minHeight', 0, down),\n maxHeight: points('maxHeight', Infinity, down),\n };\n}\n\nfunction defined(css: Record<string, string | undefined>): Record<string, string> {\n return Object.fromEntries(\n Object.entries(css).filter(([, value]) => value !== undefined),\n ) as Record<string, string>;\n}\n\n/** A block container's plan, and the children it covers. */\ninterface Flow {\n readonly plan: FlowPlan<EngineNode>;\n readonly members: ReadonlySet<EngineNode>;\n /** The boxes in a line box among blocks, each named by the first box of its line. */\n readonly lined: ReadonlyMap<EngineNode, EngineNode>;\n /**\n * The room its lines need under the baseline, as `hang` works it out: of a block of lines, and\n * of each line among blocks by its first box.\n */\n under?: number;\n unders?: ReadonlyMap<EngineNode, number>;\n /** How far each box on a line sits over the bottom of it, as a margin: see `onBaseline`. */\n lifts?: ReadonlyMap<EngineNode, number>;\n /** How far each box of a known height is moved down its line, as a margin: see `liftLines`. */\n rises?: ReadonlyMap<EngineNode, number>;\n /** Whether a box of each line reaches as high as its strut, which then holds it no taller. */\n risen?: boolean;\n}\n\n/**\n * A line box as it was last committed, kept on the first box of its run. It is what its boxes\n * are committed under: a box whose line box is another view is made again, since native never\n * moves a view to another parent. No view yet, before the first commit of it.\n */\ninterface LineBox {\n handle: FabricNode | null;\n top: number;\n /** Where its boxes sit along it, by the `text-align` its container has: see `alongLine`. */\n along?: string;\n /** How tall its strut holds it, and the room in that under the baseline: see `lineStrut`. */\n strut?: LineStrut;\n handles: readonly FabricNode[];\n in: EngineNode;\n}\n\n/**\n * A line box: the view a run of inline-level boxes among blocks is committed in, which no node\n * of the app stands for. A row that wraps, with its boxes on the bottom of each line as empty\n * boxes sit on a baseline. It is static and takes no touch, so what is placed or pressed inside\n * it is placed against and reaches the same boxes as if it were not there.\n */\n/** A line box's strut, as the props of the row it is: see `lineStrut`. */\ninterface LineStrut {\n minHeight: number;\n alignContent: string;\n}\n\n/**\n * The strut of a line among blocks, as `strutLine` has it for a block of lines: at least the\n * line's height, the room over the baseline and the room `under` it, which its boxes keep as\n * margins (see `hang`), on the bottom of the row the line is.\n */\nfunction lineStrut(\n inherited: Record<string, unknown>,\n container: EngineNode,\n first: EngineNode,\n fontScale: number | undefined,\n): LineStrut {\n if (risenLine(container, first)) return RISEN;\n const under = underLine(container, first);\n const above = strutOf(inherited).above * textScale(inherited, fontScale);\n return { minHeight: Math.round((above + under) * 1000) / 1000, alignContent: 'flex-end' };\n}\n\n/** Whether two plans of a block hang their lines the same: see `Engine.liftLines`. */\nconst sameHang = (a: Flow | undefined, b: Flow | undefined): boolean =>\n (a?.under ?? 0) === (b?.under ?? 0) &&\n sameLifts(a?.lifts, b?.lifts) &&\n sameLifts(a?.rises, b?.rises);\n\nfunction sameLifts(\n a: ReadonlyMap<EngineNode, number> = NO_LIFTS,\n b: ReadonlyMap<EngineNode, number> = NO_LIFTS,\n): boolean {\n if (a.size !== b.size) return false;\n for (const [box, lift] of a) if (b.get(box) !== lift) return false;\n return true;\n}\nconst NO_LIFTS: ReadonlyMap<EngineNode, number> = new Map();\n\n/**\n * The height of an empty box, where it is known before layout: in points, or a share of `whole`,\n * with its padding and border where those are outside it or are all it has.\n */\nfunction knownHeight(\n style: Record<string, unknown>,\n whole: number | undefined,\n): number | undefined {\n const edges = ['padding', 'paddingVertical', 'paddingTop', 'paddingBottom', 'borderWidth'];\n if (edges.some((key) => style[key] != null && typeof style[key] !== 'number')) return undefined;\n if (style['aspectRatio'] != null || style['minHeight'] != null || style['maxHeight'] != null)\n return undefined;\n const edge = insets(style);\n const frame = edge.Top + edge.Bottom;\n const height = style['height'];\n if (height == null || height === 'auto') return frame;\n const own =\n typeof height === 'number'\n ? height\n : isPercent(height) && whole !== undefined\n ? (Number.parseFloat(height as string) / 100) * whole\n : undefined;\n if (own === undefined) return undefined;\n return style['boxSizing'] === 'content-box' ? own + frame : Math.max(own, frame);\n}\n\n/** A line among blocks that a box on it holds as tall as its strut: see `Engine.riseLines`. */\nconst risenLine = (container: EngineNode, first: EngineNode): boolean =>\n container.flow?.plan.lines.get(first)?.boxes.some((box) => container.flow?.rises?.has(box)) ===\n true;\nconst RISEN: LineStrut = { minHeight: 0, alignContent: 'flex-start' };\n\n/** The room under the baseline of a line among blocks, by its first box. */\nconst underLine = (container: EngineNode, first: EngineNode): number =>\n container.flow?.unders?.get(first) ?? 0;\n\nconst sameStrut = (a: LineStrut | undefined, b: LineStrut): boolean =>\n a?.minHeight === b.minHeight && a.alignContent === b.alignContent;\n\n/**\n * Whether a fixed box is committed under its page wherever it is: on Android, whose screen and\n * root views clip each view in them to its bounds, where a fixed box draws past its own, as a\n * toaster of no height draws its toasts above itself. See `fixedHandles`.\n */\nconst clipsFixed = (position: unknown): boolean =>\n position === 'fixed' && nativePlatform() === 'android';\n\n/** What the view a page's fixed boxes are committed in is: see `fixedHandles`. */\nconst FIXED_LAYER = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n pointerEvents: 'box-none',\n // A view of layout alone is flattened into its parent, which is the view that clips.\n collapsable: false,\n};\n\nconst LINE_BOX = {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'flex-end',\n alignContent: 'flex-start',\n position: 'static',\n pointerEvents: 'box-none',\n};\n\n/** What a flex container says about its children, which a block container does not. */\nconst FLEX_CONTAINER_KEYS = [\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignContent',\n 'gap',\n 'rowGap',\n 'columnGap',\n];\n/** What a flex item says about itself, which a box in a block container's flow does not. */\nconst FLEX_ITEM_KEYS = ['flex', 'flexGrow', 'flexShrink', 'flexBasis'];\n\n/** The shorthands React Native reads a side from when the side itself is not set. */\nconst FLOW_SOURCES: Readonly<Record<FlowKey, readonly string[]>> = {\n display: ['display'],\n position: ['position'],\n marginTop: ['marginTop', 'marginVertical', 'margin'],\n marginBottom: ['marginBottom', 'marginVertical', 'margin'],\n paddingTop: ['paddingTop', 'paddingVertical', 'padding'],\n paddingBottom: ['paddingBottom', 'paddingVertical', 'padding'],\n borderTopWidth: ['borderTopWidth', 'borderWidth'],\n borderBottomWidth: ['borderBottomWidth', 'borderWidth'],\n height: ['height'],\n minHeight: ['minHeight'],\n overflow: ['overflow'],\n aspectRatio: ['aspectRatio'],\n};\nconst FLOW_PROPS = [...new Set(Object.values(FLOW_SOURCES).flat())];\n\n/**\n * A block container and the boxes in its flow, as the flex column and items Yoga lays out.\n *\n * The container is committed as `flex`, without the flex properties a block has no use for, or\n * as a wrapping row where it holds lines of inline-blocks. A box in its flow loses the flex item\n * properties, and takes the margins the container's plan collapsed for it. See `flow.ts`.\n */\nfunction flowLayout(\n node: EngineNode,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n): void {\n // Where it sits, in a line or as a block, is the plan's to say: what it holds is a flex box.\n if (props['display'] === 'inline-flex') props['display'] = 'flex';\n if (isBlockContainer(props['display'])) blockContainer(node, props, fontScale);\n const flow = flowOver(node);\n if (!flow) return;\n for (const key of FLEX_ITEM_KEYS) delete props[key];\n // A box in lines is in a line, whatever it is: an inline-block's `auto` margins are none.\n if (flow.plan.kind !== 'block') return placeInFlow(props, true, false);\n // A block fills the width, and a box in a line among blocks is as wide as its content, as an\n // item of the row its line box is. So is a block that is `fit-content`, which `fitContent` has\n // kept from stretching.\n if (!fitsWidth(node)) delete props['alignSelf'];\n // And its `auto` margins are of a browser's block, not of a flex item.\n placeInFlow(props, flow.plan.inline.has(node), fitsWidth(node));\n const margins = flow.plan.margins?.get(node);\n if (!margins) return;\n props['marginTop'] = margins.top;\n props['marginBottom'] = margins.bottom;\n}\n\n/** Where in its line a `vertical-align` sits a box, as the row the line is places an item. */\nconst LINE_ALIGNED: Readonly<Record<string, string>> = {\n center: 'center',\n top: 'flex-start',\n bottom: 'flex-end',\n};\n\n/**\n * `vertical-align: middle`, `top` or `bottom` on a box in a line: an arrow after a label's\n * words, which on the bottom of the line hangs under them. Text takes the keyword itself.\n *\n * ponytail: the middle of the line's height, where CSS means half an x-height over the\n * baseline. The two are a point or so apart in a line of one size of text.\n */\nfunction alignedInLine(node: EngineNode, props: Record<string, unknown>): void {\n const where = LINE_ALIGNED[props['textAlignVertical'] as string];\n if (where === undefined || isTextElement(node)) return;\n const flow = flowOver(node);\n if (flow?.plan.kind === 'lines' || flow?.lined.has(node)) props['alignSelf'] = where;\n}\n\n/**\n * A block of a set height that clips, as the column Yoga does not squeeze the children of: it\n * measures a column's child to fit the column's height, so the words in a panel closed to no\n * height are none tall, where a block's content is as tall as it is and is clipped. A column\n * that scrolls is measured as CSS has it, and a view told it scrolls clips as one told it hides.\n *\n * ponytail: a clipped block only. One that shows its overflow squeezes its words still, and has\n * no overflow to tell Yoga of that would not clip them.\n */\nfunction unsqueezed(props: Record<string, unknown>): void {\n if (props['overflow'] === 'hidden' && typeof props['height'] === 'number') {\n props['overflow'] = 'scroll';\n }\n}\n\n/**\n * Where `align-content` puts what a block holds along its height: a browser's button has its\n * label in the middle by it. It is the main axis of the column a block is, and of its lines\n * the cross axis of the rows they are, which is `align-content` there too.\n */\nconst ALONG_A_BLOCK: Readonly<Record<string, string>> = {\n center: 'center',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n};\n\n/** Where a `text-align` sets the boxes of a line, past its start. */\nconst ALONG_A_LINE: Readonly<Record<string, string>> = {\n center: 'center',\n end: 'flex-end',\n right: 'flex-end',\n};\n\nfunction blockContainer(\n node: EngineNode,\n props: Record<string, unknown>,\n fontScale: number | undefined,\n): void {\n props['display'] = 'flex';\n const along = ALONG_A_BLOCK[props['alignContent'] as string];\n for (const key of FLEX_CONTAINER_KEYS) delete props[key];\n if (node.flow?.plan.kind !== 'lines') {\n if (along) props['justifyContent'] = along;\n return unsqueezed(props);\n }\n props['flexDirection'] = 'row';\n props['flexWrap'] = 'wrap';\n // An empty box sits on the line's baseline, which is its bottom edge.\n //\n // ponytail: and so does one with text, by its bottom edge where a browser has its text's\n // baseline. Yoga's own baseline alignment sizes a box in the line differently (a share of a\n // width inside one came to nothing), so it is not used; align by baseline if a line of text\n // beside boxes is ever seen a few points out.\n props['alignItems'] = 'flex-end';\n props['alignContent'] = along ?? 'flex-start';\n if (strutted(node, props)) strutLine(node, props, textScale(props, fontScale));\n}\n\n/**\n * A line of boxes as tall as its strut makes it: the room over the baseline and under it, the\n * one a line box is at least whatever is on it. The boxes sit on the bottom of the row, each\n * over it by the margin `hang` gives it, so the room under the baseline is inside the row's\n * content box, and the line's height is a `minHeight` of the row. Scaled as native scales a\n * line of text, by the system text size: see `lineTall`.\n */\nfunction strutLine(node: EngineNode, props: Record<string, unknown>, scale: number): void {\n // Its boxes reach as high as the strut: see `Engine.riseLines`.\n if (node.flow?.risen) return;\n const strut = strutOf(props);\n const line = strut.above * scale + (node.flow?.under ?? strut.below * scale);\n const held = atLeastALine(props, line);\n // The line is the room its height leaves, so it is on the bottom of it, as a browser has the\n // baseline the room over it down. Not where the box is taller for another reason, as a row\n // stretches it, which a browser has the line at the top of.\n if (held && props['alignContent'] === 'flex-start' && contentTall(node, props)) {\n props['alignContent'] = 'flex-end';\n }\n}\n\n/**\n * Whether a box is as tall as what it holds, and no taller: in a column, of blocks or a flex\n * one, that does not grow it. A row stretches what is in it to its own height, and a grid to\n * its area's.\n *\n * ponytail: a row or a grid that does not stretch is counted as one that does, which leaves\n * its line at the top of the box where a browser has it a few points down.\n */\nfunction contentTall(node: EngineNode, props: Record<string, unknown>): boolean {\n if (flowOver(node)) return true;\n if (!node.parent) return true;\n if (String(readStyle(node.parent, 'display')).includes('grid')) return false;\n const direction = readStyle(node.parent, 'flexDirection');\n if (direction === 'row' || direction === 'row-reverse') return false;\n const grow = props['flexGrow'] ?? props['flex'];\n return !(typeof grow === 'number' && grow > 0);\n}\n\n/**\n * Keep a row of boxes at least a line tall, with its padding and border, under the `max-height`\n * written and over the `min-height`, which wins over it as in CSS. Whether the line is what\n * holds it that tall, and not the `min-height`.\n *\n * ponytail: a `min-height` that is not a length is left as written, with no line under it.\n */\nfunction atLeastALine(props: Record<string, unknown>, line: number): boolean {\n const min = props['minHeight'];\n if (min != null && min !== 'auto' && typeof min !== 'number') return false;\n const around = props['boxSizing'] === 'content-box' ? 0 : aroundALine(props);\n const max = props['maxHeight'];\n const capped = typeof max === 'number' ? Math.min(line + around, max) : line + around;\n const written = typeof min === 'number' ? min : 0;\n // To a thousandth of a point, as `lineTall` has it.\n props['minHeight'] = Math.round(Math.max(capped, written) * 1000) / 1000;\n return capped >= written;\n}\n\n/** How far under its line's baseline a style sets a box: a `vertical-align` of a length below none. */\nconst hungBy = (style: Readonly<Record<string, unknown>>): number => {\n const shift = style['baselineShift'];\n return typeof shift === 'number' && shift < 0 ? -shift : 0;\n};\n\n/**\n * A box on a line, over the bottom of the line by what `hang` worked out: the room under the\n * baseline, less what the box has under its own baseline, and less how far a `vertical-align`\n * length hangs it under the line's.\n *\n * ponytail: one room for a block of lines, the deepest of any of them. A line that wraps gives\n * every line the room of the deepest box: lay each line out by its own boxes if a stylesheet\n * hangs a box in a paragraph.\n */\nfunction onBaseline(node: EngineNode, props: Record<string, unknown>): void {\n const flow = node.parent?.flow;\n const lift = flow?.lifts?.get(node) ?? 0;\n delete props['baselineShift'];\n riseOnLine(props, flow?.rises?.get(node) ?? 0);\n if (lift <= 0) return;\n const written = firstOf(props, ['marginBottom', 'marginVertical', 'margin']);\n // A share of the width has no sum with the room in Yoga: it is kept, and the room is not.\n if (typeof written === 'string' && written !== 'auto') return;\n props['marginBottom'] = (typeof written === 'number' ? written : 0) + lift;\n}\n\n/**\n * Whether a box on a line has its baseline at the bottom edge of its margin for clipping what it\n * holds: an inline-block does (CSS 2.2, 10.8.1). A flex or grid box keeps the baseline of what\n * it holds, and an element inline in a browser, a span, is no inline-block there whatever the\n * engine lays it out as: neither clips its baseline away.\n */\nfunction clipsToEdge(\n box: EngineNode,\n style: Record<string, unknown>,\n rule: Readonly<Record<string, unknown>>,\n): boolean {\n if (style['overflow'] !== 'hidden' && style['overflow'] !== 'scroll') return false;\n // Written so by a stylesheet or a binding: the engine's own default for an element inline in\n // a browser is no inline-block there.\n const own = style['display'] !== box.defaultStyle?.['display'] ? style['display'] : undefined;\n return (rule['display'] ?? own) === 'inline-block';\n}\n\n/** The boxes on a line that lay out as flex or grid, and have a baseline with nothing in them. */\nconst FLEX_ON_A_LINE = new Set(['inline-flex', 'inline-grid']);\n\n/** A box's bottom margin in points, or none. */\nconst marginUnder = (style: Record<string, unknown>): number => {\n const margin = firstOf(style, ['marginBottom', 'marginVertical', 'margin']);\n return typeof margin === 'number' ? margin : 0;\n};\n\n/** A box of a known height moved down its line to reach as high as the strut: see `riseLines`. */\nfunction riseOnLine(props: Record<string, unknown>, rise: number): void {\n if (rise <= 0) return;\n const top = firstOf(props, ['marginTop', 'marginVertical', 'margin']);\n props['marginTop'] = (typeof top === 'number' ? top : 0) + rise;\n}\n\n/** How far a Latin font rises over its baseline and falls under it, as a share of its size. */\nconst FONT_ASCENT = 0.95;\nconst FONT_DESCENT = 0.24;\n/** The font size a view has where nothing gave it one, as React Native's text has. */\nconst DEFAULT_FONT_SIZE = 14;\n\n/**\n * The room a line has over and under its baseline with no text on it to make it: a browser lays\n * a line out around a strut of the container's font, so a line of boxes that sit on the baseline\n * is the font's ascent over it and its descent under it, each with half of what its line height\n * adds. Together they are the line height, where that is a length.\n *\n * ponytail: the shares are those of the system fonts and of most Latin ones, not read from the\n * font, and the strut is around the one line, not each of several a row wraps into. Measured\n * from the font if a line of boxes is ever a point off in one that matters.\n */\nfunction strutOf(props: Record<string, unknown>): { above: number; below: number } {\n const size = typeof props['fontSize'] === 'number' ? props['fontSize'] : DEFAULT_FONT_SIZE;\n const line = linePoints(props['lineHeight'], size);\n const leading = typeof line === 'number' ? line - (FONT_ASCENT + FONT_DESCENT) * size : 0;\n return {\n above: Math.max(leading / 2 + FONT_ASCENT * size, 0),\n below: Math.max(leading / 2 + FONT_DESCENT * size, 0),\n };\n}\n\n/**\n * A line height in points: a length, or a number under one times the font size, as an inherited\n * map hands a unitless one down (`{ multiple }`). Nothing for `normal`.\n *\n * ponytail: a number of one or more is read as `normal`. Material's table under Tailwind's\n * `line-height: 1.5` matched Chrome so and was ten boxes out read as points, which says a\n * line height Material writes in its own tokens is not reaching those boxes. Read every\n * number as points once that is found.\n */\nfunction linePoints(line: unknown, size: number): number | undefined {\n if (typeof line === 'number') return line;\n const multiple = (line as { multiple?: unknown } | null)?.multiple;\n return typeof multiple === 'number' && multiple < 1 ? multiple * size : undefined;\n}\n\nconst paddingUnder = (props: Record<string, unknown>): number => {\n const written = firstOf(props, ['paddingBottom', 'paddingVertical', 'padding']);\n return typeof written === 'number' ? written : 0;\n};\n\n/**\n * Whether a line's strut makes its box taller: where nothing else says how tall the box is, and\n * nothing on the line has text, whose own line is the same room. A height of its own says, and\n * so does an aspect ratio, which a block has its height from: its line is at the top of it.\n */\nfunction strutted(node: EngineNode, props: Record<string, unknown>): boolean {\n const tall =\n (props['height'] != null && props['height'] !== 'auto') ||\n (isSet(props['aspectRatio']) && props['aspectRatio'] !== 'auto');\n // Between two insets an out-of-flow box is as tall as they leave it.\n const held =\n OUT_OF_FLOW.has(props['position'] as string) && isSet(props['top']) && isSet(props['bottom']);\n return !tall && !held && !holdsText(node);\n}\n\n/**\n * Whether a generated box has text for its content, a space included: nothing is seen of a\n * space, but a browser lays its line out as one with text on it, which has the room of its own\n * font.\n */\nfunction writesText(node: EngineNode): boolean {\n if (!isGenerated(node.tag)) return false;\n const content = readStyle(node, 'content');\n return typeof content === 'string' && content !== '' && content !== 'none';\n}\n\n/** Whether there is text anywhere in what a node holds, typed into a field or written. */\nfunction holdsText(node: EngineNode): boolean {\n return node.childList.some((child) => {\n if (child.nodeKind === 'text') return child.nodeText.trim() !== '';\n return MEASURED_VIEWS.has(viewNameOf(child)) || writesText(child) || holdsText(child);\n });\n}\n\n/**\n * The plan a node is laid out by: the one of the block container it was last in the flow of,\n * where it is still there. A container taken out of the tree is never planned again, so a node\n * moved out of one still names it, and is asked where it is now.\n */\nfunction flowOver(node: EngineNode): Flow | undefined {\n const container = node.flowIn;\n if (!container?.flow?.members.has(node)) return undefined;\n let parent = node.parent;\n // No box of its own: its children are laid out in the node above it.\n while (parent && parent !== container && readStyle(parent, 'display') === 'contents') {\n parent = parent.parent;\n }\n return parent === container ? container.flow : undefined;\n}\n\n/** One key of a `[style]` value, an object or a list of them, without copying it. */\nfunction styleKey(value: unknown, key: string): unknown {\n if (!value || typeof value !== 'object') return undefined;\n if (!Array.isArray(value)) return (value as Record<string, unknown>)[key];\n for (let i = value.length - 1; i >= 0; i--) {\n const found = styleKey(value[i], key);\n if (found !== undefined) return found;\n }\n return undefined;\n}\n\n/** What a node's own style says for `key`, as `ownLayout` answers it, without an allocation. */\nfunction readStyle(node: EngineNode, key: string): unknown {\n const props = node.props;\n // Asked of most nodes more than once a commit, and most have neither of the first two.\n const over = props[STYLE_OVERRIDE];\n const inline = props['style'];\n // A style object, the usual inline style, is read here rather than through `styleKey`.\n const plain = inline !== null && typeof inline === 'object' && !Array.isArray(inline);\n return (\n (over === undefined ? undefined : styleKey(over, key)) ??\n (inline === undefined\n ? undefined\n : plain\n ? (inline as Record<string, unknown>)[key]\n : styleKey(inline, key)) ??\n props[key] ??\n node.styleCache?.style[key] ??\n node.defaultStyle?.[key]\n );\n}\n\n/** Whether a plan lays `child` out the same way in both: in the flow, with the same margins. */\nfunction sameFlow(child: EngineNode, before: Flow, after: Flow): boolean {\n if (!before.members.has(child) || !after.members.has(child)) return false;\n if (before.lined.has(child) !== after.lined.has(child)) return false;\n const a = before.plan.margins?.get(child);\n const b = after.plan.margins?.get(child);\n return a?.top === b?.top && a?.bottom === b?.bottom;\n}\n\n/** Have merged again each child a container's new plan no longer covers. */\nfunction leaveFlow(container: EngineNode, before: Flow | undefined, after: Flow | undefined): void {\n for (const child of before?.members ?? []) {\n if (after?.members.has(child)) continue;\n child.propsDirty = true;\n if (child.flowIn === container) child.flowIn = undefined;\n }\n}\n\n/** Have merged again each child a container's new plan covers differently, or for the first time. */\nfunction joinFlow(container: EngineNode, before: Flow | undefined, after: Flow | undefined): void {\n if (!after) return;\n for (const child of after.members) {\n if (before && sameFlow(child, before, after)) continue;\n child.propsDirty = true;\n child.flowIn = container;\n }\n}\n\n/** The least alpha iOS sends a touch to a view at: under a hundredth it is passed over. */\nconst TOUCHED_ALPHA = 0.011;\n\n/**\n * A view that takes a touch and has no opacity, committed with the least there is to be sent\n * one. A browser sends a press to an element at `opacity: 0`, which is how a see-through\n * backdrop hears a press outside a menu; iOS passes over a view it would not draw. A hundredth\n * of what the view draws is not seen.\n */\nfunction stillTouched(props: Record<string, unknown>): Record<string, unknown> {\n // One told to take no touch is not to be sent one, seen or not.\n if (props['pointerEvents'] === 'none') return props;\n const opacity = props['opacity'];\n if (typeof opacity === 'number' && opacity < TOUCHED_ALPHA) props['opacity'] = TOUCHED_ALPHA;\n return props;\n}\n\n/** Every prop `setOwned` can set, as a payload that changes them all. */\nconst RESET_OWNED: Readonly<Record<string, unknown>> = { opacity: undefined, transform: undefined };\n\n/** As Animated does: a view native sets values on is kept, or there is no view to set them on. */\nfunction keptForNative(node: EngineNode, props: Record<string, unknown>): void {\n if (node.owned && props['collapsable'] === undefined) props['collapsable'] = false;\n}\n\n/**\n * A box with `display: none`, out of the flow as well. It takes no room either way, but Yoga\n * reads an item's baseline from its first child that is in the flow, and a hidden one has no\n * layout to read: under a row with `align-items: baseline` the baseline is not a number, and\n * the row comes to no height with nothing in it placed. Out of the flow it is passed over.\n */\nfunction hiddenOutOfFlow(props: Record<string, unknown>): void {\n if (props['display'] === 'none') props['position'] = 'absolute';\n}\n\n/**\n * A placeholder's opacity, which native has none for, as its colour faded by that share: none of\n * it at 0, which is how a stylesheet hides a placeholder under a label, and all of it at 1.\n *\n * ponytail: with no colour of its own the placeholder is native's default, and a platform colour\n * is native's to resolve: neither is known here, so each is hidden at 0 and left as it is above\n * that. Name the platform's default, or read the colour back, if one is faded part of the way.\n */\nfunction placeholderFaded(props: Record<string, unknown>): void {\n const opacity = props['placeholderOpacity'];\n if (opacity === undefined) return;\n delete props['placeholderOpacity'];\n if (typeof opacity !== 'number' || opacity >= 1) return;\n const colour = props['placeholderTextColor'];\n if (typeof colour === 'string')\n props['placeholderTextColor'] = faded(colour, Math.max(opacity, 0));\n else if (opacity <= 0) props['placeholderTextColor'] = 'rgba(0, 0, 0, 0)';\n}\n\n/**\n * `height: 50%` under a parent with no height to take it of, which CSS reads as `auto`. Yoga\n * takes it of the space on offer, the screen's or everything a scroll view holds, so no height\n * is sent. A `min-height: 50%` there is none either, where Yoga takes it of the screen too.\n */\nfunction percentHeight(node: EngineNode, props: Record<string, unknown>): void {\n const height = isPercent(props['height']);\n const least = isPercent(props['minHeight']);\n if (!height && !least) return;\n // Out of the flow, it is of the box that holds it, which is laid out first and has a height.\n if (props['position'] === 'absolute') return;\n const parent = layoutParent(node);\n if (!parent) return;\n if (least && parent.heldAt) heldLeast(props, parent.heldAt.inner);\n // On a line among blocks, the line box Yoga takes it of is not the block it is a share of.\n if (height && onLineAmongBlocks(node)) return linedShare(parent, props);\n if (definiteHeight(parent)) return;\n if (height) delete props['height'];\n if (least) delete props['minHeight'];\n}\n\nconst onLineAmongBlocks = (node: EngineNode): boolean => flowOver(node)?.lined.has(node) === true;\n\n/**\n * A gap down a flex container that is a share of its height, as CSS has it: none where the\n * container has no height to share, as tall as its content, where Yoga takes it of the room on\n * offer. A grid works out its own gaps, and a block has none.\n */\nfunction percentGap(node: EngineNode, props: Record<string, unknown>): void {\n if (!isPercent(props['rowGap']) || node.grid !== undefined || node.flow !== undefined) return;\n if (!definiteHeight(node)) props['rowGap'] = 0;\n}\n\n/**\n * A share of the height of a block, on a line among its blocks, as what it comes to: of the\n * block's content box, where the block is held at its content's height or has a height in\n * points of its own, and no height where it has none to share. See `Engine.settleHeld`.\n */\nfunction linedShare(parent: EngineNode, props: Record<string, unknown>): void {\n const whole = blockContentHeight(parent);\n if (whole === undefined) delete props['height'];\n else props['height'] = (Number.parseFloat(props['height'] as string) / 100) * whole;\n}\n\n/** The height of a block's content box, where it is known before its layout: see `linedShare`. */\nfunction blockContentHeight(node: EngineNode): number | undefined {\n if (node.heldAt) return node.heldAt.inner;\n const height = ownLayout(node, 'height');\n if (typeof height !== 'number') return undefined;\n if (readStyle(node, 'boxSizing') === 'content-box') return height;\n const edge = insets(node.committed?.props ?? {});\n return Math.max(height - edge.Top - edge.Bottom, 0);\n}\n\n/**\n * A least height that is a share of a box held at its content's height, as what it comes to:\n * Yoga takes one down a column as a share of the box above that one. See `Engine.settleHeld`.\n *\n * ponytail: under a held box. One under a box with a height of its own is left to Yoga, which\n * has the same error there; commit it so too if a stylesheet is seen to need it.\n */\nfunction heldLeast(props: Record<string, unknown>, inner: number): void {\n props['minHeight'] = (Number.parseFloat(props['minHeight'] as string) / 100) * inner;\n}\n\n/** Whether a box's height is a percentage of a box that has no height of its own to share. */\nfunction sharesNoHeight(node: EngineNode, style: Record<string, unknown>): boolean {\n if (!isPercent(style['height']) || style['position'] === 'absolute') return false;\n const parent = layoutParent(node);\n return parent != null && !definiteHeight(parent);\n}\n\n/** Whether a grid has a height of its own, and not its rows': written, and of something. */\nconst ownsHeight = (node: EngineNode, style: Record<string, unknown>): boolean =>\n !NO_HEIGHT.has(style['height'] as string) && !sharesNoHeight(node, style);\n\n/**\n * What a grid was laid out from, to tell when it is to be laid out again: its own style, and\n * whether its height was a share of a box with none, which is no style of its own.\n */\nconst gridKey = (node: EngineNode, style: Record<string, unknown>): string =>\n asAKey(style) + (sharesNoHeight(node, style) ? ' of no height' : '');\n\nconst INLINE_ROWS = new Set(['inline-flex', 'inline-block', 'inline-grid']);\n\n/**\n * `flex-basis: 50%` in a box that is as wide as its content, or in a column as tall as its\n * content, which CSS reads as the item's own content: there is no size yet to take a share of. Yoga takes it of nothing, so the item is\n * as narrow as it can be made, and a chip's words wrap. No basis is sent.\n *\n * ponytail: a box in a line with no width of its own, or a row that is `fit-content` or capped\n * at its content. One sized by its content some other way, a grid track say, is left to Yoga;\n * name it here if one comes up.\n */\nfunction percentBasis(node: EngineNode, props: Record<string, unknown>): void {\n if (!isPercent(props['flexBasis'])) return;\n const parent = layoutParent(node);\n if (!parent) return;\n // Down a column as tall as what it holds, the share is of a height that is the content's own,\n // for a box with CSS's automatic minimum: an HTML element. A native view has none, and a\n // scroll view that shares a column with no height is no taller than nothing, as it was.\n if (!isRow(parent)) {\n if (props['minHeight'] === 'auto' && !definiteHeight(parent)) delete props['flexBasis'];\n return;\n }\n if (fitsWidth(parent)) delete props['flexBasis'];\n // Only where it sits in a line: an item of a flex container is as wide as that makes it.\n else if (INLINE_ROWS.has(readStyle(parent, 'display') as string) && inALine(parent)) {\n const width = readStyle(parent, 'width');\n if (width == null || width === 'auto') delete props['flexBasis'];\n }\n}\n\n/**\n * Whether a box is written to be as wide as its content: `width: fit-content`, or a cap at its\n * content on a width that would otherwise fill what holds it (`capAtContent`).\n */\nfunction fitsWidth(node: EngineNode): boolean {\n const width = readStyle(node, 'width');\n if (width === 'fit-content') return true;\n if (readStyle(node, 'maxWidth') !== 'max-content') return false;\n return width == null || width === 'auto' || isPercent(width);\n}\n\n/**\n * Start a multiline Android text field's text at the top, as iOS and a `<textarea>` do.\n *\n * React Native maps an unset `textAlignVertical` to `Gravity.NO_GRAVITY`, which `ReactEditText`\n * reads as the `EditText`'s own gravity, `center_vertical`. One the app set, through the input or\n * a CSS `vertical-align`, stays.\n */\nfunction alignMultiline(viewName: string, props: Record<string, unknown>): void {\n if (viewName !== 'AndroidTextInput' || props['multiline'] !== true) return;\n props['textAlignVertical'] ??= 'top';\n}\n\n/** The props of a run of text that change how tall its line is drawn. */\nconst SIZES_A_RUN = new Set(['style', 'allowFontScaling', 'maxFontSizeMultiplier']);\n\n/**\n * Keep a paragraph as tall as one of its lines, as a browser's line box is whatever holds it.\n * Yoga measures an item no taller than the room inside its container, and the text view cuts\n * its letters off there: a 24 point line in a row with 16 points between its paddings. The\n * line is the paragraph's own or a taller one of a run in it, `run`, which is scaled already. With it goes what is\n * around the text and inside the height Yoga gives a view, its padding and border above and\n * below, but for a content box. Only where a line height is a length, and nothing gives the\n * paragraph a height of its own.\n *\n * The line is as the system text size draws it: native scales a line height with the text, so\n * a line held to its points at a smaller size is shorter than its box and sits at the top of\n * it, over what a row centres it beside.\n */\nfunction lineTall(\n props: Record<string, unknown>,\n run: number,\n fontScale: number | undefined,\n): void {\n const own = props['lineHeight'];\n const line = Math.max(typeof own === 'number' ? own * textScale(props, fontScale) : 0, run);\n if (line <= 0) return;\n const unset = (value: unknown): boolean => value == null || value === 'auto';\n if (!unset(props['height']) || !unset(props['minHeight'])) return;\n const around = props['boxSizing'] === 'content-box' ? 0 : aroundALine(props);\n // To a thousandth of a point: a product of two fractions is rarely the number it reads as.\n props['minHeight'] = Math.round((line + around) * 1000) / 1000;\n}\n\n/** The points of padding and border above and below a view's content, where each is a length. */\nfunction aroundALine(props: Record<string, unknown>): number {\n return around(props, 'Height');\n}\n\n/**\n * The props each side's padding and border are read from, across a height and across a width,\n * the first set winning, as React Native and then Yoga read them: an alias of React Native's over\n * Yoga's own, a logical side over the physical one, and the start on the left unless the box is\n * right to left. A block's start and end are under the top and bottom.\n */\nfunction sides(props: Record<string, unknown>, size: 'Height' | 'Width'): string[][] {\n if (size === 'Height') {\n const block = ['paddingBlock', 'paddingVertical', 'padding'];\n return [\n ['paddingTop', 'paddingBlockStart', ...block],\n ['borderTopWidth', 'borderWidth'],\n ['paddingBottom', 'paddingBlockEnd', ...block],\n ['borderBottomWidth', 'borderWidth'],\n ];\n }\n const rtl = props['direction'] === 'rtl';\n const inline = ['paddingInline', 'paddingHorizontal', 'padding'];\n return (['Left', 'Right'] as const).flatMap((physical, at) => {\n const logical = (at === 0) !== rtl ? 'Start' : 'End';\n return [\n [`paddingInline${logical}`, `padding${logical}`, `padding${physical}`, ...inline],\n [`border${logical}Width`, `border${physical}Width`, 'borderWidth'],\n ];\n });\n}\n\n/** The points of padding and border across a view's height or width, where each is a length. */\nfunction around(props: Record<string, unknown>, size: 'Height' | 'Width'): number {\n let total = 0;\n for (const keys of sides(props, size)) {\n const found = keys.map((key) => props[key]).find((value) => value != null);\n if (typeof found === 'number') total += found;\n }\n return total;\n}\n\n/** The most and the least of each size, by name: asked of every node merged. */\nconst MOST = { Height: 'maxHeight', Width: 'maxWidth' } as const;\nconst LEAST = { Height: 'minHeight', Width: 'minWidth' } as const;\n\n/**\n * A most size under the least: under a `min-height`, or a border box's padding and border, which\n * CSS lets win (CSS 2.2, 10.7). React Native's Yoga holds the box to its most, and the box around\n * it to that, so the most is raised to the least. A most and a least in points: a share on either\n * side is left to Yoga.\n */\nfunction leastWins(props: Record<string, unknown>, size: 'Height' | 'Width'): void {\n const most = props[MOST[size]];\n if (typeof most !== 'number') return;\n const written = props[LEAST[size]];\n let least = typeof written === 'number' ? written : 0;\n if (props['boxSizing'] !== 'content-box') least = Math.max(least, around(props, size));\n if (most < least) props[MOST[size]] = least;\n}\n\n/**\n * Where a line may break: at a space, after a hyphen, and anywhere in a script written without\n * spaces. A soft hyphen and a zero-width space are places to break that draw nothing.\n */\nconst BREAKS = /[\\s\\-\\u00ad\\u200b\\u2010\\u2e80-\\u9fff\\uac00-\\ud7af\\uf900-\\ufaff\\uff00-\\uffef]/;\n\n/** Whether a paragraph's text, all its runs together, is one word: something, with no break. */\nfunction unbroken(node: EngineNode): boolean {\n let text = '';\n const collect = (from: EngineNode): void => {\n for (const child of from.childList) {\n if (child.nodeKind === 'text') text += child.nodeText;\n else if (isTextElement(child)) collect(child);\n }\n };\n collect(node);\n const words = trimEnds(text);\n return words !== '' && !BREAKS.test(words);\n}\n\n/**\n * Resolve a paragraph's `text-align` against its direction, as CSS does.\n *\n * React Native reads `left` and `right` relative to the layout direction: in a right-to-left\n * layout `RCTAttributedTextUtils` swaps them, so its `left` is the start edge. `start` and `end`\n * are therefore `left` and `right` whatever the direction. Where the app set a direction, the\n * default is `start`, as on the web, rather than native's natural alignment, which follows the\n * app's language and not the subtree; a physical `left` or `right` is swapped back so it stays on\n * that side; and the paragraph's base writing direction follows unless a `writing-direction` says\n * otherwise, which is what puts neutral characters such as punctuation on the right side.\n */\nfunction alignText(props: Record<string, unknown>, direction: TextDirection | undefined): void {\n const align = props['textAlign'] as string | undefined;\n if (!direction) {\n if (align !== undefined) props['textAlign'] = LOGICAL_ALIGN.get(align) ?? align;\n return;\n }\n props['textAlign'] = TEXT_ALIGN[direction].get(align ?? 'start') ?? align;\n props['writingDirection'] ??= direction;\n}\n\n/** React Native's `textAlign` for CSS's logical values, which means the same in either direction. */\nconst LOGICAL_ALIGN = new Map([\n ['start', 'left'],\n ['end', 'right'],\n]);\n\n/** React Native's `textAlign` for each CSS value, in a layout of each direction. */\nconst TEXT_ALIGN: Readonly<Record<TextDirection, ReadonlyMap<string, string>>> = {\n ltr: new Map([...LOGICAL_ALIGN, ['auto', 'left'], ['left', 'left'], ['right', 'right']]),\n rtl: new Map([...LOGICAL_ALIGN, ['auto', 'left'], ['left', 'right'], ['right', 'left']]),\n};\n\n/** The native modal host, which is left out of a commit while `visible` is false. */\nconst MODAL_HOST = 'ModalHostView';\n\n/**\n * The views that hold a page: what `position: fixed` is pinned to, where a browser pins it to\n * the viewport. A screen of a native stack stays mounted under the one pushed over it, so a box\n * fixed to the root would stay on top of every screen after its own.\n */\n/**\n * A screen's `gestureResponseDistance` that no touch is within: how far from each edge a swipe\n * back may start, with -1 for no limit, and none at all from the leading edge. It is what\n * `react-native-screens` reads as the swipe is about to begin; whether the swipe is enabled it\n * read when the finger came down, before anything here had heard of the touch.\n */\nconst NO_SWIPE = Object.freeze({ start: -1, end: 0, top: -1, bottom: -1 });\n\n/**\n * What a box clipped to nothing is committed with: `clip: rect(0 0 0 0)`, how a library hides\n * what is for a screen reader alone. A view is clipped to no smaller than itself, its shadow is\n * drawn outside it and a minimum size is over the pixel it is given, so each of those is taken\n * away, as is a border or outline drawn around it. It keeps its opacity: a view with none is not\n * read out, which is all this one is for.\n */\nconst CLIPPED_AWAY = {\n boxShadow: [],\n backgroundColor: 'rgba(0, 0, 0, 0)',\n minWidth: 0,\n minHeight: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n ...Object.fromEntries(\n ['', 'Top', 'Right', 'Bottom', 'Left', 'Start', 'End'].map((side) => [`border${side}Width`, 0]),\n ),\n outlineWidth: 0,\n};\n\n/** What a box that is `visibility: hidden` is committed with: there, and not seen or touched. */\nconst UNSEEN = Object.freeze({ opacity: 0, pointerEvents: 'none' });\n\n/** What a box is seen as, of what only a sheet read as a browser reads it says. */\nfunction seenByCss(merged: Record<string, unknown>): void {\n // `visibility`: a hidden box keeps its room and is not seen or touched, and nothing of a\n // native view is called visibility.\n if (merged['visibility'] !== undefined) {\n if (merged['visibility'] === 'hidden') Object.assign(merged, UNSEEN);\n delete merged['visibility'];\n }\n // A box such a sheet clips to nothing: see `CLIPPED_AWAY`.\n if (merged['clipped'] !== undefined) {\n delete merged['clipped'];\n Object.assign(merged, CLIPPED_AWAY);\n }\n}\n\n/** A screen of a native stack, which is what the swipe back is a gesture of. */\nconst STACK_SCREEN = 'RNSScreen';\n\nconst FIXED_BOUNDARIES = new Set([MODAL_HOST, STACK_SCREEN, 'RNSFullWindowOverlay']);\n\n/** What an element's `touch-action` is: bound on it, or from the rules it matches. */\nfunction touchActionOf(node: EngineNode): unknown {\n return inlineOf(node)['touchAction'] ?? node.styleCache?.style['touchAction'];\n}\n\n/** Where a touch is on the screen: its own point, or its first finger's. */\nfunction pointOf(nativeEvent: unknown): { x: number; y: number } {\n const event = (nativeEvent ?? {}) as TouchPayload & { touches?: readonly TouchPayload[] };\n const touch = event.pageX === undefined ? event.touches?.[0] : event;\n return { x: touch?.pageX ?? 0, y: touch?.pageY ?? 0 };\n}\n\n/**\n * What a touch on a node leaves to the browser: the `touch-action` of it, or of the nearest\n * element over it that says. Nothing where none does, which leaves everything.\n */\nfunction touchActions(node: EngineNode): readonly string[] | undefined {\n for (let up: EngineNode | null = node; up; up = up.parent) {\n const said = up.nodeKind === 'element' ? touchActionOf(up) : undefined;\n if (typeof said === 'string') return said.split(' ');\n }\n return undefined;\n}\n\nconst PANS_ACROSS = ['auto', 'manipulation', 'pan-x', 'pan-left', 'pan-right'];\nconst PANS_ALONG = ['auto', 'manipulation', 'pan-y', 'pan-up', 'pan-down'];\n\n/** Whether an element keeps a drag in one direction: its `touch-action` leaves no pan that way. */\nconst keeps = (actions: readonly string[] | undefined, pans: readonly string[]): boolean =>\n actions !== undefined && !actions.some((action) => pans.includes(action));\n\n/** How far a finger moves before a browser has settled which way a drag is going. */\nconst DRAG_SLOP = 4;\n\ninterface ViewNameRegistration {\n readonly viewName: string | PlatformViewName;\n readonly yielding: boolean;\n /** What it says of the native view, said again when a later registration is taken away. */\n readonly defaultProps: Record<string, unknown> | undefined;\n readonly options: ViewNameOptions | undefined;\n}\n\n/**\n * What each element name was before it was first registered, and its registrations, oldest\n * first: two packages can register one name and be taken away in either order.\n */\nconst registrations = new Map<\n string,\n {\n original: { viewName?: string | PlatformViewName; yielding: boolean; text: boolean };\n stack: ViewNameRegistration[];\n }\n>();\n\nfunction nameView(elementName: string, { viewName, yielding }: ViewNameRegistration): void {\n VIEW_NAMES[elementName] = viewName;\n if (yielding) YIELDING.add(elementName);\n else YIELDING.delete(elementName);\n // A name the app registers is the app's: no longer decided by what the element holds.\n TEXT_ELEMENTS.delete(elementName);\n}\n\n/**\n * Register a codegen'd third-party Fabric component, e.g.\n * `registerViewName('rns-screen', 'RNSScreen')`, which is how the router reaches\n * react-native-screens.\n *\n * `defaultProps` is for a component whose React wrapper supplies a base style in JS, the way\n * `ScrollView` and `Modal` do below. Driving the native component directly skips that wrapper,\n * and skipping it is not cosmetic: `RNSScreenStackHeaderConfig` without its `position: absolute`\n * joins the screen's flex layout and pushes every page down by the height of the header.\n */\nexport function registerViewName(\n elementName: string,\n viewName: string | PlatformViewName,\n defaultProps?: Record<string, unknown>,\n options?: ViewNameOptions,\n): () => void {\n const entry = registrations.get(elementName) ?? {\n original: {\n viewName: VIEW_NAMES[elementName],\n yielding: YIELDING.has(elementName),\n text: TEXT_ELEMENTS.has(elementName),\n },\n stack: [],\n };\n const registration = {\n viewName,\n yielding: options?.yieldsToComponents === true,\n defaultProps,\n options,\n };\n entry.stack.push(registration);\n registrations.set(elementName, entry);\n nameView(elementName, registration);\n describeViews(elementName, registration);\n // Takes this registration away, for a package that registers a name for as long as an app that\n // asked for it is up. The newest one still there names the element and says again what it said\n // of the native view, which this one may have cleared, and what the element was before any\n // comes back after the last. The native view's own defaults and text prop stay after the last:\n // they are the view's, whichever element names it.\n return () => {\n const index = entry.stack.indexOf(registration);\n if (index === -1) return;\n entry.stack.splice(index, 1);\n const top = entry.stack.at(-1);\n if (top) {\n nameView(elementName, top);\n return describeViews(elementName, top);\n }\n registrations.delete(elementName);\n const { original } = entry;\n if (original.viewName === undefined) delete VIEW_NAMES[elementName];\n else VIEW_NAMES[elementName] = original.viewName;\n if (original.yielding) YIELDING.add(elementName);\n else YIELDING.delete(elementName);\n if (original.text) TEXT_ELEMENTS.add(elementName);\n SPACED_TEXT.delete(elementName);\n };\n}\n\n/** Note what a registration says of each native view it names, and of the element. */\nfunction describeViews(\n elementName: string,\n { viewName, defaultProps, options }: ViewNameRegistration,\n): void {\n for (const name of typeof viewName === 'string' ? [viewName] : [viewName.ios, viewName.android]) {\n describeView(name, defaultProps, options);\n }\n // The element's, not the view's: another element may name the same view without it.\n if (options?.spacedText) SPACED_TEXT.add(elementName);\n else SPACED_TEXT.delete(elementName);\n}\n\n/** Note what a registration says of a native view: see `ViewNameOptions`. */\nfunction describeView(\n name: string,\n defaultProps: Record<string, unknown> | undefined,\n options: ViewNameOptions | undefined,\n): void {\n if (defaultProps) DEFAULT_PROPS[name] = defaultProps;\n if (options?.textContent) TEXT_CONTENT_PROPS[name] = options.textContent;\n if (options?.looseText) LOOSE_TEXT[name] = options.looseText;\n else delete LOOSE_TEXT[name];\n if (options?.fontNames) FONT_NAMES[name] = options.fontNames;\n else delete FONT_NAMES[name];\n}\n\n/** What else a registered view needs the engine to know about it. */\nexport interface ViewNameOptions {\n /**\n * The prop the view reads its text from, where it takes no children: SwiftUI's `Text` through\n * `@expo/ui` reads `text`. The text written inside the element becomes that prop, as `<text>`\n * takes its own content, and is not committed as children. An explicit prop wins over it.\n */\n readonly textContent?: string;\n /**\n * Whether the name gives way to a component of the app's own with the same selector, whose host\n * is then a plain view. For a set of views registered under a prefix an app may also use for\n * its design system, as `@expo/ui`'s are under `ui-`. A component that is the view itself, a\n * typed wrapper for it, says so with `keepNativeView`.\n */\n readonly yieldsToComponents?: boolean;\n /**\n * The element a run of text written straight into the view is drawn by, where that is not a\n * paragraph: an SVG text draws its words by a span, which is no child a template wrote. The\n * element is the engine's own, as the paragraph a view is given for its loose text is.\n */\n readonly looseText?: string;\n /**\n * Whether the text content it takes as a prop keeps its spaces, as a span of an SVG text does:\n * a run of them is one space, dropped only before the first words of what it is in and after\n * the last, since the next span's words follow on the same line.\n */\n readonly spacedText?: boolean;\n /**\n * Where a view's own props name a font that must reach native by another name, as SwiftUI's\n * `font` modifier must name a face by its file's PostScript name: rewrites `props` in place,\n * given that name for each name the app's `@font-face` faces are registered under. Called on\n * every commit of the view, and again for each view when the faces change.\n */\n readonly fontNames?: (props: Record<string, unknown>, postScriptName: PostScriptNames) => void;\n}\n\n/** The PostScript name of the face a name is registered under, where the build read it. */\nexport type PostScriptNames = (name: string) => string | undefined;\n\n/** How each view that names fonts in its own props rewrites them. See `ViewNameOptions`. */\nconst FONT_NAMES: Record<string, NonNullable<ViewNameOptions['fontNames']>> = {};\n\n/** Rewrites the fonts a view's own props name, for a view that says how. See `ViewNameOptions`. */\nfunction renameFonts(\n viewName: string,\n props: Record<string, unknown>,\n postScriptName: PostScriptNames,\n): void {\n FONT_NAMES[viewName]?.(props, postScriptName);\n}\n\n/** The elements whose text content keeps its spaces. See `ViewNameOptions`. */\nconst SPACED_TEXT = new Set<string>();\n/** Whether a view may hold spans that keep their spaces: one its loose words are drawn by. */\nconst SPACED_PARENT = (node: EngineNode): boolean =>\n SPACED_TEXT.has(node.tag) || LOOSE_TEXT[viewNameOf(node)] !== undefined;\n\n/** The element loose text in a view is drawn by, for the views that say. See `ViewNameOptions`. */\nconst LOOSE_TEXT: Record<string, string> = {};\n\n/** The registered names that give way to a component's own host. See `ViewNameOptions`. */\nconst YIELDING = new Set<string>();\n\n/** The prop each view that takes its text content as a prop reads it from. See `ViewNameOptions`. */\nconst TEXT_CONTENT_PROPS: Record<string, string> = {};\n\n/** Whether `node` takes its text content as a prop rather than as text children. */\nfunction takesTextAsProp(node: EngineNode): boolean {\n return node.nodeKind === 'element' && TEXT_CONTENT_PROPS[viewNameOf(node)] !== undefined;\n}\n\n/** Sets a view's text prop from its content, unless the prop is set explicitly. */\nfunction withTextContent(node: EngineNode, viewName: string, props: Record<string, unknown>): void {\n const prop = TEXT_CONTENT_PROPS[viewName];\n if (!prop || node.props[prop] !== undefined) return;\n const text = SPACED_TEXT.has(node.tag) ? spacedContent(node) : textContent(node);\n if (text) props[prop] = text;\n}\n\n/**\n * The text of a view that keeps its spaces: each run of them one space, and none before the\n * first words of what it is in or after the last.\n */\nfunction spacedContent(node: EngineNode): string {\n const own = node.childList\n .map((child) => (child.nodeKind === 'text' ? child.nodeText : ''))\n .join('')\n .replace(/[ \\t\\n\\r\\f]+/g, ' ');\n // The box the engine draws loose words by is in their place, which is the words' own.\n const self = node.anonymous ? (node.childList[0] ?? node) : node;\n const siblings = self.parent?.childList ?? [];\n const at = siblings.indexOf(self);\n const worded = (each: EngineNode) =>\n each.nodeKind === 'element' || (each.nodeKind === 'text' && !!trimEnds(each.nodeText));\n const first = !siblings.slice(0, at).some(worded);\n const last = !siblings.slice(at + 1).some(worded);\n return (last ? trimEnd : (text: string) => text)(first ? trimStart(own) : own);\n}\n\n/**\n * The whitespace a paragraph drops at its ends is what CSS collapses: spaces, tabs and line\n * breaks. A no-break space is text, as in a browser, so ` ` is how a value keeps a space at\n * its end; `String.prototype.trim` would take that too.\n */\nconst trimStart = (text: string): string => text.replace(/^[ \\t\\n\\r\\f]+/, '');\nconst trimEnd = (text: string): string => text.replace(/[ \\t\\n\\r\\f]+$/, '');\nconst trimEnds = (text: string): string => trimEnd(trimStart(text));\n\nconst NO_BREAK_SPACE = '\\u00a0';\n\n/**\n * A run of text as the words of a line, each with the space after it: a no-break space, which a\n * paragraph draws at its end where it drops any other. The run's own first and last space are\n * kept where something on the line is before or after it.\n *\n * ponytail: the space is part of the word, so a word that ends its line is a space wider than a\n * browser has it, and wraps that much sooner.\n */\nfunction wordsOf(run: string, leads: boolean, trails: boolean): string[] {\n const words = run.split(/[ \\t\\n\\r\\f]+/).filter((word) => word !== '');\n if (!words.length) return words;\n const last = words.length - 1;\n const spaced = words.map((word, at) => (at < last ? word + NO_BREAK_SPACE : word));\n if (leads && trimStart(run) !== run) spaced[0] = NO_BREAK_SPACE + spaced[0];\n if (trails && trimEnd(run) !== run) spaced[last] += NO_BREAK_SPACE;\n return spaced;\n}\n\n/**\n * How a paragraph is truncated, which native does by its props: one the engine made around a\n * view's own words is truncated as the view says, as a browser truncates a block's own text.\n */\nconst TRUNCATION = ['numberOfLines', 'ellipsizeMode'] as const;\n\n/**\n * The truncation each paragraph made around a view's words was merged with, as the view said it.\n * Not what it was committed with, which has the paragraph's own defaults in it.\n */\nconst truncatedBy = new WeakMap<EngineNode, readonly unknown[]>();\n\n/** What a view says of how its own words are truncated. */\nconst truncationOf = (parent: EngineNode): unknown[] =>\n TRUNCATION.map((key) => ownLayout(parent, key) ?? null);\n\n/** Whether a paragraph made around a view's words is truncated other than the view now says. */\nfunction truncationMoved(box: EngineNode, parent: EngineNode): boolean {\n const merged = truncatedBy.get(box);\n if (!merged) return false;\n return truncationOf(parent).some((said, at) => said !== merged[at]);\n}\n\nfunction truncatedAs(box: EngineNode, props: Record<string, unknown>): void {\n if (!box.anonymous || !box.parent) return;\n const said = truncationOf(box.parent);\n truncatedBy.set(box, said);\n TRUNCATION.forEach((key, at) => {\n if (said[at] !== null) props[key] = said[at];\n });\n}\n\n/**\n * Whether the words in a box are each placed on its line: a line of words and boxes, where a box\n * is an element. Beside only the boxes a rule generates, a library's struts, the words are the\n * one paragraph: nothing is placed after them, and a paragraph is one view for all of them.\n */\nconst wordedLine = (node: EngineNode): boolean =>\n node.flow?.plan.kind === 'lines' &&\n node.childList.some((child) => child.nodeKind === 'element' && !isGenerated(child.tag));\n\n/** The paragraphs the engine made for a run of text written straight into a view. */\nconst paragraphsOf = (text: EngineNode): readonly EngineNode[] =>\n text.box ? [text.box] : (text.words ?? NO_WORDS);\nconst NO_WORDS: readonly EngineNode[] = [];\n\n/**\n * The text written inside a view that takes it as a prop: every run joined, with the whitespace at\n * the two ends dropped as a paragraph drops it, and kept inside. A nested view is drawn after the\n * text, as SwiftUI's `Text` through `@expo/ui` draws a child `Text`, so the space before it stays.\n */\nfunction textContent(node: EngineNode): string {\n let text = '';\n let nested = false;\n for (const child of node.childList) {\n if (child.nodeKind === 'text') text += child.nodeText;\n else if (child.nodeKind === 'element') nested = true;\n }\n return nested ? trimStart(text) : trimEnd(trimStart(text));\n}\n\n/**\n * A view whose native name differs by platform. Chosen when the view is looked up rather than when\n * it is registered, so it does not matter which ran first: an app's imports register the router's\n * views before its `main.ts` gets to report the platform.\n */\nexport interface PlatformViewName {\n readonly ios: string;\n readonly android: string;\n}\n\n/** An element's registered view name, for the platform the host reported. */\nexport function registeredViewName(elementName: string): string | undefined {\n const name = VIEW_NAMES[elementName];\n if (name === undefined || typeof name === 'string') return name;\n return platformOS === 'android' ? name.android : name.ios;\n}\n\n/**\n * The views Fabric measures from their text, which a change of the system text size resizes:\n * a paragraph, and a text input on either platform. See `Engine.remeasureText`.\n */\nconst MEASURED_VIEWS = new Set(['Paragraph', 'TextInput', 'AndroidTextInput']);\n\n/** Leave a family that is still loading out of `style`, remembering it. See `loadingFamilies`. */\nfunction holdLoadingFamily(node: EngineNode, style: Record<string, unknown>): void {\n const family = style['fontFamily'];\n if (typeof family === 'string' && loadingFamilies.has(family)) {\n delete style['fontFamily'];\n node.heldFamily = family;\n } else if (node.heldFamily !== undefined) {\n node.heldFamily = undefined;\n }\n}\n\n/** What each mounted app does when faces register. See `fontsRegistered`. */\nconst fontListeners = new Set<(families: ReadonlySet<string>) => void>();\n\n/** Hear about faces registering with the platform, until the returned function is called. */\nexport function onFontsRegistered(listener: (families: ReadonlySet<string>) => void): () => void {\n fontListeners.add(listener);\n return () => fontListeners.delete(listener);\n}\n\n/**\n * Faces just registered with the platform, by the family names text asks for them by. Every\n * mounted app lays out again the paragraphs and text inputs that name one: see\n * `Engine.fontsRegistered`.\n */\nexport function fontsRegistered(families: Iterable<string>): void {\n const names = new Set(families);\n if (!names.size) return;\n for (const listener of [...fontListeners]) listener(names);\n}\n\n/**\n * Families a load has asked the platform for and not yet settled, by how many loads asked. Text\n * naming one is laid out in the fallback without the name until it settles: native caches a\n * text's measurement by its family name, so a fallback measurement under the face's name would\n * outlast the face arriving.\n */\nconst loadingFamilies = new Map<string, number>();\n\n/** Faces a load is about to ask the platform for. See `loadingFamilies`. */\nexport function fontsLoading(families: Iterable<string>): void {\n for (const family of families)\n loadingFamilies.set(family, (loadingFamilies.get(family) ?? 0) + 1);\n}\n\n/** What each mounted app does when a load settles. See `fontsSettled`. */\nconst settleListeners = new Set<(families: ReadonlySet<string>) => void>();\n\n/** Hear about loads settling, until the returned function is called. */\nexport function onFontsSettled(listener: (families: ReadonlySet<string>) => void): () => void {\n settleListeners.add(listener);\n return () => settleListeners.delete(listener);\n}\n\n/**\n * Faces a load asked for and has finished with, registered or not, before `fontsRegistered`.\n * Text held back for one that no load still asks for is laid out with the name again: see\n * `Engine.fontsSettled`.\n */\nexport function fontsSettled(families: Iterable<string>): void {\n const settled = new Set<string>();\n for (const family of families) {\n const left = (loadingFamilies.get(family) ?? 1) - 1;\n if (left > 0) loadingFamilies.set(family, left);\n else {\n loadingFamilies.delete(family);\n settled.add(family);\n }\n }\n if (settled.size) for (const listener of [...settleListeners]) listener(settled);\n}\n\n/** Whether a paragraph, or a span in it, was committed asking for one of these families. */\nfunction namesFamily(node: EngineNode, families: ReadonlySet<string>): boolean {\n const family = node.committed?.props['fontFamily'];\n if (typeof family === 'string' && families.has(family)) return true;\n return node.childList.some((child) => namesFamily(child, families));\n}\n\n/** A text size cap far above any a platform offers, so it caps nothing. See `fontsRegistered`. */\nconst UNCAPPED = 1000;\n/**\n * How far a paragraph's cap moves each time a face it names registers: just past the 0.005 React\n * Native compares text attributes to, so the layout it cached is not found, and too little for\n * an app's own cap to cap anything visibly differently.\n */\nconst FONT_REFRESH_STEP = 0.006;\n\n/** The views that take a cursor, on either platform. */\nconst TEXT_INPUTS = new Set(['TextInput', 'AndroidTextInput']);\n\n/**\n * Android's horizontal scroll view and the view that holds its content. RN's `ScrollView.js`\n * commits them in place of `ScrollView` and its plain content view when `horizontal` is set, and\n * the vertical view ignores `horizontal`. See `viewNameOf` and `committedViewName`.\n */\nconst HORIZONTAL_SCROLL = 'AndroidHorizontalScrollView';\nconst HORIZONTAL_CONTENT = 'AndroidHorizontalScrollContentView';\n\n/** The views that scroll their content, which `focus` brings a field into view within. */\nconst SCROLL_VIEWS = new Set(['ScrollView', HORIZONTAL_SCROLL]);\n\n/** Element name -> the element name of the ancestor it commits into. See `registerHoist`. */\nconst HOISTS: Record<string, string> = {};\n/** The `ancestorName`s, so a commit asks only those nodes what to hoist into them. */\nconst HOIST_TARGETS = new Set<string>();\n/** The `ancestorName`s that commit only what is hoisted into them. See `HoistOptions.only`. */\nconst HOIST_ONLY = new Set<string>();\n/** Element name -> the ancestor names it never hoists past. See `HoistOptions.stopAt`. */\nconst HOIST_STOPS: Record<string, ReadonlySet<string>> = {};\n/** Element name -> its registrations, the newest last, which is the one in effect. */\nconst HOIST_REGISTRATIONS = new Map<string, HoistRegistration[]>();\n\ninterface HoistRegistration {\n readonly ancestorName: string;\n readonly options: HoistOptions;\n}\n\n/**\n * Commit every `elementName` as a direct child of its nearest `ancestorName`, wherever the\n * template put it, e.g. `registerHoist('native-header', 'screen')`.\n *\n * For a native component that reads a configuration node from its own direct children and\n * nowhere else. `RNSScreen.mm` finds its header that way, so a header written inside a\n * `safe-area-view`, or inside any component a page wraps itself in, was never found: no title,\n * no back button, and nothing said why. The retained tree keeps the node where Angular put it,\n * so styles, `@if` and removal all behave as written; only what reaches Fabric moves. It lands\n * just after the ancestor's child it was written in, or after all of them when it was written in\n * the ancestor itself, which keeps a page's scroll view ahead of its header as UIKit's large\n * title wants. A node with no such ancestor commits where it is.\n *\n * Answers what takes the registration away again, for a package that can be taken out.\n */\nexport function registerHoist(\n elementName: string,\n ancestorName: string,\n options: HoistOptions = {},\n): () => void {\n const registration = { ancestorName, options };\n const stack = HOIST_REGISTRATIONS.get(elementName) ?? [];\n stack.push(registration);\n HOIST_REGISTRATIONS.set(elementName, stack);\n hoistAs(elementName, registration);\n return () => {\n const index = stack.indexOf(registration);\n if (index === -1) return;\n stack.splice(index, 1);\n // Registered again since, the later registration stays the one that counts.\n if (index < stack.length) return;\n if (stack.length === 0) HOIST_REGISTRATIONS.delete(elementName);\n hoistAs(elementName, stack.at(-1));\n };\n}\n\n/** Hoist an element as a registration says, or not at all, and note again what each ancestor is. */\nfunction hoistAs(elementName: string, registration: HoistRegistration | undefined): void {\n const { ancestorName, options } = registration ?? { ancestorName: undefined, options: {} };\n if (ancestorName === undefined) delete HOISTS[elementName];\n else HOISTS[elementName] = ancestorName;\n if (options.standIn) STAND_INS[elementName] = options.standIn;\n else delete STAND_INS[elementName];\n if (options.stopAt) HOIST_STOPS[elementName] = new Set(options.stopAt);\n else delete HOIST_STOPS[elementName];\n // An ancestor no registration in effect names any more is an ordinary view again.\n HOIST_TARGETS.clear();\n HOIST_ONLY.clear();\n for (const all of HOIST_REGISTRATIONS.values()) {\n const current = all.at(-1)!;\n HOIST_TARGETS.add(current.ancestorName);\n if (current.options.only) HOIST_ONLY.add(current.ancestorName);\n }\n}\n\nexport interface HoistOptions {\n /**\n * Props for a native view the ancestor keeps once the element has committed into it.\n *\n * For a configuration node the native side reads when it arrives but never forgets when it\n * leaves. `RNSScreen` hides its navigation bar when a header config it holds says `hidden`, and\n * does nothing at all when the config is taken away, so the last bar it was told about stays on\n * screen. With a stand-in, removing the element commits these props onto the same native view,\n * children dropped, and the next element of that name adopts the view rather than creating\n * another, so what the native side sees is one config that is updated, never one that goes.\n */\n standIn?: Record<string, unknown>;\n /**\n * Have the ancestor commit the elements hoisted into it and nothing else, in the order they\n * were written.\n *\n * For a native component that takes children of one type only. `RNSScreenStackHeaderConfig`\n * takes `RNSScreenStackHeaderSubview`s: iOS logs an error and drops any other child, and Android\n * throws. A header item written inside a component of the header reached it inside that\n * component's host view.\n */\n only?: boolean;\n\n /**\n * Ancestor names the element never hoists past: met before the ancestor it commits into, it\n * commits where it is, as one with no such ancestor does.\n *\n * For an ancestor the target is not meant to reach through. A tab's page with no stack of its\n * own has no screen of its own, and the screen above its tab is the one that holds the whole\n * tab bar, so a header written in that page must not configure it.\n */\n stopAt?: readonly string[];\n}\n\n/** Element name -> the props it leaves behind in its ancestor. See `HoistOptions.standIn`. */\nconst STAND_INS: Record<string, Record<string, unknown>> = {};\n\n/** A native view an ancestor keeps for a hoisted name with a stand-in, and who it is for now. */\ninterface KeptHoist {\n /** The element committed as this view, or null while the stand-in props are. */\n node: EngineNode | null;\n committed: Committed;\n}\n\n/**\n * Unregistered names commit as a plain RCTView, because that is what an **Angular component\n * host element** is. Angular always creates one (`<x-card>` is a real node in the tree), and\n * it carries the component's host bindings, so it cannot be elided. Guessing a native view\n * name from the element name instead produces `Unimplemented component: <XCard>` on device.\n *\n * The cost is that a typo'd element name would render as an empty view without a word, and\n * Angular's own unknown-element check cannot help (it no-ops without a DOM). So in dev the\n * engine reports a name that nothing accounts for: not a view name, not a component host (see\n * `markComponentHost`), and not an element selector any template declared (`declareElement`).\n * Use an attribute selector (`selector: '[card]'`) on a component to avoid the extra view.\n */\n/**\n * A run of text as a paragraph shows it: without the space at the paragraph's very start or end.\n *\n * Angular collapses template whitespace to a single space rather than removing it, so\n * `<text>\\n {{ name }}\\n</text>` arrives as ` Ada `. A browser drops that space where a line\n * starts or ends; React Native's Text draws it, and every label written across two lines, which\n * a formatter will do to any long one, comes out indented. Spaces between runs are left alone,\n * as they are in HTML.\n *\n * ponytail: worked out when the run itself changes. A run that stops being the first or last\n * because a sibling arrived keeps its old trim until it next changes, which is a space at most.\n */\nfunction paragraphText(node: EngineNode): string {\n let root = node.parent;\n // Text written straight into a view is a paragraph of its own, and all of it.\n if (root === null || !isTextElement(root))\n return node.box ? trimEnds(node.nodeText) : node.nodeText;\n // A text element a view stands in for, which places what it holds: no paragraph runs past it.\n const inParagraph = (above: EngineNode | null) =>\n isTextElement(above) && !aligningText(above as EngineNode);\n // The commonest paragraph by far: one run and nothing else, so it is both the first and last.\n if (root.childList.length === 1 && !inParagraph(root.parent)) return trimEnds(node.nodeText);\n while (inParagraph(root.parent)) root = root.parent!;\n const runs: EngineNode[] = [];\n const collect = (from: EngineNode) => {\n for (const child of from.childList) {\n if (child.nodeKind === 'text') {\n if (child.nodeText) runs.push(child);\n } else if (isTextElement(child)) collect(child);\n }\n };\n collect(root);\n let text = node.nodeText;\n if (runs[0] === node) text = trimStart(text);\n if (runs[runs.length - 1] === node) text = trimEnd(text);\n return text;\n}\n\n/** The part of a node `viewNameOf` reads: an engine node, or any host's mirror of one. */\nexport interface ViewNameNode {\n readonly nodeKind: string;\n readonly tag: string;\n readonly parent: ViewNameNode | null;\n /** Whether a component is mounted on it, and whether that component is the native view. */\n readonly componentHost?: boolean;\n readonly nativeView?: boolean;\n /** What it holds, which decides whether one of HTML's text elements is text or a view. */\n readonly childList?: readonly ViewNameNode[];\n /** Set on the paragraph the engine makes for a run of text written straight into a view. */\n readonly anonymous?: boolean;\n /** Set on a text element that lays out what it holds itself: see `Engine.settleBoxed`. */\n readonly boxed?: boolean;\n /** Its props, of which `horizontal` decides which scroll view a scroll view is on Android. */\n readonly props?: Readonly<Record<string, unknown>>;\n}\n\n/**\n * Whether an element is text: a `<text>`, or one of HTML's text elements that holds only text and\n * other such elements. Worked out each time, from the tree as it is, so nothing can go stale.\n */\nfunction isTextElement(node: ViewNameNode | null): boolean {\n if (node === null || node.nodeKind !== 'element') return false;\n if (node.tag === 'text') return true;\n // One lookup settles nearly every other element, which is a view.\n if (registeredViewName(node.tag) !== PARAGRAPH || node.boxed) return false;\n return !TEXT_ELEMENTS.has(node.tag) || holdsOnlyText(node);\n}\n\n/** Whether a text element holds text and nothing else. One that holds nothing holds no text. */\nfunction holdsOnlyText(node: ViewNameNode): boolean {\n const children = node.childList ?? [];\n for (const child of children) {\n if (child.nodeKind === 'element' && !isTextElement(child)) return false;\n }\n return children.length > 0;\n}\n\nconst ALIGNS = new Set(['center', 'flex-end', 'space-around', 'space-evenly']);\n\n/**\n * Whether one of HTML's text elements is a flex container that aligns the one run of text it\n * holds, as an avatar's initials are centred: `<span class=\"flex items-center justify-center\">`.\n *\n * A browser makes the run a flex item and places it. A paragraph's text is its content, which no\n * alignment moves, so such an element commits as a view, and its text as the paragraph any view's\n * loose text is. Read from the node's own style on each reconcile, which a change to it brings\n * about, so nothing is kept to go stale. The run can be a text element of its own, a label in a\n * span, which is then the item placed. So is a column of text elements, each an item under the\n * last. A `<text>` is a paragraph whatever its style, and any other element holding more than\n * the one run is left as it was.\n */\nfunction aligningText(node: EngineNode): boolean {\n if (node.nodeKind !== 'element' || node.tag === 'text' || !TEXT_ELEMENTS.has(node.tag)) {\n return false;\n }\n const stacked = stacksRuns(node);\n if (!stacked && (node.childList.length !== 1 || !oneRun(node.childList[0]!))) return false;\n // Under a text element it is a span of that paragraph, unless that one is a view placing it.\n if (isTextElement(node.parent) && !aligningText(node.parent as EngineNode)) return false;\n return placesByFlex(node, stacked);\n}\n\n/** Whether a flex container's own style places the run it holds, or stacks the runs it holds. */\nfunction placesByFlex(node: EngineNode, stacked: boolean): boolean {\n const display = ownLayout(node, 'display');\n if (display !== 'flex' && display !== 'inline-flex') return false;\n // A column of them: each a line of its own, where one paragraph would run them on.\n if (stacked) return String(ownLayout(node, 'flexDirection') ?? 'column').startsWith('column');\n return (\n ALIGNS.has(ownLayout(node, 'alignItems') as string) ||\n ALIGNS.has(ownLayout(node, 'justifyContent') as string)\n );\n}\n\n/**\n * Whether a text element holds two or more text elements and nothing else but whitespace and\n * the anchors control flow leaves: a label around a name and a hint, which a flex column has one under the other.\n */\nfunction stacksRuns(node: EngineNode): boolean {\n let runs = 0;\n for (const child of node.childList) {\n if (child.nodeKind === 'element' && TEXT_ELEMENTS.has(child.tag)) runs++;\n else if (child.nodeKind === 'text' ? trimEnds(child.nodeText) : child.nodeKind !== 'anchor')\n return false;\n }\n return runs > 1;\n}\n\n/** One run of text to place: text itself, or a text element around some, a label in a span. */\nconst oneRun = (child: EngineNode): boolean =>\n child.nodeKind === 'text' || (child.nodeKind === 'element' && TEXT_ELEMENTS.has(child.tag));\n\n/**\n * The view a node is committed as: `viewNameOf`, but for a text element that aligns its text, and\n * for the content view of a horizontal scroll view on Android, which RN commits as a view of its\n * own. That one is a plain view in every other respect, so only the commit names it: a scroll\n * view changing axis is made again with everything in it (see `forgetRenamed`), and a view moved\n * into or out of one is too (see `reconcileUnder`), so the name cannot go stale on a clone.\n */\nfunction committedViewName(node: EngineNode): string {\n if (node.scrollView) return registeredViewName('scroll-view') ?? 'ScrollView';\n if (aligningText(node)) return DEFAULT_VIEW;\n const name = viewNameOf(node);\n return name === DEFAULT_VIEW && platformOS === 'android' && holdsContentOf(node.parent)\n ? HORIZONTAL_CONTENT\n : name;\n}\n\n/**\n * The nearest scroll view a node is in that scrolls up and down: a sideways carousel on a page\n * is not what moves a field clear of the bottom of the screen.\n */\nfunction scrollingDown(node: EngineNode): EngineNode | null {\n let scroll = node.parent;\n while (\n scroll &&\n !(SCROLL_VIEWS.has(committedViewName(scroll)) && scroll.props['horizontal'] !== true)\n ) {\n scroll = scroll.parent;\n }\n return scroll;\n}\n\n/** Whether a node is a horizontal scroll view, whose children hold its content. */\nconst holdsContentOf = (parent: EngineNode | null): boolean =>\n parent !== null && parent.nodeKind === 'element' && viewNameOf(parent) === HORIZONTAL_SCROLL;\n\n/**\n * The native view a node commits as: `Paragraph` for a `<text>`, `VirtualText` for one nested in\n * another, `RawText` for a run of text, and `View` for anything unregistered, which is what an\n * Angular component's host element is.\n *\n * Exported for tools that show a template beside what it becomes, such as the X-ray in the\n * documentation's course, which labels `@ng-native/web`'s DOM with these names. It reads the same\n * table the commit does, so after `registerPlatformComponents('android')` it answers for Android.\n *\n * Exempt from the complexity limit as `mergeProps` is: asked of every element several times a\n * commit, where a call more for the name of a plain view measured slower in `pnpm bench`.\n */\n// eslint-disable-next-line complexity\nexport function viewNameOf(node: ViewNameNode): string {\n if (node.nodeKind === 'text') return RAW_TEXT;\n // RN models nested text as a span inside a paragraph: `Paragraph > [RawText, Text > RawText]`.\n // Committing a nested `<text>` as another Paragraph gives a paragraph inside a paragraph,\n // which lays out as a separate block instead of flowing inline.\n // A component of the app's own under a name a view set registered: its host is a plain view.\n if (node.componentHost && !node.nativeView && YIELDING.has(node.tag)) return DEFAULT_VIEW;\n const registered = registeredViewName(node.tag);\n // Nearly every element: a view of some kind, by its name alone. A scroll view, the one name\n // that can mean two views, is told from the rest first.\n if (registered !== PARAGRAPH) {\n return registered === 'ScrollView' ? namedView(node, registered) : (registered ?? DEFAULT_VIEW);\n }\n // One of HTML's text elements that holds something other than text: a view.\n // Or one that lays out what it holds itself: see `Engine.settleBoxed`.\n if (node.tag !== 'text' && TEXT_ELEMENTS.has(node.tag) && !holdsOnlyText(node)) {\n return DEFAULT_VIEW;\n }\n if (node.boxed) return DEFAULT_VIEW;\n // The paragraph the engine makes for a view's loose text is under a view, whatever the name\n // of the element that view is.\n return nestedText(node) ? VIRTUAL_TEXT : PARAGRAPH;\n}\n\n/**\n * The view an element other than text is by its registered name: a plain view when it has none,\n * and on Android, where there is a scroll view for each axis, the horizontal one when RN would\n * pick it, `horizontal` set to true.\n */\nconst namedView = (node: ViewNameNode, registered: string | undefined): string =>\n registered === 'ScrollView' && platformOS === 'android' && node.props?.['horizontal'] === true\n ? HORIZONTAL_SCROLL\n : (registered ?? DEFAULT_VIEW);\n\n/**\n * Whether a text element is a span of the paragraph above it: under another text element, but\n * not one that is a view for placing this one (see `aligningText`), nor the engine's own box.\n */\nconst nestedText = (node: ViewNameNode): boolean =>\n !node.anonymous && isTextElement(node.parent) && !placesText(node.parent);\n\n/** Whether a node's parent is a text element committed as a view, to place the run it holds. */\nconst placesText = (parent: ViewNameNode | null | undefined): boolean =>\n parent != null && 'props' in parent && aligningText(parent as unknown as EngineNode);\n\n/**\n * The props every native view reads as a boolean: the `bool` fields of React Native's\n * `BaseViewProps`, `AccessibilityProps` and `HostPlatformViewProps`, by the names JavaScript sends.\n *\n * An attribute arrives as text. A component that declares the prop as an input turns it into a\n * boolean itself, but an element nothing claims, such as a component's own host, holds what it\n * was given, and Android refuses a string where it reads a boolean: `focusable=\"false\"` is\n * `java.lang.String cannot be cast to java.lang.Boolean` at the first commit. iOS ignores it.\n *\n * So the text is made a boolean as it is committed, `\"false\"` false and anything else true, as an\n * attribute reads in HTML. The node keeps the text, which is what `[focusable=\"false\"]` in a\n * stylesheet matches against.\n */\nconst BOOLEAN_VIEW_PROPS = new Set([\n 'accessibilityElementsHidden',\n 'accessibilityIgnoresInvertColors',\n 'accessibilityRespondsToUserInteraction',\n 'accessibilityShowsLargeContentViewer',\n 'accessibilityViewIsModal',\n 'accessible',\n 'collapsable',\n 'collapsableChildren',\n 'focusable',\n 'hasTVPreferredFocus',\n 'needsOffscreenAlphaCompositing',\n // The flags native reads to know an event has a listener, which are booleans as well.\n 'onAccessibilityAction',\n 'onAccessibilityEscape',\n 'onAccessibilityMagicTap',\n 'onAccessibilityTap',\n 'onLayout',\n 'removeClippedSubviews',\n 'renderToHardwareTextureAndroid',\n 'screenReaderFocusable',\n 'shouldRasterizeIOS',\n]);\n\n/**\n * Whether `node` holds nothing `:empty` sees besides `moved`: so it was empty before `moved` came,\n * or is now that it has gone. What `:empty` does not see is `fills` in css.ts to say.\n */\nfunction wasOrIsEmptyWithout(node: EngineNode, moved: EngineNode): boolean {\n if (!fills(moved)) return false;\n return !node.childList.some((child) => child !== moved && fills(child));\n}\n\n/**\n * Have the child that paints a node's background merged again with the node: nothing of the\n * child's own moved, and what it paints may have.\n */\nfunction repaint(node: EngineNode): void {\n if (node.paintsOn?.parent === node) node.paintsOn.propsDirty = true;\n}\n\n/** A sixtieth of a second: how far apart the frames native is given for an animation are. */\nconst NATIVE_FRAME = 1000 / 60;\n/**\n * What native eases a set of transitions on one clock by: a colour by its own channels, opacity\n * and a transform as an animation of them is. Nothing where any of them is no value native can\n * ease, which leaves them all to JavaScript.\n */\nfunction easedChannels(\n tracks: ReadonlyMap<string, readonly TrackPoint[]>,\n spec: AnimationSpec,\n props: Record<string, unknown>,\n): DrivenChannels | null {\n const tinted = new Map([...tracks].filter(([key]) => EASED_COLOURS.has(key)));\n const moved = new Map([...tracks].filter(([key]) => !EASED_COLOURS.has(key)));\n const colors = colourChannels(tinted, spec);\n const { channels, held } = clockChannels(moved, spec, props);\n if (!colors || held.length) return null;\n const any = channels.opacity || channels.transform.length || tinted.size;\n return any ? { ...channels, colors } : null;\n}\n\n/** The sides a length is written for, and the two it is written for at once. */\nconst EDGES = ['', 'Top', 'Right', 'Bottom', 'Left', 'Horizontal', 'Vertical'];\n/**\n * The properties of a transition that resize or move a box, which native eases by laying the\n * view out where it ends: see `layEased`.\n */\nconst LAID_OUT = new Set([\n ...['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight'],\n ...['top', 'right', 'bottom', 'left', 'flexBasis'],\n ...EDGES.map((edge) => `margin${edge}`),\n]);\n/** Every prop that can resize or move a box, a view's own or another's. */\nconst MOVES_BOXES = new Set([\n ...LAID_OUT,\n ...EDGES.map((edge) => `padding${edge}`),\n ...['borderWidth', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n ...['flex', 'flexGrow', 'flexShrink', 'flexDirection', 'flexWrap', 'alignItems', 'alignSelf'],\n ...['alignContent', 'justifyContent', 'gap', 'rowGap', 'columnGap', 'display', 'position'],\n ...['aspectRatio', 'fontSize', 'lineHeight', 'fontFamily', 'fontWeight', 'letterSpacing'],\n ...['numberOfLines', 'start', 'end'],\n]);\n\n/** Whether native is moving a view to a prop's value, by a transition or an animation it laid out. */\nfunction laidByNative(node: EngineNode, key: string): boolean {\n const eased = node.transitions?.get(key);\n if (eased?.laid && !eased.done) return true;\n return node.playing?.laid === true && node.playing.tracks.has(key);\n}\n\n/** Whether an animation plays once through, forwards, with no wait before it. */\nconst playedOnce = (spec: AnimationSpec): boolean =>\n spec.delay === 0 && spec.duration > 0 && spec.iterations === 1 && !spec.direction;\n\n/** Whether a track is two frames on one curve, the first of them where the view is drawn. */\nfunction fromWhereDrawn(track: readonly TrackPoint[], drawn: unknown): boolean {\n const [first, last] = track;\n if (track.length !== 2 || first!.easing || last!.value == null) return false;\n // One that ends where it starts moves nothing: there is nothing for native to lay out.\n return Object.is(first!.value, drawn) && !Object.is(first!.value, last!.value);\n}\n\n/** The curves a layout animation has, as the timing function each is. */\nconst LAYOUT_CURVES: readonly (readonly [string, readonly number[]])[] = [\n ['linear', [0, 0, 1, 1]],\n ['easeIn', [0.42, 0, 1, 1]],\n ['easeOut', [0, 0, 0.58, 1]],\n ['easeInEaseOut', [0.42, 0, 0.58, 1]],\n];\n\n/** The curve of a layout animation nearest a timing function, by where each is along the way. */\nfunction layoutCurve(easing: readonly number[]): string {\n const along = [0.2, 0.4, 0.6, 0.8];\n const apart = (curve: readonly number[]) =>\n along.reduce((sum, at) => sum + (bezier(curve, at) - bezier(easing, at)) ** 2, 0);\n let nearest = LAYOUT_CURVES[0]!;\n for (const curve of LAYOUT_CURVES) if (apart(curve[1]) < apart(nearest[1])) nearest = curve;\n return nearest[0];\n}\n\n/** The properties of a transition native can play: see `easeNatively`. */\nconst EASED_COLOURS = new Set([\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n]);\nconst NATIVELY_EASED = new Set(['opacity', 'transform', ...EASED_COLOURS]);\n\n/** What a node that hands its background colour over has handed so far: nothing. */\nconst UNREPORTED = Symbol('unreported');\n\n/** The style keys that are a view's background. */\nconst PAINT_KEYS = [\n 'backgroundColor',\n 'experimental_backgroundImage',\n 'experimental_backgroundSize',\n 'experimental_backgroundPosition',\n 'experimental_backgroundRepeat',\n];\n\n/** Note a prop written on a node that keeps `writes`: see there. */\nfunction noteWrite(node: EngineNode, key: string, value: unknown): void {\n if (!node.writes) return;\n if (value === undefined || value === null) node.writes.delete(key);\n else node.writes.add(key);\n}\n\n/**\n * A node's own props onto what it commits with. No native prop has a hyphen: `data-*` and `aria-*`\n * attributes stay on the node for selectors to match, and an `aria-*` one is mapped to the prop\n * native reads. The node's `attributeOnly` names stay on it the same way.\n */\nfunction writeOwnProps(\n own: Record<string, unknown>,\n props: Record<string, unknown>,\n attributeOnly?: ReadonlySet<string>,\n): void {\n let aria = false;\n for (const key of Object.keys(own)) {\n if (attributeOnly?.has(key)) continue;\n if (key.includes('-')) aria ||= key.startsWith('aria-');\n else if (!ENGINES_OWN.has(key)) {\n props[key] = committedProp(key, own[key]);\n }\n }\n if (!aria) return;\n // An attribute-only `aria-*` is not mapped to the prop native reads either.\n const mapped = attributeOnly?.size\n ? Object.fromEntries(Object.entries(own).filter(([key]) => !attributeOnly.has(key)))\n : own;\n applyAria(mapped, props);\n}\n\n/** A prop as it is committed: a boolean view prop held as text is the boolean the text says. */\nfunction committedProp(key: string, value: unknown): unknown {\n return typeof value === 'string' && BOOLEAN_VIEW_PROPS.has(key) ? value !== 'false' : value;\n}\n\n/**\n * The `pointer-events` an element ends up with, in the order its props are merged: its inline\n * style's, then its `pointerEvents` prop, then what the sheets resolve. The inline one is read for\n * itself because an element no rule matches resolves to what it inherits, with its own inline\n * value only in what it hands down.\n */\nfunction pointerEventsOf(node: EngineNode, resolved: Record<string, unknown>): unknown {\n const inline = node.inlineInherits ? inlineInherited(node.props['style']) : null;\n const own = inline?.['pointerEvents'];\n // Merged over the prop, so its `inherit` is what the sheets and the parent settled, not the prop.\n if (own === 'inherit') return resolved['pointerEvents'];\n return own ?? node.props['pointerEvents'] ?? resolved['pointerEvents'];\n}\n/**\n * A node's `pointer-events` as native takes it, once its props and styles are merged.\n *\n * In CSS `none` is the element alone, and a descendant's `auto` takes touches again, which native\n * calls `box-none`: what a `none` with something inside to open it is committed as. Native's own\n * `none` is the whole subtree. It is what a `none` with nothing inside to open it stays, because\n * Android's text and images take no `pointerEvents` of their own and only an ancestor's `none`\n * keeps touches off them. It is also what the `pointerEvents` prop means, so a `none` that is the\n * prop's is left as it is.\n *\n * An inline `inherit` is what the element has without it, which is `resolved`: what the sheets\n * and its parent settled.\n */\nfunction nativePointerEvents(\n node: EngineNode,\n style: Record<string, unknown>,\n resolved: unknown,\n): void {\n let value = style['pointerEvents'];\n if (value === undefined) return;\n if (value === 'inherit') {\n value = resolved;\n if (value === undefined) delete style['pointerEvents'];\n else style['pointerEvents'] = value;\n }\n if (value === 'none' && node.touchWithin && node.props['pointerEvents'] !== 'none') {\n style['pointerEvents'] = 'box-none';\n }\n}\n/** Whether `node`, whose `pointer-events` is `value`, takes touches or holds something that does. */\nfunction takesTouches(node: EngineNode, value: unknown, prop: unknown): boolean {\n if (value === undefined) return false;\n // The prop's `none` is native's: the whole subtree, whatever is inside it.\n if (value === 'none' && prop === 'none') return false;\n // CSS's `none` and native's `box-none` take no touches themselves: their children answer.\n if (value === 'none' || value === 'box-none') {\n return node.childList.some((child) => child.touchWithin);\n }\n return true;\n}\n\n/**\n * Records on `node` whether it, or something inside it, takes touches where it would inherit\n * `none`. When that changes a `none` element's own answer, its props are marked to be committed\n * again.\n *\n * Called as a node is reconciled, after its children, so theirs are already current: a child that\n * was skipped as clean has nothing beneath it that changed, and a change beneath marks every\n * ancestor to come back through here.\n */\nfunction noteTouches(node: EngineNode, style: StyleCache | null): void {\n if (!style) return;\n // Nearly every node: no `pointer-events` in any sheet, style or prop, and nothing recorded.\n const resolved = style.style['pointerEvents'];\n const prop = node.props['pointerEvents'];\n if (resolved === undefined && prop === undefined && !node.inlineInherits && !node.touchWithin) {\n return;\n }\n const value = pointerEventsOf(node, style.style);\n const within = takesTouches(node, value, prop);\n if (within === !!node.touchWithin) return;\n node.touchWithin = within;\n if (value === 'none') node.propsDirty = true;\n}\n\nconst hasClasses = (node: EngineNode, names: readonly string[]): boolean =>\n names.every((name) => node.classes?.has(name));\n\n/** Whether `node` is `ancestor` or somewhere under it. */\nfunction isWithin(node: EngineNode | null, ancestor: EngineNode): boolean {\n for (let at = node; at; at = at.parent) if (at === ancestor) return true;\n return false;\n}\n\n/**\n * The DOM events Angular's `@defer (on interaction)` and `(on hover)` listen for on the trigger\n * element, as the engine events that mean the same thing here.\n *\n * Interaction is `click` and `keydown`: a touch that lifts on the trigger or anything inside it,\n * and focus reaching it, which is what a keyboard or a screen reader does before acting on it.\n * Hover is `mouseenter`, `mouseover` and `focusin`: a pointer entering, which only a trackpad or a\n * mouse produces, and focus. Anything else is not a trigger and is ignored.\n */\nconst DEFER_TRIGGER_EVENTS: Readonly<Record<string, readonly string[]>> = {\n click: ['topTouchEnd'],\n keydown: ['topFocus'],\n mouseenter: ['topPointerEnter'],\n focusin: ['topFocus'],\n};\n\n/** Each trigger listener's teardowns, by DOM event name. Off the node, which rarely has one. */\nconst triggerListeners = new WeakMap<\n object,\n Map<(event: unknown) => void, Map<string, () => void>>\n>();\n\n/**\n * The react tag of the next view any engine creates.\n *\n * Even, because surface root tags are odd (1, 11, 21, ...): an odd view tag eventually collides\n * with a root, and UIKit throws inside `-[RCTViewComponentView mountChildComponentView:]` while\n * adding a view to itself, a native crash with no JS error at all.\n *\n * And far above 2, where React starts. Native keeps one registry of views by tag for every\n * surface, and React numbers its own views 2, 4, 6... on any surface it renders; a development\n * build always has one, LogBox, which renders the first `console.warn` on a surface of its own.\n * Starting where React starts put two views under one tag, and the app crashed natively in\n * `-[RCTComponentViewRegistry dequeueComponentViewWithComponentHandle:tag:]`. One counter for\n * every engine, so two Angular surfaces do not collide with each other either.\n *\n * ponytail: room for about 530 million views in one run of the app before a tag would pass\n * int32, which native keeps them as; recycled and cloned views take no new tag. Wrapping would\n * need to skip tags still mounted.\n */\nconst FIRST_TAG = 2 ** 30;\nlet lastTag = FIRST_TAG - 2;\nconst nextTag = (): number => (lastTag += 2);\n\nlet hoverReported = false;\n\n/**\n * Said once, in development, the first time a `@defer (on hover)` trigger is registered: a phone\n * has no pointer, so on one the block waits for focus alone.\n */\nfunction reportHover(host: HostEngine): void {\n if (hoverReported || !(host instanceof Engine) || !host.dev) return;\n hoverReported = true;\n console.warn(\n '[angular-native] @defer (on hover) fires when a pointer enters the trigger, which takes a trackpad or a mouse (an iPad, or an Android device with one), or when the trigger takes focus. On a phone it waits for focus alone; add another trigger, such as on interaction or on viewport.',\n );\n}\n\n/** A bound value the cascade works out from tokens: a `var()`, a `color-mix()`, a relative colour. */\nconst BOUND_TOKEN =\n /^[ \\t\\n\\r\\f]*(?:var|color-mix)\\(|^[ \\t\\n\\r\\f]*[a-z]+\\([ \\t\\n\\r\\f]*from[ \\t\\n\\r\\f]/i;\n\n/**\n * A bound value kept as a declaration the cascade settles: a `var()`, a colour made of tokens, or\n * a relative length.\n */\n/**\n * The text each bound declaration was read from, to know one bound again as it was: see\n * `Engine.setBoundStyle`.\n */\nconst BOUND_TEXT = new WeakMap<DeferredDeclaration, string>();\n\n/** `boundFrom`, remembering the text it was read from. */\nfunction boundRead(prop: string, text: string, on: string): DeferredDeclaration | null {\n const bound = boundFrom(prop, text, on);\n if (bound) BOUND_TEXT.set(bound, text);\n return bound;\n}\n\nfunction boundFrom(prop: string, text: string, on: string): DeferredDeclaration | null {\n return BOUND_TOKEN.test(text)\n ? boundDeclaration(prop, tokenFromValue(text), on)\n : boundRelativeLength(prop, text, on);\n}\n\n/** Whether a value is one of the engine's own nodes. */\nexport function isEngineNode(value: unknown): value is EngineNode {\n return value instanceof RetainedNode;\n}\n\n/**\n * A retained node, as a class so every node has one shape from its first line: Hermes lays a\n * constructed object out once, where the object-spread this replaced built a literal and copied\n * eighteen fields across for each of the thousands of nodes a screen makes.\n *\n * The first three methods are what Angular's `animate.enter` and `animate.leave` ask an element\n * for directly, rather than through `Renderer2`; everything else those instructions do goes through\n * the renderer. `getAnimations` answers from the transitions the engine is actually running,\n * which is what tells Angular how long to wait before removing a leaving element.\n */\n/**\n * What the Metro preset's `Node` stand-in recognises an engine node by, so that Angular's\n * `instanceof Node` checks pass for these and for nothing else.\n */\nconst ENGINE_NODE = Symbol.for('ng-native.node');\n\nclass RetainedNode {\n static {\n Object.defineProperty(RetainedNode.prototype, ENGINE_NODE, { value: true });\n }\n\n props: Record<string, unknown> = {};\n nodeText = '';\n childList: EngineNode[] = [];\n parent: EngineNode | null = null;\n listeners: Map<string, Set<(event: unknown) => void>> | null = null;\n classes: Set<string> | null = null;\n keptAttributes: Record<string, string> | undefined = undefined;\n templateSheet: StyleSheet | null = null;\n hostSheet: StyleSheet | null = null;\n customProperties: Record<string, TokenValue> | null = null;\n styleCache: StyleCache | null = null;\n styleDirty = true;\n ownDirty = false;\n styleCommitted: StyleCache | null = null;\n fitContainer: string | undefined = undefined;\n heightBasis: boolean | undefined = undefined;\n hasDirty = false;\n stateDirty = false;\n ownStyle: object | undefined = undefined;\n claimed: true | undefined = undefined;\n dormantHoists: EngineNode[] | null = null;\n committed: Committed | null = null;\n committedUnder: EngineNode | LineBox | null = null;\n kept: Map<string, KeptHoist> | undefined = undefined;\n remeasure: true | undefined = undefined;\n oneWord: boolean | undefined = undefined;\n raised: number | undefined = undefined;\n propsDirty = false;\n structureDirty = false;\n subtreeDirty = false;\n touchWithin: boolean | undefined = undefined;\n box: EngineNode | undefined = undefined;\n words: EngineNode[] | undefined = undefined;\n anonymous: true | undefined = undefined;\n styled: true | undefined = undefined;\n bornIn: number | undefined = undefined;\n truncates: true | undefined = undefined;\n // Written on nodes that never had one: a style set inline, and every node a commit forgets. A\n // field a node is not made with gives it another shape when it is written.\n inlineInherits: boolean | undefined = undefined;\n line: LineBox | undefined = undefined;\n inside: { handle: FabricNode; childHandles: FabricNode[] } | undefined = undefined;\n transitions?: Map<string, Transition>;\n playing?: RunningAnimation;\n scrolled?: ScrollAnimation;\n owned?: { readonly tag: number; readonly keys: Set<string> };\n\n readonly nodeKind: NodeKind;\n readonly tag: string;\n /** See `HostNode.engine`. */\n readonly engine: HostEngine;\n\n constructor(kind: NodeKind, tag: string, host: HostEngine) {\n this.nodeKind = kind;\n this.tag = tag;\n this.engine = host;\n }\n\n get tagName(): string {\n return this.tag;\n }\n\n /** Angular's dev-mode assertion compares this against `Node.ELEMENT_NODE`. */\n get nodeType(): number {\n return 1;\n }\n\n getAnimations(): unknown[] {\n const running: unknown[] = [];\n const playing = this.playing;\n if (playing && !playing.done) {\n running.push({\n animationName: playing.spec.name,\n effect: {\n // `animate.enter` reads this to know how long to wait. A null count is `infinite`,\n // which is what the Web Animations shape spells as Infinity.\n getTiming: () => ({\n duration: playing.spec.duration * (playing.spec.iterations ?? Infinity),\n delay: playing.spec.delay,\n iterations: playing.spec.iterations ?? Infinity,\n }),\n },\n });\n }\n for (const [property, transition] of this.transitions ?? []) {\n if (transition.done) continue;\n running.push({\n transitionProperty: property,\n effect: {\n getTiming: () => ({ duration: transition.duration, delay: 0, iterations: 1 }),\n },\n });\n }\n return running;\n }\n\n /**\n * Where another node is relative to this one, as the DOM's `compareDocumentPosition` answers:\n * the bits for preceding (2), following (4), containing (8) and contained (16), in tree order.\n * Signal Forms asks, to focus the first of a form's fields in the order the screen shows them.\n */\n compareDocumentPosition(other: RetainedNode): number {\n if (other === this) return 0;\n const path = (node: RetainedNode): RetainedNode[] => {\n const chain: RetainedNode[] = [];\n for (let at: RetainedNode | null = node; at; at = at.parent as RetainedNode | null) {\n chain.unshift(at);\n }\n return chain;\n };\n const mine = path(this);\n const theirs = path(other);\n if (mine[0] !== theirs[0]) return 1 | 32 | 4;\n let depth = 0;\n while (depth < mine.length && depth < theirs.length && mine[depth] === theirs[depth]) depth++;\n if (depth === mine.length) return 4 | 16;\n if (depth === theirs.length) return 2 | 8;\n const siblings = mine[depth - 1]!.childList as unknown as RetainedNode[];\n return siblings.indexOf(theirs[depth]!) < siblings.indexOf(mine[depth]!) ? 2 : 4;\n }\n\n /**\n * What Signal Forms' `focusBoundControl()` calls on a field's element, and what a DOM element\n * would do: see `HostEngine.focus`.\n */\n focus(): void {\n this.engine.focus(this as unknown as EngineNode);\n }\n\n get classList(): { contains(name: string): boolean } {\n const classes = this.classes;\n return { contains: (name: string): boolean => classes?.has(name) ?? false };\n }\n\n /**\n * What `@defer (on interaction)` and `(on hover)` call on their trigger element, the one place\n * Angular listens on an element directly rather than through `Renderer2`. See\n * `DEFER_TRIGGER_EVENTS`.\n */\n addEventListener(type: string, listener: (event: unknown) => void): void {\n const events = DEFER_TRIGGER_EVENTS[type];\n if (!events) return;\n let byListener = triggerListeners.get(this);\n if (!byListener) triggerListeners.set(this, (byListener = new Map()));\n let byType = byListener.get(listener);\n if (!byType) byListener.set(listener, (byType = new Map()));\n if (byType.has(type)) return;\n if (type === 'mouseenter') reportHover(this.engine);\n const stops = events.map((event) =>\n this.engine.setEventListener(this as unknown as EngineNode, event, listener),\n );\n byType.set(type, () => {\n for (const stop of stops) stop();\n });\n }\n\n removeEventListener(type: string, listener: (event: unknown) => void): void {\n const byType = triggerListeners.get(this)?.get(listener);\n byType?.get(type)?.();\n byType?.delete(type);\n }\n}\n\n/**\n * Every field the engine keeps on a node, including the ones it assigns only later, in a commit:\n * an extension may shadow none of them, or the engine's own write would go through the\n * extension's getter. Typed against `EngineNode`, so a field added there and not here fails the\n * typecheck.\n */\nconst ENGINE_NODE_FIELDS = {\n nodeKind: true,\n tag: true,\n tagName: true,\n typeName: true,\n namespace: true,\n props: true,\n nodeText: true,\n childList: true,\n parent: true,\n listeners: true,\n classes: true,\n templateSheet: true,\n hostSheet: true,\n customProperties: true,\n styleCache: true,\n styleDirty: true,\n ownDirty: true,\n hasDirty: true,\n stateDirty: true,\n heldFamily: true,\n inlineInherits: true,\n boundStyle: true,\n boundByProp: true,\n touchWithin: true,\n box: true,\n words: true,\n anonymous: true,\n styled: true,\n focused: true,\n active: true,\n ownStyle: true,\n styleCommitted: true,\n fitContainer: true,\n inlineLevel: true,\n scrollView: true,\n lined: true,\n boxed: true,\n flow: true,\n resolved: true,\n sticky: true,\n fixedTo: true,\n ordered: true,\n fit: true,\n fitMin: true,\n fitOff: true,\n mixed: true,\n mixedOff: true,\n line: true,\n autoMin: true,\n shareMin: true,\n shareOff: true,\n row: true,\n grid: true,\n gridIn: true,\n flowIn: true,\n heightBasis: true,\n heldAt: true,\n transitions: true,\n playing: true,\n scrolled: true,\n owned: true,\n composedTransform: true,\n bornIn: true,\n boundTransform: true,\n claimed: true,\n componentHost: true,\n nativeView: true,\n attributeOnly: true,\n keptAttributes: true,\n writes: true,\n paintsOn: true,\n paintTaker: true,\n paintTaken: true,\n defaultStyle: true,\n dormantHoists: true,\n committed: true,\n committedUnder: true,\n kept: true,\n onBaseline: true,\n baselineFields: true,\n remeasure: true,\n oneWord: true,\n raised: true,\n presented: true,\n propsDirty: true,\n structureDirty: true,\n subtreeDirty: true,\n inside: true,\n scrollsOverflow: true,\n engine: true,\n} satisfies Record<keyof EngineNode, true>;\n\n/**\n * The fields an extension may not shadow: the engine's, and the one Angular assigns. A getter\n * the prototype only reads out, as `tagName` is for Angular, is a member like `classList`, which\n * an extension may replace: the engine never writes it.\n */\nconst NODE_FIELDS = new Set([\n ...Object.keys(ENGINE_NODE_FIELDS).filter((name) => {\n const own = Object.getOwnPropertyDescriptor(RetainedNode.prototype, name);\n return !(own?.get && !own.set);\n }),\n '__ngContext__',\n]);\n\n/**\n * Give every node members of a package's own, on the prototype they share: a getter, a method.\n * Returns what takes them away again.\n *\n * For a package that presents nodes to code written against another API, as a web-compatibility\n * layer answers `getAttribute` and `closest` from a node's name and props. A field the engine\n * keeps on a node (`nodeKind`, `props`, `childList`) is refused. A member a node already has on the\n * prototype (`classList`, `addEventListener`) is replaced, and put back when the extension is\n * taken away: what replaces it has to do what the original did for Angular.\n */\nexport function extendNodes(members: PropertyDescriptorMap & ThisType<EngineNode>): () => void {\n const names = Object.keys(members);\n for (const name of names) {\n if (NODE_FIELDS.has(name)) {\n throw new Error(`[angular-native] extendNodes: '${name}' is a field the engine keeps.`);\n }\n }\n const added: [string, PropertyDescriptor][] = [];\n const remove = () => {\n for (const [name, descriptor] of added.splice(0)) removeMember(name, descriptor);\n };\n try {\n for (const name of names) {\n // Configurable whatever the descriptor says, or it could not be taken away again.\n const descriptor = { ...members[name], configurable: true };\n addMember(name, descriptor);\n added.push([name, descriptor]);\n }\n } catch (error) {\n // A descriptor the runtime refuses: the ones before it do not stay behind.\n remove();\n throw error;\n }\n return remove;\n}\n\n/**\n * What each extended member was before any extension, and the extensions' own descriptors for it,\n * oldest first. Two extensions can give the same member, and be taken away in either order: the\n * newest still there is the one a node has, and the original comes back after the last.\n */\nconst extended = new Map<string, { original?: PropertyDescriptor; stack: PropertyDescriptor[] }>();\n\nfunction addMember(name: string, descriptor: PropertyDescriptor): void {\n const prototype = RetainedNode.prototype;\n const entry = extended.get(name) ?? {\n original: Object.getOwnPropertyDescriptor(prototype, name),\n stack: [],\n };\n // First, so a descriptor the runtime refuses is never recorded.\n Object.defineProperty(prototype, name, descriptor);\n entry.stack.push(descriptor);\n extended.set(name, entry);\n}\n\nfunction removeMember(name: string, descriptor: PropertyDescriptor): void {\n const prototype = RetainedNode.prototype;\n const entry = extended.get(name);\n const index = entry?.stack.indexOf(descriptor) ?? -1;\n if (!entry || index === -1) return;\n entry.stack.splice(index, 1);\n const top = entry.stack.at(-1);\n if (top) return void Object.defineProperty(prototype, name, top);\n extended.delete(name);\n if (entry.original) Object.defineProperty(prototype, name, entry.original);\n else Reflect.deleteProperty(prototype, name);\n}\n\n/**\n * RN-specific helpers, injected rather than imported so the engine stays runnable under Node.\n */\nexport interface EngineOptions {\n /**\n * React Native's `NativeAnimatedHelper`, which lets native move a view by a scroll with no\n * JavaScript in between: how sticky headers stay pinned on a fast fling. The platform supplies it\n * on a device; without it, the components move those views from JavaScript as before.\n */\n nativeAnimated?: NativeAnimated | null;\n /**\n * RN's `processColor`. Narrower than `unknown` on purpose: it is only ever handed the value of\n * a `*color` prop, and typing it that way is what lets an app pass RN's function straight in\n * rather than casting at every call site.\n */\n processColor?: (value: string | number) => unknown;\n /**\n * RN's `resolveAssetSource`. `require('./x.png')` compiles to an asset *id*, and only this\n * turns it into `{uri, width, height, scale}`. Without it local images cannot work at all,\n * while remote `{uri}` objects pass through and appear to prove the prop is fine.\n */\n resolveAssetSource?: (value: unknown) => unknown;\n /**\n * The application-level sheet, compiled at build time. The one set of rules allowed to match a\n * node whatever component created it, which is what resets, utility classes and `:root` tokens\n * all need.\n */\n globalStyles?: StyleSheet | null;\n /**\n * What media queries are evaluated against. Pushed in rather than read, because the engine\n * imports nothing from React Native and a host may have its own idea of the viewport.\n */\n conditions?: Conditions;\n /**\n * Custom properties the device knows and the stylesheet cannot: the hairline width, and\n * whatever else is settled before the first frame. Seeded on the root, below `:root`, so an\n * app's own sheet still overrides them. Values that only arrive later - the safe-area insets,\n * which nothing knows until a view has been laid out - come through `updateTokens` instead.\n */\n tokens?: Readonly<Record<string, TokenValue>>;\n /**\n * `strict` lays the app out without Yoga's legacy errata, as a browser would: a percentage\n * inset or size of an out-of-flow box is of its container's padding box, and one with no inset\n * starts inside the padding. `compatibility` keeps the errata and is the default, as it is in\n * React Native, whose `experimental_LayoutConformance` takes the same two modes. Strict commits\n * the app inside that view, which has no box of its own.\n */\n layoutConformance?: 'strict' | 'compatibility';\n /**\n * Report host primitives used without their component (see `claimHost`). Defaults to RN's\n * `__DEV__`, so a release build never looks.\n */\n dev?: boolean;\n /**\n * The clock CSS transitions run on. Pushed in for the same reason everything else is: the\n * engine imports nothing, and a test drives time rather than waiting for it.\n */\n now?: () => number;\n /**\n * Called when the tree goes from clean to dirty. The host uses it to schedule a commit for a\n * change that arrives outside change detection, which is where Angular's animation queue puts\n * the classes for `animate.enter` and `animate.leave`.\n */\n onDirty?: () => void;\n /**\n * Where an error thrown while a native event is being dispatched goes, with the event's name.\n * The platform adapter points it at the app's `ErrorHandler`. Without one it is logged, and\n * either way it is never rethrown: see `dispatchEvent` for why.\n */\n onError?: (error: unknown, topLevelType: string) => void;\n}\n\n/**\n * A prop whose value is a colour, and so has to go through `processColor` before native reads it.\n *\n * The `Android` suffix is part of the test because React Native names its platform-specific props\n * that way round: `underlineColorAndroid` is a colour and does not end in `color`, and Android's\n * `ColorPropConverter` takes a number or a platform-colour map and refuses a string, so an unnamed\n * one arrives as the wrong type. `iOS`-suffixed props are not in the set because none of them are\n * colours - `shouldRasterizeIOS` is a boolean.\n */\nconst IS_COLOR_PROP = /color(android)?$/i;\n/**\n * Colour props React Native does not name with a `color` suffix: `<switch>`'s pair ends in the\n * state each one paints - `trackColorForTrue` and `trackColorForFalse`. They are the same type\n * problem the `Android` suffix causes: Android's `ColorPropConverter` takes a number or a\n * platform-colour map, refuses a string, and throws rather than approximating one.\n */\nconst STATE_COLOR_PROPS = new Set(['trackColorForTrue', 'trackColorForFalse']);\n/** Answers per key name, once: the regex ran for every prop of every node in every commit. */\nconst colorProps = new Map<string, boolean>();\nfunction isColorProp(key: string): boolean {\n let answer = colorProps.get(key);\n if (answer === undefined) {\n colorProps.set(\n key,\n (answer = IS_COLOR_PROP.test(key) || STATE_COLOR_PROPS.has(key) || BRUSH_PROPS.has(key)),\n );\n }\n return answer;\n}\nconst ASSET_PROPS = new Set(['source', 'defaultSource', 'loadingIndicatorSource']);\n\n/**\n * Props whose value is a list of objects with a `color` inside.\n *\n * Colour processing keys off the *property name*, which cannot see a colour nested in an array.\n * That matters more than it sounds: with `enableNativeCSSParsing` off, which is the default,\n * Fabric does not parse a colour string either, so an unprocessed nested colour is not\n * approximated, it is dropped.\n */\nconst NESTED_COLOR_LIST_PROPS = new Set(['boxShadow']);\n\n/** The props of an SVG shape that take a brush, not a colour. */\nconst BRUSH_PROPS = new Set(['fill', 'stroke']);\n/** The brush that paints a shape in the colour of the view it is in: `currentColor`. */\nconst CURRENT_BRUSH = { type: 2 };\n\n/** The paint a stylesheet can give a shape, which native reads only where `propList` names it. */\nconst SHAPE_PAINT = ['fill', 'stroke', 'strokeWidth', 'strokeDasharray', 'strokeDashoffset'];\n\n/**\n * Name in a shape's `propList` each paint its style gave it. react-native-svg takes a paint from\n * the shape only where the list says the shape set it, and from the group above otherwise, so\n * one a stylesheet set would be passed over. The list is kept from one commit to the next while\n * what it names is the same, as a prop that is a new array is a change to send.\n */\nfunction namePaint(node: EngineNode, props: Record<string, unknown>): void {\n const written = (node.props['propList'] as readonly string[] | undefined) ?? [];\n const painted = SHAPE_PAINT.filter((key) => key in props && !written.includes(key));\n const before = node.committed?.props['propList'] as readonly string[] | undefined;\n if (!painted.length && !written.length) {\n if (before?.length) props['propList'] = before === NAMES_NO_PAINT ? before : NAMES_NO_PAINT;\n return;\n }\n if (!painted.length) return;\n const names = [...written, ...painted];\n const same = before?.length === names.length && names.every((name, i) => before[i] === name);\n props['propList'] = same ? before : names;\n}\n\n/**\n * The list of a shape that once named a paint and names none now. react-native-svg keeps the\n * list it had where it is sent none, on Android, or an empty one, on iOS: the shape would keep\n * the paint as its own, and draw in a colour no sheet gives it any more, or in none. This names\n * `vector-effect` instead, which SVG does not inherit, so naming it as the shape's own changes\n * nothing it draws.\n */\nconst NAMES_NO_PAINT: readonly string[] = ['vectorEffect'];\n\n/**\n * What CSS draws and places as a box, which a shape in a drawing has none of: a browser draws no\n * background, border or shadow on one and gives it no padding or margin. Native would: a shape is\n * a view, whose background is drawn over the drawing it is in, and hides what is drawn after it.\n */\nconst BOX = /^(experimental_)?background|^(border|padding|margin|outline)|^boxShadow$/;\n\n/** Take the box off a shape's style: see `BOX`. Not off the drawing, nor its HTML in it. */\nfunction noBoxOnShape(viewName: string, props: Record<string, unknown>): void {\n if (viewName.startsWith('RNSVGSvgView') || viewName === 'RNSVGForeignObject') return;\n for (const key of Object.keys(props)) if (BOX.test(key)) delete props[key];\n}\n\n/** The views of a drawing that read a font: a group passes its own on to what is in it. */\nconst FONTED: ReadonlySet<string> = new Set([\n 'RNSVGGroup',\n 'RNSVGText',\n 'RNSVGTSpan',\n 'RNSVGTextPath',\n]);\n\n/** The parts of a font a view of a drawing is also sent alone, from its style. */\nconst FONT_PARTS = ['fontSize', 'fontWeight'] as const;\n\n/** The font last sent to each view, kept while what it was made of is the same: see `fontInOne`. */\nconst oneFonts = new WeakMap<EngineNode, { from: readonly unknown[]; font: object }>();\n\n/**\n * Send a view of a drawing its size and weight inside its `font`, not beside it. On Android,\n * react-native-svg sets the whole font from a `fontSize` or a `fontWeight` sent alone, in\n * whichever order the props come, so one sent beside a `font` with a weight in it could drop the\n * weight. What the font itself says is kept over the style's: an attribute on the shape over a\n * size inherited from the text it is in. The same object while its parts are, as a new one is a\n * change to send.\n */\nfunction fontInOne(node: EngineNode, merged: Record<string, unknown>): void {\n const own = merged['font'] as Record<string, unknown> | undefined;\n const parts = FONT_PARTS.map((key) => merged[key]);\n if (parts.every((part) => part == null)) return;\n for (const key of FONT_PARTS) delete merged[key];\n const from = [own, ...parts];\n const kept = oneFonts.get(node);\n if (kept && kept.from.every((part, i) => part === from[i])) {\n merged['font'] = kept.font;\n return;\n }\n const font: Record<string, unknown> = {};\n FONT_PARTS.forEach((key, i) => {\n if (parts[i] != null) font[key] = parts[i];\n });\n Object.assign(font, own);\n oneFonts.set(node, { from, font });\n merged['font'] = font;\n}\n\n/**\n * A paint of `currentColor`, as a sheet read as a browser reads it keeps one: the brush of the\n * colour of the view it is in, which native follows as that changes.\n */\nfunction currentPaint(merged: Record<string, unknown>): void {\n for (const key of BRUSH_PROPS) {\n const paint = merged[key];\n if (typeof paint === 'string' && paint.toLowerCase() === 'currentcolor') {\n merged[key] = CURRENT_BRUSH;\n }\n }\n}\n\n/**\n * What a view of a library's drawing is drawn with of its style: see the helpers above. Only a\n * drawing's (`EngineNode.namespace`): an icon's shapes commit their style as any view does.\n */\nfunction drawnAsShape(node: EngineNode, viewName: string, merged: Record<string, unknown>): void {\n noBoxOnShape(viewName, merged);\n currentPaint(merged);\n namePaint(node, merged);\n if (platformOS === 'android' && FONTED.has(viewName)) fontInOne(node, merged);\n}\n\n/** Styles arrive as objects, arrays, nested arrays and nulls. Reduce to one object. */\n/**\n * A bound transform is still the CSS string: see `inline-transform.ts`. One CSS cannot read\n * leaves the transform the rules set, as a browser drops it.\n */\nfunction boundTransform(\n node: EngineNode,\n style: Record<string, unknown>,\n cascaded: unknown,\n): Record<string, unknown> {\n const text = style['transform'];\n if (typeof text !== 'string') return style;\n // The same list for the same string, commit after commit: a transition compares the two ends\n // it is given, and a list made afresh each time reads as a new place to go.\n if (node.boundTransform?.text !== text) node.boundTransform = { text, list: transformList(text) };\n const list = node.boundTransform.list ?? cascaded;\n if (list === undefined) delete style['transform'];\n else style['transform'] = list;\n return style;\n}\n\n/** A transform string as the list native reads, and none for one CSS cannot read. */\nconst transformOf = (value: string): unknown[] => transformList(value) ?? [];\n\nfunction flattenStyle(value: unknown, into: Record<string, unknown>): Record<string, unknown> {\n if (!value) return into;\n if (Array.isArray(value)) {\n for (const entry of value) flattenStyle(entry, into);\n return into;\n }\n if (typeof value === 'object') Object.assign(into, value);\n return into;\n}\n\n/** The timing a rule can set apart from a property list, and the part of the spec each sets. */\nconst TRANSITION_TIMING = {\n $transitionDuration: 'duration',\n $transitionDelay: 'delay',\n $transitionEasing: 'easing',\n} as const;\n/** Listed once, as `ANIMATION_ENTRIES` is. */\nconst TRANSITION_ENTRIES = Object.entries(TRANSITION_TIMING);\n\n/**\n * The transition spec, with any timing set by a rule of its own laid over it: `.duration-700`\n * beside `.transition`. A rule that writes the timing itself compiles it to `null`, which is how\n * a stronger transition keeps its own.\n *\n * Every key is taken out of `props`: they are instructions for this engine, and nothing native\n * has ever heard of them. See `animated` for why each `delete` is guarded.\n */\nfunction transitionSpec(\n props: Record<string, unknown>,\n): Record<string, TransitionSpec> | undefined {\n // Keyed `$transition` by the compiler, so a view's own `transition` prop reaches it.\n let spec = props['$transition'] as Record<string, TransitionSpec> | undefined;\n if (spec !== undefined) delete props['$transition'];\n for (const [key, part] of TRANSITION_ENTRIES) {\n if (!(key in props)) continue;\n const value = props[key];\n delete props[key];\n if (value === null || spec === undefined) continue;\n const timed: Record<string, TransitionSpec> = {};\n for (const name of Object.keys(spec)) timed[name] = { ...spec[name]!, [part]: value };\n spec = timed;\n }\n return spec;\n}\n\n/**\n * The keys CSS's `translate`, `rotate` and `scale` compile to, in the order they apply. The\n * compiler's `INDIVIDUAL_TRANSFORMS` in `packages/metro/css/properties.cjs` writes the same three.\n */\nconst INDIVIDUAL_TRANSFORMS = ['__translate', '__rotate', '__scale'] as const;\n\n/**\n * Fold the individual transform properties into the one list native has.\n *\n * They cascade, transition and animate as properties of their own, so this runs last, on what\n * the node is about to paint. CSS Transforms 2 applies translate, then rotate, then scale, then\n * `transform`, and a list applies left to right, so that is the order they are written in.\n */\nfunction composeTransform(\n node: EngineNode,\n props: Record<string, unknown>,\n): Record<string, unknown> {\n const [translate, rotate, scale] = INDIVIDUAL_TRANSFORMS.map((key) => props[key]);\n if (translate === undefined && rotate === undefined && scale === undefined) return props;\n // Guarded, as `animated` guards its own: a `delete` is what sends an object to Hermes's slow\n // dictionary layout, and most nodes have none of these.\n for (const key of INDIVIDUAL_TRANSFORMS) if (key in props) delete props[key];\n\n const transform = props['transform'];\n const parts = [translate, rotate, scale, transform];\n const last = node.composedTransform;\n let value: unknown[];\n if (last && last.parts.every((part, i) => part === parts[i])) {\n value = last.value;\n } else {\n // A bound style's transform is still the CSS string: see `inline-transform.ts`.\n const own = typeof transform === 'string' ? transformOf(transform) : transform;\n value = [translate, rotate, scale, own].flatMap((part) => (Array.isArray(part) ? part : []));\n node.composedTransform = { parts, value };\n }\n\n if (value.length) props['transform'] = value;\n else delete props['transform'];\n return props;\n}\n\n/**\n * Fabric *merges* the raw props handed to a clone onto the node's existing props, so a prop\n * that has gone away has to be sent explicitly as `null`. Sending the whole prop object would\n * silently keep removed props alive.\n */\nfunction diffProps(\n prev: Record<string, unknown>,\n next: Record<string, unknown>,\n): Record<string, unknown> | null {\n let payload: Record<string, unknown> | null = null;\n for (const key of Object.keys(next)) {\n if (!Object.is(prev[key], next[key])) (payload ??= {})[key] = next[key];\n }\n for (const key of Object.keys(prev)) {\n if (!(key in next)) (payload ??= {})[key] = null;\n }\n return payload;\n}\n\n/**\n * The prop a replaced element, an image, puts its own pixel size in: `{ width, height }`.\n *\n * Not a style, because a style binding is inline style and beats every rule, so a picture's own\n * 600 by 600 would override `class=\"size-11\"`. CSS gives a replaced element's natural size the\n * lowest precedence of all, below any rule and any bound style, and that is what this is for.\n * It never reaches native.\n */\nconst INTRINSIC_SIZE = 'intrinsicSize';\n\n/**\n * The prop a text field's width in characters is in, where it has no width of its own: HTML's\n * `size`. Read here for the width it comes to, see `columnsWide`, and not sent to a native\n * field, which has no such prop.\n */\nconst FIELD_SIZE = 'size';\n\n/**\n * The prop a component puts the style it must have the last word on in, over the caller's.\n *\n * The other end of the scale from `intrinsicSize`. Angular merges a component's host style\n * binding under the template's, so a caller's `[style]=\"{flex: 1}\"` beats the host's own\n * `flex: 0`; that is the right order for a default and the wrong one for an adjustment the\n * component is making on the caller's behalf, which RN composes after the caller's style. A\n * keyboard-avoiding view's padding, height and flex are that. Applied after inline style, a key\n * at a time, so every other property the caller wrote still applies. It never reaches native.\n */\nconst STYLE_OVERRIDE = 'styleOverride';\n\n/** The props that are the engine's to read, and no prop of any native view. */\nconst ENGINES_OWN: ReadonlySet<string> = new Set(['style', INTRINSIC_SIZE, STYLE_OVERRIDE]);\n\ninterface IntrinsicSize {\n readonly width: number;\n readonly height: number;\n}\n\nconst isSet = (value: unknown): boolean => value !== undefined && value !== null;\n\n/**\n * Size a box from its content's natural size, where nothing else did, as CSS sizes an `<img>`.\n *\n * Neither dimension set: the natural size, or the natural width alone when the author gave an\n * aspect ratio for Yoga to take the height from. One dimension set: the other follows the\n * picture's proportions, through `aspectRatio`, unless the author gave one of their own.\n */\nfunction applyIntrinsicSize(props: Record<string, unknown>, size: IntrinsicSize): void {\n const width = isSet(props['width']);\n const height = isSet(props['height']);\n if (width && height) return;\n const ownRatio = isSet(props['aspectRatio']);\n if (!width && !height) {\n props['width'] = size.width;\n if (!ownRatio) props['height'] = size.height;\n return;\n }\n if (!ownRatio && size.width > 0 && size.height > 0) {\n props['aspectRatio'] = size.width / size.height;\n }\n}\n\nconst now = (): number => globalThis.performance?.now?.() ?? Date.now();\n\nfunction sameHandles(a: readonly FabricNode[], b: readonly FabricNode[]): boolean {\n return a.length === b.length && a.every((handle, i) => handle === b[i]);\n}\n\n/** Whether two sets of the same classes hold them in the same order. */\nfunction inOrder(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean {\n const other = b.values();\n for (const name of a) if (other.next().value !== name) return false;\n return true;\n}\n\nconst BEFORE = '::before';\nconst AFTER = '::after';\ntype GeneratedBox = typeof BEFORE | typeof AFTER;\n\n/**\n * Whether a rule for a generated box gives it `content`, which is what makes a box: a rule\n * without it, a reset for every `::before` there is, styles the ones other rules make and makes\n * none of its own.\n */\nfunction givesContent(rule: StyleSheet['rules'][number]): boolean {\n const content = rule.important?.['content'] ?? rule.declarations['content'];\n return content !== undefined && content !== 'none';\n}\n\n/** The elements a sheet's rules give one generated box to: by class, id, name or attribute, or all. */\ninterface GeneratedFor {\n readonly classes: Set<string>;\n readonly names: Set<string>;\n /** The ids a rule names its element by, as a page names one element. */\n readonly ids: Set<string>;\n /** The attributes a rule names its element by alone, as a headless library's do. */\n readonly attributes: Set<string>;\n /** The sheets whose `:host` a rule names: a host of one, and no other element, has the box. */\n readonly hosts: Set<StyleSheet>;\n every: boolean;\n}\n\n/** What one or more sheets' rules give each generated box to. */\ntype Generated = Record<GeneratedBox, GeneratedFor>;\n\nconst generatedFor = (): GeneratedFor => ({\n classes: new Set(),\n names: new Set(),\n ids: new Set(),\n attributes: new Set(),\n hosts: new Set(),\n every: false,\n});\n\nconst noGenerated = (): Generated => ({ [BEFORE]: generatedFor(), [AFTER]: generatedFor() });\n\n/** What a sheet's `::before` and `::after` rules with a content give a box to, or null for none. */\nfunction generatedIn(sheet: StyleSheet): Generated | null {\n if (!sheet.generated) return null;\n let boxes: Generated | null = null;\n for (const rule of sheet.rules) {\n const box = rule.compounds.at(-1)?.type;\n if ((box !== BEFORE && box !== AFTER) || !givesContent(rule)) continue;\n noteGenerated((boxes ??= noGenerated())[box], rule.compounds.at(-2), sheet);\n }\n return boxes;\n}\n\n/** What every sheet in `all` gives a box to together, or null where none gives one. */\nfunction joinGenerated(all: Iterable<Generated | null>): Generated | null {\n let joined: Generated | null = null;\n for (const boxes of all) {\n if (!boxes) continue;\n joined ??= noGenerated();\n for (const box of [BEFORE, AFTER] as const) {\n const into = joined[box];\n const from = boxes[box];\n for (const key of ['classes', 'names', 'ids', 'attributes'] as const) {\n for (const each of from[key]) into[key].add(each);\n }\n for (const each of from.hosts) into.hosts.add(each);\n into.every ||= from.every;\n }\n }\n return joined;\n}\n\n/**\n * Note the element a rule draws a box in, by the compound its selector names it with: one of its\n * classes, or its name, either of which the element must have for the rule to match, or those\n * of each alternative of a `:is()` it is named in, or an attribute it must have. With none of\n * those any element could be the one.\n */\nfunction noteGenerated(boxes: GeneratedFor, origin: Compound | undefined, sheet: StyleSheet): void {\n if (!origin) boxes.every = true;\n else if (origin.host !== undefined) boxes.hosts.add(sheet);\n else if (origin.classes[0] !== undefined) boxes.classes.add(origin.classes[0]);\n else if (origin.id !== undefined) boxes.ids.add(origin.id);\n else if (origin.type !== undefined) boxes.names.add(origin.type);\n else noteUnnamed(boxes, origin, sheet);\n}\n\n/** Note the element of a rule that names it by neither a class nor its name. */\nfunction noteUnnamed(boxes: GeneratedFor, origin: Compound, sheet: StyleSheet): void {\n const alternatives = origin.is?.[0];\n // Named inside `:is()`, as Tailwind writes a state: each alternative is the element itself.\n if (alternatives?.length) for (const each of alternatives) noteGenerated(boxes, each, sheet);\n // By an attribute it has to have, where that is all that names it.\n else if (origin.attributes?.length) boxes.attributes.add(origin.attributes[0]!.name);\n else boxes.every = true;\n}\n\n/** Whether an element hosts a component whose `:host` a rule gives the box to. */\nconst hostsGenerated = (node: EngineNode, boxes: GeneratedFor): boolean =>\n node.hostSheet !== null && boxes.hosts.has(node.hostSheet);\n\nfunction wantsGenerated(node: EngineNode, boxes: GeneratedFor): boolean {\n if (boxes.every || boxes.names.has(node.tag) || hostsGenerated(node, boxes)) return true;\n const id = node.props['nativeID'];\n if (typeof id === 'string' && boxes.ids.has(id)) return true;\n if (node.classes) for (const name of node.classes) if (boxes.classes.has(name)) return true;\n return hasGeneratedAttribute(node, boxes);\n}\n\n/** Whether an element has an attribute a rule gives the box to by that alone. */\nfunction hasGeneratedAttribute(node: EngineNode, boxes: GeneratedFor): boolean {\n for (const name of boxes.attributes) {\n const value = attributeOf(node, name);\n if (value !== undefined && value !== null && value !== false) return true;\n }\n return false;\n}\n\n/** What a generated box has before any rule: a browser's is not positioned, where a view is. */\nconst GENERATED_STYLE = { position: 'static' };\nconst NOT_GENERATED = { display: 'none' };\n\n/**\n * A generated box's style from its rules. `content` is what makes the box: with none, or with\n * `none`, there is no box, however much else is written for it.\n */\nfunction generatedStyle(style: Readonly<Record<string, unknown>>): Record<string, unknown> {\n const { content, ...drawn } = style;\n return content === undefined || content === 'none' ? NOT_GENERATED : drawn;\n}\n\n/** Where a child put last goes: before the `::after` box, which stays last. */\nfunction endOf(parent: EngineNode, child: EngineNode): number {\n const last = parent.childList.at(-1);\n return last?.tag === AFTER && child.tag !== AFTER\n ? parent.childList.length - 1\n : parent.childList.length;\n}\n\n/**\n * Whether a node could be the element a compound is written for, by its classes alone: its own,\n * and those of one alternative of each `:is()` on it, which is where Tailwind names a group or\n * a peer. A compound with no class in either could be any element.\n */\nfunction couldBe(compound: Compound, node: EngineNode): boolean {\n if (!compound.classes.every((name) => node.classes?.has(name))) return false;\n return (compound.is ?? []).every((alternatives) =>\n alternatives.some((option) => couldBe(option, node)),\n );\n}\n\n/** Dev-time commit accounting, so a slow frame can be attributed rather than guessed at. */\nexport interface EngineStats {\n commits: number;\n lastCommitMs: number;\n /** The initial mount, which is a different animal from a steady-state update. */\n firstCommitMs: number;\n /** Worst commit *after* the mount. This is the number that matters for frame rate. */\n worstCommitMs: number;\n /** Commits that took longer than 8ms, a frame at 120Hz, excluding the mount. */\n slowCommits: number;\n /**\n * Worst `begin()`..`end()` span, excluding the mount. This brackets Angular's whole render\n * pass - template execution, bindings, the commit - so comparing it against `worstCommitMs`\n * says whether time is going into the renderer or into change detection around it.\n */\n worstRenderMs: number;\n createdNodes: number;\n clonedNodes: number;\n}\n\nconst FRAME_BUDGET_MS = 8;\n\n/**\n * What one pass of `markUnderHas` has reached after the boxes it asked: each box's place in its\n * list, found once a list, and the elements reached for each rule's subjects. A list of a\n * thousand boxes asked is looked through once, not once a box.\n */\nclass MarkedAfter {\n private readonly lists = new Map<EngineNode, Map<EngineNode, number>>();\n private readonly bySubjects = new Map<Subjects, Set<EngineNode>>();\n\n place(node: EngineNode): number {\n const list = node.parent!;\n let places = this.lists.get(list);\n if (!places) {\n places = new Map(list.childList.map((child, at) => [child, at]));\n this.lists.set(list, places);\n }\n return places.get(node)!;\n }\n\n reached(subjects: Subjects): Set<EngineNode> {\n let reached = this.bySubjects.get(subjects);\n if (!reached) this.bySubjects.set(subjects, (reached = new Set()));\n return reached;\n }\n}\n\n/** How many boxes `node` is under. */\n/**\n * How deep a node is, with the depth of every box on its way up kept in `known`: the boxes that\n * changed beneath are a node and its ancestors, so each is counted once, not once a box.\n */\nfunction depthOf(node: EngineNode, known: Map<EngineNode, number>): number {\n const path: EngineNode[] = [];\n let depth = -1;\n for (let up: EngineNode | null = node; up; up = up.parent) {\n const found = known.get(up);\n if (found !== undefined) {\n depth = found;\n break;\n }\n path.push(up);\n }\n for (let i = path.length - 1; i >= 0; i--) known.set(path[i]!, ++depth);\n return depth;\n}\n\n/** A solid brush with no colour in it, which stops react-native-svg. */\nconst emptyBrush = (value: unknown): boolean =>\n typeof value === 'object' &&\n value !== null &&\n (value as { type?: unknown }).type === 0 &&\n (value as { payload?: unknown }).payload == null;\n\nexport class Engine implements HostEngine {\n /** Scopes the CSS resolver's memo. Bumped once per commit. */\n private styleEpoch = 0;\n\n /** The node `:focus` currently applies to. */\n private focusedNode: EngineNode | null = null;\n\n readonly stats: EngineStats = {\n commits: 0,\n lastCommitMs: 0,\n firstCommitMs: 0,\n worstCommitMs: 0,\n slowCommits: 0,\n worstRenderMs: 0,\n createdNodes: 0,\n clonedNodes: 0,\n };\n\n private eventsRegistered = false;\n\n readonly root: EngineNode = new RetainedNode('element', 'root', this);\n\n private readonly fabric: FabricUIManager;\n private readonly rootTag: number;\n /** Whether the app is laid out without Yoga's errata. See `EngineOptions`. */\n private readonly strict: boolean;\n private readonly styles: StyleResolver;\n /** Whether to run the development checks, which a release build skips. */\n readonly dev: boolean;\n private readonly now: () => number;\n private onDirty: (() => void) | undefined;\n private onError: ((error: unknown, topLevelType: string) => void) | undefined;\n /** Nodes with at least one transition in flight, so a frame walks those and nothing else. */\n private readonly running = new Set<EngineNode>();\n /** Nodes playing a `@keyframes` animation. */\n private readonly playing = new Set<EngineNode>();\n /**\n * Elements of a hoisted name (`registerHoist`) that are in the tree, so a commit need not search\n * for them. Only those in the tree: see `releaseDetached`.\n */\n private readonly hoisted = new Set<EngineNode>();\n\n /**\n * Whether a subtree that left the tree has ever held a hoisted node of its own: until one has,\n * a node taken out has none to carry, and `carryHoists` does not walk up to look.\n */\n private hoistsHeld = false;\n /** The nodes taken out of a child list since the last commit. See `releaseDetached`. */\n private readonly removedSinceCommit = new Set<EngineNode>();\n /**\n * `@keyframes` by name, across every sheet registered. One registry rather than one per sheet,\n * because that is the scope CSS gives them: a name defined in a global stylesheet is usable\n * from a component's. The cost is that two components defining the same name collide, last one\n * in wins, exactly as two stylesheets in a document would.\n */\n private readonly keyframes = new Map<string, readonly Keyframe[]>();\n /** Every sheet registered, in the order a document would hold them. See `sheetReplaced`. */\n private readonly sheetOrder: StyleSheet[] = [];\n /** The `@keyframes` each playing animation was started from. See `startPlaying`. */\n private readonly playedFrames = new WeakMap<RunningAnimation, readonly Keyframe[]>();\n /** Element names already reported as unclaimed, so a list of a thousand rows reports once. */\n private readonly reported = new Set<string>();\n private readonly processColor: (value: string | number) => unknown;\n /**\n * Whether any sheet seen so far asks about a node's position among its siblings. Until one\n * does, a child list can move without anything else needing to be looked at again.\n */\n private structuralSheets = false;\n /** How many children after a change in a list one of them reaches. See `siblingReach`. */\n private structuralAfter = 0;\n /** Whether one of them reaches the children before it. */\n private structuralBefore = false;\n /** The compounds of theirs that read an element's place from under it. See `markPlace`. */\n private readonly placeElsewhere = new Set<PlaceReader>();\n /** The sheets `watchStructure` has read, which it is asked about once an element. */\n private readonly watchedStructure = new WeakSet<StyleSheet>();\n /**\n * The sheets in play that use `:has()`, each with whether it asks about what comes after a\n * node, `:has(+ .x)`: see `hasBeside`. A sheet taken away asks no more.\n */\n private readonly hasWatched = new Map<StyleSheet, boolean>();\n /** Whether any sheet in play uses `:has()`. See `markBeneath`. */\n private hasSheets = false;\n /** Whether any asks about what comes after a node. See `markBefore`. */\n private hasBesideSheets = false;\n private readonly resolveAssetSource: (value: unknown) => unknown;\n\n constructor(fabric: FabricUIManager, rootTag: number, options: EngineOptions = {}) {\n this.fabric = fabric;\n this.rootTag = rootTag;\n const conditions = options.conditions ?? { width: 0, height: 0, colorScheme: 'light' };\n this.lastConditions = options.conditions;\n this.styles = new StyleResolver(options.globalStyles ?? null, conditions);\n this.viewportSize = { width: conditions.width, height: conditions.height };\n this.fontScale = conditions.fontScale;\n if (options.tokens) this.styles.setRootTokens(options.tokens);\n this.want(tokensAsk(options.tokens));\n this.watchStructure(options.globalStyles);\n this.watchLayout(options.globalStyles);\n this.watchHas(options.globalStyles);\n this.watchActive(options.globalStyles);\n this.watchGenerated(options.globalStyles);\n this.dev = options.dev ?? (globalThis as { __DEV__?: boolean }).__DEV__ === true;\n this.strict = options.layoutConformance === 'strict';\n if (this.dev) {\n this.styles.onUndefinedToken = (name, props, on) =>\n this.reportUndefinedToken(name, props, on);\n this.styles.onUnreadDisplay = (name, value) => this.reportUnreadDisplay(name, value);\n }\n this.now = options.now ?? (() => globalThis.performance?.now?.() ?? Date.now());\n this.onDirty = options.onDirty;\n this.onError = options.onError;\n this.registerSheet(options.globalStyles);\n this.processColor = options.processColor ?? ((value) => value);\n this.resolveAssetSource = options.resolveAssetSource ?? ((value) => value);\n this.scrollDriver = options.nativeAnimated\n ? new NativeScrollDriver(options.nativeAnimated, (view, tag, keys) =>\n this.touchedNatively(view as EngineNode, tag, keys),\n )\n : null;\n // Eagerly, not on the first listener. Fabric holds exactly one event handler and\n // `ReactFabric` installs React's at module scope, so until we claim it every native event\n // lands in React's event plugins. Those look the name up in a view config registry we never\n // populate and throw `Unsupported top level event type` from inside the native dispatch, or\n // read `instanceHandle.stateNode.canonical` off our own node and throw on `canonical`.\n // Nothing here emits events until a component asks for one, so waiting looks safe; it is not.\n // `RNSScreen` fires `onWillAppear`/`onHeaderHeightChange` on its own during a push, with no\n // listener anywhere, and the throw unwinds through the mounting transaction that pushed it.\n // The next commit then reads freed props and the process dies in `updateProps`.\n this.registerEventHandler();\n }\n\n /**\n * A rotation, a window resize, or the system switching to dark mode.\n *\n * None of those change a single node, so nothing would be dirty and nothing would re-render.\n * Marking the root is what gets the tree walked again; every cached style is already invalid,\n * because each carries the conditions version it was resolved under.\n */\n /**\n * Move `:focus`, invalidating only the two nodes involved.\n *\n * Precise rather than by generation: unlike a rotation, the engine knows exactly which nodes\n * changed, and a keystroke's worth of focus movement should not invalidate the tree.\n */\n private setFocused(node: EngineNode | null): void {\n if (this.focusedNode === node) return;\n if (this.focusedNode) {\n this.focusedNode.focused = false;\n this.markProps(this.focusedNode);\n }\n this.focusedNode = node;\n if (node) {\n node.focused = true;\n this.markProps(node);\n }\n this.commit();\n }\n\n /**\n * Set or clear `:active` along a responder chain, marking each node so its style re-resolves.\n *\n * Returns whether anything moved, because the caller has to commit: a gesture changes no\n * binding, so nothing marks an Angular view dirty and no change-detection pass would follow.\n */\n private setActiveChain(from: EngineNode | null, active: boolean): boolean {\n let changed = false;\n const set = (node: EngineNode) => {\n if (node.active === active) return;\n node.active = active;\n this.markActive(node);\n changed = true;\n };\n for (let node = from; node; node = node.parent) {\n set(node);\n if (active) this.activeNodes.add(node);\n }\n if (!active) {\n // Every node the press set, too: one the pressed node was moved or removed from mid-press\n // is no longer above it.\n for (const node of this.activeNodes) set(node);\n this.activeNodes.clear();\n }\n return changed;\n }\n\n /** The nodes a press has set `:active` on, to clear whatever happens to the tree meanwhile. */\n private readonly activeNodes = new Set<EngineNode>();\n\n /** Whether any sheet styles a pressed element, and each compound that asks about one from another. */\n private activeUse: { own: boolean; elsewhere: readonly Compound[] } = {\n own: false,\n elsewhere: [],\n };\n\n /** What each sheet in play asks about a pressed element: `activeUse` is all of them together. */\n private readonly activeBySheet = new Map<StyleSheet, ReturnType<typeof usesActive>>();\n\n /** Note what a sheet in play asks about a pressed element. See `markActive`. */\n private watchActive(sheet: StyleSheet | null | undefined): void {\n // Asked for every element a component's sheet is given to: noted once a sheet.\n if (!sheet || this.activeBySheet.has(sheet)) return;\n const use = usesActive(sheet);\n this.activeBySheet.set(sheet, use);\n if (!use.own && !use.elsewhere.length) return;\n this.countActive();\n if (this.styles.tracksHas) return;\n // What a pressed element is compared with is the rules it matched, which no cache kept until\n // a sheet asked. Nothing is resolved yet when the sheet is the one the engine was made with.\n this.styles.tracksHas = true;\n if (!this.root) return;\n this.root.styleDirty = true;\n this.markPath(this.root);\n }\n\n /** A sheet has left play, by a hot swap or by being removed: what it asked goes with it. */\n private unwatchActive(sheet: StyleSheet): void {\n if (!this.activeBySheet.delete(sheet)) return;\n this.countActive();\n this.trackMatched();\n }\n\n private countActive(): void {\n const all = [...this.activeBySheet.values()];\n this.activeUse = {\n own: all.some((use) => use.own),\n elsewhere: all.flatMap((use) => use.elsewhere),\n };\n }\n\n /**\n * A press began or ended on `node` or under it, which is all that changed about it. A press\n * reaches every ancestor up to the root, and marking each as restyled would style the whole\n * screen again, twice a press. So each is only matched again, and keeps its style and all\n * that is under it unless it now matches other rules. An element a rule asks about from\n * inside or beside it, `.card:active .title`, changes more than itself, and is restyled with\n * everything under it as any other change is. With no rule for a pressed element at all there\n * is nothing to match.\n */\n private markActive(node: EngineNode): void {\n const { own, elsewhere } = this.activeUse;\n if (!own && !elsewhere.length) return;\n if (elsewhere.some((compound) => couldBe(compound, node))) return this.markProps(node);\n node.stateDirty = true;\n this.markPath(node.parent ?? node);\n }\n\n /**\n * Custom properties the device knows and the stylesheet cannot, once they change.\n *\n * Merged rather than replaced: the insets come from a view and the hairline from the device, so\n * a caller owns the properties it names and nothing else. Each owner writes all of its own at\n * once - four insets together, never one - so nothing is left over from a previous rotation.\n */\n /**\n * Match `sheet` against every node from now on, after the global sheet the engine was made\n * with, and restyle everything; false, and nothing done, when it already is. How a platform\n * applies a component whose CSS is not scoped, such as Angular's `ViewEncapsulation.None`.\n * `replacing` is a sheet added before that this one takes the place of, after a hot swap.\n */\n addGlobalSheet(sheet: StyleSheet, replacing?: StyleSheet): boolean {\n if (!this.styles.addGlobalSheet(sheet, replacing)) return false;\n if (replacing) this.sheetReplaced(replacing, sheet);\n else this.registerSheet(sheet);\n this.watchStructure(sheet);\n this.watchLayout(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.watchGenerated(sheet);\n this.markPath(this.root);\n this.sheetsAdded.push(sheet);\n return true;\n }\n\n /**\n * The sheets added since the last commit, whose nodes are not yet marked: see `markAdded`.\n * Emptied by each commit. One taken away before it stays in the list, which only marks nodes\n * it could have matched: taking a sheet away styles everything again in any case.\n */\n private readonly sheetsAdded: StyleSheet[] = [];\n\n /**\n * Have styled again each node a sheet added since the last commit could match. The rest keep\n * the style they have, which the resolver lets stand for a node none of the sheets' rules is\n * written for, so a commit steps over them: the walk here is what finds the ones it must not\n * step over. One walk for all of them: a screen of a component library adds a sheet for each\n * component it renders for the first time.\n */\n private markAdded(): void {\n if (!this.sheetsAdded.length) return;\n const subjects = this.styles.subjectsOfAll(this.sheetsAdded.splice(0));\n this.markWrittenFor(subjects, this.root);\n }\n\n private markWrittenFor(subjects: Subjects, node: EngineNode): void {\n if (node.nodeKind === 'element' && this.styles.isFor(subjects, node)) {\n node.styleDirty = true;\n this.markPath(node);\n }\n for (const child of node.childList) this.markWrittenFor(subjects, child);\n }\n\n /**\n * Stop matching a sheet `addGlobalSheet` added, and restyle everything; false, and nothing\n * done, when it is not one. A hot swap that leaves a None component no rules, or makes it scoped.\n */\n removeGlobalSheet(sheet: StyleSheet): boolean {\n if (!this.styles.removeGlobalSheet(sheet)) return false;\n this.sheetReplaced(sheet, null);\n this.markPath(this.root);\n return true;\n }\n\n updateTokens(next: Readonly<Record<string, TokenValue>>): void {\n this.styles.setRootTokens({ ...this.styles.rootTokens, ...next });\n this.want(tokensAsk(next));\n this.root.subtreeDirty = true;\n this.layoutStale = true;\n this.commit();\n }\n\n /**\n * The system text size changed: measure every text and text input again, and commit.\n *\n * React Native's surface re-measures its text when the content size category changes, on a\n * commit of its own. The next commit from here is built from the handles the engine holds,\n * which are the nodes from before that, laid out at the old size, and Yoga keeps a clean node's\n * layout: every text whose content had not changed kept its old box, with its glyphs drawn at\n * the new size inside it, clipped. So each one is committed again, cloned with its children,\n * which is what makes Fabric dirty a measured node and measure it at the size now in effect.\n */\n remeasureText(): void {\n const again = (measured: EngineNode): void => {\n measured.remeasure = true;\n this.markProps(measured, false);\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.childList) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.nodeKind === 'text') {\n for (const box of paragraphsOf(child)) if (box.committed) again(box);\n }\n if (child.nodeKind !== 'element') continue;\n if (child.committed && MEASURED_VIEWS.has(committedViewName(child))) again(child);\n visit(child);\n }\n };\n visit(this.root);\n this.commit();\n }\n\n /** Whether any text has been laid out again for a face. See `fontsRegistered`. */\n private fontsRefreshed = false;\n /** How many times each paragraph or text input has been laid out again for a face. */\n private readonly fontRefreshes = new WeakMap<EngineNode, number>();\n /** The text inputs whose `fontFamily` the next commit sends again. See `fontsRegistered`. */\n private readonly fontResends = new WeakSet<EngineNode>();\n\n /**\n * Faces registered after text naming them was laid out: lay that text out again, and commit.\n *\n * Native keeps a paragraph's text layout, face included, keyed by what the paragraph asks for.\n * iOS caches the attributed string it built and the size it measured, so text laid out before\n * its face registered stays in the fallback face, and committing it again unchanged hits the\n * same cache. What it asks for has to change, and nothing visible can: each paragraph naming\n * one of the families is committed with its text size cap raised by a step too small to see, or\n * set far above any size the platform offers where it had none. Its view, and everything native\n * holds for it, stays where it is. Android keys its text layout the same way and applies the\n * cap the same way, so the same change works there.\n *\n * A text input takes its font another way. iOS sets it on the field again only when the input's\n * text attributes change, which the same cap does. Android sets it only when `fontFamily` is in\n * the props it is sent, and the engine sends only what changed, so it is sent again once.\n */\n /**\n * Loads have settled for these families: every node held back for one, a span inside a\n * paragraph included, is laid out with the name again, registered or not. See `loadingFamilies`.\n */\n fontsSettled(families: ReadonlySet<string>): void {\n let held = false;\n const release = (node: EngineNode | undefined): void => {\n if (node?.heldFamily === undefined || !families.has(node.heldFamily)) return;\n this.markProps(node, false);\n held = true;\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.childList) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n release(child.nodeKind === 'text' ? child.box : child);\n visit(child);\n }\n };\n visit(this.root);\n if (held) this.commit();\n }\n\n fontsRegistered(families: ReadonlySet<string>): void {\n /** Lay `node` out again where it is text naming one of the families, saying whether it was. */\n const refresh = (node: EngineNode): boolean => {\n // As it is drawn: a text element placing its text is a view, with the paragraph inside it.\n const viewName = committedViewName(node);\n const input = TEXT_INPUTS.has(viewName);\n const named = (viewName === PARAGRAPH || input) && namesFamily(node, families);\n if (!node.committed || !named) return false;\n this.fontRefreshes.set(node, (this.fontRefreshes.get(node) ?? 0) + 1);\n if (input) this.fontResends.add(node);\n this.fontsRefreshed = true;\n this.markProps(node, false);\n return true;\n };\n const visit = (node: EngineNode): void => {\n for (const child of node.childList) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.nodeKind === 'text' && child.box) refresh(child.box);\n if (child.nodeKind === 'element' && !refresh(child)) visit(child);\n }\n };\n visit(this.root);\n this.commit();\n }\n\n /**\n * Put the cursor in a text input; bring anything else on screen, in the scroll view it is in.\n * A form sends the user to the first field that needs fixing this way, and a toggle or a picker\n * has no cursor to take, so it is scrolled to instead.\n */\n focus(node: EngineNode): void {\n if (TEXT_INPUTS.has(viewNameOf(node))) this.dispatchCommand(node, 'focus');\n else this.reveal(node);\n }\n\n /**\n * Scroll the nearest scroll view the node is in by as little as brings the node fully on\n * screen, with `margin` to spare - UIKit's `scrollRectToVisible`. `visibleBottom` is where in\n * the window the visible area ends when something covers the bottom of the scroll view: the\n * keyboard's top edge, for a field the keyboard would otherwise hide.\n *\n * Measured in the window, all of it, so the scroll view's offset needs no tracking: it is how\n * far its content's top edge is above its own.\n */\n reveal(node: EngineNode, options: { visibleBottom?: number; margin?: number } = {}): void {\n const scroll = scrollingDown(node);\n const content = scroll && this.contentOf(scroll);\n if (!scroll || !content) return;\n const margin = options.margin ?? 16;\n this.measure(scroll, (view) => {\n this.measureHandle(content, (inner) => {\n this.measure(node, (target) => {\n const offset = view.y - inner.y;\n const top = view.y + margin;\n const bottom = Math.min(view.y + view.height, options.visibleBottom ?? Infinity) - margin;\n let by = 0;\n if (target.y + target.height > bottom) by = target.y + target.height - bottom;\n else if (target.y < top) by = target.y - top;\n if (by !== 0)\n this.dispatchCommand(scroll, 'scrollTo', [0, Math.max(0, offset + by), true]);\n });\n });\n });\n }\n\n /**\n * The view a scroll view's content is in: an element that scrolls its overflow holds its\n * children in one of its own, and any other scroll view's first child is it.\n */\n private contentOf(scroll: EngineNode): FabricNode | undefined {\n return scroll.inside?.handle ?? this.visibleChildren(scroll)[0]?.committed?.handle;\n }\n\n /**\n * Commit one measured node again, cloned with its children, so Fabric measures it once more.\n *\n * A text input is measured from its native state, and a text set from JavaScript reaches that\n * state only in the layout after the measurement, so the commit carrying the text sizes the\n * field for the text it had before. This is the commit that sizes it for the new one: one of\n * the exceptions to a commit per pass, because waiting for the next pass would leave the field\n * the wrong height until something else changed.\n */\n remeasure(node: EngineNode): void {\n if (!node.committed) return;\n node.remeasure = true;\n this.markProps(node, false);\n this.commit();\n }\n\n /**\n * A node's component rules are its creating sheet's, so this matches it against `like`'s, or\n * against the one it was created with once `like` is null.\n */\n adoptScope(node: EngineNode, like: EngineNode | null): void {\n if (like && !this.ownSheets.has(node)) this.ownSheets.set(node, node.templateSheet);\n const sheet = like ? like.templateSheet : this.ownSheets.get(node);\n if (sheet === undefined || node.templateSheet === sheet) return;\n node.templateSheet = sheet;\n this.styles.noteSheet(sheet, true);\n this.watchStructure(sheet);\n this.watchLayout(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.watchGenerated(sheet);\n // Its generated boxes are matched against the sheet it now has, as it is.\n for (const child of node.childList) {\n if (isGenerated(child.tag) && child.templateSheet !== sheet) {\n child.templateSheet = sheet;\n this.markProps(child);\n }\n }\n if (this.generated !== null) this.generate(node);\n this.markProps(node);\n }\n\n /** The sheet each node given another's scope was created with. */\n private readonly ownSheets = new WeakMap<EngineNode, StyleSheet | null>();\n\n /** The window's size, from the conditions media queries use. Zero until the platform says. */\n get viewport(): { readonly width: number; readonly height: number } {\n return this.viewportSize;\n }\n\n private viewportSize: { readonly width: number; readonly height: number };\n /** The system text size, from the conditions. See `Conditions.fontScale`. */\n private fontScale: number | undefined;\n\n private readonly viewportWatchers = new Set<() => void>();\n\n /** Calls `listener` after each change of conditions, which is when `viewport` can change. */\n watchViewport(listener: () => void): () => void {\n this.viewportWatchers.add(listener);\n return () => this.viewportWatchers.delete(listener);\n }\n\n /**\n * The conditions given to the constructor or to `updateConditions` last, or undefined before\n * any, when the engine settles colours as light and has no size: what a package\n * answering a media query from a script, `matchMedia`, reads the colour scheme and the motion\n * preference from.\n */\n get conditions(): Conditions | undefined {\n return this.lastConditions;\n }\n\n private lastConditions: Conditions | undefined;\n\n updateConditions(next: Conditions): void {\n this.lastConditions = next;\n this.viewportSize = { width: next.width, height: next.height };\n this.fontScale = next.fontScale;\n this.styles.setConditions(next);\n this.root.subtreeDirty = true;\n this.layoutStale = true;\n // The window's size is the room everything is in: see `heldIn`.\n this.changesHeld = false;\n // Committed here rather than left to the next change-detection pass, because there may not\n // be one: no view is dirty, so a tick does no work and never reaches the renderer at all.\n this.commit();\n for (const watcher of this.viewportWatchers) watcher();\n }\n\n // --- mutation API -----------------------------------------------------\n\n createElement(name: string, sheet: StyleSheet | null = null): EngineNode {\n const node = new RetainedNode('element', name, this);\n node.templateSheet = sheet;\n this.styles.noteSheet(sheet, true);\n const html = HTML_ELEMENTS.get(name);\n if (html !== undefined) {\n if (html.role) node.props['accessibilityRole'] = html.role;\n node.styled = html.styled;\n }\n // Each watch is of a sheet, and most elements are made with none: told here, not five calls in.\n if (sheet !== null) {\n this.watchStructure(sheet);\n this.watchLayout(sheet);\n this.watchHas(sheet);\n this.watchActive(sheet);\n this.watchGenerated(sheet);\n }\n if (HOISTS[name]) this.hoisted.add(node);\n if (this.generated !== null) this.generate(node);\n return node;\n }\n\n addClass(node: EngineNode, name: string): void {\n const was = this.classAttribute(node);\n (node.classes ??= new Set()).add(name);\n this.markClasses(node, [name], was);\n if (this.generated !== null) this.generate(node);\n }\n\n removeClass(node: EngineNode, name: string): void {\n const was = this.classAttribute(node);\n node.classes?.delete(name);\n this.markClasses(node, [name], was);\n if (this.generated !== null) this.generate(node);\n }\n\n /**\n * A node's classes as its `class` attribute is written, where a sheet reads the attribute as a\n * whole: see `ClassChange`. Null where none does, and nothing is written.\n */\n private classAttribute(node: EngineNode): string | undefined | null {\n if (!this.styles.testsClassAttribute) return null;\n return node.classes?.size ? [...node.classes].join(' ') : undefined;\n }\n\n /**\n * Mark a node whose classes changed, by what the rules that name those classes can restyle.\n *\n * A class no selector names changes no style: a library's own marker, of an overlay that is\n * animating or a control that was touched. One a rule is for the element of, `.on`, has that\n * element matched again, and one named as what a rule's element is inside, `.animating .close`\n * or `.close:is(.animating *)`, the elements under the node that such rules are for. What is\n * under any of those is styled again from the rules it matched, for what it inherits: a `dark`\n * class on the root finds no rule again for an element no `dark` rule is for. One named in\n * `:has()`, or answering a test of the class attribute there, has the boxes above the node and\n * those before it asked again, and one named only in `:has(> )` the box right above it. Any\n * other class has the node and everything under it matched again, as any other change to it\n * does.\n *\n * A sheet that names a class later restyles what it is for as it arrives, and a node not yet\n * committed is styled when it is, with the class as it is then.\n */\n private markClasses(\n node: EngineNode,\n changed: Iterable<string>,\n was: string | undefined | null,\n ): void {\n // An element still being built, in no tree and never styled: nothing is styled by it yet,\n // and it is styled when it is committed, with the classes it has then. Every element of a\n // screen is given its classes this way, so what they reach is not asked for each.\n if (node.parent === null && node.styleCache === null) return this.markProps(node, false);\n const now = was === null ? null : this.classAttribute(node);\n const reach = this.styles.reachOf(\n changed,\n now === null ? undefined : { was: was as string | undefined, now },\n );\n if (reach === true) return this.markProps(node);\n this.markProps(node, false);\n if (!reach) return;\n if (reach.own) node.ownDirty = true;\n if (this.hasSheets) this.markHasAsking(node, reach);\n if (this.styles.reachesUnder(reach)) {\n this.classesAbove += 1;\n this.markUnder(node, reach);\n }\n }\n\n /** Mark the boxes whose `:has()` can ask of a node whose classes changed, by `reach`. */\n private markHasAsking(node: EngineNode, reach: Subjects): void {\n if (reach.beneath) this.markBeneath(node.parent, node);\n // `:has(> .on)`: only the box right above the node can answer it.\n else if (reach.parentHas) this.markAsked(node.parent, node.parent?.parent);\n }\n\n /**\n * How many class changes have restyled what is under an element. `markUnder` walks the tree as\n * it is, so an element out of it then is not reached: one that comes back after any is matched\n * again, with all that is under it.\n */\n private classesAbove = 0;\n /**\n * The count when each element went out of the tree, for the ones still out. `detach` sets it\n * for a node that only moves too, so `markReturned` runs after it and clears that.\n */\n private readonly outSince = new WeakMap<EngineNode, number>();\n\n /** Have matched again a node coming back into the tree that missed a class change above it. */\n private markReturned(child: EngineNode): void {\n const since = this.outSince.get(child);\n if (since === undefined) return;\n this.outSince.delete(child);\n if (since !== this.classesAbove) this.markAllUnder(child);\n }\n\n private markAllUnder(node: EngineNode): void {\n if (node.nodeKind !== 'element') return;\n node.ownDirty = true;\n this.markPath(node);\n for (const child of node.childList) this.markAllUnder(child);\n }\n\n /**\n * Have matched again each element under a node that one of `subjects`' rules could be for. One\n * under another is marked too: what is under an element marked this way keeps its rules.\n */\n private markUnder(node: EngineNode, subjects: Subjects): void {\n for (const child of node.childList) {\n if (child.nodeKind !== 'element') continue;\n if (this.styles.isFor(subjects, child)) {\n child.ownDirty = true;\n this.markPath(child);\n }\n this.markUnder(child, subjects);\n }\n }\n\n /** What the sheets in play give a generated box to, by the last thing their selectors name. */\n private generated: Generated | null = null;\n /** What each sheet in play gives a generated box to: `generated` is all of them together. */\n private readonly generatedBySheet = new Map<StyleSheet, Generated | null>();\n\n /**\n * Note the elements a sheet's `::before` and `::after` rules are written for, and give the\n * ones there already their boxes. Only a sheet compiled with them has any, which is a\n * library's the build names as a browser's; for every other this reads the sheet once.\n */\n private watchGenerated(sheet: StyleSheet | null | undefined): void {\n if (!sheet || this.generatedBySheet.has(sheet)) return;\n const boxes = generatedIn(sheet);\n this.generatedBySheet.set(sheet, boxes);\n if (!boxes) return;\n noteGeneratedBoxes();\n this.generated = joinGenerated([this.generated, boxes]);\n if (this.root) this.generateBeneath(this.root);\n }\n\n /**\n * A sheet has left play, by a hot swap or by being removed: the boxes only it gave go, from\n * every element in the tree.\n */\n private unwatchGenerated(sheet: StyleSheet): void {\n const boxes = this.generatedBySheet.get(sheet);\n if (!this.generatedBySheet.delete(sheet) || !boxes) return;\n const left = joinGenerated(this.generatedBySheet.values());\n // Asked for none, so each box there is goes; then none is asked for again.\n this.generated = left ?? noGenerated();\n if (this.root) this.generateBeneath(this.root);\n this.generated = left;\n }\n\n /** `next` in play where `sheet` was: noted first, so a box both give is kept, not made again. */\n private swapGenerated(sheet: StyleSheet, next: StyleSheet | null): void {\n this.watchGenerated(next);\n if (next !== sheet) this.unwatchGenerated(sheet);\n }\n\n /** An attribute or the id a rule gives a generated box by came or went on an element. */\n private generateFor(node: EngineNode, key: string): void {\n const boxes = this.generated;\n if (boxes === null) return;\n if (boxes[BEFORE].attributes.has(key) || boxes[AFTER].attributes.has(key)) {\n this.generate(node);\n } else if (key === 'nativeID' && (boxes[BEFORE].ids.size || boxes[AFTER].ids.size)) {\n this.generate(node);\n }\n }\n\n private generateBeneath(node: EngineNode): void {\n if (node.nodeKind !== 'element' || isGenerated(node.tag)) return;\n this.generate(node);\n for (const child of [...node.childList]) this.generateBeneath(child);\n }\n\n /** Keep a box first and last in an element a rule could draw one for, and nowhere else. */\n private generate(node: EngineNode): void {\n if (this.generated === null || node.nodeKind !== 'element' || isGenerated(node.tag)) return;\n this.keepGenerated(node, BEFORE, node.childList[0]);\n this.keepGenerated(node, AFTER, node.childList.at(-1));\n }\n\n private keepGenerated(node: EngineNode, box: GeneratedBox, at: EngineNode | undefined): void {\n const there = at?.tag === box ? at : undefined;\n if (wantsGenerated(node, this.generated![box]) === (there !== undefined)) return;\n if (there) return this.removeChild(node, there);\n const made = this.createElement(box, node.templateSheet);\n this.setDefaultStyle(made, GENERATED_STYLE);\n if (box === BEFORE) this.insertBefore(node, made, node.childList[0] ?? null);\n else this.appendChild(node, made);\n }\n\n /**\n * The sheet of the component `node` hosts, whose `:host` rules it matches. Set again when a hot\n * swap replaces the component's sheet, which recreates the views inside but not the host, so the\n * host is styled afresh here.\n */\n setHostSheet(node: EngineNode, sheet: StyleSheet | null): void {\n if (node.hostSheet === sheet) return;\n node.hostSheet = sheet;\n this.styles.noteSheet(sheet, true);\n this.watchStructure(sheet);\n this.watchHas(sheet);\n this.watchLayout(sheet);\n this.watchActive(sheet);\n this.watchGenerated(sheet);\n // A sheet seen before gives this host its box here: a second host of the component, say.\n if (this.generated !== null) this.generate(node);\n this.markProps(node);\n }\n\n /**\n * Style for `node` that any matched rule or inline style overrides, as a browser's own default\n * for an element is. `mount` gives the root component's host the surface's height this way, as\n * the web's mount point has, unless the app's `:host` sizes it otherwise.\n */\n setDefaultStyle(node: EngineNode, style: Readonly<Record<string, unknown>> | undefined): void {\n this.noteEasing(style);\n node.defaultStyle = style;\n if (this.asked !== EVERYTHING) this.want(this.defaultAsks(node, style));\n // Under what the cascade comes to, and read by no selector: nothing is matched again.\n this.markProps(node, false);\n }\n\n /**\n * What a default style asks for. The root component's host is given the surface's height as a\n * percentage of it, and the surface's height is native's, which nothing is held at: an app of\n * plain flex that `mount` gives that height is asked nothing for it. See `noteShare`.\n */\n private defaultAsks(node: EngineNode, style: unknown): number {\n const asked = styleAsks(style);\n return node.parent === this.root ? asked & ~SHARED_HEIGHTS : asked;\n }\n\n /**\n * Say that a browser lays an element out inline, for a package that gives elements a\n * browser's defaults. `unless-block` is an element with no display of its own, a custom\n * element: its default display is the engine's from here, an inline-block while it holds only\n * text and inline-level boxes and a block once it holds one, which cannot sit in a line.\n */\n setInline(node: EngineNode, how: 'always' | 'unless-block' | undefined): void {\n node.inlineLevel = how;\n this.inlines ||= how !== undefined;\n this.want(CSS_LAYOUT);\n this.markProps(node);\n }\n\n /**\n * `class=\"a b\"` from a template. Replaces the set rather than adding to it. The same classes in\n * another order are a change too, to a selector that reads the class attribute, `[class^=\"a\"]`.\n */\n setClasses(node: EngineNode, value: string): void {\n // By HTML's spaces, which are CSS's: a vertical tab or a no-break space is part of a name.\n const names = value.split(CSS_SPACE).filter(Boolean);\n const before = node.classes;\n const was = this.classAttribute(node);\n node.classes = names.length ? new Set(names) : null;\n // Each class that came or went: one in both changes nothing.\n const changed = [...names.filter((name) => !before?.has(name))];\n for (const name of before ?? []) if (!node.classes?.has(name)) changed.push(name);\n const reordered =\n !changed.length && !!before && !!node.classes && !inOrder(before, node.classes);\n this.markClasses(node, reordered ? node.classes! : changed, was);\n if (this.generated !== null) this.generate(node);\n }\n\n /** Angular's `@if`/`@for`/`ViewContainerRef` markers. Ordered, never committed. */\n createAnchor(): EngineNode {\n return new RetainedNode('anchor', '#anchor', this);\n }\n\n createText(value: string): EngineNode {\n const node = new RetainedNode('text', '#text', this);\n node.nodeText = value;\n return node;\n }\n\n appendChild(parent: EngineNode, child: EngineNode): void {\n this.markAdopted(child, parent);\n this.detach(child);\n this.markReturned(child);\n child.parent = parent;\n // Before a generated `::after`, once a sheet gives one: see `endOf`.\n if (this.generated === null) parent.childList.push(child);\n else parent.childList.splice(endOf(parent, child), 0, child);\n if (child.dormantHoists) this.wakeHoists(child);\n this.markStructure(parent, child, parent.childList.length - 1);\n this.markTextContent(parent, child);\n }\n\n insertBefore(parent: EngineNode, child: EngineNode, ref: EngineNode | null): void {\n this.markAdopted(child, parent);\n this.detach(child);\n this.markReturned(child);\n child.parent = parent;\n const at = ref ? parent.childList.indexOf(ref) : -1;\n if (at < 0 && this.generated === null) parent.childList.push(child);\n else parent.childList.splice(at < 0 ? endOf(parent, child) : at, 0, child);\n if (child.dormantHoists) this.wakeHoists(child);\n this.markStructure(parent, child, at < 0 ? parent.childList.length - 1 : at);\n this.markTextContent(parent, child);\n }\n\n /**\n * A node coming under a parent other than the one it is under, or under any once it has been\n * taken out: what is over it may be other than it was styled under. The resolver sees that for\n * itself by the parent's cache, except between two boxes that share one, where it is told here.\n * Moved within its own parent, a row of a list reordered, it is styled as it was.\n */\n private markAdopted(child: EngineNode, parent: EngineNode): void {\n if (child.parent !== parent && this.styles.styledUnderShared(child)) child.styleDirty = true;\n }\n\n removeChild(parent: EngineNode | null, child: EngineNode): void {\n const target = parent ?? child.parent;\n if (!target) return;\n const at = target.childList.indexOf(child);\n if (at < 0) return;\n this.carryHoists(child);\n target.childList.splice(at, 1);\n child.parent = null;\n this.outSince.set(child, this.classesAbove);\n this.removedSinceCommit.add(child);\n this.markStructure(target, child, at);\n this.markTextContent(target, child);\n }\n\n /**\n * A child came or went under a view that takes its text as a prop: that prop changed. A span\n * changes it too, by keeping or dropping the space before it.\n */\n private markTextContent(parent: EngineNode, child: EngineNode): void {\n if (child.nodeKind === 'anchor') return;\n if (takesTextAsProp(parent)) this.markProps(parent);\n else if (isTextElement(parent)) this.markWords(parent, child.nodeKind === 'element');\n // A span that keeps its spaces drops them only at the ends of what it is in: the ones\n // beside a span or words that came or went may be at an end now, or no longer. Only under\n // a view whose loose words a span draws, an SVG text and what is in one, and only once a\n // view keeps its spaces at all.\n if (!SPACED_TEXT.size || parent.nodeKind !== 'element') return;\n if (!SPACED_PARENT(parent)) return;\n const spaced = (node: EngineNode) => node.nodeKind === 'element' && SPACED_TEXT.has(node.tag);\n for (const each of parent.childList) {\n const drawn = each.nodeKind === 'text' ? each.box : each;\n if (drawn && spaced(drawn)) this.markProps(drawn);\n }\n }\n\n /**\n * Text came, went or changed in a paragraph: where it has become one word, or stopped being\n * one, the paragraph is merged again, since that is one line or as many as it takes. Asked\n * of the paragraph's outermost element, which is the view; any other change leaves it be.\n */\n private markWords(within: EngineNode, run = false): void {\n let root = within;\n while (isTextElement(root.parent)) root = root.parent!;\n // A run that came or went can be the tallest line of the paragraph: see `lineTall`.\n // ponytail: one restyled to another line height is not; mark its paragraph if seen cut.\n const words = root.oneWord !== undefined && unbroken(root) !== root.oneWord;\n if (run || words) this.markProps(root, false);\n }\n\n /**\n * A node taken out of a subtree that left the tree can take hoisted nodes of the subtree's with\n * it, as content projected inside an element of an `@if` moves into the element made again when\n * the block opens. All of the subtree's are woken, and the commit, which the removal makes\n * release, puts each back with the subtree it is in.\n */\n private carryHoists(child: EngineNode): void {\n if (!this.hoistsHeld) return;\n const top = this.topOf(child);\n if (top.dormantHoists) this.wakeHoists(top);\n }\n\n /** A subtree that went out of the tree is back in: its hoisted nodes commit again. */\n private wakeHoists(node: EngineNode): void {\n for (const hoisted of node.dormantHoists!) this.hoisted.add(hoisted);\n node.dormantHoists = null;\n }\n\n /**\n * Let go of what is placed from here, and of the pages fixed boxes are on, out of the tree: a\n * box that comes back is placed again from the start.\n */\n private releasePlacements(): void {\n for (const node of this.unplaced) {\n if (this.topOf(node) === this.root) continue;\n this.unplaced.delete(node);\n node.resolved = undefined;\n }\n for (const [page, fixed] of this.fixedIn) {\n if (page === this.root || this.topOf(page) === this.root) continue;\n for (const node of fixed) if (node.fixedTo === page) node.fixedTo = undefined;\n this.fixedIn.delete(page);\n }\n }\n\n /**\n * Let go of everything the engine holds for nodes that have left the tree.\n *\n * Removal is the only signal a destroyed subtree reliably sends. Angular calls `destroyNode` for\n * the top-level nodes of the view it destroys and not for anything inside a child component's\n * view, so a screen's own template is never told it is gone. A reference the engine keeps to any\n * one node of such a subtree keeps all of it, because a node reaches every other node of its\n * subtree through its parent and children, and each of those holds its committed Fabric handle,\n * which keeps its native shadow node alive. A screen with a header was retained in full that way,\n * every native node of it, for as long as the app ran.\n *\n * Removal is not destruction, though: a detached screen can be put back, and must come back\n * whole. So a hoisted node moves to the root of the subtree it left with, which is garbage along\n * with it if the subtree never returns, and is handed back when it does. An animation on a node\n * out of the tree stops rather than running a frame loop for something nobody can see, and\n * starts again if the node returns. And a node out of the tree when the commit runs forgets its\n * committed views, as a withheld modal does: the commit unmounts them, Fabric never re-enables an\n * unmounted view's events (`EventEmitter::setEnabled`), and committed again they would ignore\n * every touch. It comes back created afresh, as React creates an element it mounts again. One\n * put back before the commit never left, and keeps its views.\n *\n * Once per commit, and only after a removal: the walks are the depth of a handful of nodes, and\n * forgetting walks each subtree that left once.\n */\n private releaseDetached(): void {\n this.forgetDetached();\n this.releasePlacements();\n for (const node of this.hoisted) {\n const top = this.topOf(node);\n if (top === this.root) continue;\n this.hoisted.delete(node);\n (top.dormantHoists ??= []).push(node);\n this.hoistsHeld = true;\n }\n for (const node of this.playing) {\n if (this.topOf(node) === this.root) continue;\n this.playing.delete(node);\n node.playing = undefined;\n this.markProps(node, false);\n }\n this.releasePlayedNatively();\n for (const nodes of this.scrollTimelines.values()) {\n for (const node of nodes) {\n if (this.topOf(node) === this.root) continue;\n this.stopScrolled(node);\n this.markProps(node, false);\n }\n }\n if (this.focusedNode && this.topOf(this.focusedNode) !== this.root) this.dropFocus();\n this.dropDetachedPress();\n }\n\n /** A pressed node out of the tree gets no release: native has no view to end the touch on. */\n private dropDetachedPress(): void {\n const pressed = this.currentResponder;\n if (!pressed || this.topOf(pressed) === this.root) return;\n this.setActiveChain(pressed, false);\n this.currentResponder = null;\n }\n\n /**\n * Forget the focused node, which has left the tree without a blur: off the node as well as the\n * engine, or a `:focus` rule styles it again when it is put back.\n */\n private dropFocus(): void {\n const node = this.focusedNode!;\n node.focused = false;\n this.markProps(node);\n this.focusedNode = null;\n }\n\n /** Forget the committed views of each node removed since the last commit that is still out. */\n private forgetDetached(): void {\n for (const node of this.removedSinceCommit) {\n if (node.committed && this.topOf(node) !== this.root) this.forgetCommitted(node);\n }\n this.removedSinceCommit.clear();\n }\n\n /** The root of the tree a node is in: the engine's root while it is attached. */\n private topOf(node: EngineNode): EngineNode {\n let top = node;\n while (top.parent) top = top.parent;\n return top;\n }\n\n /**\n * Angular calls this per node on view destroy, but only when `Renderer2.destroyNode` is\n * non-null. It is not always the end of the node: Angular calls it for the content an\n * `<ng-content>` at the top of the view projects too, which belongs to the declaring view, and\n * puts the same nodes back when the view is made again. So what is let go here comes back when\n * the node does, and its listeners stay: each goes when the view or directive that added it\n * tears it down, and Angular does not listen again for content it puts back.\n */\n destroyNode(node: EngineNode): void {\n // With what it holds: a node Angular destroys can be put back, as content projected into\n // an `@if` is, and its children's views would then be handed to the view it is made again\n // as. Native gives a view one parent for its life, and aborts on a second.\n if (node.committed) this.forgetCommitted(node);\n this.stopEased(node);\n node.transitions = undefined;\n if (node.playing) this.stopNative(node, node.playing);\n node.playing = undefined;\n this.stopScrolled(node);\n // And what follows it, where it is the scroll view: each starts again if it is put back.\n for (const follower of this.scrollTimelines.get(node) ?? []) {\n this.stopScrolled(follower);\n this.markProps(follower, false);\n }\n this.running.delete(node);\n this.playing.delete(node);\n // Held by the subtree it left, as `releaseDetached` holds it, and hoisted again if put back.\n const top = this.hoisted.has(node) ? this.topOf(node) : this.root;\n if (top !== this.root) {\n this.hoisted.delete(node);\n (top.dormantHoists ??= []).push(node);\n this.hoistsHeld = true;\n }\n node.kept = undefined;\n // A field popped with the keyboard up never sends its blur.\n if (this.focusedNode === node) this.dropFocus();\n }\n\n parentNode(node: EngineNode): EngineNode | null {\n return node.parent;\n }\n\n nextSibling(node: EngineNode): EngineNode | null {\n const siblings = node.parent?.childList;\n if (!siblings) return null;\n return siblings[siblings.indexOf(node) + 1] ?? null;\n }\n\n /**\n * Whether any declaration the engine was given transitions or animates: until one does, a\n * node's style is committed as it is, with nothing asked of what eases it. See `eased`.\n */\n private eases = false;\n\n private noteEasing(declarations: Readonly<Record<string, unknown>> | null | undefined): void {\n if (this.eases || !declarations) return;\n for (const key in declarations) {\n if (key.startsWith('$transition') || key.startsWith('$animation')) this.eases = true;\n }\n }\n\n /** A node's style as its transitions and animation have it: a declaration asks for one. */\n private eased(node: EngineNode, style: Record<string, unknown>): Record<string, unknown> {\n if (!this.eases) return style;\n return this.animated(node, this.transitioned(node, style));\n }\n\n /** Note a sheet any of whose rules transitions or animates: see `eases`. */\n private noteSheetEasing(sheet: StyleSheet): void {\n for (const rule of this.eases ? [] : sheet.rules) {\n this.noteEasing(rule.declarations);\n this.noteEasing(rule.important);\n // One a token holds: `animation: var(--motion)`.\n for (const deferred of rule.deferred ?? []) {\n this.noteEasing(Object.fromEntries(deferred.props.map((key) => [key, true])));\n }\n }\n }\n\n /**\n * Note a prop, or a style set as one, that transitions or animates: see `eases`. Asked of every\n * prop and declaration set until one does, so it reads the keys where they are, copying none.\n */\n private noteEasingProp(key: string, value: unknown): void {\n if (easesBy(key) || ((key === 'style' || key === STYLE_OVERRIDE) && styleEases(value))) {\n this.eases = true;\n }\n }\n\n /**\n * Exempt from the complexity limit deliberately, as `mergeProps` is: run for every prop Angular\n * writes, where a call more for what a value asks of the engine measured slower in `pnpm bench`.\n */\n // eslint-disable-next-line complexity\n setProp(node: EngineNode, key: string, value: unknown): void {\n if (!this.eases) this.noteEasingProp(key, value);\n noteWrite(node, key, value);\n // A prop written again is a binding's, and is committed as any other is.\n if (node.attributeOnly?.delete(key)) this.markProps(node, false);\n if (value === undefined || value === null) {\n // Nothing to remove, so nothing changed. Worth its own branch because it is the common\n // case, not a rare one: a host primitive carries a host binding for every prop React Native\n // reads, so every element on screen writes some thirty of these on every pass, and the\n // work being skipped is a walk to the root marking ancestors dirty.\n if (!(key in node.props)) return;\n delete node.props[key];\n } else {\n if (node.props[key] === value) return;\n node.props[key] = value;\n // A number asks for nothing but by a key the engine alone reads: see `asks`.\n // `askedBy`, written out: this runs for every prop Angular writes.\n if ((typeof value !== 'number' || LAID_OUT_HERE.has(key)) && this.asked !== EVERYTHING) {\n const bits =\n key === 'style' || key === STYLE_OVERRIDE ? styleAsks(value) : asks(key, value);\n if (bits & ~this.asked) this.want(bits);\n }\n }\n // Inline style is applied after the cascade and inherited by nothing, so it cannot change\n // what any node matches or inherits. Every other prop can: `[disabled]` is a selector. An\n // inline `direction` is the exception, because the paragraphs below it align by it.\n // And a child that takes one of this node's own values, an `inherit`, follows it.\n const heirs = node.styleCache?.heirs === true;\n // And only a prop some selector names: `aria-valuenow` on every tick of a progress bar, a\n // field's text on every key, match nothing they did not.\n const read =\n key === 'style'\n ? this.inlineReachesStyle(node)\n : this.styles.reads(key) || (node.namespace !== undefined && handsDownPaint(key));\n if (this.generated !== null) this.generateFor(node, key);\n // And restyles the elements after it only where a rule asks the prop of an element before\n // another, `[data-on] ~ .x`: a point of a chart set as a finger moves leaves those after it.\n this.markProps(node, read || heirs, this.styles.readsBeside(key));\n if (SIZES_A_RUN.has(key)) this.markParagraph(node);\n }\n\n /**\n * Have the paragraph a run of text is in merged again: it is as tall as the tallest line of\n * its runs, by a line height or a text scaling set on one of them. See `lineTall`.\n */\n private markParagraph(run: EngineNode): void {\n let paragraph = run;\n while (paragraph.parent && isTextElement(paragraph.parent)) paragraph = paragraph.parent;\n if (paragraph !== run) this.markProps(paragraph, false);\n }\n\n /**\n * Paint a node's background on one of its children instead of on the node: the node keeps its\n * `background-color` and `background-image` in the cascade, where a stylesheet wrote them, and\n * the child is the view that draws them. What a view that masks its children and not itself\n * needs, as `<gradient-text>` is.\n */\n paintOn(node: EngineNode, child: EngineNode): void {\n node.paintsOn = child;\n this.markProps(node, false);\n this.markProps(child, false);\n }\n\n /**\n * Hand a node's background colour to `listener` instead of painting it: what its stylesheets,\n * tokens and inline style resolve `background-color` to, or undefined for none. Called after\n * each commit that changes it, the first one included. What a component needs whose colour is\n * drawn by a native view the node is not, from a prop of that view's, as a bottom sheet's is.\n * The function returned stops it, and the node paints its own background again.\n */\n takePaint(node: EngineNode, listener: (color: unknown) => void): () => void {\n node.paintTaker = listener;\n node.paintTaken = UNREPORTED;\n this.markProps(node, false);\n return () => {\n if (node.paintTaker !== listener) return;\n node.paintTaker = undefined;\n this.paintReports.delete(node);\n this.markProps(node, false);\n };\n }\n\n /** Nodes whose background colour is to be handed over once the commit running ends. */\n private readonly paintReports = new Set<EngineNode>();\n\n private reportPaint(): void {\n const nodes = [...this.paintReports];\n this.paintReports.clear();\n // One listener that throws stops neither the rest nor what the commit does after them.\n for (const node of nodes) {\n try {\n node.paintTaker?.(node.paintTaken);\n } catch (error) {\n this.reportEventError(error, 'paint');\n }\n }\n }\n\n /**\n * Keep a prop the node already has as an attribute: on the node for a selector such as\n * `:host([variant='primary'])` to match, and left out of what is committed to the native view.\n * It is committed again once the prop is next written. What the platform adapter does with a\n * static attribute that is an input of the host's component.\n */\n keepAsAttribute(node: EngineNode, key: string): void {\n if (!(key in node.props)) return;\n (node.attributeOnly ??= new Set()).add(key);\n this.markProps(node, false);\n }\n\n /**\n * Keep an attribute of a node apart from its props: matched by a selector, over a prop of the\n * same name, and committed to nothing. For a package that keeps attributes a native view reads\n * under other names, as `@ng-native/web-compat` keeps a drawing's `width`. What depends on it is\n * restyled as it would be for a prop; `null` or `undefined` takes it away.\n */\n keepAttribute(node: EngineNode, name: string, value: string | null | undefined): void {\n const kept = node.keptAttributes;\n if (value === undefined || value === null) {\n if (kept?.[name] === undefined) return;\n delete kept[name];\n } else {\n if (kept?.[name] === value) return;\n (node.keptAttributes ??= {})[name] = value;\n }\n if (this.generated !== null) this.generateFor(node, name);\n // Only one some selector names can change what anything matches: see `setProp`.\n if (this.styles.reads(name)) this.markProps(node, true, this.styles.readsBeside(name));\n }\n\n /**\n * Whether a node's inline style can change what it or anything below it resolves to: it sets,\n * or until now set, a property its children inherit.\n */\n private inlineReachesStyle(node: EngineNode): boolean {\n const inherits = setsInherited(node.props['style'], node.namespace !== undefined);\n const inherited = node.inlineInherits === true;\n node.inlineInherits = inherits;\n return this.noteInlineDirection(node) || inherits || inherited;\n }\n\n /** Whether a node's inline style sets `direction`, remembering that one has. */\n private noteInlineDirection(node: EngineNode): boolean {\n const style = node.props['style'];\n if (!style || (typeof style === 'object' && !Array.isArray(style) && !('direction' in style))) {\n return false;\n }\n if (flattenStyle(style, {})['direction'] === undefined) return false;\n this.inlineDirection = true;\n return true;\n }\n\n /** Note what a prop just set asks for: a style, or one declaration of one. */\n private askedBy(key: string, value: unknown): void {\n const bits =\n key === 'style' || key === STYLE_OVERRIDE\n ? styleAsks(value)\n : value === undefined\n ? 0\n : asks(key, value);\n // Nearly always nothing new: what most props and declarations ask for is nothing.\n if (bits & ~this.asked) this.want(bits);\n }\n\n /**\n * The style object a node already holds has been changed in place.\n *\n * Angular's styling instructions set one property at a time, so a style of ten properties would\n * otherwise mean ten copies of a growing object per element. The adapter owns the object it put\n * there and may write into it; this is how it says so, since nothing about the object's identity\n * has changed for the props diff to notice.\n */\n styleChanged(node: EngineNode, key?: string): void {\n // The rest of the style was noted as it was set: only the declaration changed can be new.\n if (!this.eases) {\n if (key === undefined) this.noteEasingProp('style', node.props['style']);\n else if (easesBy(key)) this.eases = true;\n }\n if (this.asked !== EVERYTHING) {\n const style = node.props['style'] as Record<string, unknown> | undefined;\n const value = key === undefined ? style : style?.[key];\n // A number asks for nothing but by a key the engine alone reads: see `asks`.\n if (typeof value !== 'number' || LAID_OUT_HERE.has(key!)) this.askedBy(key ?? 'style', value);\n }\n // As `setProp` restyles for a new style object: a child that takes one of its values, an\n // `inherit`, follows the one changed in place too.\n this.markProps(node, this.inlineReachesStyle(node) || node.styleCache?.heirs === true);\n this.markParagraph(node);\n }\n\n /**\n * A bound declaration, `[style.color]`, whose value may be a `var()`, or a length in `em` or a\n * viewport unit. One that is, is kept as a declaration the cascade settles with the node's\n * tokens, font size and viewport, as a rule's is, and true is answered: the text is no value to\n * put in the node's style. A negative `line-height` is dropped, with a warning, and true is\n * answered too. Any other value forgets what was kept.\n */\n setBoundStyle(node: EngineNode, prop: string, value: unknown): boolean {\n const text = typeof value === 'string' ? value : undefined;\n const had = node.boundByProp?.get(prop);\n // Bound again as it is: a chart writes each of its points' paints again as a finger moves.\n // Asked here, without a call, as this runs for every declaration of every inline style.\n if (had !== undefined && text !== undefined && BOUND_TEXT.get(had) === text) return true;\n const refused = text !== undefined && this.refusedBound(node, prop, text);\n const bound = text === undefined || refused ? null : boundRead(prop, text, node.tag);\n if (bound || had) this.keepBound(node, prop, bound);\n return bound !== null || refused;\n }\n\n /** Keep a bound declaration for the cascade to settle, or forget the one kept, with `null`. */\n private keepBound(node: EngineNode, prop: string, bound: DeferredDeclaration | null): void {\n // A value not known until its token is: taken as asking, where the property could.\n if (bound) this.want(lateAsks(bound));\n const byProp = (node.boundByProp ??= new Map());\n if (bound) byProp.set(prop, bound);\n else byProp.delete(prop);\n node.boundStyle = byProp.size ? [...byProp.values()] : null;\n // Settled by the cascade as the node is styled, and asked about by no selector: nothing after\n // the node matches otherwise for it.\n this.markProps(node, true, false);\n }\n\n /** Whether a bound value is one CSS has none of, which is dropped with a warning. */\n private refusedBound(node: EngineNode, prop: string, text: string): boolean {\n if (!isNegativeLineHeight(prop, text)) return false;\n this.reportDroppedDeclaration('line-height', text, node.tag, 'it is negative');\n return true;\n }\n\n /**\n * Set a custom property on a node, `--tint` from `[style.--tint]`, or remove it with `null`.\n *\n * Not a prop: Fabric has no such thing, and would be sent one. It is a token for the cascade,\n * converted from the value here because nothing built it ahead of time (`inline-token.ts`), and\n * changing it re-resolves the node and so everything under it.\n */\n setCustomProperty(node: EngineNode, name: string, value: unknown): void {\n const token = value === null || value === undefined ? undefined : tokenFromValue(value);\n const current = node.customProperties;\n if (!token) {\n if (!current || !(name in current)) return;\n const { [name]: _removed, ...rest } = current;\n node.customProperties = Object.keys(rest).length ? rest : null;\n } else {\n node.customProperties = { ...current, [name]: token };\n if (this.asked !== EVERYTHING) this.want(tokenAsks(token));\n }\n // In scope for the node's own rules and for what is under it, and read by no selector: the\n // node is styled again, and those under it from the rules they matched.\n this.markProps(node, false);\n node.ownDirty = true;\n }\n\n setText(node: EngineNode, value: string): void {\n const filled = (node.nodeText === '') !== (value === '');\n node.nodeText = value;\n this.markProps(node);\n if (!node.parent) return;\n this.markTextContent(node.parent, node);\n // Text of no length is nothing to `:empty`: its first character and its last change what\n // the element it is in matches, and what comes after that element.\n if (filled && this.structuralSheets) this.markFilled(node.parent);\n }\n\n private markFilled(node: EngineNode): void {\n node.styleDirty = true;\n this.markLaterSiblings(node);\n this.markPath(node);\n }\n\n setEventListener(\n node: EngineNode,\n topLevelType: string,\n fn: (event: unknown) => void,\n ): () => void {\n this.registerEventHandler();\n\n const optIn =\n EVENT_OPT_IN_PROPS[topLevelType] ?? VIEW_EVENT_OPT_IN_PROPS[viewNameOf(node)]?.[topLevelType];\n if (optIn && node.props[optIn] !== true) this.setProp(node, optIn, true);\n\n const listeners = (node.listeners ??= new Map());\n let set = listeners.get(topLevelType);\n if (!set) listeners.set(topLevelType, (set = new Set()));\n set.add(fn);\n // With the last of a type goes its set, and with the last set the map: `destroyNode` leaves\n // them, so an empty one would stay on the node for good and read as someone listening. Only\n // from the set it was put in: a teardown run again once that set is gone takes nothing from\n // a later one, the same function listening again included.\n let done = false;\n return () => {\n // Once: a teardown run again takes nothing, the same function listening again included.\n if (done) return;\n done = true;\n const current = node.listeners?.get(topLevelType);\n if (current !== set || !set.delete(fn) || set.size) return;\n node.listeners!.delete(topLevelType);\n if (!node.listeners!.size) node.listeners = null;\n };\n }\n\n // --- dirty marking ----------------------------------------------------\n\n private markProps(node: EngineNode, affectsStyle = true, beside = true): void {\n node.propsDirty = true;\n // Classes, `nativeID` and anything else a selector can read live in props, so any of them\n // changing can change what this node matches, and through it what its whole subtree does.\n // Marking only when it can is what keeps an animated `[style]` from re-cascading everything\n // beneath it on every frame.\n if (affectsStyle) {\n node.styleDirty = true;\n // `.peer:focus ~ .label`: what a later sibling matches can hang on this node's classes and\n // state, though nothing about the sibling moved. Only sheets that ask about siblings pay.\n // Not for a change `beside` says no rule asks of an element before another.\n if (this.structuralSheets && beside) this.markLaterSiblings(node);\n if (this.hasSheets) this.markBeneath(node.parent, node);\n }\n // The root has no parent to carry the mark, so it carries its own: `.dark` on the root alone\n // restyles everything beneath it.\n this.markPath(node.parent ?? node);\n }\n\n /** Start matching ancestors again on a change, once a sheet that uses `:has()` is in play. */\n private watchHas(sheet: StyleSheet | null | undefined): void {\n if (!sheet?.has) return;\n if (!this.hasReaders.has(sheet)) this.hasReaders.set(sheet, hasAbove(sheet));\n if (this.hasWatched.has(sheet)) return;\n this.hasWatched.set(sheet, hasBeside(sheet));\n if (this.hasWatched.get(sheet)) this.hasBesideSheets = true;\n if (this.hasSheets) return;\n this.hasSheets = true;\n this.styles.tracksHas = true;\n // What is already resolved kept no record of the rules it matched: resolve it again. Nothing\n // is, when the sheet is the one the engine was made with.\n if (!this.root) return;\n this.root.styleDirty = true;\n this.markPath(this.root);\n }\n\n /** A sheet has left play: what it asked of `:has()` goes with it. */\n private unwatchHas(sheet: StyleSheet): void {\n this.hasReaders.delete(sheet);\n if (!this.hasWatched.delete(sheet)) return;\n this.hasSheets = this.hasWatched.size > 0;\n this.hasBesideSheets = [...this.hasWatched.values()].some(Boolean);\n this.trackMatched();\n }\n\n /**\n * Have caches keep the rules each node matched while a sheet in play compares with them, and\n * stop once none does. A sheet that asks about a place in a child list is never unset.\n */\n private trackMatched(): void {\n const { own, elsewhere } = this.activeUse;\n this.styles.tracksHas = this.hasSheets || this.structuralSheets || own || elsewhere.length > 0;\n }\n\n /**\n * Something at or beneath `from` changed: every node from there up may match a `:has()` rule\n * it did not, or stop matching one. They are matched again rather than marked for restyling,\n * which would restyle everything under them. Only sheets that use `:has()` pay. `changed` is\n * the child of `from` that changed, or `at` where in its list one came or went.\n */\n private markBeneath(from: EngineNode | null, changed?: EngineNode, at?: number): void {\n this.markAsked(from);\n if (this.hasBesideSheets && from) this.markBeside(from, changed, at);\n }\n\n /** The boxes from `from` up, to `upTo` and not it, to ask `:has()` again: see `markBeneath`. */\n private markAsked(from: EngineNode | null, upTo: EngineNode | null = null): void {\n forgetHasAnswers();\n this.layoutStale = true;\n const wasClean = !this.root.structureDirty && !this.root.subtreeDirty;\n for (let node = from; node && node !== upTo; node = node.parent) {\n node.hasDirty = true;\n // Each is reached by the commit, though a box on the way was marked and not committed\n // since: one with `display: none` keeps its mark, and `markPath` stops at a marked box.\n node.subtreeDirty = true;\n if (this.hasReaders.size) this.changedBeneath.add(node);\n }\n if (wasClean && this.root.subtreeDirty) this.dirtied();\n }\n\n /** `markBefore` for a change to `changed` in `parent`'s list, or one coming or going at `at`. */\n private markBeside(parent: EngineNode, changed?: EngineNode, at?: number): void {\n // One came or went at `at`: what is after it is not where it was marked.\n if (at !== undefined && at < (this.markedBefore.get(parent) ?? 0)) {\n this.markedBefore.set(parent, at);\n }\n this.markBefore(parent, at ?? (changed ? parent.childList.indexOf(changed) : 0));\n }\n\n /**\n * By child list, how many of its first children `markBefore` has marked since the last commit,\n * which marks no more of them again: a list that gains its items one at a time is not looked\n * through once for each. A child coming or going before that many brings it down to where.\n */\n private readonly markedBefore = new Map<EngineNode, number>();\n\n /**\n * By child list, how many of its first children `markRepositioned` has marked for their place\n * from the end since the last commit: a list that gains its items one at a time at its end is\n * not looked through once for each.\n */\n private readonly placesMarked = new Map<EngineNode, number>();\n /** By child list, the first of the children `markAllAfter` has marked with all after it. */\n private readonly placesMarkedAfter = new Map<EngineNode, number>();\n\n /**\n * `:has(+ .x)` and `:has(~ .x .y)`: a change in `parent`'s list at `at` can change what the\n * elements before it match, and so can one beneath a box for the elements before that box.\n * Each is matched again, as an ancestor is. Only sheets that ask about what comes after pay.\n */\n private markBefore(parent: EngineNode, at: number): void {\n let end = at;\n for (let list: EngineNode | null = parent; list;) {\n const marked = this.markedBefore.get(list) ?? 0;\n for (let i = marked; i < end; i++) {\n const before = list.childList[i]!;\n if (before.nodeKind !== 'element') continue;\n before.hasDirty = true;\n if (this.hasReaders.size) this.changedBeneath.add(before);\n }\n if (end > marked) this.markedBefore.set(list, end);\n const up: EngineNode | null = list.parent;\n if (up) end = up.childList.indexOf(list);\n list = up;\n }\n }\n\n /**\n * The boxes rules ask `:has()` of above the node they style, `.card:has(.x) .title`, by the\n * sheet that asks: a sheet replaced or taken away asks no more.\n */\n private readonly hasReaders = new Map<StyleSheet, readonly HasAbove[]>();\n /** The nodes something changed beneath since the last commit, where any sheet has such a rule. */\n private readonly changedBeneath = new Set<EngineNode>();\n\n /**\n * Have matched again what is under each box that changed beneath and that such a rule could\n * be asking: the nodes the rule is for, and no other. Once for a commit, however many changes\n * there were beneath the box: a table gains its rows one at a time.\n *\n * A rule asked of a box above is walked under the highest box that asks it, which reaches what\n * is under the boxes beneath that one as well: a rule `:has()` asks of any box is asked by every\n * box from the change up to the root, and walked once, from the root. The rules a box asks are\n * walked together, the tree beneath it once.\n */\n private markUnderHas(): void {\n if (!this.changedBeneath.size) return;\n const readers = [...this.hasReaders.values()].flat();\n const depths = new Map<EngineNode, number>();\n for (const node of this.changedBeneath) depthOf(node, depths);\n const boxes = [...this.changedBeneath].sort((a, b) => depths.get(a)! - depths.get(b)!);\n // By box walked, the rules walked under it and under every box above it.\n const walked = new Map<EngineNode, ReadonlySet<HasAbove>>();\n const after = new MarkedAfter();\n for (const node of boxes) {\n let above: ReadonlySet<HasAbove> | undefined;\n for (let up = node.parent; up && !above; up = up.parent) above = walked.get(up);\n const all = this.markUnderBox(node, readers, above, after);\n if (all) walked.set(node, all);\n }\n this.changedBeneath.clear();\n }\n\n /**\n * `markUnderHas` for one box: the rules it asks that no box above it was walked for, walked\n * together. What was walked under it and above it, which is `above` where it asks no more.\n */\n private markUnderBox(\n node: EngineNode,\n readers: readonly HasAbove[],\n above: ReadonlySet<HasAbove> | undefined,\n after: MarkedAfter,\n ): ReadonlySet<HasAbove> | undefined {\n const asked: HasAbove[] = [];\n for (const reader of readers) {\n if (above?.has(reader) || !couldAsk(reader, node)) continue;\n asked.push(reader);\n }\n if (!asked.length) return above;\n const subjects = asked.map((reader) => reader.subjects);\n this.markUnder(node, subjects.length === 1 ? subjects[0]! : joinSubjects(subjects));\n for (const reader of asked) if (reader.beside) this.markAfter(node, reader.subjects, after);\n return new Set([...(above ?? []), ...asked]);\n }\n\n /**\n * Have matched again each element after `node` that one of `subjects`' rules could be for, and\n * each under one of those: what `.card:has(.x) ~ .title` is for, where the card is `node`.\n * One already reached for `subjects` in this pass had all after it reached with it.\n */\n private markAfter(node: EngineNode, subjects: Subjects, after: MarkedAfter): void {\n // The root, or a box taken out since, has nothing after it.\n if (!node.parent) return;\n const siblings = node.parent.childList;\n const reached = after.reached(subjects);\n for (let i = after.place(node) + 1; i < siblings.length; i++) {\n const sibling = siblings[i]!;\n if (sibling.nodeKind !== 'element') continue;\n if (reached.has(sibling)) return;\n reached.add(sibling);\n if (this.styles.isFor(subjects, sibling)) {\n sibling.ownDirty = true;\n this.markPath(sibling);\n }\n this.markUnder(sibling, subjects);\n }\n }\n\n /**\n * What `node` matches changed, which the elements after it can read: as many of them as a rule\n * steps along from one, every one for a `~`, and none where no sheet steps at all.\n */\n private markLaterSiblings(node: EngineNode): void {\n let left = this.structuralAfter;\n const siblings = left > 0 ? node.parent?.childList : undefined;\n if (!siblings) return;\n // Each matched again, and left as it was with all under it where it matches what it did:\n // see `markPlace`.\n for (let i = siblings.indexOf(node) + 1; i < siblings.length && left > 0; i++) {\n const sibling = siblings[i]!;\n this.markPlace(sibling);\n if (sibling.nodeKind === 'element') left--;\n }\n }\n\n /** `node`'s child list changed: `moved` came into it at `at`, or went out of it from there. */\n private markStructure(node: EngineNode, moved: EngineNode, at: number): void {\n node.structureDirty = true;\n this.layoutStale = true;\n // An item whose least width is measured holds something else now: see `settleMinimums`.\n if (this.minimums.size) {\n for (let up: EngineNode | null = node; up; up = up.parent) {\n if (up.shareMin) up.shareMin.width = undefined;\n }\n }\n // A child list that moved changes what its members match, though nothing about them did:\n // the old last row is no longer the last. Only sheets that ask about position pay for this.\n if (this.structuralSheets) {\n moved.styleDirty = true;\n this.markRepositioned(node, at, moved);\n // What the node itself matches hangs on its child list only through `:empty`, which only\n // its first child arriving or its last one leaving changes: and then what a later sibling\n // matches can too, `.box:empty + .spacer`. Styled again for any other change, everything\n // under it would be resolved again with it.\n if (wasOrIsEmptyWithout(node, moved)) {\n node.styleDirty = true;\n this.markLaterSiblings(node);\n }\n }\n if (this.hasSheets) this.markBeneath(node, undefined, at);\n this.markPath(node.parent);\n }\n\n /**\n * Mark the children whose place in a child list that changed at `at` a sheet could read\n * differently. The two at each end always, which are the old first and last and the new. Those\n * from `at` on where some sheet counts from the start or asks about any one before, since a\n * child's place from the start hangs only on those before it; and those before `at` where one\n * counts from the end. Styling one again resolves everything under it again, so a long list\n * gaining a row at its end is not the whole list.\n *\n * Where the sheets ask no further than the element just before (`+`), a rule steps a known\n * number of elements along from one whose own match changed, and those are all there is to\n * mark: that many after the change, and that many after the two at the start, either of which\n * may have stopped or started being first. Nothing comes after the two at the end.\n */\n private markRepositioned(list: EngineNode, at: number, moved: EngineNode): void {\n const children = list.childList;\n const steps = this.structuralAfter;\n const pastFirst = steps === Infinity ? 0 : steps;\n for (const child of elementsAtEnd(children, 2 + pastFirst, false)) this.markPlace(child);\n for (const child of elementsAtEnd(children, 2, true)) this.markPlace(child);\n if (this.structuralBefore) {\n // Those before `at` are where they were: the ones of them marked already stay marked.\n for (let i = Math.min(this.placesMarked.get(list) ?? 0, at); i < at; i++) {\n this.markPlace(children[i]!);\n }\n this.placesMarked.set(list, at);\n }\n if (steps === Infinity) return this.markAllAfter(list, at, moved);\n // The elements after the change, not counting the one that came, which is marked already.\n let left = steps;\n for (let i = at; i < children.length && left > 0; i++) {\n const child = children[i]!;\n this.markPlace(child);\n if (child.nodeKind === 'element' && child !== moved) left--;\n }\n }\n\n /**\n * Mark every element after a change at `at`, where a sheet asks about any element before\n * (`~`). Those after the last change marked so since the commit are marked still, wherever they\n * moved to: a list losing its rows first to last is not looked through once for each.\n */\n private markAllAfter(list: EngineNode, at: number, moved: EngineNode): void {\n const children = list.childList;\n const from = this.placesMarkedAfter.get(list);\n const inserted = children[at] === moved;\n // The change is among the marked ones, which a row coming or going leaves marked.\n if (from !== undefined && (at > from || (at === from && !inserted))) return;\n // Those from `from` moved one along, on for a row put in and back for one taken out.\n const end = from === undefined ? children.length : inserted ? from + 1 : from - 1;\n for (let i = at; i < end; i++) this.markPlace(children[i]!);\n this.placesMarkedAfter.set(list, at);\n }\n\n /**\n * A child's place in its list changed, which is all that changed about it. It is matched\n * again, and keeps its style and all that is under it unless it now matches other rules: its\n * place is read by the rules that style it and by no other. Not where a rule reads the place\n * of an element like it from under it, `.row:nth-child(odd) .label`: that changes more than\n * the element itself, which is then styled again with everything under it, as is a child\n * that is no element.\n */\n private markPlace(child: EngineNode): void {\n if (child.nodeKind !== 'element' || this.placeReadFromUnder(child)) child.styleDirty = true;\n else child.stateDirty = true;\n }\n\n /**\n * Whether a rule could read this element's place from another element. By its classes and its\n * element name, which every such compound it could be asks for: one with neither could be any.\n */\n private placeReadFromUnder(node: EngineNode): boolean {\n for (const { compound, above, child } of this.placeElsewhere) {\n // By its element name as well, `text:nth-child(odd) .label`, where the compound has one.\n if (compound.type !== undefined && compound.type !== (node.typeName ?? node.tag)) continue;\n if (!hasClasses(node, compound.classes)) continue;\n // And by what the rule has it in, which a compound with no class is told from.\n if (!above?.length) return true;\n for (let up = node.parent; up; up = child ? null : up.parent) {\n if (hasClasses(up, above)) return true;\n }\n }\n return false;\n }\n\n /** Note what a sheet coming into play asks about a child list. None is unset: see `structural`. */\n private watchStructure(sheet: StyleSheet | null | undefined): void {\n if (!sheet?.structural || this.watchedStructure.has(sheet)) return;\n this.watchedStructure.add(sheet);\n this.structuralSheets = true;\n const reach = siblingReach(sheet);\n this.structuralAfter = Math.max(this.structuralAfter, reach.after);\n if (reach.before) this.structuralBefore = true;\n for (const compound of placeReadElsewhere(sheet)) this.placeElsewhere.add(compound);\n // What a child whose place changed is compared with is the rules it matched, which a cache\n // keeps from here on. One made before has none, and is styled again the first time, as it\n // was before any sheet asked.\n this.styles.tracksHas = true;\n }\n\n /** Walk up until we hit a node already known to have a dirty subtree. */\n /**\n * Whether anything has been marked since the last commit that could move layout: everything\n * is, but a frame of an animation that only paints. A commit of such frames alone plans no\n * layout and reads nothing back: a spinner turns on every frame for as long as its page is\n * open, and the page's layout is the same on each of them.\n */\n private layoutStale = true;\n /** Set while a frame of an animation marks a node whose animated props only paint. */\n private paintTick = false;\n /** Set for the length of a commit that nothing but such frames led to. */\n private paintOnly = false;\n\n /** Mark a node for a frame of its animation or transition, which moved these props. */\n private tick(node: EngineNode, keys: readonly string[]): void {\n this.paintTick = keys.every((key) => PAINT_ONLY_KEYS.has(key));\n try {\n this.markProps(node, false);\n } finally {\n this.paintTick = false;\n }\n }\n\n /** Tell the host the tree is dirty: what its listener changes is no frame that only paints. */\n private dirtied(): void {\n const paintTick = this.paintTick;\n this.paintTick = false;\n try {\n this.onDirty?.();\n } finally {\n this.paintTick = paintTick;\n }\n }\n\n private markPath(node: EngineNode | null): void {\n if (!this.paintTick) this.layoutStale = true;\n const wasClean = !this.root.structureDirty && !this.root.subtreeDirty;\n for (let current = node; current && !current.subtreeDirty; current = current.parent) {\n current.subtreeDirty = true;\n }\n // The tree has just gone from clean to dirty. Inside a change-detection pass that means\n // nothing, because the pass ends in a commit; outside one it means the change has no commit\n // coming, and the host has to arrange a frame.\n if (wasClean && this.root.subtreeDirty) this.dirtied();\n }\n\n private isClean(node: EngineNode): boolean {\n return (\n node.committed !== null && !node.propsDirty && !node.structureDirty && !node.subtreeDirty\n );\n }\n\n // --- commit -----------------------------------------------------------\n\n /**\n * Incremental: clone only what changed and reuse untouched subtrees by reference. A full\n * rebuild would mint fresh shadow nodes for every node on every tick, which drops scroll\n * offset, text cursor and keyboard focus. That is a correctness requirement, not an\n * optimisation.\n */\n commit(): boolean {\n if (this.removedSinceCommit.size) {\n // A box that went can have made room for any other: see `heldIn`.\n this.changesHeld = false;\n this.releaseDetached();\n }\n // The root is never reconciled itself, so it has no `committed` record and `isClean` would\n // always say dirty. Ask the flags directly, or every change-detection pass ends in a\n // completeRoot that changes nothing: during a fling that is one wasted native commit per\n // frame, since any listener firing marks the view for refresh.\n this.settleCreated();\n this.markAdded();\n this.markUnderHas();\n // The marks are taken up by the commit from here: see `markedBefore` and `placesMarked`.\n this.markedBefore.clear();\n this.placesMarked.clear();\n this.placesMarkedAfter.clear();\n if (!this.root.structureDirty && !this.root.subtreeDirty) return false;\n\n const started = now();\n // Faces registered before the walk, the global sheet's among them, reach every node in it.\n this.facesAdded = false;\n this.paintOnly = !this.layoutStale;\n this.layoutStale = false;\n this.movedBoxes.clear();\n this.grownBoxes.clear();\n this.changed.clear();\n this.quietly.clear();\n this.loudly.clear();\n this.holders = undefined;\n this.commitAsAsked();\n // Each a layout of the engine's, which an app of plain flex has asked for none of.\n if (!this.paintOnly && this.asked & LAYOUTS) this.settleLayout();\n this.paintOnly = false;\n this.changesHeld = true;\n\n this.countCommit(now() - started);\n\n this.flushTransitionEvents();\n this.reportPaint();\n this.playSized();\n this.scrollDriver?.afterCommit();\n // Read first: the commit that settles keyframes starts by clearing it.\n const facesAdded = this.facesAdded;\n if (this.awaitingKeyframes.size) this.settleKeyframes();\n if (facesAdded) this.rematchFonts();\n this.blurHidden();\n return true;\n }\n\n /** Count a commit that reached native, and how long it took, in `stats`. */\n private countCommit(elapsed: number): void {\n this.stats.commits++;\n this.stats.lastCommitMs = elapsed;\n if (this.stats.commits === 1) {\n this.stats.firstCommitMs = elapsed;\n } else {\n if (elapsed > this.stats.worstCommitMs) this.stats.worstCommitMs = elapsed;\n if (elapsed > FRAME_BUDGET_MS) this.stats.slowCommits++;\n }\n }\n\n /** A field went out of view focused, in the commit running: see `undisplayed`. */\n private blurAfterCommit = false;\n\n private blurHidden(): void {\n if (!this.blurAfterCommit) return;\n this.blurAfterCommit = false;\n this.setFocused(null);\n }\n\n private beforeCommit: (() => void) | null = null;\n\n private announceCommit(): void {\n const run = this.beforeCommit;\n this.beforeCommit = null;\n run?.();\n }\n\n /**\n * Run `run` once, as the next commit hands its tree to the host and before the host has it: the\n * moment for something the host applies to its next commit, which is only this one from here.\n * A pass that changes nothing commits nothing and runs nothing, so a request waits until it is\n * taken back with the function returned. A later request replaces an earlier one.\n */\n beforeNextCommit(run: () => void): () => void {\n this.beforeCommit = run;\n return () => {\n if (this.beforeCommit === run) this.beforeCommit = null;\n };\n }\n\n /** The first commit whose new views have not been drawn yet, while `commitUnseen` runs. */\n private unseen = Infinity;\n\n /**\n * A commit for what changed after earlier commits, before a frame has drawn them. `since` is\n * how many commits there had been before the first of them (`stats.commits`).\n *\n * A view those commits created has not been seen in the style they gave it, so what this one\n * gives it is where it starts, and no transition runs toward it. That is what a browser does\n * with a class added to an element before the frame after it was inserted, and what\n * `animate.enter` is built on: Angular adds the enter class after the render pass that created\n * the element, and takes it off a frame later, which is the one change the transition is for.\n */\n commitUnseen(since: number): boolean {\n this.unseen = since;\n try {\n return this.commit();\n } finally {\n this.unseen = Infinity;\n }\n }\n\n /** Nodes that asked for `@keyframes` this commit had not met, by the name they asked for. */\n private readonly awaitingKeyframes = new Map<EngineNode, string>();\n\n /**\n * A sheet is registered when the first node it styles is committed, so a node committed before\n * it can name keyframes that arrive later in the same commit. Those nodes play them from another\n * commit straight away, as a browser applies keyframes however the sheets arrived; a name still\n * unknown once the commit is over is reported.\n */\n private settleKeyframes(): void {\n const waiting = [...this.awaitingKeyframes];\n this.awaitingKeyframes.clear();\n let found = false;\n for (const [node, name] of waiting) {\n if (this.keyframes.has(name)) {\n this.markProps(node, false);\n found = true;\n } else if (this.dev) {\n this.reportMissingKeyframes(name);\n }\n }\n if (found) this.commit();\n }\n\n private readonly scrollDriver: NativeScrollDriver | null;\n\n /** Whether native can move a view by a scroll with no JavaScript in between. */\n get drivesScroll(): boolean {\n return this.scrollDriver !== null;\n }\n\n /** See `HostEngine.driveByScroll`. The connection waits for a commit of both views. */\n driveByScroll(\n view: EngineNode,\n scroll: EngineNode,\n axis: ScrollAxis,\n range: ScrollRange,\n statics: readonly StaticTransform[] = [],\n ): ScrollDrive | null {\n const property = axis === 'x' ? 'translateX' : 'translateY';\n return this.driveByEvent(view, scroll, scrollFeed(axis), property, range, statics);\n }\n\n /** See `HostEngine.driveByEvent`. */\n driveByEvent(\n view: EngineNode,\n source: EngineNode,\n feed: EventFeed,\n property: DrivenProperty,\n range: ScrollRange,\n statics: readonly StaticTransform[] = [],\n shift: number | null = null,\n ): ScrollDrive | null {\n return this.composedDrive(view, source, feed, property, range, statics, shift);\n }\n\n /** See `driveByEvent`: a drive whose transform after its move can change. */\n private composedDrive(\n view: EngineNode,\n source: EngineNode,\n feed: EventFeed,\n property: DrivenProperty,\n range: ScrollRange,\n statics: readonly StaticTransform[] = [],\n shift: number | null = null,\n ): ComposedDrive | null {\n if (!this.scrollDriver) return null;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move.\n this.setProp(view, 'collapsable', false);\n return this.scrollDriver.drive(\n view,\n source,\n feed,\n property,\n range,\n statics,\n (node) => (node as EngineNode).committed?.tag ?? null,\n shift,\n );\n }\n\n /**\n * `transitionstart` and `transitionend`, for anything listening.\n *\n * Angular's `animate.enter` and `animate.leave` are built on these: they add a class, wait for\n * the transition it starts, and clean up when it ends. Nothing native emits them - there is no\n * CSS animation in React Native to emit them - so the engine that runs the transition is what\n * says when one began and ended.\n */\n /** Created since the last commit and waiting to settle. See `HostEngine.settle`. */\n private unsettled: Settling[] = [];\n\n settle(target: Settling): void {\n this.unsettled.push(target);\n }\n\n /**\n * Let every element created since the last commit write what its inputs say. One that was\n * checked already has, and answers at once; one whose view is detached writes its props here,\n * so the commit that first mounts it carries them.\n */\n private settleCreated(): void {\n if (this.unsettled.length === 0) return;\n const created = this.unsettled;\n this.unsettled = [];\n for (const target of created) target.settleProps();\n }\n\n private readonly transitionEvents: { node: EngineNode; type: string; property: string }[] = [];\n\n private emitTransition(node: EngineNode, type: string, property: string): void {\n if (!node.listeners?.has(type)) return;\n this.transitionEvents.push({ node, type, property });\n }\n\n /**\n * After the commit, never during it: a listener is free to add a class or drop an element, and\n * a tree that changes halfway through being walked is the one thing a commit cannot survive.\n */\n private flushTransitionEvents(): void {\n if (this.transitionEvents.length === 0) return;\n for (const { node, type, property } of this.transitionEvents.splice(0)) {\n // One listener that throws stops neither the rest nor the node being let go.\n for (const listener of [...(node.listeners?.get(type) ?? [])]) {\n try {\n listener(animationEvent(type, node, property));\n } catch (error) {\n this.reportEventError(error, type);\n }\n }\n if (type === 'topAnimationend') this.letGo(node);\n }\n }\n\n /**\n * The nodes whose animation has ended with no fill and is still held at its last frame, until\n * its `animationend` has been heard. A browser runs that listener before it paints again, and\n * an exit animation's listener takes the element away: it is never seen back at rest. Here the\n * listener runs after the commit, so the commit that ends the animation paints the last frame,\n * and the element goes back to rest once the listener has run and left it there.\n */\n private readonly lettingGo = new Set<EngineNode>();\n\n private letGo(node: EngineNode): void {\n if (!this.lettingGo.delete(node)) return;\n const running = node.playing;\n if (!running?.done) return;\n running.values = {};\n this.markProps(node, false);\n }\n\n /** Everything the engine lays out in Yoga's place, from the commit just made. */\n private settleLayout(): void {\n this.moveFixed();\n this.settleMinimums();\n this.settleGrids();\n this.settleFits();\n this.settleHeld();\n // A sum can size a grid or move what is in a held box: each again, and the sums of it after.\n if (this.settleMixed()) {\n this.settleGrids();\n this.settleHeld();\n this.settleMixed();\n }\n this.settleAbsolute();\n this.settleSticky();\n }\n\n /** Note a node that is settled after layout: by a sum of a share and a length, or its least. */\n private noteSettled(node: EngineNode, props: Record<string, unknown>): void {\n if (node.mixed) this.mixeds.add(node);\n if (node.shareMin) this.minimums.add(node);\n // While an item is read at its narrowest: a box in it that is no wider than what it is in,\n // `max-width: 100%`, gets as narrow as that, and holds the item to nothing. A picture.\n const shrinks = typeof props['maxWidth'] === 'string' && props['maxWidth'].endsWith('%');\n if (shrinks && this.narrowed && this.inWords(node)) props['width'] = 0;\n }\n\n /** The items whose minimum width is measured: see `shareMinimum`. */\n private readonly minimums = new Set<EngineNode>();\n /** Those whose text is committed a word to a line, while how narrow they go is read. */\n private narrowed: ReadonlySet<EngineNode> | null = null;\n\n private inWords(node: EngineNode): boolean {\n // While a grid's words are read: see `readNarrow`.\n if (this.wordsOf !== null && isWithin(node, this.wordsOf)) return true;\n if (!this.narrowed) return false;\n for (let up = node.parent; up; up = up.parent) if (this.narrowed.has(up)) return true;\n return false;\n }\n\n /**\n * Read how narrow each item that takes a share of its row goes, where that is not known or\n * something in the item changed: all of them committed as wide as their content with their\n * words a line each, read, and committed again with that as their minimum. Two commits for\n * all of them together, and none where nothing in any of them moved.\n */\n private settleMinimums(): void {\n if (!this.minimums.size || !this.fabric.getBoundingClientRect) return;\n const stale = [...this.minimums].filter((node) => this.minimumIsStale(node));\n if (!stale.length) return this.reshare();\n const texts = stale.flatMap(textsUnder);\n this.settling = true;\n try {\n for (const node of stale) node.shareOff = true;\n this.narrowed = new Set(stale);\n const narrow = stale.flatMap((node) => this.noWiderThanRoom(node));\n this.touch([...stale, ...texts, ...narrow]);\n this.commitTree();\n for (const node of stale) {\n if (node.shareMin) node.shareMin.width = this.boxOf(node)?.[2];\n node.shareOff = undefined;\n }\n this.narrowed = null;\n this.touch([...stale, ...texts, ...narrow, ...this.sharedAgain()]);\n this.commitTree();\n } finally {\n this.narrowed = null;\n this.settling = false;\n }\n }\n\n /** The boxes under a node whose width is capped at a share of what they are in. */\n private noWiderThanRoom(node: EngineNode): EngineNode[] {\n const found: EngineNode[] = [];\n for (const child of node.childList) {\n if (child.nodeKind !== 'element') continue;\n const cap = readStyle(child, 'maxWidth');\n if (typeof cap === 'string' && cap.endsWith('%')) found.push(child);\n found.push(...this.noWiderThanRoom(child));\n }\n return found;\n }\n\n /** Share each row out again where its room or its items changed, with no minimum to read. */\n private reshare(): void {\n const changed = this.sharedAgain();\n if (!changed.length) return;\n this.settling = true;\n try {\n this.touch(changed);\n this.commitTree();\n } finally {\n this.settling = false;\n }\n }\n\n /**\n * Work out each item's share of its line again, for every row whose items all grow into it\n * from nothing, and answer the items whose share is another than it was. A row with any other\n * item in it, one with a width or as wide as its content, is left to Yoga with its items'\n * minimums: what such an item takes of a line is not known until the line is laid out.\n */\n private sharedAgain(): EngineNode[] {\n const changed: EngineNode[] = [];\n const rows = new Set<EngineNode>();\n for (const node of this.minimums) {\n // A row in no room that can have changed, and whose items did not, shares out as it did.\n if (node.parent && this.mayHaveMoved(node.parent)) rows.add(node.parent);\n }\n for (const row of rows) {\n const items = row.childList.filter(\n (child) => child.nodeKind === 'element' && this.inFlowOfRow(child),\n );\n const sharers = items.map((item) => this.sharerOf(item));\n const all = sharers.every((each) => each !== undefined);\n const room = all ? this.roomIn(row) : Infinity;\n const widths = Number.isFinite(room)\n ? lineShares(sharers as Sharer[], room, this.gapOf(row), this.wrapsRow(row))\n : [];\n items.forEach((item, at) => {\n const share = widths[at];\n if (!item.shareMin || sameShare(item.shareMin.share, share)) return;\n item.shareMin.share = share;\n changed.push(item);\n });\n }\n return changed;\n }\n\n /** An item of a row that is laid out in it: displayed, and not out of the flow. */\n private inFlowOfRow(node: EngineNode): boolean {\n if (readStyle(node, 'display') === 'none') return false;\n return !OUT_OF_FLOW.has(readStyle(node, 'position') as string);\n }\n\n /** An item as `lineShares` takes one, or nothing for one that does not grow from nothing. */\n private sharerOf(node: EngineNode): Sharer | undefined {\n if (!node.shareMin) return this.unsharing(node);\n const least = node.shareMin?.width;\n const basis = readStyle(node, 'flexBasis');\n const flex = readStyle(node, 'flex');\n const grow = typeof flex === 'number' ? flex : readStyle(node, 'flexGrow');\n const fromNothing = typeof flex === 'number' || basis === 0 || basis === '0%';\n // One that does not grow is held at its least: `flex: 0`.\n const grows = typeof grow === 'number' ? grow : 0;\n if (least === undefined || !fromNothing) return undefined;\n return { grow: grows, least, around: marginsAlong(node) };\n }\n\n /**\n * An item that takes no share of its row, as what it takes of a line: the width it was laid\n * out at. Nothing for one that grows from its content, whose width is the line's to give.\n */\n private unsharing(node: EngineNode): Sharer | undefined {\n const grow = readStyle(node, 'flexGrow');\n if (typeof readStyle(node, 'flex') === 'number' || (typeof grow === 'number' && grow > 0)) {\n return undefined;\n }\n const box = this.boxOf(node);\n return box ? { grow: 0, least: box[2]!, around: marginsAlong(node) } : undefined;\n }\n\n private gapOf(row: EngineNode): number {\n const gap = readStyle(row, 'columnGap') ?? readStyle(row, 'gap');\n return typeof gap === 'number' ? gap : 0;\n }\n\n private wrapsRow(row: EngineNode): boolean {\n const wrap = readStyle(row, 'flexWrap');\n return wrap === 'wrap' || wrap === 'wrap-reverse';\n }\n\n /** Whether an item's minimum is to be read: it never was, or something in it moved or grew. */\n private minimumIsStale(node: EngineNode): boolean {\n if (!node.shareMin || this.topOf(node) !== this.root) {\n this.minimums.delete(node);\n return false;\n }\n if (node.shareMin.width === undefined) return true;\n for (const box of this.movedBoxes) if (box !== node && isWithin(box, node)) return true;\n for (const box of this.grownBoxes) if (isWithin(box, node)) return true;\n return false;\n }\n\n /** Reconcile what is dirty and hand the tree to Fabric, which lays it out before returning. */\n private commitTree(): void {\n // A commit of its own, such as a grid's once native has measured it, styles what a sheet\n // added since the last `commit` matches as well.\n this.markAdded();\n // What `:has()` answers is kept for the commit, where a sheet asks it: see `keepHasAnswers`.\n keepHasAnswers(this.hasSheets);\n try {\n this.commitWhole();\n } finally {\n keepHasAnswers(false);\n this.markedBefore.clear();\n this.placesMarked.clear();\n this.placesMarkedAfter.clear();\n }\n }\n\n private commitWhole(): void {\n // One epoch per commit. Node props do not change while a commit runs, so every node can be\n // resolved once and shared with each of its descendants for the length of this walk.\n this.styleEpoch++;\n const set = this.fabric.createChildSet(this.rootTag);\n let handles = this.rootHandles();\n // Again, where transitions it laid out where they end are to be eased from JavaScript.\n if (this.layOut()) {\n handles = this.rootHandles();\n // What that found resized is the transitions themselves, at the frame they are eased to.\n this.movesOthers = false;\n }\n for (const handle of handles) this.fabric.appendChildToSet(set, handle);\n this.clearFlags(this.root);\n this.announceCommit();\n this.fabric.completeRoot(this.rootTag, set);\n }\n\n /** The fixed boxes each page, or the root, is committed with. */\n private readonly fixedIn = new Map<EngineNode, Set<EngineNode>>();\n /** Boxes found to be fixed while they were being committed under their parent. */\n private readonly fixedLate = new Set<EngineNode>();\n\n /** What a finger is on, while one is down. */\n private fingerOn: EngineNode | null = null;\n /** Boxes that became fixed or absolute with the finger on them, left under their parents. */\n private readonly fixedUnderFinger = new Set<EngineNode>();\n\n /** Note what a finger comes down on, and once the last has lifted move what waited for it. */\n private trackFinger(target: EngineNode | null, type: string, nativeEvent: unknown): void {\n const fingers = (nativeEvent as { touches?: readonly unknown[] } | null)?.touches?.length ?? 0;\n // The first finger down is a new touch, whether or not the last one's end was heard.\n if (type === TOUCH_START && fingers <= 1) this.fingerOn = target;\n if ((type !== 'topTouchEnd' && type !== 'topTouchCancel') || fingers > 0) return;\n this.fingerOn = null;\n for (const node of this.fixedUnderFinger) {\n if (!isWithin(node, this.root)) continue;\n this.refix(node, readStyle(node, 'position'));\n this.markProps(node, false);\n }\n this.fixedUnderFinger.clear();\n }\n\n /** The page a box is on: the nearest view that holds one, or the root. */\n private pageOf(node: EngineNode): EngineNode | null {\n let page = node.parent;\n while (page?.parent && !FIXED_BOUNDARIES.has(viewNameOf(page))) {\n page = page.parent;\n }\n return page;\n }\n\n /** Whether anything between a box and its page scrolls or clips what is inside it. */\n private scrollsOrClips(node: EngineNode, page: EngineNode): boolean {\n for (let up = node.parent; up && up !== page; up = up.parent) {\n if (up.nodeKind !== 'element') continue;\n if (SCROLL_VIEWS.has(viewNameOf(up))) return true;\n if ((readStyle(up, 'overflow') ?? 'visible') !== 'visible') return true;\n }\n return false;\n }\n\n /**\n * Note a node that has become `position: fixed` inside something that scrolls or clips, which\n * a fixed box does neither with: it is committed under its page in place of its parent. It is\n * being reconciled under its parent as this is asked, so it is committed there once more and\n * moved straight after: see `moveFixed`. Anywhere else a fixed box stays where it is, and is\n * placed against its page by `settleAbsolute`.\n */\n private refix(node: EngineNode, position: unknown): void {\n if (node.fixedTo !== undefined) return;\n // A view that is moved loses its touch: one a finger is on is moved when the finger lifts.\n if (isWithin(this.fingerOn, node)) return void this.fixedUnderFinger.add(node);\n const page = position === 'fixed' ? this.pageOf(node) : this.placedAbove(node);\n if (!page || !(this.scrollsOrClips(node, page) || clipsFixed(position))) return;\n node.fixedTo = page;\n const held = this.fixedIn.get(page) ?? new Set();\n this.fixedIn.set(page, held.add(node));\n this.fixedLate.add(node);\n }\n\n /**\n * The box an absolute box is placed against, where that is further up than its parent: one\n * under a parent that is not positioned. A browser clips such a box by nothing between the\n * two, where a native view is clipped by every view it is in, so where one of them clips it is\n * committed under the box it is placed against, as a fixed box is under its page.\n */\n private placedAbove(node: EngineNode): EngineNode | null {\n const block = this.containingBlock(node);\n return block === node.parent ? null : block;\n }\n\n /**\n * Whether a child is committed under its page, and not under its parent. On Android a fixed box\n * is taken there before its parent commits it, so that it is never moved: Android mounts a\n * view moved out of boxes of layout alone wrongly. See `clipsFixed`.\n */\n private onPage(child: EngineNode, context: object | undefined): boolean {\n // A fixed box asks for a layout of CSS's: an app that has none reads no child's position.\n if (\n child.fixedTo === undefined &&\n this.asked & CSS_LAYOUT &&\n child.nodeKind === 'element' &&\n nativePlatform() === 'android'\n ) {\n this.styles.resolve(child, this.styleEpoch);\n const position = readStyle(child, 'position');\n if (clipsFixed(position)) this.refix(child, position);\n }\n return child.fixedTo !== undefined && this.staysFixed(child, context);\n }\n\n /** Whether a box committed under another still is to be: asked in place of committing it under its parent. */\n private staysFixed(child: EngineNode, context: object | undefined): boolean {\n if (this.stillCommitted(child, context)) return true;\n this.styles.resolve(child, this.styleEpoch);\n const position = readStyle(child, 'position');\n if (position === 'fixed') return true;\n // An absolute one, for as long as it is placed against the same box and still clipped.\n const above = position === 'absolute' ? this.placedAbove(child) : null;\n if (above === child.fixedTo && above && this.scrollsOrClips(child, above)) return true;\n this.fixedIn.get(child.fixedTo!)?.delete(child);\n child.fixedTo = undefined;\n return false;\n }\n\n /** The view each page's fixed boxes are committed in, and what it was last committed with. */\n private readonly fixedLayers = new WeakMap<\n EngineNode,\n { handle: FabricNode; handles: FabricNode[] }\n >();\n\n /**\n * The fixed boxes pinned to `page`, committed after its own children so they draw over them,\n * in a view over the whole page: Android's screen view clips each view in it to that view's\n * bounds, and a fixed box draws past its own, as a toaster of no height draws its toasts.\n */\n private fixedHandles(page: EngineNode, into: FabricNode[]): void {\n const fixed: FabricNode[] = [];\n this.fixedBoxes(page, fixed);\n if (fixed.length) into.push(this.fixedLayer(page, fixed));\n }\n\n /** The view `fixedHandles` puts a page's fixed boxes in: the same view each commit. */\n private fixedLayer(page: EngineNode, handles: FabricNode[]): FabricNode {\n const was = this.fixedLayers.get(page);\n if (\n was &&\n was.handles.length === handles.length &&\n handles.every((h, i) => h === was.handles[i])\n )\n return was.handle;\n const handle = was\n ? this.clone(was.handle, null, [...handles])\n : this.fabric.createNode(nextTag(), 'View', this.rootTag, { ...FIXED_LAYER }, page);\n if (!was) for (const child of handles) this.fabric.appendChild(handle, child);\n this.fixedLayers.set(page, { handle, handles });\n return handle;\n }\n\n /** The fixed boxes pinned to `page`, as they are committed. */\n private fixedBoxes(page: EngineNode, into: FabricNode[]): void {\n const held = this.fixedIn.get(page);\n if (!held) return;\n for (const node of held) {\n if (node.fixedTo !== page || !isWithin(node, page)) {\n held.delete(node);\n if (node.fixedTo === page) node.fixedTo = undefined;\n continue;\n }\n // Inside something that is not displayed, it is not either: nothing of it is committed.\n if (this.hiddenBelow(node, page)) continue;\n const parent = node.parent!;\n const context =\n parent.nodeKind === 'element'\n ? this.styles.resolve(parent, this.styleEpoch).context\n : undefined;\n into.push(this.reconcileUnder(page, node, context));\n }\n }\n\n /** Whether anything between a node and `page` is `display: none`. */\n private hiddenBelow(node: EngineNode, page: EngineNode): boolean {\n for (let up = node.parent; up && up !== page; up = up.parent) {\n if (up.nodeKind !== 'element') continue;\n this.styles.resolve(up, this.styleEpoch);\n if (readStyle(up, 'display') === 'none') return true;\n }\n return false;\n }\n\n /** Commit again with each box that has just become fixed under its page, in the same task. */\n private moveFixed(): void {\n if (!this.fixedLate.size) return;\n this.touch(this.fixedLate);\n this.fixedLate.clear();\n this.commitTree();\n }\n\n /**\n * What the engine lays out in Yoga's place, for a node being reconciled: a block's flow, a\n * grid, and a fixed, sticky or out-of-flow box. Its display and position are read once here,\n * since this is asked of every node reconciled and most are none of these.\n */\n private relayout(node: EngineNode): void {\n // A frame that only paints moved no box: see `layoutStale`.\n if (node.nodeKind !== 'element' || this.paintOnly) return;\n // A box given other styles may give what is in it other room: see `settleFits`.\n if (node.propsDirty && this.fits.size && !this.settling) this.restyled.add(node);\n if (!(this.asked & CSS_LAYOUT)) {\n // Asked here, and not by a call: most apps have neither a share nor a sum.\n if (this.asked & LAYOUTS && !this.settling) this.replanPlain(node);\n return;\n }\n if (this.inlines) this.settleInlines(node);\n this.replan(node);\n }\n\n /**\n * `replan` for an app nothing in which has asked for a layout of CSS's: what a box of plain\n * flex can still need of the engine, a share of a box as wide as its content and a\n * percentage with a length added. See `asked`.\n */\n private replanPlain(node: EngineNode): void {\n if (node.mixed) node.mixed.dirty = true;\n if (this.asked & SHARED_WIDTHS) this.noteFits(node);\n }\n\n /**\n * What has been asked for that the engine works out in Yoga's place, as the bits of `asks`:\n * by a sheet, a style or a package that gives elements a browser's defaults. Until something\n * asks, a node is asked none of what that takes, which is most of what is asked of one: an\n * app of native views and flex is laid out by Yoga alone. Nothing is taken back, as a sheet\n * is never forgotten.\n */\n private asked = askMode() === 'all' ? EVERYTHING : 0;\n private readonly checksAsks = askMode() === 'check';\n /** The boxes that asked for a layout of CSS's as they were merged: see `laidOut`. */\n private readonly askedLate = new Set<EngineNode>();\n\n private want(bits: number): void {\n // A layout asked for in a commit has none of what changed before it noted: see `heldIn`.\n if (bits & LAYOUTS & ~this.asked) {\n this.changesHeld = false;\n this.holders = undefined;\n }\n this.asked |= bits;\n this.notesMoves = this.asked !== 0;\n }\n\n /** The sheets whose asks are in `asked` already: read once each, as a sheet does not change. */\n private readonly askingSheets = new WeakSet<StyleSheet>();\n\n private watchLayout(sheet: StyleSheet | null | undefined): void {\n // Asked for every element a component's sheet is given to.\n if (!sheet || this.asked === EVERYTHING || this.askingSheets.has(sheet)) return;\n this.askingSheets.add(sheet);\n this.want(sheetAsks(sheet));\n }\n\n /**\n * Commit the tree, and again where a box asked for a layout of CSS's as it was merged, by\n * what it came to and no one declaration: it had been planned as a box of plain flex by\n * then, so it is planned and merged again, now that it is asked what it was not.\n */\n private commitAsAsked(): void {\n this.commitTree();\n if (!this.askedLate.size) return;\n this.touch([...this.askedLate]);\n this.askedLate.clear();\n this.paintOnly = false;\n this.commitTree();\n }\n\n /**\n * A test run's check that nothing was left unasked: throw where a node being merged would\n * be laid out by what no declaration has asked for, which a sheet or a style is not read for.\n */\n private checkAsked(node: EngineNode, merged: Record<string, unknown>): void {\n const missed = this.asked & CSS_LAYOUT ? [] : this.unaskedLayout(node, merged);\n if (!(this.asked & MIXED_SIZES) && takeMixed(node, { ...merged })) missed.push('a sum');\n if (!(this.asked & SHARED_WIDTHS) && sharesWidth(node)) missed.push('a share');\n if (missed.length) throw new Error(`Laid out by what nothing asked for: ${missed.join(', ')}`);\n }\n\n /** What a layout of CSS's would make of a node that no declaration asked for one of. */\n private unaskedLayout(node: EngineNode, merged: Record<string, unknown>): string[] {\n const copy = { ...merged };\n const [autoMin, shareMin] = [node.autoMin, node.shareMin];\n this.flowed(node, copy);\n gridLayout(node, copy);\n autoMinimum(node, copy);\n shareMinimum(node, copy);\n notNative(copy);\n const missed = node.autoMin || node.shareMin ? ['a minimum'] : [];\n [node.autoMin, node.shareMin] = [autoMin, shareMin];\n for (const key of new Set([...Object.keys(copy), ...Object.keys(merged)])) {\n if (!Object.is(copy[key], merged[key])) missed.push(key);\n }\n return [...missed, ...unaskedPlan(node)];\n }\n\n /** Whether any element has been said to be inline: only then is any looked for. */\n private inlines = false;\n\n /**\n * Settle the display of a box that is inline in a browser, and of each such box it holds:\n * those first, since the plan about to be made for this one reads them, and each is reconciled\n * after it.\n */\n private settleInlines(node: EngineNode): void {\n for (const child of node.childList) {\n if (child.inlineLevel === 'unless-block') this.settleInline(child);\n else if (child.inlineLevel === 'always') this.settleLine(child);\n }\n if (node.inlineLevel === 'unless-block') this.settleInline(node);\n else if (node.inlineLevel === 'always') this.settleLine(node);\n }\n\n /**\n * Give an element that is text in a browser, a span or a label, a line to lay out what it\n * holds in, once it holds a box: a label's words and the arrow after them are one line in a\n * browser, and a view's children are a column. Nothing where it holds only text, which a text\n * element lays out itself, or where it has a display of its own.\n *\n * ponytail: the elements that are text and nothing else. A button or a link with no display\n * is inline too, and is left the flex box it has been: one as wide as an item that is as wide\n * as its content, `width: 100%`, is as wide as the room where it sits in a line. Fit the item\n * to its content first if a library leaves a button's display to the browser.\n */\n private settleLine(node: EngineNode): void {\n this.settleBoxed(node);\n const holds =\n inlineText(node) &&\n !isTextElement(node) &&\n node.childList.some((child) => child.nodeKind === 'element');\n if (holds === (node.lined === true)) return;\n const { display, ...rest } = node.defaultStyle ?? {};\n if (holds && display != null) return;\n node.lined = holds || undefined;\n node.defaultStyle = holds ? { ...rest, display: 'inline-block' } : rest;\n node.propsDirty = true;\n }\n\n /**\n * A span that is a flex box or a grid by its own style is a view, and each span in it an item\n * of it with a paragraph of its own: a toolbar's count, title and description, with a gap\n * between them. Text all the way down is one paragraph otherwise, whatever its display.\n */\n private settleBoxed(node: EngineNode): void {\n const boxed = LAYS_OUT_ITSELF.has(readStyle(node, 'display') as string) || undefined;\n if (boxed === node.boxed) return;\n node.boxed = boxed;\n node.propsDirty = true;\n }\n\n /** Give an element that is inline in a browser the display it has for what it holds now. */\n private settleInline(node: EngineNode): void {\n this.flowStyles.clear();\n const display = this.holdsBlock(node) ? 'block' : 'inline-block';\n this.flowStyles.clear();\n if (node.defaultStyle?.['display'] === display) return;\n node.defaultStyle = { ...node.defaultStyle, display };\n node.propsDirty = true;\n }\n\n /** Whether a box holds a block-level box in its flow, through any box that is only inline. */\n private holdsBlock(node: EngineNode): boolean {\n for (const child of node.childList) {\n if (child.nodeKind !== 'element' || this.committedElsewhere(child)) continue;\n const style = this.flowStyle(child);\n const display = style['display'];\n if (display === 'none' || OUT_OF_FLOW.has(style['position'] as string)) continue;\n // By what it holds, where its own display is the engine's or it has no box at all.\n const through = display === 'contents' || this.inlineByDefault(child, style);\n if (through ? this.holdsBlock(child) : !sitsInLine(child, display)) return true;\n }\n return false;\n }\n\n /** Whether a box's display is the one the engine gave it for being inline in a browser. */\n private inlineByDefault(node: EngineNode, style: Record<string, unknown>): boolean {\n return (\n node.inlineLevel === 'unless-block' && style['display'] === node.defaultStyle?.['display']\n );\n }\n\n private replan(node: EngineNode): void {\n const display = readStyle(node, 'display');\n const position = readStyle(node, 'position');\n if (node.parent && readStyle(node, 'order') != null) node.parent.ordered = true;\n this.reflow(node, display);\n this.regrid(node, display);\n this.reminimum(node);\n // Something in it changed, which can change the box its percentages are of.\n if (node.mixed && !this.settling) node.mixed.dirty = true;\n if (position === 'fixed' || position === 'absolute') this.refix(node, position);\n else if (position === 'sticky') this.stickies.add(node);\n if (position === 'absolute' || position === 'fixed') this.reabsolute(node, position);\n if (!this.settling) this.noteFits(node);\n }\n\n /** Have a box fitted to its content again, and the item of a row it is a share of. */\n private noteFits(node: EngineNode): void {\n if (this.sitsInLine(node) || (this.fits.has(node) && this.fitsContent(node))) {\n this.refitted(node);\n }\n if (!sharesWidth(node)) return;\n // The box it is a share of, or one further up that this one is as wide as: each box between\n // has no width of its own, and is as wide as the one it is in.\n for (let around = node.parent; around?.nodeKind === 'element'; around = around.parent) {\n if (this.fitsContent(around)) return this.refitted(around);\n if (!this.wideAsItsBox(around)) return;\n }\n }\n\n /** Whether a box is as wide as what it holds: an item of a row, or out of the flow. */\n private fitsContent(node: EngineNode): boolean {\n return this.itemOfRow(node) || shrunkOutOfFlow(node);\n }\n\n /**\n * Whether a box with no width of its own is as wide as the box it is in: a block in the flow,\n * or an item a column stretches. A share of it is then a share of that box.\n */\n private wideAsItsBox(node: EngineNode): boolean {\n const around = node.parent;\n if (around?.nodeKind !== 'element' || readStyle(node, 'width') != null) return false;\n if (readStyle(node, 'display') === 'contents') return false;\n if (OUT_OF_FLOW.has(readStyle(node, 'position') as string)) return false;\n if (around.flow) return !this.sitsInLine(node);\n return !isRow(around) && stretched(node, around);\n }\n\n private refitted(node: EngineNode): void {\n this.fits.add(node);\n node.fit = { ...node.fit, dirty: true };\n }\n\n /**\n * Whether a box is an item of a flex row with no width, share or basis of its own, which is\n * as wide as its content: a dialog's pane, in a wrapper that centres it. A box in it that is\n * `width: 100%` is as wide as the item, where to Yoga it is as wide as the room.\n */\n private itemOfRow(node: EngineNode): boolean {\n const row = node.parent;\n if (!row || row.nodeKind !== 'element' || row.flow) return false;\n // One that is `display: contents` is no box, and its children are the row's items.\n if (readStyle(node, 'width') != null || readStyle(node, 'display') === 'contents') return false;\n if (OUT_OF_FLOW.has(readStyle(node, 'position') as string)) return false;\n // An item of a column is as wide as its content too, where the column does not stretch it.\n if (!isRow(row)) return !stretched(node, row);\n return !sharesRow(node) || this.growsFromField(node);\n }\n\n /**\n * Whether an item grows into its row from the width of what it holds, `flex: 1 1 auto`, and\n * holds a text field as wide as it is. A browser starts it at the field's own width, its\n * characters, and wraps the row on that; a native field holds nothing to be measured by, so\n * the item is fitted as one with no share is, and grows from the width it comes to.\n */\n private growsFromField(node: EngineNode): boolean {\n const basis = readStyle(node, 'flexBasis');\n if (typeof readStyle(node, 'flex') === 'number' || (basis != null && basis !== 'auto')) {\n return false;\n }\n return this.sizedByRoom(node).some((each) => each.props[FIELD_SIZE] != null);\n }\n\n /**\n * Ask an automatic minimum again: of this node when something under it changed, and of its\n * children when it turns between a row and a column. See `autoMinimum`.\n */\n private reminimum(node: EngineNode): void {\n if (node.autoMin) node.propsDirty = true;\n const row = isRow(node);\n if (node.row !== undefined && node.row !== row) {\n this.touch(node.childList.filter((child) => child.nodeKind === 'element'));\n }\n node.row = row;\n }\n\n /** The boxes that sit in a line of a block, and so are as wide as their content. */\n private readonly fits = new Set<EngineNode>();\n\n /** Whether a box is an inline-level one in a block's flow: on a line, at its content's width. */\n private sitsInLine(node: EngineNode): boolean {\n return inALine(node);\n }\n\n /**\n * Size each box that sits in a line from its content, where Yoga would size it from the room\n * on offer: a box holding a row with a percentage width, or cells that share a row from a\n * basis of nothing. The box is committed with those set aside, its width is read back, and it\n * is committed at that width, which the percentages and the shares are then of.\n */\n private settleFits(): void {\n if (!this.fits.size || !this.fabric.getBoundingClientRect) return;\n this.refitUnderRestyled();\n this.standFitted();\n this.settling = true;\n try {\n // One that is not to be fitted again, and in no room that can have changed, is left.\n let waiting = [...this.fits].filter(\n (node) => (node.fit?.dirty || this.mayHaveMoved(node)) && this.toFit(node),\n );\n // From the innermost: a box is fitted to what it holds, a fitted box among it.\n while (waiting.length) {\n const around = waiting.filter((node) =>\n waiting.some((other) => other !== node && isWithin(other, node)),\n );\n this.fitTogether(waiting.filter((node) => !around.includes(node)));\n waiting = around.filter((node) => this.toFit(node));\n }\n } finally {\n this.settling = false;\n }\n }\n\n /** The boxes the commit being settled resized or moved, or moved others by: see `noteMoved`. */\n private readonly movedBoxes = new Set<EngineNode>();\n /** Those that only came to hold more: words added to, a child more than there was. */\n private readonly grownBoxes = new Set<EngineNode>();\n\n /** The nodes the commit being settled changed: their props, their style or their children. */\n private readonly changed = new Set<EngineNode>();\n /**\n * Those of them cloned with nothing that lays a box out: a colour, or what a screen reader\n * is told, as a progress bar's value is each time it ticks. And those cloned with more.\n */\n private readonly quietly = new Set<EngineNode>();\n private readonly loudly = new Set<EngineNode>();\n /** Unset where a box went or the conditions changed, which can move any box: see `heldIn`. */\n private changesHeld = true;\n /** What `heldIn` answered, until something more is changed. */\n private holders: readonly EngineNode[] | null | undefined;\n\n /** Asked only where a layout of the engine's reads it: see `want` for one asked in a commit. */\n private noteChanged(node: EngineNode): void {\n this.changed.add(node);\n this.holders = undefined;\n }\n\n /**\n * The boxes every change of the commit being settled is inside, where each is out of the flow\n * with a width and a height of its own, or nothing where any change is not inside one. Yoga\n * lays such a box out at the size it is given, so nothing in it moves a box outside it: a\n * progress bar's indicator, in a track of a set size, can tick on a timer without anything\n * else on the page being read back to see whether it has to be laid out again.\n */\n private heldIn(): readonly EngineNode[] | null {\n if (this.holders !== undefined) return this.holders;\n if (!this.changesHeld) return (this.holders = null);\n const holders = new Set<EngineNode>();\n for (const node of this.changed) {\n if (!this.movedItself(node)) continue;\n const holder = this.holderOf(node);\n if (!holder) return (this.holders = null);\n holders.add(holder);\n }\n return (this.holders = [...holders]);\n }\n\n /** The nearest box above a node that holds what changes in it, unchanged itself. */\n private holderOf(node: EngineNode): EngineNode | null {\n for (let up = node.parent; up && up !== this.root; up = up.parent) {\n if (!this.movedItself(up) && holdsItsContent(up)) return up;\n // One committed under another view than its parent is laid out in that one.\n if (this.committedElsewhere(up) || this.fixedLate.has(up) || this.isFixedIn(up)) return null;\n }\n return null;\n }\n\n /** Note whether a node is cloned with more than how it is painted: see `heldIn`. */\n private noteHow(node: EngineNode, payload: Record<string, unknown> | null): void {\n const loud = node.structureDirty || node.remeasure === true || !paintsOnly(payload);\n (loud ? this.loudly : this.quietly).add(node);\n this.holders = undefined;\n }\n\n /** Whether a node was changed in the commit being settled by more than how it is painted. */\n private movedItself(node: EngineNode): boolean {\n return this.changed.has(node) && (this.loudly.has(node) || !this.quietly.has(node));\n }\n\n private isFixedIn(node: EngineNode): boolean {\n for (const fixed of this.fixedIn.values()) if (fixed.has(node)) return true;\n return false;\n }\n\n /**\n * Whether a box can have moved in the commit being settled: see `heldIn`. One asked to be\n * merged again is asked, too: a box read back at a new width is marked for nothing else.\n */\n private mayHaveMoved(node: EngineNode): boolean {\n if (this.changed.has(node)) return true;\n const holders = this.heldIn();\n return holders === null || holders.some((holder) => isWithin(node, holder));\n }\n\n /**\n * Leave each box that is fitted already as it is, where nothing in it or above it moved: a\n * button pressed and painted another colour leaves the box around it the width it has. One\n * as wide as its room is left as what it holds grows, too: an answer written a letter at a\n * time wraps, and is no wider.\n *\n * ponytail: a word added that cannot wrap, and is wider than the room, is not reached past\n * the room for until the box is next fitted. Read how far the content reaches if one is seen.\n */\n private standFitted(): void {\n const moved = [...this.movedBoxes];\n const grown = [...this.grownBoxes];\n for (const node of this.fits) {\n const fit = node.fit;\n if (!fit?.dirty || fit.width === undefined) continue;\n if (moved.some((box) => isWithin(box, node) || isWithin(node, box))) continue;\n const fuller = grown.some((box) => isWithin(box, node));\n // As it is laid out: one whose content is all a share of it is fitted to nothing.\n const width = Math.max(fit.width, this.boxOf(node)?.[2] ?? 0);\n if (!fuller || width + 0.5 >= this.roomOf(node)) fit.dirty = false;\n }\n }\n\n /** The boxes whose own styles changed in this commit, while any box is fitted. */\n private readonly restyled = new Set<EngineNode>();\n\n /**\n * Have each fitted box under a box that was restyled fitted again. The room a box is in can\n * come from far above it, through boxes that are each as wide as what they hold: an overlay's\n * outer box is given the screen, and nothing between it and a calendar says so. The room\n * read from the box's own parent is then the box's own width, and never changes.\n */\n private refitUnderRestyled(): void {\n if (!this.restyled.size) return;\n for (const node of this.fits) {\n if (!node.fit || node.fit.dirty) continue;\n for (let up = node.parent; up; up = up.parent) {\n if (!this.restyled.has(up)) continue;\n node.fit.dirty = true;\n break;\n }\n }\n this.restyled.clear();\n }\n\n /**\n * Whether a box is to be fitted to its content again. One that is no longer fitted at all, or\n * holds nothing sized by the room, is let go here, and one that stands as it is is left.\n */\n private toFit(node: EngineNode): boolean {\n const fit = node.fit;\n const fitted =\n this.topOf(node) === this.root && (this.sitsInLine(node) || this.fitsContent(node));\n if (!fit || !fitted || readStyle(node, 'width') != null) {\n this.unfit(node);\n return false;\n }\n if (this.fitStands(node, fit)) return false;\n if (this.sizedByRoom(node).length) return true;\n fit.dirty = false;\n this.unfit(node, true);\n return false;\n }\n\n /**\n * Fit boxes with nothing of each other in them: all committed with what is sized by the room\n * set aside, read, and committed at the widths they came to. Two commits for all of them,\n * where one at a time is two commits of the whole screen for each.\n */\n private fitTogether(nodes: readonly EngineNode[]): void {\n if (!nodes.length) return;\n const boxes = nodes.map((node) => ({ node, fit: node.fit!, inside: this.sizedByRoom(node) }));\n for (const { node, fit, inside } of boxes) {\n fit.dirty = false;\n fit.width = undefined;\n for (const each of inside) each.fitOff = true;\n // One that grows into its row is measured without its share, as what is in it is.\n if (sharesRow(node)) node.fitOff = true;\n this.touch([node, ...inside, ...this.ungrow(fit)]);\n }\n this.commitTree();\n for (const { node } of boxes) this.gridsAgain(node);\n for (const { node, fit, inside } of boxes) {\n const { width, grown } = this.fittedWidth(node);\n for (const each of [node, ...inside]) each.fitOff = undefined;\n fit.width = width;\n fit.grown = grown;\n this.touch([node, ...inside, ...grown]);\n }\n this.commitTree();\n for (const { node, fit } of boxes) {\n this.gridsAgain(node);\n fit.room = this.roomOf(node);\n }\n }\n\n /**\n * Lay out again each grid in a box whose content's share of the room was just set aside or\n * given back. A grid keeps the width its tracks came to, which was worked out in whatever\n * width it had then: a share of a pane not yet fitted is a share of nothing, and its columns\n * are as narrow as a word.\n */\n private gridsAgain(box: EngineNode): void {\n const grids = gridsIn(box);\n if (!grids.length) return;\n // All started over at once, so that one inside another is measured with nothing around it\n // sized yet, and then laid out from the innermost: a grid is sized from what it holds.\n for (const grid of grids) this.restartGrid(grid, grid.grid!.members);\n this.touch(grids.flatMap((grid) => [grid, ...grid.grid!.members]));\n this.commitTree();\n for (const grid of grids.reverse()) this.settleGrid(grid);\n }\n\n /**\n * The width a box comes to from the commit just made of it, with what is sized by the room\n * set aside. No wider than the room, and no narrower than what in it cannot get narrower:\n * text wraps to the room, and a row of cells with a least width does not, so it reaches past\n * the box's edge. A browser's box is that wide, and overflows the room it is in.\n */\n private fittedWidth(node: EngineNode): { width: number; grown: EngineNode[] } {\n this.flowStyles.clear();\n const box = this.boxOf(node);\n const within = Math.min(box?.[2] ?? 0, this.roomIn(node.parent));\n // An item of a row is as wide as it was laid out with its shares set aside, and no wider\n // than the row: what reaches past it, a drawer waiting off to one side, is no part of it.\n if (!this.sitsInLine(node)) return { width: within, grown: [] };\n // Its content's reach, and its own padding and border after that.\n const edge = insets(this.flowStyle(node)).Right;\n const width = box ? Math.max(within, this.reachOf(node, box[0]) - box[0] + edge) : within;\n const grown = width > within ? this.growAround(node, width) : [];\n this.flowStyles.clear();\n return { width, grown };\n }\n\n /**\n * Hold the boxes around a fitted box that overflows its room to its width: each one that is\n * as wide as its content, out to the first with a width of its own or with room enough. A\n * popover's panel around a calendar wider than the room the panel was given: in a browser a\n * flex item is no narrower than its content, and the panel is drawn under all of the calendar.\n */\n private growAround(node: EngineNode, width: number): EngineNode[] {\n const around: { box: EngineNode; needed: number }[] = [];\n // How many of them are in a box sized by what it holds: the ones past the last such box\n // are as wide as their room, a page and the screen it is on, and are left so.\n let held = 0;\n let needed = width;\n for (\n let up = node.parent;\n up && up !== this.root && up.nodeKind === 'element';\n up = up.parent\n ) {\n const style = this.flowStyle(up);\n if (style['width'] != null && style['width'] !== 'auto') break;\n const edge = insets(style);\n needed += edge.Left + edge.Right;\n if ((this.boxOf(up)?.[2] ?? Infinity) >= needed) break;\n around.push({ box: up, needed });\n if (this.sizedByWhatItHolds(up, style)) held = around.length;\n }\n const grown = around.slice(0, held);\n for (const each of grown) each.box.fitMin = each.needed;\n return grown.map((each) => each.box);\n }\n\n /**\n * Whether a box is as wide as its content and not as its room: out of the flow, on a line, an\n * item of a row, or kept from stretching across a column. A block, and an item stretched\n * across a column, is as wide as the room whatever it holds.\n */\n private sizedByWhatItHolds(node: EngineNode, style: Record<string, unknown>): boolean {\n if (OUT_OF_FLOW.has(style['position'] as string) || this.sitsInLine(node)) return true;\n const parent = node.parent;\n if (!parent || parent.nodeKind !== 'element' || parent.flow) return false;\n if (isRow(parent)) return true;\n const align = style['alignSelf'] ?? readStyle(parent, 'alignItems');\n return align != null && !STRETCHES.has(align as string);\n }\n\n /** Let go of the boxes a fit was holding wider, and answer them, to be committed again. */\n private ungrow(fit: NonNullable<EngineNode['fit']>): EngineNode[] {\n const grown = fit.grown ?? [];\n for (const each of grown) each.fitMin = undefined;\n fit.grown = undefined;\n return grown;\n }\n\n /**\n * Whether a box's fit still holds: nothing about it changed, and it was fitted in the room\n * it is in now. A box is no wider than its room, so it is fitted again when that grows or\n * shrinks, though nothing about the box did.\n */\n private fitStands(node: EngineNode, fit: NonNullable<EngineNode['fit']>): boolean {\n if (fit.dirty) return false;\n return fit.width === undefined || this.roomOf(node) === fit.room;\n }\n\n /** How far right the boxes in a node reach, in the window: past its own edge where they overflow. */\n private reachOf(node: EngineNode, least: number): number {\n let reach = least;\n for (const child of node.childList) {\n if (child.nodeKind !== 'element' || !child.committed) continue;\n const box = this.boxOf(child);\n if (box) reach = Math.max(reach, box[0] + box[2]);\n reach = Math.max(reach, this.reachOf(child, reach));\n }\n return reach;\n }\n\n /** The room a fitted box is in now, as its parent was last laid out. */\n private roomOf(node: EngineNode): number {\n this.flowStyles.clear();\n const room = this.roomIn(node.parent);\n this.flowStyles.clear();\n return room;\n }\n\n /** Stop fitting a box, and commit it again as written where it had been given a width. */\n private unfit(node: EngineNode, keep = false): void {\n const had = node.fit?.width !== undefined;\n const grown = node.fit ? this.ungrow(node.fit) : [];\n if (keep) node.fit = { dirty: false };\n else {\n node.fit = undefined;\n this.fits.delete(node);\n }\n if (!had && !grown.length) return;\n this.touch([node, ...grown]);\n this.commitTree();\n }\n\n /**\n * The boxes inside `node` that Yoga sizes from the room on offer and not from their content:\n * one with a percentage width, and one that takes a share of a row from a basis of nothing.\n * Nothing under a box with a width of its own in points is looked at: that width is its\n * content's room whatever it holds.\n */\n private sizedByRoom(node: EngineNode): EngineNode[] {\n const found: EngineNode[] = [];\n for (const child of node.childList) {\n if (child.nodeKind !== 'element') continue;\n const width = readStyle(child, 'width');\n const shares =\n typeof readStyle(child, 'flex') === 'number' || isNoBasis(readStyle(child, 'flexBasis'));\n if (typeof width === 'string' || shares || isShare(readStyle(child, 'minWidth'))) {\n found.push(child);\n }\n if (typeof width !== 'number') found.push(...this.sizedByRoom(child));\n }\n return found;\n }\n\n /** The boxes a percentage height in them is of, or may be: see `settleHeld`. */\n private readonly holds = new Set<EngineNode>();\n\n /** Note the box a node's percentage height or basis is of, which may be held for it. */\n private noteShare(node: EngineNode, style: Record<string, unknown>): void {\n const shares = ['height', 'minHeight', 'flexBasis'].some((key) => isShareOrSum(style[key]));\n const parent = shares ? layoutParent(node) : null;\n // The surface is as tall as native makes it, and never held.\n if (parent?.nodeKind === 'element' && parent !== this.root) this.holds.add(parent);\n }\n\n /**\n * Hold each box that a percentage height in it is of, and that is as tall as its content, at\n * the height that came to: once the column it is in has sized it, a browser takes the\n * percentage of that height (CSS Flexbox 9.8), where Yoga takes it of the space on offer. The\n * box is read from a commit with each percentage in it set aside, as a browser sizes it, and\n * committed at that height, which a percentage in it is then of and adds nothing to. It is read\n * again when anything in it or beside it moves, and when its width changes.\n */\n private settleHeld(): void {\n if (!this.holds.size || !this.fabric.getBoundingClientRect) return;\n const stale = [...this.holds].filter((node) => this.heldIsStale(node));\n if (!stale.length) return;\n this.settling = true;\n try {\n // Let go first: the commit just made had a box not held as tall as its content already.\n const held = stale.filter((node) => node.heldAt !== undefined);\n for (const node of held) node.heldAt = undefined;\n this.commitTouched(held);\n const holding = stale.filter((node) => {\n const holds = this.holdsHeight(node);\n if (!holds) this.holds.delete(node);\n return holds;\n });\n for (const node of holding) node.heldAt = this.heldBox(node);\n this.commitTouched(holding);\n } finally {\n this.settling = false;\n }\n }\n\n /** A box's height as it was just committed, and the height of its content box then. */\n private heldBox(node: EngineNode): EngineNode['heldAt'] {\n const box = this.boxOf(node);\n if (!box) return undefined;\n const edge = insets(node.committed?.props ?? {});\n return { width: box[2], height: box[3], inner: Math.max(box[3] - edge.Top - edge.Bottom, 0) };\n }\n\n /** Whether a box is to be read again: not held yet, moved, or with something in it moved. */\n private heldIsStale(node: EngineNode): boolean {\n if (this.topOf(node) !== this.root) {\n this.holds.delete(node);\n // Merged again if it comes back, without the height it had here.\n if (node.heldAt) node.propsDirty = true;\n node.heldAt = undefined;\n return false;\n }\n if (!node.heldAt) return true;\n if (this.boxOf(node)?.[2] !== node.heldAt.width) return true;\n // Beside it too: across a row, a box beside it can make the row taller.\n const around = node.parent ?? node;\n for (const box of this.movedBoxes) if (isWithin(box, around)) return true;\n for (const box of this.grownBoxes) if (isWithin(box, around)) return true;\n return false;\n }\n\n /** Whether a box is held: as tall as its content, sized by flex, and a percentage is of it. */\n private holdsHeight(node: EngineNode): boolean {\n if (definiteHeight(node) || !NO_HEIGHT.has(ownLayout(node, 'height') as string)) return false;\n return sizedByFlex(node) && holdsShares(node);\n }\n\n /** The boxes with a declaration that is a percentage and a length: see `settleMixed`. */\n private readonly mixeds = new Set<EngineNode>();\n\n /**\n * Finish each `calc()` of a percentage and a length from the commit just made: read the box\n * the percentage is of, and commit the box at what the sum comes to. A box in the flow is\n * committed first with those declarations set aside, since the box it is in may be as wide as\n * its content, and in a browser the percentage is of that width without them. It is worked out\n * again when the box or anything in it changes, and when the box it is of changes size.\n * Whether any was worked out.\n */\n private settleMixed(): boolean {\n if (!this.mixeds.size || !this.fabric.getBoundingClientRect) return false;\n this.settling = true;\n try {\n let waiting = [...this.mixeds].filter((node) => this.mixedIsStale(node));\n const settled = waiting.length > 0;\n // From the outermost: a share of a box is of the size that box is finished at.\n while (waiting.length) {\n const inside = waiting.filter((node) =>\n waiting.some((other) => other !== node && isWithin(node, other)),\n );\n this.settleMixedTogether(waiting.filter((node) => !inside.includes(node)));\n waiting = inside.filter((node) => this.mixedIsStale(node, true));\n }\n return settled;\n } finally {\n this.settling = false;\n }\n }\n\n /** Whether a box is to be worked out: it changed, or the box it is a share of did. */\n private mixedIsStale(node: EngineNode, waited = false): boolean {\n const mixed = node.mixed;\n if (!mixed || this.topOf(node) !== this.root) {\n this.mixeds.delete(node);\n return false;\n }\n const base = this.mixedBase(node);\n return base !== undefined && (waited || mixed.dirty || !sameBase(base, mixed.base));\n }\n\n /**\n * Work out boxes that are not in one another with two commits between them: one with each\n * set aside, to read what it is a share of, and one with each at what it comes to. A grid and\n * a fitted box are sized from their content in commits of their own.\n */\n private settleMixedTogether(nodes: readonly EngineNode[]): void {\n const alone = (node: EngineNode) => node.grid !== undefined || node.fit !== undefined;\n for (const node of nodes) node.mixed!.dirty = false;\n const measured = nodes.filter((node) => !this.mixedOnlyMoves(node) && this.mixedInFlow(node));\n const plain = measured.filter((node) => !alone(node));\n for (const node of plain) node.mixedOff = true;\n this.commitTouched(plain);\n for (const node of plain) node.mixedOff = undefined;\n const bases = new Map(plain.map((node) => [node, this.mixedBase(node)]));\n for (const node of measured.filter(alone)) bases.set(node, this.measuredBase(node));\n for (const node of nodes) this.workOutMixed(node, bases.get(node));\n this.commitTouched(nodes.filter((node) => !alone(node)));\n for (const node of nodes.filter(alone)) this.commitMixed(node);\n // A grid laid out again may have been merged with no sum left: a size of its tracks'.\n for (const node of nodes) if (node.mixed) node.mixed.base = this.mixedBase(node);\n }\n\n /** What a node's sums come to against the box they are of, read now where none was given. */\n private workOutMixed(node: EngineNode, base: readonly [number, number | undefined] | undefined) {\n const against = base ?? this.mixedBase(node);\n if (!against || !node.mixed) return;\n const inColumn = node.parent !== null && !isRow(node.parent);\n node.mixed.values = mixedValues(node.mixed.parts, against, this.boxOf(node), inColumn);\n }\n\n private commitTouched(nodes: readonly EngineNode[]): void {\n if (!nodes.length) return;\n this.touch(nodes);\n this.commitTree();\n }\n\n /** A translate moves nothing but the box itself: nothing is measured again for one. */\n private mixedOnlyMoves(node: EngineNode): boolean {\n return Object.keys(node.mixed!.parts).every((key) => key.startsWith('translate'));\n }\n\n private mixedInFlow(node: EngineNode): boolean {\n const position = readStyle(node, 'position');\n return position !== 'absolute' && position !== 'fixed';\n }\n\n /**\n * Commit a node whose mixed declarations were set aside or worked out. A grid, and a box in\n * a line, is sized from its content and keeps the width that came to, so it is sized again\n * from the start: left as it was, it would be measured at the width its last limit gave it.\n */\n private commitMixed(node: EngineNode): void {\n if (node.grid) return this.settleGrid(node);\n this.touch([node]);\n this.commitTree();\n if (!node.fit) return;\n node.fit.dirty = true;\n if (this.toFit(node)) this.fitTogether([node]);\n }\n\n /**\n * The box a node's percentages are of, with its mixed declarations set aside: a box in the\n * flow can be what makes its container as wide as it is. One out of the flow makes nothing\n * wider, so the box it is placed in is read as it stands.\n */\n private measuredBase(node: EngineNode): readonly [number, number | undefined] | undefined {\n node.mixedOff = true;\n this.commitMixed(node);\n node.mixedOff = undefined;\n return this.mixedBase(node);\n }\n\n /**\n * The width and height a node's percentages are of: the padding box of what an out-of-flow\n * box is placed in, and the content box of its parent for any other. The height is nothing\n * where the parent was given none, as a percentage of an `auto` height is in a browser.\n */\n private mixedBase(node: EngineNode): readonly [number, number | undefined] | undefined {\n const position = readStyle(node, 'position');\n if (position === 'absolute' || position === 'fixed') {\n const box = this.paddingBox(node.fixedTo ?? this.containingBlock(node));\n return box && [box[2], box[3]];\n }\n const parent = node.parent;\n if (!parent || parent === this.root)\n return this.paddingBox(this.root)?.slice(2) as [number, number];\n const box = this.boxOf(parent);\n if (!box) return undefined;\n this.flowStyles.clear();\n const style = this.flowStyle(parent);\n const edge = insets(style);\n this.flowStyles.clear();\n // Written, or given by the layout around it, or held at its content's: see `settleHeld`.\n const given = (style['height'] != null && style['height'] !== 'auto') || definiteHeight(parent);\n return [box[2] - edge.Left - edge.Right, given ? box[3] - edge.Top - edge.Bottom : undefined];\n }\n\n /** The out-of-flow boxes Yoga does not place as CSS does: see `settleAbsolute`. */\n private readonly unplaced = new Set<EngineNode>();\n\n /**\n * Note a fixed box, an out-of-flow one with an `auto` margin or no inset in a block, and one\n * in a grid.\n */\n private reabsolute(node: EngineNode, position: unknown): void {\n if (this.settling) return;\n // Styled again itself: its own insets, margins or lines may be others. See `concernedBy`.\n if (node.propsDirty) this.restyledPlaced.add(node);\n // A fixed box is placed against its page, wherever in the page it is written.\n const auto = () => MARGIN_KEYS.some((key) => readStyle(node, key) === 'auto');\n // In a grid: placed against the lines it names, or aligned in the grid's padding box.\n const inGrid = () => node.parent?.grid !== undefined;\n // Under a box that is not positioned, it is placed against one further up, and a share of\n // a size is a share of that one's.\n const through = () => node.parent != null && readStyle(node.parent, 'position') === 'static';\n // In a block, or in a line of one: a container the engine lays out as a browser's flow.\n const block = node.parent?.flow !== undefined;\n if (position === 'fixed' || block || auto() || inGrid() || through()) this.unplaced.add(node);\n }\n\n /**\n * Resolve from the commit just made what Yoga leaves undone for an out-of-flow box, and commit\n * again where anything changed: `auto` margins between two insets, which centre it, and the\n * place in a block's flow it has with no inset. Both need its size and its container's.\n */\n private settleAbsolute(): void {\n // Emptied whatever comes of it: a screen that has gone is not kept by what was styled in it.\n const restyled = new Set(this.restyledPlaced);\n this.restyledPlaced.clear();\n if (!this.unplaced.size || !this.fabric.getBoundingClientRect) return;\n const concerns = this.concernedBy(restyled);\n const moved: EngineNode[] = [];\n for (const node of this.unplaced) {\n const placed = node.resolved !== undefined || this.placedAsWritten.has(node);\n if (placed && !concerns(node)) continue;\n const resolved = this.resolveAbsolute(node);\n if (resolved === undefined && !node.resolved) {\n this.unplaced.delete(node);\n this.placedAsWritten.add(node);\n }\n if (sameResolved(resolved, node.resolved)) continue;\n node.resolved = resolved;\n moved.push(node);\n }\n if (!moved.length) return;\n this.settling = true;\n try {\n this.touch(moved);\n this.commitTree();\n } finally {\n this.settling = false;\n }\n }\n\n /**\n * Whether the commit being settled can have changed where an out-of-flow box is placed: it\n * resized or moved something in the box it is placed against, or that box or one above it.\n * A box is placed from its own size, its container's and what comes before it there, each\n * read back from native, and a screen of buttons has one in each: read on every commit, a\n * few hundred reads for a colour that changed somewhere else.\n *\n * A fixed box is asked every time: it is placed against its page, wherever it is written.\n * So is one styled again itself, whose insets, margins or lines may be others while what it\n * is committed with is the same.\n */\n /**\n * The out-of-flow boxes found to need nothing resolved, placed as written: noted again each\n * time one is reconciled, and placed again only for what concerns it, as one resolved is.\n */\n private readonly placedAsWritten = new WeakSet<EngineNode>();\n\n /** The out-of-flow boxes whose own styles changed since they were last placed. */\n private readonly restyledPlaced = new Set<EngineNode>();\n\n private concernedBy(restyled: ReadonlySet<EngineNode>): (node: EngineNode) => boolean {\n const boxes = new Set([...this.movedBoxes, ...this.grownBoxes]);\n // Every box with one of them in it, itself among them.\n const around = new Set<EngineNode>();\n for (const box of boxes) {\n for (let up: EngineNode | null = box; up && !around.has(up); up = up.parent) around.add(up);\n }\n // Each change held in a box of a size of its own, which moves nothing outside it, the box\n // itself included: see `heldIn`.\n const holders = this.heldIn();\n return (node) => {\n // Not in one of those boxes: a holder restyled was so in how it is painted alone, or held\n // nothing, since a change that moves it is not held.\n if (holders?.length && !holders.some((holder) => holder !== node && isWithin(node, holder))) {\n return false;\n }\n if (restyled.has(node)) return true;\n if (node.fixedTo || readStyle(node, 'position') === 'fixed') return true;\n const block = this.containingBlock(node);\n if (around.has(block)) return true;\n for (let up: EngineNode | null = block; up; up = up.parent) if (boxes.has(up)) return true;\n return false;\n };\n }\n\n private resolveAbsolute(node: EngineNode): Record<string, number | null> | undefined {\n if (this.topOf(node) !== this.root) return undefined;\n this.flowStyles.clear();\n const style = this.flowStyle(node);\n const boxes = this.boxesFor(node, style['position']);\n this.flowStyles.clear();\n if (!boxes) return undefined;\n const { box, by, against } = boxes;\n const resolved: Record<string, number | null> = {};\n if (by !== against) Object.assign(resolved, againstPage(style, by, against));\n if (boxes.inArea) {\n const grid = this.flowStyle(node.parent!);\n Object.assign(resolved, startOfArea(style, grid, { by, area: against, box }));\n }\n // Its sizes always; its insets where it is placed by the box it is placed against, which a\n // fixed box is not: those are worked out against its page above.\n const sized = withOwnSizes(node, style);\n Object.assign(resolved, shareOfBlock(sized, against, by === against));\n for (const axis of ABSOLUTE_AXES) {\n const [room, size, width] = [against[axis.size]!, box[axis.size]!, against[2]!];\n Object.assign(resolved, autoMargins(sized, axis, room, size, width));\n }\n const top = this.flowPlace(node, style, by[1]);\n if (top !== undefined) resolved['top'] = top;\n return Object.keys(resolved).length ? resolved : undefined;\n }\n\n /**\n * An out-of-flow box, the box Yoga positions it by and the box CSS positions it against, each\n * of the last two inside its border. They are one box unless it is fixed in place, where CSS\n * means its page.\n */\n /** The area of a grid an out-of-flow item is placed in: none for a fixed one, on its page. */\n private areaFor(node: EngineNode, block: EngineNode, page: EngineNode, by: readonly number[]) {\n return block === node.parent && page === block ? this.gridArea(node, by) : undefined;\n }\n\n private boxesFor(node: EngineNode, position: unknown) {\n if (position !== 'absolute' && position !== 'fixed') return null;\n const block = node.fixedTo ?? this.containingBlock(node);\n const page = position === 'fixed' ? (this.pageOf(node) ?? block) : block;\n const [box, by] = [this.boxOf(node), this.paddingBox(block)];\n if (!box || !by) return null;\n const area = this.areaFor(node, block, page, by);\n const against = area ?? (page === block ? by : this.paddingBox(page));\n return against ? { box, by, against, inArea: area !== undefined } : null;\n }\n\n /**\n * What an out-of-flow child of a grid is placed against: the area between the lines its\n * placement names, in the window. A side it names no line for, or one the grid has not got,\n * is the grid's padding edge. `by` is the grid's box inside its border.\n */\n private gridArea(node: EngineNode, by: readonly number[]): number[] | undefined {\n const grid = node.parent!;\n const style = this.flowStyle(node);\n if (!grid.grid?.area) return undefined;\n // Placed against no lines, its area is the grid's padding box.\n if (!namesLines((key) => style[key])) return [...by];\n const at = grid.grid.area(gridItemStyle(style));\n const box = this.boxOf(grid)!;\n const edge = insets(this.flowStyle(grid));\n const [left, top] = [box[0] + edge.Left, box[1] + edge.Top];\n const x = at.left === undefined ? by[0]! : left + at.left;\n const y = at.top === undefined ? by[1]! : top + at.top;\n const right = at.right === undefined ? by[0]! + by[2]! : left + at.right;\n const bottom = at.bottom === undefined ? by[1]! + by[3]! : top + at.bottom;\n return [x, y, Math.max(right - x, 0), Math.max(bottom - y, 0)];\n }\n\n /** The box Yoga positions an out-of-flow node by: the nearest ancestor that is not static. */\n private containingBlock(node: EngineNode): EngineNode {\n for (let up = node.parent; up; up = up.parent) {\n if (up.nodeKind !== 'element' || readStyle(up, 'position') !== 'static') return up;\n }\n return this.root;\n }\n\n /** A box inside its border, which insets are measured from. The root's is the window. */\n private paddingBox(node: EngineNode): readonly [number, number, number, number] | undefined {\n if (node === this.root) {\n const { width, height } = this.viewportSize;\n return width > 0 && height > 0 ? [0, 0, width, height] : undefined;\n }\n const box = this.boxOf(node);\n if (!box) return undefined;\n const edge = this.borderInsets(node);\n const [width, height] = [box[2] - edge.Left - edge.Right, box[3] - edge.Top - edge.Bottom];\n return [box[0] + edge.Left, box[1] + edge.Top, width, height];\n }\n\n /** A container's borders alone: an inset is measured from inside the border. */\n private borderInsets(container: EngineNode) {\n if (container.nodeKind !== 'element') return NO_INSETS;\n const style = this.flowStyle(container);\n return insets(\n Object.fromEntries(Object.entries(style).filter(([key]) => key.startsWith('border'))),\n );\n }\n\n /**\n * Where a box with no vertical inset would have been in its block's flow: under the in-flow\n * sibling before it and that sibling's bottom margin, which an out-of-flow box does not\n * collapse with: Chrome has it under the margin, and its own margin under that. `origin` is the\n * top of the container's padding box.\n *\n * ponytail: the sibling's own bottom margin, of points and over none. One its last child's\n * margin collapses into, or a negative one, is a few points out; read the plan's margins if a\n * box under a card's last paragraph is ever seen out.\n */\n private flowPlace(\n node: EngineNode,\n style: Record<string, unknown>,\n origin: number,\n ): number | undefined {\n const flow = node.parent?.flow;\n if (flow?.plan.kind !== 'block' || style['top'] != null || style['bottom'] != null) {\n return undefined;\n }\n const siblings = node.parent!.childList;\n for (let i = siblings.indexOf(node) - 1; i >= 0; i--) {\n const sibling = siblings[i]!;\n const first = flow.lined.get(sibling);\n // A box on a line is in its line box, which the box is under.\n if (first) return this.lineBottom(node.parent!, first, origin);\n const box = flow.members.has(sibling) ? this.boxOf(sibling) : undefined;\n if (box) return box[1] + box[3] + this.marginUnder(sibling) - origin;\n }\n return undefined;\n }\n\n /** The bottom of the line box `first` starts in `container`, from `origin`, once it is laid out. */\n private lineBottom(container: EngineNode, first: EngineNode, origin: number): number | undefined {\n const handle = first.line?.in === container ? first.line.handle : null;\n const box = handle ? this.fabric.getBoundingClientRect?.(handle, false) : undefined;\n return box ? box[1] + box[3] - origin : undefined;\n }\n\n /** A box's own bottom margin, where it is points over none. */\n private marginUnder(node: EngineNode): number {\n const margin = this.flowTree.style(node, 'marginBottom');\n return typeof margin === 'number' && margin > 0 ? margin : 0;\n }\n\n /** Every `position: sticky` box in the tree. */\n private readonly stickies = new Set<EngineNode>();\n /** Each scroll view with a sticky box in it: its offset, and what stops listening for it. */\n private readonly stickyScrolls = new Map<\n EngineNode,\n { x: number; y: number; timer?: ReturnType<typeof setTimeout>; stop: () => void }\n >();\n\n /**\n * Work out where each sticky box sticks from the commit just made: its place in its scroll\n * view, and the end of its parent, which it does not leave. Native moves it between the two\n * where it can. A host with no layout to read leaves it where it is written.\n */\n private settleSticky(): void {\n if (!this.stickies.size || !this.fabric.getBoundingClientRect) return;\n for (const node of this.stickies) {\n const scroll = this.stickyScroll(node);\n if (scroll) this.stick(node, scroll);\n else this.unstick(node);\n }\n // A scroll view nothing sticks in any more is no longer listened to, or kept.\n for (const [scroll, offset] of this.stickyScrolls) {\n if ([...this.stickies].some((node) => node.sticky?.scroll === scroll)) continue;\n clearTimeout(offset.timer);\n offset.stop();\n this.stickyScrolls.delete(scroll);\n }\n }\n\n /** The scroll view a box sticks in, or nothing once it is no longer sticky or in the tree. */\n private stickyScroll(node: EngineNode): EngineNode | null {\n if (this.topOf(node) !== this.root || readStyle(node, 'position') !== 'sticky') return null;\n return this.scrollSourceOf(node);\n }\n\n private stick(node: EngineNode, scroll: EngineNode): void {\n const span = this.stickySpan(node, scroll);\n if (!span) {\n // With no inset it sticks nowhere, as a relative box: its move goes, and it is still asked\n // again, for an inset that comes back. A layout not read yet leaves it as it is.\n const inset = ['top', 'left'].some((key) => typeof readStyle(node, key) === 'number');\n if (!inset && node.sticky) this.loosen(node);\n return;\n }\n // No span yet, so the first one read is a change, and starts the drive.\n const state = (node.sticky ??= {\n scroll,\n axis: span.axis,\n start: NaN,\n stop: NaN,\n shift: 0,\n drive: null,\n });\n this.followScroll(scroll);\n const turned = state.axis !== span.axis;\n this.redrive(node, state, span, scroll);\n this.composeSticky(node);\n this.shiftSticky(node);\n // A move along the other axis, though it may be by as much: committed as the other move.\n if (turned) this.markProps(node, false);\n }\n\n /** Have native move a sticky box between these offsets, of this scroll view on this axis. */\n private redrive(\n node: EngineNode,\n state: StickyState,\n span: { axis: ScrollAxis; start: number; stop: number },\n scroll: EngineNode,\n ): void {\n const fed = state.scroll === scroll && state.axis === span.axis;\n if (fed && state.start === span.start && state.stop === span.stop) return;\n // Moved to another scroll view, or to stick along the other axis: the drive is fed by the\n // offset it was made for.\n if (!fed) {\n state.drive?.stop();\n state.drive = null;\n }\n Object.assign(state, span, { scroll });\n const range = pinnedRange(span.start, span.stop);\n if (state.drive) state.drive.update(range);\n else {\n const property = span.axis === 'x' ? 'translateX' : 'translateY';\n state.drive = this.composedDrive(node, scroll, scrollFeed(span.axis), property, range);\n }\n }\n\n /**\n * The scroll offsets a sticky box moves between, read from where the last commit laid it out:\n * from its place in the scroll view less its inset, to the end of its parent.\n */\n private stickySpan(node: EngineNode, scroll: EngineNode) {\n const top = readStyle(node, 'top');\n const axis: ScrollAxis = typeof top === 'number' ? 'y' : 'x';\n const inset = axis === 'y' ? top : readStyle(node, 'left');\n const [box, within, around] = [node, scroll, stickyBlock(node)].map((each) => this.boxOf(each));\n if (typeof inset !== 'number' || !box || !within || !around) return null;\n const [at, size] = axis === 'y' ? [1, 3] : [0, 2];\n const start = box[at]! - within[at]! - inset;\n const end = around[at]! + around[size]! - within[at]! - box[size]! - inset;\n return { axis, start, stop: Math.max(start, end) };\n }\n\n private unstick(node: EngineNode): void {\n this.stickies.delete(node);\n this.loosen(node);\n }\n\n /**\n * Have native apply a sticky box's own transform after the move it drives: as a transition\n * native plays has it while one does, and as it is committed otherwise.\n */\n private composeSticky(node: EngineNode, transform = node.committed?.props['transform']): void {\n const state = node.sticky;\n if (!state?.drive) return;\n const own = ownTransform(transform);\n const held = heldTransform(own, () => this.boxSize(node), platformOS !== 'android');\n state.drive.follow(state.lent ?? held ?? []);\n }\n\n /**\n * Let a sticky box's move go: native stops driving it, and it is committed where it is. A\n * transition of its transform native was easing in the drive is eased on from here.\n */\n private loosen(node: EngineNode): void {\n const state = node.sticky;\n const lent = state?.lent && node.transitions?.get('transform')?.native;\n if (lent) this.backToScriptEased(node, lent, this.now());\n state?.drive?.stop();\n if (state?.shift) this.markProps(node, false);\n node.sticky = undefined;\n if (state?.drive) this.undriven(node, state.shift);\n }\n\n /**\n * Native goes on drawing what a drive set last once it is gone, which no commit changes (see\n * `Touched`): a box's own transform is set there where it has one or the drive had moved it.\n */\n private undriven(node: EngineNode, moved: number): void {\n const own = ownTransform(node.committed?.props['transform']);\n if ((moved || own !== undefined) && node.owned) {\n this.setOwned(node, { transform: own }, { transform: own });\n }\n }\n\n /** Write how far a sticky box is moved at its scroll view's offset, where that has changed. */\n private shiftSticky(node: EngineNode): void {\n const state = node.sticky;\n const offset = state && this.stickyScrolls.get(state.scroll);\n if (!state || !offset) return;\n const past = offset[state.axis] - state.start;\n const shift = Math.min(Math.max(0, past), state.stop - state.start);\n if (shift === state.shift) return;\n state.shift = shift;\n this.markProps(node, false);\n }\n\n /** Keep a scroll view's offset, and move its sticky boxes as it changes. */\n private followScroll(scroll: EngineNode): void {\n if (this.stickyScrolls.has(scroll)) return;\n const offset = { x: 0, y: 0, timer: undefined as ReturnType<typeof setTimeout> | undefined };\n const apply = () => {\n for (const node of this.stickies) if (node.sticky?.scroll === scroll) this.shiftSticky(node);\n };\n const stop = this.setEventListener(scroll, 'topScroll', (event) => {\n const at = (event as { nativeEvent?: { contentOffset?: { x?: number; y?: number } } })\n .nativeEvent?.contentOffset;\n offset.x = at?.x ?? 0;\n offset.y = at?.y ?? 0;\n // Native is moving them already: the transform is written once the scroll pauses.\n if (!this.drivesScroll) return apply();\n clearTimeout(offset.timer);\n offset.timer = setTimeout(apply, STICKY_SETTLE_MS);\n });\n this.stickyScrolls.set(scroll, Object.assign(offset, { stop }));\n }\n\n /** Every grid container in the tree, or once in it. */\n private readonly grids = new Set<EngineNode>();\n /** Set while grids are laid out, when a node is reconciled for a phase and not for a change. */\n private settling = false;\n\n /** The children a grid places: elements in its flow, committed under it. */\n private gridMembers(node: EngineNode): EngineNode[] {\n const members = node.childList.filter((child) => {\n if (child.nodeKind !== 'element' || this.committedElsewhere(child)) return false;\n const style = this.flowStyle(child);\n const position = style['position'];\n return style['display'] !== 'none' && position !== 'absolute' && position !== 'fixed';\n });\n // Placed in the order their `order` gives, as written among equals (CSS Grid 8.5).\n const order = (member: EngineNode) => Number(this.flowStyle(member)['order'] ?? 0) || 0;\n return members.some((member) => order(member) !== 0)\n ? members\n .map((member, i) => ({ member, i }))\n .sort((a, b) => order(a.member) - order(b.member) || a.i - b.i)\n .map(({ member }) => member)\n : members;\n }\n\n /**\n * Note a grid container reconciled for a change, in it or beneath it: its items are committed\n * unsized in this commit, to be read and placed straight after it. Nothing is noted on a host\n * with no layout to read back, where a grid stays the column it would otherwise be.\n */\n private regrid(node: EngineNode, display: unknown): void {\n if (this.settling) return;\n const grid = isGrid(display) && !!this.fabric.getBoundingClientRect;\n if (!grid && !node.grid) return;\n this.flowStyles.clear();\n const members = grid ? this.gridMembers(node) : [];\n const follows = this.follows(node, members);\n this.flowStyles.clear();\n if (follows) return;\n // Every item is merged again, and so is one that has just stopped being an item.\n for (const child of new Set([...(node.grid?.members ?? []), ...members])) {\n child.propsDirty = true;\n }\n for (const child of members) child.gridIn = node;\n node.propsDirty = true;\n if (grid) this.restartGrid(node, members);\n else this.ungrid(node);\n }\n\n /**\n * Whether a grid laid out already stays as it is for this commit: its own style and each\n * item's are what it was laid out from, and its items are the same ones. What changed is then\n * in an item or beneath one, and is committed as any change is; whether the grid has to be\n * laid out again for it is asked once it has been, of what the change did: see `outgrown`.\n *\n * Laying a grid out is three commits, and most of what changes in one changes nothing it is\n * sized from: a colour, a state, a bar a share of its track wide, a number as long as the last.\n *\n * ponytail: content that comes to want another width with no other sign of it (text of the\n * same length in wider letters, a box beneath given a width) keeps the track it had until the\n * grid is next laid out. Read each item's content width where a track is sized by it if a\n * grid is seen a few points out.\n */\n private follows(node: EngineNode, members: readonly EngineNode[]): boolean {\n const state = node.grid;\n if (!state?.settled || state.phase !== 'placed' || !this.asLaidOut(node, state, members)) {\n return false;\n }\n const followed = (state.followed ??= new Map<EngineNode, Reach>());\n // Read now, of the layout before this commit: after it is what it is compared with.\n for (const member of members) {\n if (this.isClean(member) || followed.has(member)) continue;\n // As it was last read, where nothing has been laid out again since: one read a commit.\n followed.set(member, state.reached?.get(member) ?? this.reach(member));\n }\n return true;\n }\n\n /** Whether a grid's style and its items, and each item's style, are what it was laid out from. */\n private asLaidOut(node: EngineNode, state: GridState, members: readonly EngineNode[]): boolean {\n const styles = state.styles;\n if (!styles || members.length !== state.members.length) return false;\n if (state.styled !== gridKey(node, this.flowStyle(node))) return false;\n return members.every(\n (member, at) =>\n member === state.members[at] && styles.get(member) === asAKey(this.flowStyle(member)),\n );\n }\n\n /** How far the content of a grid's item reaches, as it is laid out now. */\n private reach(member: EngineNode): Reach {\n const own = this.boxOf(member);\n let bottom = 0;\n let right = 0;\n const note = (box: EngineNode): void => {\n const [left, top, width, height] = this.boxOf(box) ?? [0, 0, 0, 0];\n bottom = Math.max(bottom, top + height);\n right = Math.max(right, left + width);\n };\n for (const child of member.childList) {\n if (child.nodeKind === 'text') paragraphsOf(child).forEach(note);\n else if (\n child.nodeKind === 'element' &&\n !OUT_OF_FLOW.has(readStyle(child, 'position') as string)\n ) {\n note(child);\n }\n }\n if (!own) return { bottom: 0, over: false };\n return { bottom: Math.round(bottom - own[1]), over: right > own[0] + own[2] + 0.5 };\n }\n\n /**\n * Whether a change a grid was not laid out again for turns out to need it: an item holds\n * more or less than it did, or its content reaches further down, or past its edge.\n */\n private outgrown(state: GridState): boolean {\n const followed = state.followed;\n if (!followed) return false;\n state.followed = undefined;\n for (const [member, before] of followed) {\n if (state.shapes?.get(member) !== shapeOf(member)) return true;\n const now = this.reach(member);\n if (now.bottom !== before.bottom || now.over !== before.over) return true;\n (state.reached ??= new Map()).set(member, now);\n }\n return false;\n }\n\n /** Start a grid over: its items unsized, and nothing known about them. */\n private restartGrid(node: EngineNode, members: readonly EngineNode[]): void {\n const state = (node.grid ??= this.newGrid(node));\n state.followed = undefined;\n state.reached = undefined;\n Object.assign(state, { phase: 'measuring', settled: false, members });\n Object.assign(state, { height: undefined, ownWidth: undefined });\n state.content.clear();\n state.narrow.clear();\n state.heights.clear();\n state.baselines.clear();\n }\n\n private ungrid(node: EngineNode): void {\n node.grid?.stopListening?.();\n node.grid = undefined;\n this.grids.delete(node);\n }\n\n private newGrid(node: EngineNode): GridState {\n this.grids.add(node);\n return {\n phase: 'measuring',\n settled: false,\n members: [],\n content: new Map(),\n narrow: new Map(),\n wantsNarrow: false,\n heights: new Map(),\n baselines: new Map(),\n asked: new Map(),\n widths: new Map(),\n rects: new Map(),\n // A width native gives it later, on a rotation say, lays it out again.\n stopListening: this.setEventListener(node, 'topLayout', () => this.regridIfResized(node)),\n };\n }\n\n private regridIfResized(node: EngineNode): void {\n const state = node.grid;\n if (!state?.settled || !this.gridResized(node, state)) return;\n this.markProps(node, false);\n }\n\n private boxOf(node: EngineNode): readonly [number, number, number, number] | undefined {\n const handle = node.committed?.handle;\n return handle ? this.fabric.getBoundingClientRect?.(handle, false) : undefined;\n }\n\n /** Have these nodes merged again in the next commit, without asking the host for one. */\n private touch(nodes: Iterable<EngineNode>): void {\n for (const node of nodes) {\n node.propsDirty = true;\n for (let up = node.parent; up && !up.subtreeDirty; up = up.parent) up.subtreeDirty = true;\n }\n }\n\n /**\n * Lay out every grid that changed, or whose box did: read sizes from the commit just made,\n * and commit again with each item placed. An inner grid is laid out once the outer one has\n * given it a width, and the outer one again once the inner one has a height, so this repeats\n * until nothing moves. All of it is in one task, so only the last commit is drawn.\n */\n private settleGrids(): void {\n if (!this.grids.size) return;\n this.settling = true;\n try {\n for (let pass = 0; pass < 4; pass++) {\n const stale = [...this.grids].filter((node) => this.gridIsStale(node));\n if (!stale.length) return;\n // One in another is laid out in the box the other gives it, so after a commit of that.\n const nested = this.gridsNested(stale);\n const apart = stale.filter((node) => !nested.has(node));\n this.measureGrids(apart);\n for (const node of apart) this.settleGrid(node, false);\n if (apart.length) this.commitTree();\n for (const node of nested) this.settleGrid(node);\n }\n } finally {\n this.settling = false;\n }\n }\n\n private gridIsStale(node: EngineNode): boolean {\n if (this.topOf(node) !== this.root) {\n // All of it goes: a grid put back is laid out from the start, as a new one is.\n this.ungrid(node);\n return false;\n }\n const state = node.grid!;\n if (node.committed !== null && this.outgrown(state)) state.settled = false;\n if (node.committed === null) return false;\n return !state.settled || (this.mayHaveMoved(node) && this.gridResized(node, state));\n }\n\n /**\n * Whether a grid is another width than it was laid out at. Native answers in floats, and a\n * box at a third of a point across is a hair off the width it was given.\n */\n private gridResized(node: EngineNode, state: GridState): boolean {\n const width = this.boxOf(node)?.[2];\n return width === undefined || state.width === undefined || Math.abs(width - state.width) > 0.5;\n }\n\n /** Those of some grids that are in another of them, or have another of them inside. */\n private gridsNested(grids: readonly EngineNode[]): Set<EngineNode> {\n const all = new Set(grids);\n const nested = new Set<EngineNode>();\n for (const node of grids) {\n for (let up = node.parent; up; up = up.parent) {\n if (all.has(up)) nested.add(up).add(node);\n }\n }\n return nested;\n }\n\n /** Commit grids as stacks of their items, to read what each item holds: one commit for all. */\n private measureGrids(grids: readonly EngineNode[]): void {\n const placed = grids.filter((node) => node.grid!.phase !== 'measuring');\n for (const node of placed) {\n this.restartGrid(node, node.grid!.members);\n this.touch([node, ...node.grid!.members]);\n }\n if (placed.length) this.commitTree();\n }\n\n private settleGrid(node: EngineNode, commit = true): void {\n const state = node.grid!;\n const before = { width: state.ownWidth, height: state.height };\n this.measureGrids([node]);\n const box = this.boxOf(node);\n if (!box) return;\n for (const member of state.members) {\n const [, , width, height] = this.boxOf(member) ?? [0, 0, 0, 0];\n state.content.set(member, { width, height });\n }\n const run = this.gridRun(node, state, box);\n const layout = this.gridRows(node, state, run);\n const height = this.placeGrid(state, run, layout);\n this.touch([node, ...state.members]);\n if (commit) this.commitTree();\n // A grid this one is in sized a row by the height it had, and a column by its width. One\n // it is an item of placed it, at a height that is not its rows' where it stretched it.\n const resized = run.item ? state.height !== before.height : height !== box[3];\n if (resized || state.ownWidth !== before.width) this.unsettleAbove(node);\n }\n\n /** Note where a grid's layout puts it and its items, and answer how tall it came to. */\n private placeGrid(\n state: GridState,\n run: ReturnType<Engine['gridRun']>,\n layout: GridLayout,\n ): number {\n const height = run.ownHeight ? run.box[3]! : run.rows + run.down;\n // Committed as its style writes a size: of its content box, where that is what it sizes.\n const content = run.style['boxSizing'] === 'content-box';\n state.phase = 'placed';\n state.settled = true;\n state.ownWidth = run.inner === undefined ? undefined : run.inner + (content ? 0 : run.across);\n state.width = run.available.width + run.across;\n state.height = run.ownHeight ? undefined : height - (content ? run.down : 0);\n state.area = layout.area;\n // Yoga places an item out of the flow inside the grid's border: its padding is added here.\n const { Left, Top } = run.padding;\n state.rects = new Map(\n state.members.map((member, i) => {\n const rect = layout.items[i]!;\n return [member, { ...rect, left: rect.left + Left, top: rect.top + Top }];\n }),\n );\n return height;\n }\n\n /** What a grid is laid out from, read from its style and from the commit that measured it. */\n private gridRun(node: EngineNode, state: GridState, box: readonly number[]) {\n this.flowStyles.clear();\n const style = this.flowStyle(node);\n // The width of the box the grid is in, which a padding written as a share is of: the\n // window's, at the top.\n const within = this.roomIn(node.parent);\n const room = Number.isFinite(within) ? within : this.viewportSize.width || Infinity;\n const whole = Number.isFinite(room) ? room : 0;\n const edge = insets(style, whole);\n const container = gridContainerStyle(style);\n const items = state.members.map((member) => gridItemOf(this.flowStyle(member)));\n state.styled = gridKey(node, style);\n state.styles = new Map(state.members.map((each) => [each, asAKey(this.flowStyle(each))]));\n state.shapes = new Map(state.members.map((each) => [each, shapeOf(each)]));\n this.flowStyles.clear();\n\n const across = edge.Left + edge.Right;\n const down = edge.Top + edge.Bottom;\n const given = box[2]! - across;\n const limits = sizeLimits(style, across, down);\n // An item of another grid is placed at the width that one gives it, which it measured from\n // the width its tracks come to: worked out whatever width it was given last.\n const item = gridOver(node) !== undefined;\n const stretched = !item && stretchedAcross(node, style);\n const inner =\n !item && ownsWidth(style['width'])\n ? undefined\n : this.gridWidth(\n state,\n {\n measured: item ? 0 : given,\n room: room - across,\n stretched,\n shared: isShare(style['width']),\n },\n {\n container,\n items,\n limits,\n },\n );\n // `fit-content` is its rows' height too: no height of its own. Nor is a share of a box\n // with no height to take it of, which is `auto`: see `percentHeight`.\n const ownHeight = ownsHeight(node, style);\n const available = {\n width: item ? given : (inner ?? given),\n height: ownHeight ? box[3]! - down : undefined,\n };\n const padding = insets(style, whole, false);\n return {\n style,\n container,\n items,\n item,\n inner,\n ownHeight,\n available,\n limits,\n padding,\n across,\n down,\n box,\n rows: 0,\n };\n }\n\n /**\n * A grid laid out in the width it has: its rows as tall as they come to, or held to its own\n * least and most, or laid out in the row of the grid it is in where that stretches it. `rows`\n * is set to what they came to, before any stretch.\n */\n private gridRows(node: EngineNode, state: GridState, run: ReturnType<Engine['gridRun']>) {\n const { container, items, available, limits, down } = run;\n let layout = this.gridWithHeights(node, state, container, items, available);\n run.rows = Math.max(Math.min(layout.height, limits.maxHeight), limits.minHeight);\n if (run.ownHeight) return layout;\n if (run.rows !== layout.height) {\n // Held to a minimum or a maximum, its rows are laid out in that height, as one it has.\n available.height = run.rows;\n layout = this.gridWithHeights(node, state, container, items, available);\n }\n const stretch = run.box[3]! - down;\n if (run.item && stretchedDown(node, run.style) && stretch !== run.rows) {\n // Stretched down the row of the grid it is in, it is as tall as that row: its own rows\n // are laid out in that, and what it measures at is still what they come to.\n available.height = stretch;\n layout = this.gridWithHeights(node, state, container, items, available);\n }\n return layout;\n }\n\n /**\n * The width a grid gives itself, or nothing where something else gives it one. It was\n * measured as a stack of its items at their content's width: wider than the widest of them,\n * something gave it that width, and it is kept. As wide as the widest and no wider, nothing\n * did, and it is as wide as its tracks come to, up to the width of what holds it, and within\n * its own least and most.\n */\n private gridWidth(\n state: GridState,\n given: { measured: number; room: number; stretched: boolean; shared: boolean },\n from: { container: Record<string, string>; items: readonly GridItemOf[]; limits: SizeLimits },\n ): number | undefined {\n const { measured, room, stretched } = given;\n const { container, items, limits } = from;\n const widest = Math.max(0, ...state.members.map((member) => state.content.get(member)!.width));\n if (measured > widest + 0.5) return undefined;\n // Narrower than the box it is stretched across, or a share narrower than its items: its\n // own limit or its own width made it so.\n if (stretched && measured < room - 0.5) return undefined;\n if (given.shared && measured < widest - 0.5) return undefined;\n const wanted = this.layOutGrid(state, container, items, {\n width: undefined,\n height: undefined,\n });\n // Stretched, it is no wider than the box it is in: what is in that box may be as wide as\n // the grid is. Otherwise it goes no narrower than its tracks do, with no room to grow.\n const least = stretched\n ? measured\n : this.layOutGrid(state, container, items, { width: 0, height: undefined }).usedWidth;\n state.widths = new Map();\n const width = Math.min(wanted.width, Math.max(least, room));\n return Math.max(Math.min(width, limits.maxWidth), limits.minWidth);\n }\n\n /** The width inside a box's padding and border, which is the most a child of it is given. */\n private roomIn(node: EngineNode | null): number {\n const box = node && this.boxOf(node);\n if (!node || !box) return Infinity;\n const edge = node.nodeKind === 'element' ? insets(this.flowStyle(node)) : NO_INSETS;\n return box[2] - edge.Left - edge.Right;\n }\n\n private unsettleAbove(node: EngineNode): void {\n for (let up = node.parent; up; up = up.parent) if (up.grid) up.grid.settled = false;\n }\n\n /**\n * The grid laid out, with each height it asks for read from a commit of those items at that\n * width: a row is as tall as its items are at their columns' widths, which only laying them\n * out there says.\n */\n private gridWithHeights(\n node: EngineNode,\n state: GridState,\n container: Record<string, string>,\n items: readonly GridItemOf[],\n available: { width: number; height: number | undefined },\n ) {\n let layout = this.layOutGrid(state, container, items, available);\n if (state.wantsNarrow) {\n this.readNarrow(node, state);\n layout = this.layOutGrid(state, container, items, available);\n }\n for (let round = 0; state.widths.size && round < 3; round++) {\n state.phase = 'sizing';\n this.readSizes(node, state);\n layout = this.layOutGrid(state, container, items, available);\n }\n state.inRow = false;\n return layout;\n }\n\n /**\n * Commit the items a layout asked the height of, each at the width it asked at, and read them.\n * Baselines are read from a row of every item, lined up by them: see `gridContainer`. Each is\n * counted from that row's baseline, so all that were asked for are read from the one row, and\n * none is kept from a row before it.\n */\n private readSizes(node: EngineNode, state: GridState): void {\n state.inRow = state.wantsBaseline;\n if (state.inRow) {\n for (const [member, width] of state.asked) state.widths.set(member, width);\n state.baselines.clear();\n }\n this.touch(state.inRow ? [node, ...state.members] : state.widths.keys());\n this.commitTree();\n for (const [member, width] of state.widths) {\n const box = this.boxOf(member);\n noteAt(state.heights, member, width, box?.[3] ?? 0);\n if (state.inRow && state.asked.has(member)) {\n noteAt(state.baselines, member, width, -(box?.[1] ?? 0));\n }\n }\n }\n\n /** The grid whose items' text is committed one word to a line, while their words are read. */\n private wordsOf: EngineNode | null = null;\n\n /**\n * Read how narrow each item's content goes, which Yoga has no way to say: commit the grid's\n * text one word to a line, with each item at its content's width, and the widest line is the\n * longest word. A box inside that has a width of its own keeps it, as it would in a browser.\n */\n private readNarrow(node: EngineNode, state: GridState): void {\n const texts = state.members.flatMap(textsUnder);\n state.phase = 'words';\n this.wordsOf = node;\n this.touch([node, ...state.members, ...texts]);\n this.commitTree();\n for (const member of state.members) state.narrow.set(member, this.boxOf(member)?.[2] ?? 0);\n // Written back as they were by the next commit, which is the one that sizes or places them.\n this.wordsOf = null;\n this.touch(texts);\n }\n\n /** One run of the grid layout, noting in `widths` each height it wanted and nothing has read. */\n private layOutGrid(\n state: GridState,\n container: Record<string, string>,\n styles: readonly GridItemOf[],\n available: { width: number | undefined; height: number | undefined },\n ) {\n state.widths = new Map();\n state.wantsNarrow = false;\n state.wantsBaseline = false;\n state.asked = new Map();\n const items: GridItem[] = state.members.map((member, i) => ({\n ...styles[i]!,\n measure: (width) => {\n // Not something Yoga answers: asked for, and read from a commit of its words. See\n // `readNarrow`.\n if (width === 'min') {\n const narrow = state.narrow.get(member);\n if (narrow === undefined) state.wantsNarrow = true;\n return { width: narrow ?? 0, height: 0 };\n }\n if (width === 'max') return state.content.get(member)!;\n const height = state.heights.get(member)?.get(width);\n if (height === undefined) state.widths.set(member, width);\n return { width, height: height ?? 0 };\n },\n baseline: (width) => {\n state.asked.set(member, width);\n const baseline = state.baselines.get(member)?.get(width);\n if (baseline === undefined) {\n state.widths.set(member, width);\n state.wantsBaseline = true;\n }\n return baseline ?? 0;\n },\n }));\n return layOutGrid(container, items, available);\n }\n\n /** What the root is committed with: the app's top views, or the strict view around them. */\n private rootHandles(): FabricNode[] {\n const handles: FabricNode[] = [];\n for (const child of this.visibleChildren(this.root)) {\n if (this.onPage(child, undefined)) continue;\n if (!this.withheld(child)) handles.push(this.reconcileUnder(this.root, child));\n }\n this.fixedHandles(this.root, handles);\n return this.strict ? [this.inStrictView(handles)] : handles;\n }\n\n /** The `LayoutConformance` view the app is committed in. See `EngineOptions`. */\n private strictView: FabricNode | null = null;\n private strictChildren: FabricNode[] | null = null;\n\n /** The app's top views inside the strict view: the same view each commit, with these in it. */\n private inStrictView(children: FabricNode[]): FabricNode {\n if (this.strictView && this.strictChildren && sameHandles(children, this.strictChildren)) {\n return this.strictView;\n }\n this.strictChildren = children;\n this.strictView = this.strictView\n ? this.fabric.cloneNodeWithNewChildren(this.strictView)\n : this.fabric.createNode(\n nextTag(),\n 'LayoutConformance',\n this.rootTag,\n { mode: 'strict', display: 'contents' },\n this.root,\n );\n for (const child of children) this.fabric.appendChild(this.strictView, child);\n return this.strictView;\n }\n\n /** Anchors take part in sibling ordering but never reach Fabric. */\n private visibleChildren(node: EngineNode): EngineNode[] {\n // A view that takes its text as a prop has no text children to commit. See `ViewNameOptions`.\n const textAsProp = takesTextAsProp(node);\n return node.childList.filter(\n (child) => child.nodeKind !== 'anchor' && !(textAsProp && child.nodeKind === 'text'),\n );\n }\n\n /**\n * Everything a node renders with, unprocessed. Precedence, weakest first: native defaults, the\n * node's `defaultStyle`, matched CSS, explicit props, inline style, a component's\n * `styleOverride`. Inline wins over CSS as it does on the web, but for a declaration marked\n * `!important`, which stands over it: see `inlineOf`.\n *\n * Raw, because this is what the next commit diffs against. Colours and asset ids are converted\n * on the way out instead (`processed`), and only for the keys that changed: the converters\n * return fresh objects, so diffing their output would re-send every image and shadow on every\n * unrelated change.\n */\n /** What a touch on an element that keeps a drag holds off, while it lasts: see `holdSwipe`. */\n private heldFor(node: EngineNode, merged: Record<string, unknown>): void {\n if (node === this.swipeHeld) merged['gestureResponseDistance'] = NO_SWIPE;\n if (this.scrollHeld.size && this.scrollHeld.has(node)) merged['scrollEnabled'] = false;\n }\n\n /**\n * Exempt from the complexity limit deliberately, as `matchesCompound` is: a flat sequence of\n * steps, each guarded by what it reads, run for every node merged. Moving the guards into calls\n * of their own measured slower in `pnpm bench` and `pnpm bench:tailwind`.\n */\n // eslint-disable-next-line complexity\n private mergeProps(node: EngineNode, viewName: string): Record<string, unknown> {\n if (node.nodeKind === 'text') {\n // Asked first, without a call: no grid's words are being read in nearly every commit.\n if (this.wordsOf === null && this.narrowed === null) return { text: paragraphText(node) };\n return this.textProps(node);\n }\n if (this.dev) this.checkProps(node);\n this.registerSheet(node.templateSheet);\n this.registerSheet(node.hostSheet);\n const defaults = node.scrollView ? OVERFLOW_SCROLLER : DEFAULT_PROPS[viewName];\n const props: Record<string, unknown> = { ...defaults, ...node.defaultStyle };\n // A generated box's style is told from the rest only once a sheet gives one: see `ruleStyle`.\n Object.assign(\n props,\n this.generated === null\n ? this.styles.resolve(node, this.styleEpoch).style\n : this.ruleStyle(node),\n );\n const resolved = props['pointerEvents'];\n writeOwnProps(node.props, props, node.attributeOnly);\n withTextContent(node, viewName, props);\n truncatedAs(node, props);\n const cascaded = props['transform'];\n const inline = inlineOf(node);\n const style = boundTransform(node, Object.assign(props, inline), cascaded);\n // What an element sets itself, inline or bound from a token, over the cascade's other forms of\n // it: the logical or physical side (`overOtherForms`) and the sides a shorthand covers\n // (`underOwnShorthands`). Asked here, not in a method of its own: it is asked of every node.\n if (inline !== NO_STYLE) this.styles.overOtherForms(inline, style);\n if (inline !== NO_STYLE || node.boundByProp?.size) {\n underOwnShorthands(style, inline, node.boundByProp, node.styleCache?.important);\n }\n nativePointerEvents(node, style, resolved);\n // Before an image's own size: `fit-content` is no size, so the image's is what it gets.\n fitContent(node, style);\n if (this.asked & SHARED_HEIGHTS) this.noteShare(node, style);\n // Each asked of the key it reads first: it is asked of every node merged.\n if (style['height'] !== undefined || style['minHeight'] !== undefined) {\n percentHeight(node, style);\n }\n if (style['rowGap'] !== undefined) percentGap(node, style);\n if (this.asked & CSS_LAYOUT) this.flowed(node, style);\n placeholderFaded(style);\n const intrinsic = node.props[INTRINSIC_SIZE] as IntrinsicSize | undefined;\n if (intrinsic) applyIntrinsicSize(style, intrinsic);\n flattenStyle(node.props[STYLE_OVERRIDE], style);\n this.fontFaces.apply(style);\n holdLoadingFamily(node, style);\n // Once the face is matched: a family a view's own font names is the face its weight chose.\n renameFonts(viewName, style, this.postScriptName);\n // What a paragraph alone is styled with: how its text is aligned, cut off and held tall.\n if (viewName === PARAGRAPH) {\n alignText(style, this.directionOf(node, style));\n this.wholeWords(node, style);\n lineTall(style, this.tallestRun(node, style, 0), this.fontScale);\n }\n if (this.fontsRefreshed) this.capForFonts(node, style);\n const field = TEXT_INPUTS.has(viewName);\n if (field) fieldStyled(viewName, style, this.fontScale);\n const merged = composeTransform(node, this.eased(node, style));\n // On iOS: Android's field says the baseline of the line it is sized and centred by.\n if (field) centreSingleLine(viewName, merged, this.fontScale, isOnBaseline(node, viewName));\n // After a transition, which eases the basis as the basis it was written as.\n basisAsSize(node, merged);\n // Each asked of the key it reads first, here and in `engineLayout`: it is asked of every node\n // merged. After the basis, which is a size given where it is committed as one.\n if (merged['aspectRatio'] != null) {\n ratioForAutoSize(merged);\n stretchedOverRatio(node, merged);\n }\n if (merged['flexWrap'] !== undefined) wrappedLinesStretch(merged);\n noOutline(merged);\n this.borderInText(node, merged);\n // Last, on what is committed: an override or an animation can hide a box, or place it.\n hiddenOutOfFlow(merged);\n delete merged['touchAction'];\n if (this.responders.has(node)) stillTouched(merged);\n // Each read here, so asked for as a layout of CSS's is: see `LAID_OUT_HERE`.\n if (this.asked & CSS_LAYOUT) seenByCss(merged);\n this.heldFor(node, merged);\n this.movePaint(node, merged);\n // Asked of the namespace first: it is asked of every node merged.\n if (node.namespace !== undefined && viewName.startsWith('RNSVG')) {\n drawnAsShape(node, viewName, merged);\n }\n if (node.raised !== undefined) merged['zIndex'] ??= node.raised;\n keptForNative(node, merged);\n // What `laidOut` does for a box nothing asked a layout of, unplaced, told here without its\n // two calls: this is asked of every node merged, and an app of plain flex asks nothing.\n if (this.asked !== 0 || this.checksAsks || merged['position'] !== undefined) {\n this.laidOut(node, merged);\n } else {\n if (merged['maxHeight'] !== undefined) leastWins(merged, 'Height');\n if (merged['maxWidth'] !== undefined) leastWins(merged, 'Width');\n }\n return merged;\n }\n\n /** A run of text as it is committed: a word to a line while how narrow it goes is read. */\n private textProps(node: EngineNode): Record<string, unknown> {\n const text = paragraphText(node);\n // While a grid's words are read: see `readNarrow`.\n const words = (this.wordsOf !== null || this.narrowed !== null) && this.inWords(node);\n return { text: words ? text.trim().replace(/\\s+/g, '\\n') : text };\n }\n\n /** A node's part in a block's flow, where a layout of CSS's has been asked for. */\n private flowed(node: EngineNode, style: Record<string, unknown>): void {\n percentBasis(node, style);\n flowLayout(node, style, this.fontScale);\n this.alignLine(node, style);\n onBaseline(node, style);\n alignedInLine(node, style);\n }\n\n /** What the engine lays out in Yoga's place, of what has been asked for: see `asked`. */\n private laidOut(node: EngineNode, merged: Record<string, unknown>): void {\n const asked = this.asked;\n if (this.checksAsks) this.checkAsked(node, merged);\n engineLayout(node, merged, asked);\n const placed = merged['position'] === 'absolute';\n if (placed && !(asked & CSS_LAYOUT) && asksOfPlaced(merged)) {\n this.want(CSS_LAYOUT);\n this.askedLate.add(node);\n }\n if (asked & LAYOUTS) this.noteSettled(node, merged);\n }\n\n /** What a node's rules give it: for a generated box with no content, nothing but `display: none`. */\n private ruleStyle(node: EngineNode): Readonly<Record<string, unknown>> {\n const { style } = this.styles.resolve(node, this.styleEpoch);\n // Asked of every node a commit: told from a generated box here, without a call.\n return this.generated !== null && isGenerated(node.tag) ? generatedStyle(style) : style;\n }\n\n /** Each node's layout styles while one container is planned, so each is merged once. */\n private readonly flowStyles = new Map<EngineNode, Record<string, unknown>>();\n\n /** A node's own layout styles, in the order `mergeProps` applies them. */\n private flowStyle(node: EngineNode): Record<string, unknown> {\n let style = this.flowStyles.get(node);\n if (style) return style;\n style = { ...node.defaultStyle, ...this.ruleStyle(node) };\n for (const key of FLOW_PROPS) {\n if (node.props[key] !== undefined) style[key] = node.props[key];\n }\n flattenStyle(node.props['style'], style);\n flattenStyle(node.props[STYLE_OVERRIDE], style);\n this.flowStyles.set(node, style);\n return style;\n }\n\n /** The engine's nodes as `planFlow` reads them. A run of text is a box with no style. */\n private readonly flowTree: FlowTree<EngineNode> = {\n children: (node) => {\n const boxes: EngineNode[] = [];\n for (const child of node.childList) {\n if (child.nodeKind === 'text' && child.nodeText.trim() !== '') boxes.push(child);\n // An element committed somewhere else, an overlay say, is laid out there.\n if (child.nodeKind !== 'element' || this.committedElsewhere(child)) continue;\n const display = this.flowStyle(child)['display'];\n if (display === 'none') continue;\n // No box of its own: its children are laid out here.\n if (display === 'contents') boxes.push(...this.flowTree.children(child));\n else boxes.push(child);\n }\n return boxes;\n },\n style: (node, key) => {\n if (node.nodeKind !== 'element') return undefined;\n const style = this.flowStyle(node);\n // Fixed is out of the flow as absolute is.\n if (key === 'position' && style['position'] === 'fixed') return 'absolute';\n for (const source of FLOW_SOURCES[key]) {\n if (style[source] != null) return style[source];\n }\n // An element said to be always inline, a span, with no display given: a box in a line.\n if (key === 'display' && inlineText(node)) return 'inline-block';\n return undefined;\n },\n hasText: (node) =>\n isTextElement(node) && node.childList.some((child) => child.nodeKind === 'text'),\n isText: (node) => node.nodeKind === 'text',\n };\n\n /**\n * Whether a node is a block container, or was one when it was last planned. A text element\n * lays out text, not boxes: it has no flow to plan, whatever its display.\n */\n private flows(node: EngineNode, display: unknown): boolean {\n if (node.flow !== undefined) return true;\n return isBlockContainer(display) && !isTextElement(node);\n }\n\n /**\n * Plan a block container's flow again, and have merged again each child the plan lays out\n * differently: one whose collapsed margins moved, one that joined the flow or left it. A child\n * is planned from its siblings, so nothing about it need have changed for this to change.\n */\n private reflow(node: EngineNode, display: unknown): void {\n if (!this.flows(node, display)) return;\n this.flowStyles.clear();\n const before = node.flow;\n const after = isTextElement(node) ? undefined : this.planFlow(node);\n this.flowStyles.clear();\n if (!before && !after) return;\n node.flow = after;\n if (before?.plan.kind !== after?.plan.kind) node.propsDirty = true;\n leaveFlow(node, before, after);\n joinFlow(node, before, after);\n this.hang(node, before, after);\n }\n\n /**\n * Work out the room each line needs under its baseline, and how far over the bottom of it\n * each box on it sits, and have merged again the container and each box where that changed:\n * every one of them is placed by it. See `liftLines`.\n */\n private hang(node: EngineNode, before: Flow | undefined, after: Flow | undefined): void {\n if (after) this.liftLines(node, after);\n if (sameHang(before, after)) return;\n node.propsDirty = true;\n for (const child of node.childList) {\n if (child.nodeKind !== 'text') child.propsDirty = true;\n else for (const box of paragraphsOf(child)) box.propsDirty = true;\n }\n }\n\n /**\n * A browser sits each box on a line by its baseline, and the line has its strut's room under\n * the baseline at least. The engine sits the boxes on the bottom of a row instead, so each is\n * given a margin under it: the room under the line's baseline, the most any box or the strut\n * needs, less the room under the box's own. An empty box's baseline is its bottom edge, and a\n * box of text or of lines has its last line's under it, with its padding and border.\n *\n * ponytail: read from the sheets and the props, where a library's struts are. A shift bound on\n * an element is not seen here until the inline form compiles to one.\n */\n private liftLines(node: EngineNode, flow: Flow): void {\n const runs =\n flow.plan.kind === 'lines'\n ? [this.onLines(node)]\n : [...flow.plan.lines.values()].map((line) => line.boxes);\n if (!runs.some((boxes) => boxes.length)) return;\n const below = this.strutBelow(node);\n const lifts = new Map<EngineNode, number>();\n const unders = new Map<EngineNode, number>();\n const rises = this.riseLines(node, runs);\n for (const boxes of runs) {\n // A box a keyword aligns to the top, middle or bottom of its line is not on its baseline.\n const aligned = boxes.map((box) => this.alignedOnLine(box));\n const depths = boxes.map((box, i) => (aligned[i] ? 0 : this.depthOnLine(box, below)));\n const under = Math.max(below, ...depths);\n boxes.forEach((box, i) => {\n const lift = aligned[i] ? 0 : Math.round((under - depths[i]!) * 1000) / 1000;\n // A run of text is placed as its paragraphs.\n for (const placed of box.nodeKind === 'text' ? paragraphsOf(box) : [box])\n lifts.set(placed, lift);\n });\n if (boxes[0]) unders.set(boxes[0], under);\n }\n flow.lifts = lifts;\n flow.unders = unders;\n flow.rises = rises;\n flow.risen = runs.every((boxes) => boxes.some((box) => rises.has(box)));\n if (flow.plan.kind === 'lines') flow.under = Math.max(below, ...unders.values());\n }\n\n /**\n * The room over a line's baseline, as its boxes keep it: a box whose height is known is moved\n * down by a top margin to reach as high as the strut does, so the line is as tall over its\n * baseline as a browser has it without a least height of the row it is in. That holds a line\n * in a box with a height of its own, which the row's least height cannot, and lets a line\n * taller than the box it is in reach down out of it, where the row's lines on its bottom\n * would reach up.\n */\n private riseLines(\n node: EngineNode,\n runs: readonly (readonly EngineNode[])[],\n ): Map<EngineNode, number> {\n const inherited = this.styles.resolve(node, this.styleEpoch).inherited;\n const above = strutOf(inherited).above * textScale(inherited, this.fontScale);\n const rises = new Map<EngineNode, number>();\n for (const box of runs.flat()) {\n const reach = this.knownAbove(box, node);\n if (reach !== undefined) rises.set(box, Math.round(Math.max(above - reach, 0) * 1000) / 1000);\n }\n return rises;\n }\n\n /**\n * How high over the baseline an empty box on a line reaches, with its margins, where that\n * is known before layout: a height in points, or a share of a box of lines held at its\n * content's height, and its padding and border. Nothing for a box aligned another way.\n */\n private knownAbove(box: EngineNode, container: EngineNode): number | undefined {\n if (box.nodeKind !== 'element' || isTextElement(box) || MEASURED_VIEWS.has(viewNameOf(box)))\n return undefined;\n const rule = this.ruleStyle(box);\n if (hungBy(rule) || rule['textAlignVertical'] !== undefined || this.onLines(box).length)\n return undefined;\n const style = this.flowStyle(box);\n // An empty inline-block's baseline is the bottom edge of its margin: both margins are over\n // it. An empty flex or grid box's is the bottom of its border box: see `depthOnLine`.\n const margins = [\n firstOf(style, ['marginTop', 'marginVertical', 'margin']),\n this.emptyFlexOnALine(box, style)\n ? 0\n : firstOf(style, ['marginBottom', 'marginVertical', 'margin']),\n ].map((margin) => (margin == null || margin === 'auto' ? 0 : margin));\n if (margins.some((margin) => typeof margin !== 'number')) return undefined;\n const height = knownHeight(style, blockContentHeight(container));\n return height === undefined\n ? undefined\n : height + (margins[0] as number) + (margins[1] as number);\n }\n\n /** Whether `vertical-align` sets a box to the top, the middle or the bottom of its line. */\n private alignedOnLine(box: EngineNode): boolean {\n return (\n box.nodeKind === 'element' &&\n LINE_ALIGNED[this.ruleStyle(box)['textAlignVertical'] as string] !== undefined\n );\n }\n\n /** The boxes in a block's lines: those in its flow, a run of text among them. */\n private onLines(node: EngineNode): EngineNode[] {\n return this.flowTree\n .children(node)\n .filter(\n (child) =>\n child.nodeKind === 'text' ||\n !OUT_OF_FLOW.has(this.flowStyle(child)['position'] as string),\n );\n }\n\n /**\n * How far under a line's baseline a box on it reaches: a run of text, of the line's font, as\n * far as the strut's room, `below`. See `liftLines`.\n */\n private depthOnLine(box: EngineNode, below: number): number {\n if (box.nodeKind === 'text') return below;\n if (isTextElement(box) || MEASURED_VIEWS.has(viewNameOf(box))) return this.strutBelow(box);\n const style = this.flowStyle(box);\n const own = this.ownUnder(box, style);\n // An empty flex or grid box sits on the baseline by the bottom of its border box, with its\n // bottom margin under it; an empty inline-block, by the bottom of that margin.\n //\n // ponytail: the margin under a box of text or of lines is not counted, which Chrome counts.\n // Count it once a box's lines are told from the blocks in it.\n const margin = this.emptyFlexOnALine(box, style) ? marginUnder(style) : 0;\n return hungBy(this.ruleStyle(box)) + own + margin;\n }\n\n /** An inline-flex or inline-grid box with nothing in it: its baseline is its border box's bottom. */\n private emptyFlexOnALine(box: EngineNode, style: Record<string, unknown>): boolean {\n return FLEX_ON_A_LINE.has(style['display'] as string) && this.onLines(box).length === 0;\n }\n\n /**\n * The room under a box's own baseline, inside its margin: none where it has no line in it,\n * or clips what it holds, and its last line's room and its padding and border where it has.\n *\n * ponytail: a box of blocks with text in them is taken to end on a line of its own font.\n */\n private ownUnder(box: EngineNode, style: Record<string, unknown>): number {\n if (clipsToEdge(box, style, this.ruleStyle(box))) return 0;\n const lines = isBlockContainer(style['display']) && this.holdsLines(box);\n const room = lines ? this.lineUnder(box) : holdsText(box) ? this.strutBelow(box) : 0;\n if (room === 0) return 0;\n // A height of its own: its one line is at the top of it, and so is its baseline.\n const tall = this.belowFirstLine(box, style);\n if (tall !== undefined) return tall;\n const border = firstOf(style, ['borderBottomWidth', 'borderWidth']);\n return room + paddingUnder(style) + (typeof border === 'number' ? border : 0);\n }\n\n /**\n * How far under the baseline of its first line a box with a height in points reaches.\n *\n * ponytail: one line of its own font, as an input or a badge has. A box of a set height with\n * lines of words in it ends lower; count the lines if one is seen.\n */\n private belowFirstLine(box: EngineNode, style: Record<string, unknown>): number | undefined {\n const height = style['height'];\n if (typeof height !== 'number') return undefined;\n const edge = insets(style);\n const border = style['boxSizing'] === 'content-box' ? height + edge.Top + edge.Bottom : height;\n const inherited = this.styles.resolve(box, this.styleEpoch).inherited;\n const above = strutOf(inherited).above * textScale(inherited, this.fontScale);\n return Math.max(border - edge.Top - above, 0);\n }\n\n /** Whether a block container holds lines: something in its flow, and nothing a block. */\n private holdsLines(box: EngineNode): boolean {\n return this.onLines(box).length > 0 && !this.holdsBlock(box);\n }\n\n /** The room under the baseline of a box's lines, as `liftLines` works it out for it. */\n private lineUnder(box: EngineNode): number {\n const below = this.strutBelow(box);\n return Math.max(below, ...this.onLines(box).map((child) => this.depthOnLine(child, below)));\n }\n\n /** The room under the baseline of a node's strut, as native scales its text. */\n private strutBelow(node: EngineNode): number {\n const inherited = this.styles.resolve(node, this.styleEpoch).inherited;\n const below = strutOf(inherited).below * textScale(inherited, this.fontScale);\n return Math.round(below * 1000) / 1000;\n }\n\n private planFlow(node: EngineNode): Flow | undefined {\n const inBlock = flowOver(node)?.plan.kind === 'block';\n const plan = planFlow(this.flowTree, node, inBlock);\n if (!plan) return undefined;\n const members = new Set(\n this.flowTree\n .children(node)\n .filter((child) => this.flowTree.style(child, 'position') !== 'absolute'),\n );\n const lined = new Map<EngineNode, EngineNode>();\n for (const [first, line] of plan.lines) for (const box of line.boxes) lined.set(box, first);\n return { plan, members, lined };\n }\n\n /**\n * The z-index a view is drawn at for the boxes in it: the highest of theirs. A browser draws a\n * box with a z-index over what follows the boxes it is in, and a native view is ordered among\n * the views beside it and no further, so each view the box is in is raised as far. Read from\n * what its children committed, which for a raised child is what raised it. A child with a\n * z-index of its own answers with that and nothing from inside it, as the stacking context it\n * is. Only a plain view is raised: a scroll view clips what is in it, and a screen is ordered\n * by its stack.\n *\n * ponytail: a z-index is the one thing read as making a stacking context. Opacity and a\n * transform make one in a browser too; read them here if a box is ever raised past one.\n */\n private raisedBy(node: EngineNode, viewName: string): number | undefined {\n if (viewName !== DEFAULT_VIEW && viewName !== HORIZONTAL_CONTENT) return undefined;\n let over = 0;\n for (const child of node.childList) {\n const z = child.committed?.props['zIndex'];\n if (typeof z !== 'number' || z <= over) continue;\n if (!this.committedElsewhere(child) && !this.withheld(child)) over = z;\n }\n return over || undefined;\n }\n\n /** Read how far a view is raised, once its children are committed: its props are, if it moved. */\n private raise(node: EngineNode, viewName: string): void {\n const raised = this.raisedBy(node, viewName);\n if (raised === node.raised) return;\n node.raised = raised;\n node.propsDirty = true;\n }\n\n /**\n * Draw a border that has a width and no colour in the colour of the text, as a browser does:\n * `border-color` starts as `currentColor`, and native starts it as black. Each side with a\n * width, where nothing gave that side a colour. Left to native where there is no text colour\n * to take, which is black in a browser too.\n */\n private borderInText(node: EngineNode, props: Record<string, unknown>): void {\n let text: unknown;\n // The side a logical colour is for is the other one where text is read right to left.\n const flipped =\n (props['borderStartColor'] != null || props['borderEndColor'] != null) &&\n this.styles.readsRightToLeft(props);\n for (const side of BORDER_SIDES) {\n if (!colourless(props, side, flipped)) continue;\n text ??= props['color'] ?? this.styles.resolve(node, this.styleEpoch).inherited['color'];\n if (text == null) return;\n props[side.color] = text;\n }\n }\n\n /**\n * The tallest line, as the system text size draws it, of the runs of text in a paragraph:\n * none is 0. A run scales as what it is in does, `within`, but for what it says of that\n * itself: one that does not scale, or stops at a size, beside text that does.\n */\n private tallestRun(node: EngineNode, within: Record<string, unknown>, tallest: number): number {\n for (const child of node.childList) {\n if (!isTextElement(child)) continue;\n const scaling = {\n allowFontScaling: child.props['allowFontScaling'] ?? within['allowFontScaling'],\n maxFontSizeMultiplier:\n child.props['maxFontSizeMultiplier'] ?? within['maxFontSizeMultiplier'],\n };\n const line =\n inlineOf(child)['lineHeight'] ??\n this.styles.resolve(child, this.styleEpoch).style['lineHeight'];\n const drawn = typeof line === 'number' ? line * textScale(scaling, this.fontScale) : 0;\n tallest = this.tallestRun(child, scaling, Math.max(tallest, drawn));\n }\n return tallest;\n }\n\n /**\n * Keep a paragraph whose text has nowhere to wrap on one line, as a browser does: a word is\n * not broken inside, and what does not fit is past the edge. Native breaks a word wider than\n * its line between any two letters. Cut at the edge, where no rule says how it ends.\n */\n private wholeWords(node: EngineNode, props: Record<string, unknown>): void {\n // Remembered, for its text changing to be told from its text changing what this answers.\n node.oneWord = props['numberOfLines'] == null ? unbroken(node) : undefined;\n if (!node.oneWord) return;\n props['numberOfLines'] = 1;\n const ended = [\n this.styles.resolve(node, this.styleEpoch).style,\n node.props,\n inlineOf(node),\n flattenStyle(node.props[STYLE_OVERRIDE], {}),\n ];\n if (ended.every((from) => from['ellipsizeMode'] == null)) props['ellipsizeMode'] = 'clip';\n }\n\n /**\n * Leave a node's background out of what it commits when a child paints it, and give that child\n * its parent's: the cascade's, and over it the parent's inline style.\n */\n private movePaint(node: EngineNode, merged: Record<string, unknown>): void {\n if (node.paintTaker) {\n // Only the colour is handed over: a background image stays painted on the node.\n this.takenPaint(node, merged['backgroundColor']);\n delete merged['backgroundColor'];\n }\n if (node.paintsOn) for (const key of PAINT_KEYS) delete merged[key];\n const from = node.parent?.paintsOn === node ? node.parent : null;\n if (!from) return;\n const paint = { ...this.styles.resolve(from, this.styleEpoch).style, ...inlineOf(from) };\n for (const key of PAINT_KEYS) if (paint[key] !== undefined) merged[key] = paint[key];\n }\n\n /** Note the background colour a node that hands it over resolves to, where it changed. */\n private takenPaint(node: EngineNode, color: unknown): void {\n if (color === node.paintTaken) return;\n node.paintTaken = color;\n this.paintReports.add(node);\n }\n\n /**\n * A container whose direction or alignment changed since a child with a `fit-content` size\n * read it, or whose height stopped or started being one a percentage is taken of since a child\n * with a percentage height asked: those children are merged again. A change to a container\n * marks nothing beneath it, since none of these is inherited.\n */\n private refitChildren(node: EngineNode): void {\n // Both are asked, and both remembered, before either has the children merged again.\n const basis = node.heightBasis;\n const based = basis !== undefined && definiteHeight(node) !== basis;\n const fitted = node.fitContainer !== undefined && containerOf(node) !== node.fitContainer;\n if (fitted) node.fitContainer = containerOf(node);\n if (based || fitted) this.refit(node);\n }\n\n /** Have a container's children merged again, through any `display: contents` among them. */\n private refit(container: EngineNode): void {\n for (const child of container.childList) {\n if (child.nodeKind !== 'element') continue;\n child.propsDirty = true;\n if (containerOf(child) === 'contents') this.refit(child);\n }\n }\n\n /**\n * The text size cap that lays a paragraph or text input out again once a face it names has\n * registered: a step per face above the app's own cap where it set one (below 1 is none, on\n * both platforms), or above any text size there is. Counted per view, so an app's cap moves by\n * a step for each face its text names and no further. See `fontsRegistered`.\n */\n private capForFonts(node: EngineNode, props: Record<string, unknown>): void {\n const refreshes = this.fontRefreshes.get(node);\n if (refreshes === undefined) return;\n const own = props['maxFontSizeMultiplier'];\n props['maxFontSizeMultiplier'] =\n (typeof own === 'number' && own >= 1 ? own : UNCAPPED) + refreshes * FONT_REFRESH_STEP;\n }\n\n /** Set once any node has had a `direction` in its inline style. See `directionOf`. */\n private inlineDirection = false;\n\n /**\n * The direction a paragraph is laid out in, where the app wrote one: its own, or the nearest\n * ancestor's. Undefined when nothing above it says, which leaves the platform's own.\n *\n * A stylesheet's `direction` is inherited through the cascade, so it is already in `props`. An\n * inline one is not, and is found by walking up, which only happens once some node has had one.\n */\n private directionOf(node: EngineNode, props: Record<string, unknown>): TextDirection | undefined {\n const own = textDirection(props['direction']);\n if (!this.inlineDirection) return own;\n for (let at: EngineNode | null = node; at; at = at.parent) {\n const inline = textDirection(inlineOf(at)['direction']);\n if (inline) return inline;\n const cascaded = textDirection(at.styleCache?.style['direction']);\n if (cascaded && cascaded !== textDirection(at.parent?.styleCache?.style['direction'])) {\n return cascaded;\n }\n }\n return own;\n }\n\n /**\n * Hold back what a transition is meant to ease into.\n *\n * Called with everything the node would otherwise commit with, so a property is compared\n * against the last value aimed at rather than the last one painted: a transition redirected\n * halfway carries on from where it had got to instead of snapping.\n *\n * A property seen for the first time is recorded and left alone. That is CSS's own rule, and\n * without it every element would fade in from whatever the previous value happened to be.\n */\n /**\n * Take a sheet's `@keyframes` and `@font-face` rules into the registries. Cheap and idempotent;\n * sheets are few.\n */\n private registerSheet(sheet: StyleSheet | null | undefined): void {\n if (!sheet || this.knownSheets.has(sheet)) return;\n this.knownSheets.add(sheet);\n this.noteSheetEasing(sheet);\n this.styles.noteSheet(sheet);\n this.sheetOrder.push(sheet);\n for (const name of Object.keys(sheet.keyframes ?? {})) {\n this.keyframes.set(name, sheet.keyframes![name]!);\n }\n if (sheet.fonts && this.fontFaces.add(sheet.fonts)) this.facesAdded = true;\n }\n\n /**\n * A hot swap edited a component's sheet into `next`, or took it away with null: `sheet`'s\n * `@keyframes` go, and `next`'s take its place among the others, as an edited stylesheet keeps\n * its place in a document. A name another sheet also defines falls back to that one. Every\n * animation re-resolves the name it plays, so one whose keyframes went stops, as in a browser.\n * A `sheet` already gone, such as a global sheet removed, leaves `next` registered last.\n */\n sheetReplaced(sheet: StyleSheet, next: StyleSheet | null): void {\n if (sheet === next && this.knownSheets.has(sheet)) return;\n this.unwatchHas(sheet);\n this.watchHas(next);\n this.watchLayout(next);\n this.unwatchActive(sheet);\n this.watchActive(next);\n this.swapGenerated(sheet, next);\n const at = this.sheetOrder.indexOf(sheet);\n if (at === -1) {\n this.registerSheet(next);\n return;\n }\n this.knownSheets.delete(sheet);\n if (next && !this.knownSheets.has(next)) {\n this.knownSheets.add(next);\n this.noteSheetEasing(next);\n this.styles.noteSheet(next);\n this.sheetOrder[at] = next;\n } else {\n this.sheetOrder.splice(at, 1);\n }\n if (sheet.keyframes || next?.keyframes) this.reindexKeyframes();\n if (sheet.fonts || next?.fonts) this.reindexFonts();\n }\n\n /**\n * Every sheet's `@font-face` rules again, in order, and every text that names a family matched\n * again: a face whose rule went is no longer matched, though the platform keeps it registered.\n */\n private reindexFonts(): void {\n this.fontFaces.clear();\n for (const sheet of this.sheetOrder) if (sheet.fonts) this.fontFaces.add(sheet.fonts);\n this.markFontText(this.root);\n }\n\n /** Every sheet's `@keyframes` again, in order, and every animation told to look them up. */\n private reindexKeyframes(): void {\n this.keyframes.clear();\n for (const sheet of this.sheetOrder) {\n for (const name of Object.keys(sheet.keyframes ?? {})) {\n this.keyframes.set(name, sheet.keyframes![name]!);\n }\n }\n this.markAnimated(this.root);\n }\n\n /** Mark every node under `node` with an animation, so it looks its keyframes up again. */\n private markAnimated(node: EngineNode): void {\n for (const child of node.childList) {\n if (child.playing || child.scrolled) this.markProps(child, false);\n this.markAnimated(child);\n }\n }\n\n /** Every `@font-face` seen, global as on the web: a face declared in one sheet serves all. */\n private readonly fontFaces = new FontFaces();\n private readonly postScriptName: PostScriptNames = (name) => this.fontFaces.postScriptName(name);\n /** Whether a sheet first used in this commit declared a face. See `rematchFonts`. */\n private facesAdded = false;\n\n /**\n * Faces a sheet declared partway through a commit: text resolved before it, in this commit or\n * an earlier one, matched without them. Resolve every text naming a family again, and commit.\n * Once per sheet that declares faces, so walking the tree costs nothing that matters.\n */\n private rematchFonts(): void {\n this.markFontText(this.root);\n this.commit();\n }\n\n /** Mark every element under `node` committed with a family, so it is matched again. */\n private markFontText(node: EngineNode): void {\n const named = (text: EngineNode | undefined): void => {\n if (typeof text?.committed?.props['fontFamily'] === 'string') this.markProps(text, false);\n };\n for (const child of node.childList) {\n // The paragraph of a run of text written straight into a view is kept on the text.\n if (child.nodeKind === 'text') named(child.box);\n if (child.nodeKind !== 'element') continue;\n if (child.committed && FONT_NAMES[child.committed.viewName]) this.markProps(child, false);\n else named(child);\n this.markFontText(child);\n }\n }\n\n private readonly knownSheets = new WeakSet<StyleSheet>();\n\n /**\n * Start, advance or stop the `@keyframes` animation a node's style asks for.\n *\n * Unlike a transition this does not need anything to have changed: an animation plays from its\n * own frames, which is what lets an element animate in without differing from anything.\n */\n private animated(node: EngineNode, props: Record<string, unknown>): Record<string, unknown> {\n const spec = animationOf(props);\n\n // One played by a scroll that is no longer asked for, whatever is asked for instead.\n if (node.scrolled && !spec?.timeline) this.stopScrolled(node);\n if (!spec) {\n if (node.playing) {\n this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n }\n return props;\n }\n\n const written = this.keyframesOf(node, spec.name);\n const frames = written && this.framesFor(node, written);\n if (!frames) {\n // Keyframes a hot swap deleted, from under an animation that was playing them, or ones a\n // sheet later in this commit has: see `settleKeyframes`.\n this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n this.stopScrolled(node);\n this.awaitingKeyframes.set(node, spec.name);\n return props;\n }\n if (spec.timeline) return this.scrollAnimated(node, spec, frames, props);\n this.startPlaying(node, spec, frames, props);\n return Object.assign(props, playedOver(node));\n }\n\n /**\n * The keyframes a node's animation names: those of its own component's sheet where it has\n * some by that name, as Angular scopes a component's keyframes in a browser, and otherwise\n * whichever sheet has them, since any other is global.\n *\n * ponytail: a host is asked of the sheet it is written in before its own component's, so\n * a `:host` animation is played by its parent's frames where both have the name.\n */\n private keyframesOf(node: EngineNode, name: string): readonly Keyframe[] | undefined {\n const own = node.templateSheet?.keyframes?.[name] ?? node.hostSheet?.keyframes?.[name];\n return own ?? this.keyframes.get(name);\n }\n\n /** Each node's frames as they settle on it, kept for as long as they settle the same. */\n private readonly settledFrames = new WeakMap<\n EngineNode,\n { of: readonly Keyframe[]; styled: unknown; key: string; frames: readonly Keyframe[] }\n >();\n\n /**\n * An animation's frames for the node playing it: those with a value that waits for the node,\n * a `var()` it sets, settled against it. The same frames are answered while they settle the\n * same, and others once a variable changes, which is what an animation under way is played\n * on from: see `reframe`.\n */\n private framesFor(node: EngineNode, frames: readonly Keyframe[]): readonly Keyframe[] {\n if (!frames.some((frame) => frame.deferred)) return frames;\n const kept = this.settledFrames.get(node);\n // Styled as it was, it settles as it did: a commit a frame asks, and most change nothing.\n const styled = node.styleCache;\n if (kept?.of === frames && kept.styled === styled) return kept.frames;\n const settled = frames.map(\n (frame) => frame.deferred && this.styles.settleFor(node, frame.deferred, this.styleEpoch),\n );\n const key = JSON.stringify(settled);\n if (kept?.of === frames && kept.key === key) {\n kept.styled = styled;\n return kept.frames;\n }\n const made = frames.map((frame, at) => {\n const values = Object.entries(settled[at] ?? {}).filter(([, value]) => value !== undefined);\n return values.length\n ? { ...frame, declarations: { ...frame.declarations, ...Object.fromEntries(values) } }\n : frame;\n });\n this.settledFrames.set(node, { of: frames, styled, key, frames: made });\n return made;\n }\n\n /**\n * A clock animation the scroll plays instead: the same animation where only the timeline moved,\n * and one cancelled where the name changed.\n */\n private handOverToScroll(node: EngineNode, spec: AnimationSpec): void {\n if (!node.playing) return;\n this.stopNative(node, node.playing);\n if (node.playing.spec.name !== spec.name) this.cancelPlaying(node);\n node.playing = undefined;\n this.playing.delete(node);\n }\n\n /**\n * `animationcancel` for an animation stopped before it ended: the element no longer asks for it,\n * asks for another by name, or its keyframes went, as a browser fires it.\n */\n private cancelPlaying(node: EngineNode): void {\n const running = node.playing;\n if (running) this.stopNative(node, running);\n if (running && !running.done)\n this.emitTransition(node, 'topAnimationcancel', running.spec.name);\n }\n\n /** Stop on native each animation and transition whose view has left the tree. */\n private releasePlayedNatively(): void {\n for (const node of [...this.playedNatively]) {\n if (this.topOf(node) === this.root) continue;\n this.stopNative(node, node.playing!);\n node.playing = undefined;\n this.markProps(node, false);\n }\n for (const node of [...this.easedNatively]) {\n if (this.topOf(node) !== this.root) this.stopEased(node);\n }\n }\n\n /** Every node whose animation native is playing, with no frame of it in JavaScript. */\n private readonly playedNatively = new Set<EngineNode>();\n\n /**\n * Hand an animation that has just started to native, where native can play it: one that moves\n * only opacity and transforms, starts at once, and repeats a whole number of times. Native then\n * runs it frame by frame, and JavaScript hears of it again when it ends. Anything else is\n * played from here, a commit a frame. See `NativeScrollDriver.play`.\n */\n /**\n * The nodes whose animation moves them by a share of their own size and had no size yet when\n * it started, each with the style it rests at: asked again once the commit has laid them out.\n */\n private readonly unsized = new Map<EngineNode, Record<string, unknown>>();\n\n /**\n * An animation's frames as native can interpolate them: a move by a share of the box,\n * `translateX(200%)`, as the points that is of the size the view is laid out at. Nothing where\n * the view has no size yet, which is every view until its first commit: it is played from\n * JavaScript, and handed over once that commit has laid it out. See `playSized`.\n *\n * ponytail: the size it had when it started. A box that changes size goes on moving by the\n * points of the old one until the animation starts again; restart it from the box's layout\n * event if a bar that resizes mid-animation comes up.\n */\n private sized(\n node: EngineNode,\n running: RunningAnimation,\n props: Record<string, unknown>,\n ): { tracks: RunningAnimation['tracks']; resting: Record<string, unknown> } | null {\n // One that waits, or takes no time, is played from here whatever it moves by.\n if (running.spec.delay !== 0 || running.spec.duration <= 0) return null;\n if (!movesByShare(running.tracks, props)) return { tracks: running.tracks, resting: props };\n let size: { width: number; height: number } | undefined;\n this.measure(node, (frame) => (size = frame));\n if (size) return sharesAsPoints(running.tracks, props, size);\n this.unsized.set(node, props);\n return null;\n }\n\n /**\n * Hand to native each animation that was waiting for its view to have a size. The commit just\n * made painted its first frame, so its clock starts here: no frame of it has been seen move.\n */\n private playSized(): void {\n if (!this.unsized.size) return;\n const waiting = [...this.unsized];\n this.unsized.clear();\n for (const [node, props] of waiting) {\n const running = node.playing;\n if (!running || running.done || running.native || !this.playing.has(node)) continue;\n // Native plays it from its first frame, so its clock starts here: but only where native\n // takes it. Left in JavaScript, it goes on from the clock it started on.\n const started = running.start;\n running.start = this.now();\n if (this.playNatively(node, running, props)) {\n this.playing.delete(node);\n // `collapsable`, which keeps a view for native to move, is in what it holds now.\n this.markProps(node, false);\n } else {\n running.start = started;\n }\n }\n // One with no size after its commit is not laid out at all, and is played from JavaScript.\n this.unsized.clear();\n }\n\n private playNatively(\n node: EngineNode,\n running: RunningAnimation,\n props: Record<string, unknown>,\n ): boolean {\n const { spec } = running;\n const sized = this.scrollDriver ? this.sized(node, running, props) : null;\n if (!this.scrollDriver || !sized) return false;\n const pinned = pinnedIn(node, sized.tracks);\n const tracks = unpinned(sized.tracks, pinned);\n const { channels, held, span } = clockChannels(tracks, spec, sized.resting);\n if (held.length || !(channels.opacity || channels.transform.length)) return false;\n // There and back is one native animation: an odd number of ways has no whole number of them.\n const count = spec.iterations === null ? -1 : spec.iterations / span;\n if (count !== -1 && !(Number.isInteger(count) && count > 0)) return false;\n const length = Math.max(2, Math.round((spec.duration * span) / NATIVE_FRAME) + 1);\n const frames = Array.from({ length }, (_, i) => i / (length - 1));\n const native = this.scrollDriver.play(\n node,\n channels,\n { frames, toValue: span, iterations: count },\n (view) => this.tagOf(view as EngineNode),\n () => this.endedNatively(node, running),\n );\n if (!native) return false;\n running.native = native;\n running.pinned = pinned;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move.\n running.values = { ...running.values, collapsable: false };\n this.playedNatively.add(node);\n return true;\n }\n\n /**\n * Native reached the end of an animation it was playing. The frame it ends at, or the resting\n * style where it does not fill, is committed, and set on native where the animation set the\n * prop (see `setOwned`). The view is let go first, which puts nothing back on Fabric: it is\n * drawn where the animation left it until then.\n */\n private endedNatively(node: EngineNode, running: RunningAnimation): void {\n if (node.playing !== running || !running.native) return;\n const { native, spec } = running;\n running.native = undefined;\n this.playedNatively.delete(node);\n const end = running.start + spec.duration * (spec.iterations ?? 1);\n native.stop();\n this.advancePlayer(node, Math.max(this.now(), end));\n this.commit();\n // The commit sets only what it changed, and the style the view rests at can be the frame it\n // was committed with as it played: native has drawn it elsewhere since.\n const committed = node.committed;\n if (node.owned && committed) this.setOwned(node, RESET_OWNED, committed.props);\n }\n\n /** Take an animation back from native, which stops it there. The caller plays it on, or not. */\n private stopNative(node: EngineNode, running: RunningAnimation): void {\n if (!running.native) return;\n running.native.stop();\n running.native = undefined;\n this.playedNatively.delete(node);\n }\n\n /**\n * Play on from JavaScript an animation native was playing, from where its clock has got to:\n * what a pause, other frames or a view made again need, none of which native can be told of.\n */\n private backToScript(node: EngineNode, running: RunningAnimation): void {\n if (!running.native) return;\n this.stopNative(node, running);\n running.values = sample(running, this.now()).values;\n if (!running.done && running.pausedAt === undefined) this.playing.add(node);\n }\n\n /** Start the clock on an animation, unless the node is already playing this one. */\n private startPlaying(\n node: EngineNode,\n spec: AnimationSpec,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n ): void {\n const current = node.playing;\n const inherited = this.inheritedColour(node, frames);\n if (!current || !sameAnimation(current.spec, spec)) {\n if (current && current.spec.name !== spec.name) this.cancelPlaying(node);\n else if (current) this.stopNative(node, current);\n const started: RunningAnimation = {\n spec,\n tracks: tracksOf(frames, props, inherited),\n inherited,\n start: this.now(),\n values: {},\n done: false,\n };\n // Sampled straight away, so the very commit that starts the animation paints its first\n // frame. Otherwise an element appears in its resting style for one frame and then jumps,\n // which is the flash this whole mechanism exists to avoid.\n //\n // A delayed animation therefore holds its first frame through the delay rather than the\n // resting style: `animation-fill-mode: backwards` behaviour, always. It is what an entrance\n // wants, and the alternative is the flash again.\n started.values = sample(started, this.now()).values;\n this.playedFrames.set(started, frames);\n node.playing = started;\n if (spec.paused) started.pausedAt = this.now();\n else this.playSomewhere(node, started, props);\n this.emitTransition(node, 'topAnimationstart', spec.name);\n return;\n }\n // A view made again is another view: the one native was moving is gone. And one whose\n // important declarations changed is moving what it now must not, or not what it now may.\n if (node.committed === null || pinsChanged(node, current)) this.backToScript(node, current);\n if (this.playedFrames.get(current) !== frames || inherited !== current.inherited) {\n this.backToScript(node, current);\n this.reframe(node, current, frames, props, inherited);\n }\n this.playOrPause(node, node.playing!, spec);\n }\n\n /** Play an animation that has just started: by native's layout, by native's driver, or here. */\n private playSomewhere(\n node: EngineNode,\n started: RunningAnimation,\n props: Record<string, unknown>,\n ): void {\n if (this.layPlayed(node, started)) this.laidPlayed.push({ node, running: started });\n else if (!this.playNatively(node, started, props)) this.playing.add(node);\n }\n\n /**\n * The colour `node` inherits, for frames that set `color: currentColor`, which is that colour\n * wherever the animation has got to, as in CSS. Undefined for frames that do not.\n */\n private inheritedColour(node: EngineNode, frames: readonly Keyframe[]): unknown {\n if (!readsInheritedColour(frames)) return undefined;\n const parent = node.parent && this.styles.resolve(node.parent, this.styleEpoch);\n return parent?.inherited['color'] ?? 'black';\n }\n\n /**\n * The name an animation plays now has other frames: a hot swap edited them, or took away the\n * sheet whose copy won. Or the colour its `color: currentColor` stands for has changed. It\n * carries on along the new tracks, on its own clock, as a browser does, paused or not.\n */\n private reframe(\n node: EngineNode,\n current: RunningAnimation,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n inherited: unknown,\n ): void {\n const tracks = tracksOf(frames, props, inherited);\n // One native was laying out goes on from JavaScript, by the clock it started on.\n const reframed: RunningAnimation = { ...current, tracks, inherited, laid: undefined };\n const { values, finished } = sample(reframed, current.pausedAt ?? this.now());\n const holds = current.spec.fill === 'forwards' || current.spec.fill === 'both';\n reframed.values = finished && !holds ? {} : values;\n this.playedFrames.set(reframed, frames);\n node.playing = reframed;\n // One that had nothing to paint was let go of: with frames that say something it plays on.\n const stopped = reframed.done || reframed.pausedAt !== undefined || reframed.native;\n if (!stopped) this.playing.add(node);\n }\n\n /**\n * `animation-play-state` changed on an animation already playing: pausing holds the frame it\n * has reached, and running again carries on from there, the paused time left out of its clock.\n * Neither starts it over, as a change of play state does not in CSS.\n */\n private playOrPause(node: EngineNode, current: RunningAnimation, spec: AnimationSpec): void {\n current.spec = spec;\n const now = this.now();\n if (spec.paused && current.pausedAt === undefined && !current.done) {\n this.backToScript(node, current);\n current.pausedAt = now;\n this.playing.delete(node);\n } else if (!spec.paused && current.pausedAt !== undefined) {\n current.start += now - current.pausedAt;\n current.pausedAt = undefined;\n this.playing.add(node);\n }\n }\n\n /** Every node playing a scroll-driven animation, by the scroll view that plays it. */\n private readonly scrollTimelines = new Map<EngineNode, Set<EngineNode>>();\n /** How far each such scroll view scrolls, along each axis, once one of its events has said. */\n private readonly scrollExtents = new WeakMap<EngineNode, { x: number; y: number }>();\n\n /**\n * An animation played by the nearest scroll view's offset: `animation-timeline: scroll()`.\n *\n * Its keyframes are laid along the offset and handed to native, which plays them as the view\n * scrolls, with no JavaScript between (`scroll-animation.ts`, `NativeScrollDriver.animate`).\n * The frame at the offset the view starts at is committed once and then left alone: a prop that\n * changed on a later commit would reset what native is animating.\n */\n private scrollAnimated(\n node: EngineNode,\n spec: AnimationSpec,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n ): Record<string, unknown> {\n const current = node.scrolled;\n const inherited = this.inheritedColour(node, frames);\n const same = current?.frames === frames && sameAnimation(current.spec, spec);\n if (same && pinnedIn(node, current.tracks).join(' ') === current.pinned.join(' ')) {\n return Object.assign(props, this.rescrolled(node, current, frames, props, inherited));\n }\n this.stopScrolled(node);\n this.handOverToScroll(node, spec);\n\n const tracks = tracksOf(frames, props, inherited);\n const pinned = pinnedIn(node, tracks);\n const played = unpinned(tracks, pinned);\n const source = this.scrollSourceOf(node);\n const extent = source ? (this.scrollExtents.get(source)?.[spec.timeline!] ?? null) : null;\n const range = rangeOf(spec, extent);\n const first: Record<string, unknown> = firstFrame(played, spec, range);\n const resting = { ...props };\n if (!source && this.dev) this.reportUnscrolled(spec.name);\n const drive = source ? this.driveScrolled(node, source, spec, played, resting, range) : null;\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for the animation to move. Committed with the first frame, so it stays put.\n if (drive) first['collapsable'] = false;\n node.scrolled = { spec, frames, tracks, pinned, resting, first, source, drive, inherited };\n return Object.assign(props, first);\n }\n\n /**\n * The first frame of a scroll-driven animation already playing. When the colour its\n * `color: currentColor` stands for has changed, that frame's colour is taken from tracks built\n * again. Native drives opacity and transforms only, so a colour holds its first frame, and\n * nothing native animates is touched.\n */\n private rescrolled(\n node: EngineNode,\n current: ScrollAnimation,\n frames: readonly Keyframe[],\n props: Record<string, unknown>,\n inherited: unknown,\n ): Record<string, unknown> {\n if (inherited === current.inherited) return current.first;\n // The element's own colour, which a track with no first frame starts at, may be the one it\n // inherits, so it is read again too.\n const resting = { ...current.resting, color: props['color'] };\n const tracks = tracksOf(frames, resting, inherited);\n const extent = current.source ? this.scrollExtents.get(current.source) : undefined;\n const range = rangeOf(current.spec, extent?.[current.spec.timeline!] ?? null);\n const first = { ...current.first };\n const colour = firstFrame(tracks, current.spec, range)['color'];\n if ('color' in first) first['color'] = colour;\n node.scrolled = { ...current, tracks, resting, first, inherited };\n return first;\n }\n\n /** Hand a scroll-driven animation's channels to native, fed by `source`'s scroll events. */\n private driveScrolled(\n node: EngineNode,\n source: EngineNode,\n spec: AnimationSpec,\n tracks: ScrollAnimation['tracks'],\n resting: Record<string, unknown>,\n range: readonly [number, number],\n ): ScrollAnimation['drive'] {\n if (!this.scrollDriver) return null;\n const { channels, held } = scrollChannels(tracks, spec, resting, range);\n if (held.length && this.dev) this.reportHeld(spec.name, held);\n let playing = this.scrollTimelines.get(source);\n if (!playing) this.scrollTimelines.set(source, (playing = new Set()));\n playing.add(node);\n return this.scrollDriver.animate(\n node,\n source,\n scrollFeed(spec.timeline!),\n channels,\n (one) => (one as EngineNode).committed?.tag ?? null,\n );\n }\n\n /** The scroll view a scroll-driven animation on `node` follows: the nearest one it is inside. */\n private scrollSourceOf(node: EngineNode): EngineNode | null {\n for (let up = node.parent; up; up = up.parent) {\n // As it is committed: an element that scrolls its overflow is a scroll view too.\n if (SCROLL_VIEWS.has(committedViewName(up))) return up;\n }\n return null;\n }\n\n private stopScrolled(node: EngineNode): void {\n const scrolled = node.scrolled;\n if (!scrolled) return;\n node.scrolled = undefined;\n scrolled.drive?.stop();\n const playing = scrolled.source && this.scrollTimelines.get(scrolled.source);\n if (!playing) return;\n playing.delete(node);\n // The last to follow this scroll view: a key left here keeps it, and all it is linked to.\n if (!playing.size) this.scrollTimelines.delete(scrolled.source!);\n }\n\n /**\n * A scroll view has said how far it scrolls. Every animation on it with a range that depends on\n * that - none written, or a percentage - is laid out again along the new extent.\n */\n private measuredScroll(source: EngineNode, event: unknown): void {\n const { contentSize, layoutMeasurement } = (event ?? {}) as {\n contentSize?: { width: number; height: number };\n layoutMeasurement?: { width: number; height: number };\n };\n if (!contentSize || !layoutMeasurement) return;\n const extent = {\n x: Math.max(0, contentSize.width - layoutMeasurement.width),\n y: Math.max(0, contentSize.height - layoutMeasurement.height),\n };\n const known = this.scrollExtents.get(source);\n if (known && known.x === extent.x && known.y === extent.y) return;\n this.scrollExtents.set(source, extent);\n for (const node of this.scrollTimelines.get(source) ?? []) {\n const scrolled = node.scrolled;\n if (!scrolled?.drive) continue;\n const range = rangeOf(scrolled.spec, extent[scrolled.spec.timeline!]);\n scrolled.drive.update(\n scrollChannels(\n unpinned(scrolled.tracks, scrolled.pinned),\n scrolled.spec,\n scrolled.resting,\n range,\n ).channels,\n );\n }\n }\n\n private reportUnscrolled(name: string): void {\n if (this.reported.has(`scroll ${name}`)) return;\n this.reported.add(`scroll ${name}`);\n console.error(\n `[angular-native] '${name}' plays by animation-timeline: scroll(), but the element is not ` +\n `inside a scroll view, so nothing moves it. It shows its first frame.`,\n );\n }\n\n private reportHeld(name: string, properties: readonly string[]): void {\n if (this.reported.has(`held ${name}`)) return;\n this.reported.add(`held ${name}`);\n console.error(\n `[angular-native] '${name}' plays by a scroll, which native drives for opacity and ` +\n `transforms only. ${properties.join(', ')} holds its first frame.`,\n );\n }\n\n private reportMissingKeyframes(name: string): void {\n if (this.reported.has(`@keyframes ${name}`)) return;\n this.reported.add(`@keyframes ${name}`);\n console.error(\n `[angular-native] no @keyframes named '${name}'. Nothing animates, and the element ` +\n `renders with its resting style. Keyframes are global across every stylesheet the app ` +\n `has loaded, so the block has to exist somewhere by the time the animation starts.`,\n );\n }\n\n private transitioned(node: EngineNode, props: Record<string, unknown>): Record<string, unknown> {\n this.unseenTransitions(node);\n const spec = transitionSpec(props);\n if (!spec && !node.transitions) return props;\n if (spec) keepForTransition(node, props, spec);\n\n const state = (node.transitions ??= new Map());\n const now = this.now();\n this.takeBackEased(node, state, props, spec, now);\n this.takeBackLaid(state, props, spec, now);\n const started: string[] = [];\n const before = spec && this.paintedBefore(node);\n\n for (const key of steppedKeys(props, spec, state)) {\n if (step(state, key, props, spec?.[key] ?? spec?.['all'], now, before)) {\n this.running.add(node);\n started.push(key);\n this.emitTransition(node, 'topTransitionstart', key);\n }\n }\n this.easeNatively(node, state, started, props, now);\n\n if (state.size === 0) node.transitions = undefined;\n return props;\n }\n\n /**\n * What a view was last painted with, by property, for a transition that arrives with the change\n * it eases: CSS takes the transition from the style after the change and eases from the value\n * before it. Nothing for a view nobody has seen yet, which starts where it is. The individual\n * transforms are read back from the parts the painted transform was put together from.\n */\n private paintedBefore(node: EngineNode): ((key: string) => unknown) | undefined {\n const painted = node.committed?.props;\n // A view that paints its background on a child does not commit it as its own.\n if (!painted || node.paintsOn) return undefined;\n if (node.bornIn !== undefined && node.bornIn >= this.unseen) return undefined;\n // What the styles wrote: a move the engine made before it is no part of what was eased.\n const own = ownTransform(painted['transform']);\n const read = (key: string) => (key === 'transform' ? own : painted[key]);\n const composed = node.composedTransform;\n if (!composed || !sameEntries(own, composed.value)) return read;\n return (key) => {\n if (key === 'transform') return composed.parts[3];\n const part = (INDIVIDUAL_TRANSFORMS as readonly string[]).indexOf(key);\n return part === -1 ? painted[key] : composed.parts[part];\n };\n }\n\n /** Nobody saw what the last commit gave a view it created, so this is where the view starts. */\n private unseenTransitions(node: EngineNode): void {\n // One with no commit it was born in has been seen, whatever was committed since.\n if (node.bornIn === undefined || node.bornIn < this.unseen) return;\n this.stopEased(node);\n node.transitions = undefined;\n }\n\n /** The elements native is playing a transition of. */\n private readonly easedNatively = new Set<EngineNode>();\n\n /**\n * Hand to native each transition that just started and that it can play: opacity and\n * transforms, with no wait before they start. Those that start together, take as long and ease\n * alike share a clock. Nothing of them runs in JavaScript until native says they have ended:\n * a press that fades or slides something is a commit to start it and a commit to end it.\n *\n * ponytail: a colour is eased from JavaScript still, a commit a frame, and so is anything\n * that waits. Native has a colour node for the first; give the driver a channel for it.\n */\n private easeNatively(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n if (started.length) this.startEased(node, state, started, props, now);\n this.layEased(node, state, started, props, now);\n const inScript = [...state.values()].some(\n (eased) => !eased.done && !eased.native && !eased.laid,\n );\n if (!inScript) this.running.delete(node);\n // As Animated does: Fabric flattens a view that only lays out, and then there is no native\n // view for a transition to move.\n if (this.easedNatively.has(node)) props['collapsable'] = false;\n }\n\n /** When each size in transition was last started, and how many starts in a row came soon. */\n private readonly laidStarts = new WeakMap<\n EngineNode,\n Map<string, { at: number; soon: number }>\n >();\n\n /**\n * Whether a transition of a size is one sent on again and again, each before the last had\n * ended: a progress bar that steps every 50ms and eases each step over 150. Native moves the\n * view, and lays the screen out, every frame while a layout animation runs, and JavaScript\n * commits every frame while it eases one, so one started at every step is one that never\n * stops. The first, and one sent back before it ends, are played; from the second sent on in\n * a row, each is committed where it ends, and the steps are the motion. Played again once the\n * size has been left alone for as long as it lasts.\n */\n private sentOnAgain(node: EngineNode, key: string, eased: Transition, now: number): boolean {\n const starts = this.laidStarts.get(node) ?? this.laidStarts.set(node, new Map()).get(node)!;\n const last = starts.get(key);\n const soon = last && now - last.at < eased.duration ? last.soon + 1 : 0;\n starts.set(key, { at: now, soon });\n return soon >= 2;\n }\n\n /** The animations this commit lays out at their last frame, for native to move the views to. */\n private laidPlayed: { node: EngineNode; running: RunningAnimation }[] = [];\n\n /**\n * Whether an animation that has just started is one native can play by laying the view out\n * at its last frame: two frames of sizes or places, played once from where the view is drawn\n * now, which is where native moves it from. It is then committed at that frame; see `layOut`.\n */\n private layPlayed(node: EngineNode, running: RunningAnimation): boolean {\n const drawn = node.committed?.props;\n const { spec, tracks } = running;\n if (!this.fabric.configureNextLayoutAnimation || !drawn || !tracks.size) return false;\n if (!playedOnce(spec)) return false;\n for (const [key, track] of tracks) {\n if (!LAID_OUT.has(key) || !fromWhereDrawn(track, drawn[key])) return false;\n }\n running.laid = true;\n running.values = Object.fromEntries([...tracks].map(([key, track]) => [key, track[1]!.value]));\n return true;\n }\n\n /** Go on from JavaScript with an animation native was to lay out, by the clock it started on. */\n private playLaidHere(node: EngineNode, running: RunningAnimation): void {\n running.laid = undefined;\n running.values = sample(running, this.now()).values;\n this.playing.add(node);\n }\n\n /** An animation native laid out has had its time: it is at its last frame, and says so. */\n private endLaidPlayed(node: EngineNode, running: RunningAnimation): void {\n if (!running.laid || running.done || node.playing !== running) return;\n Object.assign(running, { done: true, laid: undefined });\n if (!this.keeps(node, running)) {\n running.values = {};\n this.markProps(node, false);\n }\n this.emitTransition(node, 'topAnimationend', running.spec.name);\n this.flushTransitionEvents();\n if (this.pending) this.commit();\n }\n\n /** The transitions this commit lays out where they end, for native to move the views to. */\n private laying: { node: EngineNode; key: string; eased: Transition }[] = [];\n /** Whether this commit resizes or moves a box that is in no such transition. */\n private movesOthers = false;\n /**\n * Whether the boxes a commit moves or resizes are noted: for what the engine lays out in\n * Yoga's place, which is laid out again around them, and for a transition native lays out,\n * which is eased from JavaScript where anything else moves. An app with neither has no use\n * for the note. Kept by `want`, as what is asked grows.\n */\n private notesMoves = this.asked !== 0;\n\n /**\n * Commit where it ends each transition of a size or a place that just started, for native to\n * move the view there: a layout animation, which the commit asks for once it is known that\n * nothing else in it moves. One still on its way is committed where it ends too. On a host\n * with no layout animation they are eased from JavaScript, but for one sent on again and again.\n *\n * A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.\n */\n private layEased(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n const native = this.fabric.configureNextLayoutAnimation !== undefined;\n for (const key of started) {\n const eased = state.get(key)!;\n if (!LAID_OUT.has(key) || eased.start > now || eased.duration <= 0) continue;\n if (this.sentOnAgain(node, key, eased, now)) {\n // Where it ends, at once: see `sentOnAgain`.\n Object.assign(eased, { current: eased.to, done: true });\n this.emitTransition(node, 'topTransitionend', key);\n props[key] = eased.to;\n continue;\n }\n if (!native) continue;\n eased.laid = true;\n this.laying.push({ node, key, eased });\n }\n for (const [key, eased] of state) if (eased.laid && !eased.done) props[key] = eased.to;\n }\n\n /**\n * Before a commit is handed over: ask native to move what it lays out, and take back to\n * ease from JavaScript whatever it cannot: all of it where the commit moves anything else,\n * and otherwise what would not take as long as the longest. Answers whether the tree has to\n * be reconciled again.\n */\n private layOut(): boolean {\n const laying = this.laying;\n const played = this.laidPlayed.filter(({ node, running }) => node.playing === running);\n const others = this.movesOthers;\n this.laying = [];\n this.laidPlayed = [];\n this.movesOthers = false;\n if (!laying.length && !played.length) return false;\n // Native takes one length of time for a commit: the longest asked of it, and whatever\n // would take another is eased from JavaScript. None of it, where anything else moves.\n const longest = Math.max(\n ...laying.map(({ eased }) => eased.duration),\n ...played.map(({ running }) => running.spec.duration),\n );\n const kept = (duration: number) => !others && duration === longest;\n const back: EngineNode[] = [];\n for (const { node, eased } of laying) {\n if (kept(eased.duration)) continue;\n eased.laid = undefined;\n this.running.add(node);\n back.push(node);\n }\n for (const { node, running } of played) {\n if (kept(running.spec.duration)) continue;\n this.playLaidHere(node, running);\n back.push(node);\n }\n for (const node of back) this.markProps(node, false);\n if (!others) this.askLayout(laying, played, longest);\n return back.length > 0;\n }\n\n /** Ask native to move what the commit lays out over `duration`, and end each when it is up. */\n private askLayout(\n laying: readonly { node: EngineNode; key: string; eased: Transition }[],\n played: readonly { node: EngineNode; running: RunningAnimation }[],\n duration: number,\n ): void {\n const easing =\n laying.find(({ eased }) => eased.laid)?.eased.easing ??\n played.find(({ running }) => running.laid)!.running.spec.easing;\n const nothing = () => undefined;\n this.fabric.configureNextLayoutAnimation!(\n { duration, update: { type: layoutCurve(easing) } },\n nothing,\n nothing,\n );\n for (const { node, key, eased } of laying) {\n if (eased.laid) setTimeout(() => this.endLaid(node, key, eased), duration);\n }\n for (const { node, running } of played) {\n if (running.laid) setTimeout(() => this.endLaidPlayed(node, running), duration);\n }\n }\n\n /** A transition native laid out has had its time: it is where it ends, and says so. */\n private endLaid(node: EngineNode, key: string, eased: Transition): void {\n if (!eased.laid || eased.done || node.transitions?.get(key) !== eased) return;\n Object.assign(eased, { current: eased.to, done: true, laid: undefined });\n this.emitTransition(node, 'topTransitionend', key);\n // No commit comes of it, which is what tells listeners otherwise: it is where it ends.\n this.flushTransitionEvents();\n // And what a listener did, taking away an element that has left, is committed.\n if (this.pending) this.commit();\n }\n\n /**\n * Bring a transition native laid out to where its clock has got to, where it is sent another\n * way or its rule has gone: that is where it goes on from.\n */\n private takeBackLaid(\n state: Map<string, Transition>,\n props: Record<string, unknown>,\n spec: Record<string, TransitionSpec> | undefined,\n now: number,\n ): void {\n for (const [key, eased] of state) {\n if (!eased.laid || eased.done) continue;\n const kept = spec?.[key] ?? spec?.['all'];\n if (kept && !aimsElsewhere(eased, key, props)) continue;\n const progress = Math.min(1, Math.max(0, (now - eased.start) / eased.duration));\n eased.current = interpolate(eased.from, eased.to, bezier(eased.easing, progress));\n eased.laid = undefined;\n }\n }\n\n private startEased(\n node: EngineNode,\n state: Map<string, Transition>,\n started: readonly string[],\n props: Record<string, unknown>,\n now: number,\n ): void {\n if (!this.scrollDriver) return;\n const clocks = new Map<string, string[]>();\n for (const key of started) {\n const eased = state.get(key)!;\n if (!NATIVELY_EASED.has(key) || eased.start > now || eased.duration <= 0) continue;\n const clock = `${eased.duration} ${eased.easing.join()}`;\n clocks.set(clock, [...(clocks.get(clock) ?? []), key]);\n }\n for (const keys of clocks.values()) this.playEased(node, state, keys, props);\n }\n\n private playEased(\n node: EngineNode,\n state: Map<string, Transition>,\n keys: readonly string[],\n props: Record<string, unknown>,\n ): void {\n const first = state.get(keys[0]!)!;\n // Where the view is committed: one that takes a touch stops short of no opacity.\n const touched = this.responders.has(node);\n // A sticky box's drive moves it, and applies the transform eased here after the move.\n const sticky = keys.includes('transform') ? node.sticky : undefined;\n const lend = sticky?.drive\n ? (entries: readonly FollowingTransform[] | null) => {\n if (node.sticky !== sticky) return;\n sticky.lent = entries ?? undefined;\n this.composeSticky(node);\n }\n : undefined;\n // The moves the engine put before the transform: native paints the transform it eases whole.\n const moves = lend ? [] : engineMoves(node.committed?.props['transform']);\n const seen = (key: string, value: unknown) => {\n if (key === 'transform' && moves.length)\n return [...moves, ...(Array.isArray(value) ? value : [])];\n return touched && key === 'opacity'\n ? stillTouched({ ...props, opacity: value })['opacity']\n : value;\n };\n const tracks = new Map(\n keys.map((key) => {\n const { current, to, easing } = state.get(key)!;\n return [\n key,\n [\n { offset: 0, value: seen(key, current), easing },\n { offset: 1, value: seen(key, to) },\n ],\n ] as const;\n }),\n );\n const spec: AnimationSpec = {\n name: '',\n duration: first.duration,\n delay: 0,\n easing: first.easing,\n iterations: 1,\n fill: 'both',\n };\n const channels = easedChannels(tracks, spec, props);\n if (!channels) return;\n const length = Math.max(2, Math.round(first.duration / NATIVE_FRAME) + 1);\n const frames = Array.from({ length }, (_, i) => i / (length - 1));\n const clock: { keys: readonly string[]; stop(): void } = { keys, stop: () => undefined };\n const native = this.scrollDriver!.play(\n node,\n channels,\n { frames, toValue: 1, iterations: 1 },\n (view) => this.tagOf(view as EngineNode),\n () => this.endedEased(node, clock),\n lend,\n );\n if (!native) return;\n clock.stop = () => native.stop();\n for (const key of keys) state.get(key)!.native = clock;\n this.easedNatively.add(node);\n }\n\n /**\n * Native reached the end of the transitions on one clock. Where they end is committed before\n * the view is let go, so nothing shows of where they started, which is what it was committed\n * with.\n */\n private endedEased(node: EngineNode, clock: EasedNatively): void {\n const state = node.transitions;\n const keys = clock.keys.filter((key) => state?.get(key)?.native === clock);\n for (const key of keys) {\n const eased = state!.get(key)!;\n Object.assign(eased, { current: eased.to, done: true, native: undefined });\n this.emitTransition(node, 'topTransitionend', key);\n this.markProps(node, false);\n }\n this.forgetEased(node);\n if (keys.length) this.commit();\n clock.stop();\n }\n\n /** No longer one native is easing, once none of its transitions is native's. */\n private forgetEased(node: EngineNode): void {\n for (const eased of node.transitions?.values() ?? []) if (eased.native) return;\n this.easedNatively.delete(node);\n }\n\n /**\n * Take back from native each transition it can no longer play as it was started: one sent\n * another way, one whose rule has gone, any of a view that was made again. Each is brought to\n * where its clock has got to, which is where it goes on from, here or on native again.\n */\n private takeBackEased(\n node: EngineNode,\n state: Map<string, Transition>,\n props: Record<string, unknown>,\n spec: Record<string, TransitionSpec> | undefined,\n now: number,\n ): void {\n if (!this.easedNatively.has(node)) return;\n const remade = node.committed === null;\n for (const [key, eased] of state) {\n if (!eased.native) continue;\n const kept = spec?.[key] ?? spec?.['all'];\n if (remade || !kept || aimsElsewhere(eased, key, props)) {\n this.backToScriptEased(node, eased.native, now);\n }\n }\n }\n\n /** Stop a clock native runs, and go on from JavaScript with each transition it was playing. */\n private backToScriptEased(node: EngineNode, clock: EasedNatively, now: number): void {\n for (const key of clock.keys) {\n const eased = node.transitions?.get(key);\n if (eased?.native !== clock) continue;\n eased.native = undefined;\n const progress = Math.min(1, Math.max(0, (now - eased.start) / eased.duration));\n eased.current = interpolate(eased.from, eased.to, bezier(eased.easing, progress));\n this.running.add(node);\n }\n clock.stop();\n this.forgetEased(node);\n }\n\n /** A graph of native's was connected to a view: see `Touched`. */\n private touchedNatively(node: EngineNode, tag: number, keys: readonly string[]): void {\n const taken = keys.filter((key) => key === 'opacity' || key === 'transform');\n if (!taken.length) return;\n if (node.owned?.tag !== tag) node.owned = { tag, keys: new Set() };\n for (const key of taken) node.owned.keys.add(key);\n }\n\n /**\n * Set on native a change of a prop a graph of native's has set on the view before, while no\n * graph of its holds it: the commit cannot change it (see `Touched`). The payload is committed\n * as well, so the shadow node is as the view is drawn. A transform native cannot take as\n * numbers, a matrix in depth, is left committed alone.\n */\n private setOwned(\n node: EngineNode,\n payload: Readonly<Record<string, unknown>>,\n props: Record<string, unknown>,\n ): void {\n const owned = node.owned!;\n const tag = node.committed?.tag;\n if (tag === undefined || owned.tag !== tag || !this.scrollDriver) return;\n const held = this.scrollDriver.held(node);\n const free = (key: string) => key in payload && owned.keys.has(key) && !held.has(key);\n const values: SetValues = {};\n if (free('opacity')) {\n const opacity = props['opacity'];\n values.opacity = typeof opacity === 'number' ? opacity : 1;\n }\n if (free('transform')) {\n const transform = heldTransform(\n props['transform'],\n () => this.boxSize(node),\n platformOS !== 'android',\n );\n if (transform) values.transform = transform;\n }\n if (values.opacity !== undefined || values.transform) {\n this.scrollDriver.set(node, tag, values);\n }\n }\n\n /** The size a view is laid out at, where it has been. */\n private boxSize(node: EngineNode): { width: number; height: number } | undefined {\n let size: { width: number; height: number } | undefined;\n this.measure(node, (frame) => (size = frame));\n return size;\n }\n\n /** Forget the props native set on a node's view, which is gone or made again. */\n private disown(node: EngineNode): void {\n node.owned = undefined;\n this.scrollDriver?.forget(node);\n }\n\n /** Let go of what native is easing on an element that is going, or gone. */\n private stopEased(node: EngineNode): void {\n if (!this.easedNatively.delete(node)) return;\n const clocks = new Set<EasedNatively>();\n for (const eased of node.transitions?.values() ?? []) {\n if (eased.native) clocks.add(eased.native);\n eased.native = undefined;\n }\n for (const clock of clocks) clock.stop();\n }\n\n /**\n * Whether an animation that has finished goes on holding its last frame. With a forwards fill\n * it does, for good: without one the element falls back to whatever the cascade gives it, and\n * 'backwards' fills the start only. Heard, it holds until whoever listens has been told: see\n * `lettingGo`.\n */\n private keeps(node: EngineNode, running: RunningAnimation): boolean {\n if (running.spec.fill === 'forwards' || running.spec.fill === 'both') return true;\n // One that listened and has stopped takes its set with it: nobody to hear it.\n if (!node.listeners?.has('topAnimationend')) return false;\n this.lettingGo.add(node);\n return true;\n }\n\n /** Whether a node, or an element it is in, is `display: none`. */\n private boxless(node: EngineNode): boolean {\n for (let at: EngineNode | null = node; at; at = at.parent) {\n if (at.nodeKind !== 'element') continue;\n this.styles.resolve(at, this.styleEpoch);\n if (ownLayout(at, 'display') === 'none') return true;\n }\n return false;\n }\n\n /** One `@keyframes` player, one frame on. */\n private advancePlayer(node: EngineNode, now: number): void {\n const running = node.playing;\n if (!running) {\n this.playing.delete(node);\n return;\n }\n\n if (running.pausedAt !== undefined) {\n this.playing.delete(node);\n return;\n }\n // One with no box, or in a box with none, paints nothing, and an endless one would keep the\n // frame loop going for good. It is cancelled, as a browser cancels it, and starts again when\n // the node is shown, as it is made again.\n if (this.boxless(node)) {\n this.cancelPlaying(node);\n this.playing.delete(node);\n node.playing = undefined;\n // A commit, for its `animationcancel` to be sent after, and to drop its last frame.\n this.markProps(node, false);\n return;\n }\n // Frames that say nothing paint nothing: a keyframe's one declaration refused at build time\n // leaves these. No frame of it is committed, and one that never ends has nothing left to do.\n const idle = running.tracks.size === 0;\n const { values, finished } = sample(running, now);\n // One of no time is finished already, endless or not, and ends as any other does.\n if (idle && !finished && running.spec.iterations === null) {\n this.playing.delete(node);\n return;\n }\n running.values = finished && !this.keeps(node, running) ? {} : values;\n // Its end is still a commit: that is what its `animationend` is sent after. Its last frame\n // gives back what it held, which may be a size: a frame of layout.\n if (!idle || finished) this.tick(node, frameKeys(values, finished));\n\n if (!finished) return;\n running.done = true;\n this.playing.delete(node);\n this.emitTransition(node, 'topAnimationend', running.spec.name);\n }\n\n /**\n * Late-bound because the host that wants the callback is usually built from this engine, so\n * neither can be constructed with the other in hand.\n */\n setOnDirty(fn: () => void): void {\n this.onDirty = fn;\n }\n\n /** Late-bound for the same reason: the app's `ErrorHandler` lives in an injector built later. */\n setOnError(fn: (error: unknown, topLevelType: string) => void): void {\n this.onError = fn;\n }\n\n /** Whether any transition or animation still has frames left to run. */\n get animating(): boolean {\n return this.running.size > 0 || this.playing.size > 0;\n }\n\n /**\n * Whether anything has changed since the last commit.\n *\n * The frame loop reads this because a `transitionend` listener runs after its commit has\n * finished, and what it does is often to remove the element that just finished leaving. That\n * change needs a commit of its own or the view stays on screen, fully transparent, forever.\n */\n get pending(): boolean {\n return this.root.structureDirty || this.root.subtreeDirty;\n }\n\n /**\n * Advance every transition to `now` and mark what changed. The caller commits afterwards; on a\n * device the platform pumps this from `requestAnimationFrame` for as long as it returns true.\n */\n advanceAnimations(now: number = this.now()): boolean {\n for (const node of [...this.playing]) this.advancePlayer(node, now);\n for (const node of [...this.running]) {\n let live = false;\n for (const [key, transition] of node.transitions ?? []) {\n if (transition.done) continue;\n const elapsed = now - transition.start;\n // Still inside the delay: nothing to paint yet, but the transition is not over.\n if (elapsed < 0) {\n live = true;\n continue;\n }\n const progress = transition.duration <= 0 ? 1 : Math.min(1, elapsed / transition.duration);\n if (progress >= 1) {\n transition.current = transition.to;\n transition.done = true;\n this.emitTransition(node, 'topTransitionend', key);\n } else {\n transition.current = interpolate(\n transition.from,\n transition.to,\n bezier(transition.easing, progress),\n );\n live = true;\n }\n this.tick(node, [key]);\n }\n if (!live) this.running.delete(node);\n }\n return this.animating;\n }\n\n /**\n * The host's conversions, applied to a copy. A removed prop travels as `cleared` says, null for\n * nearly every one. On an update a colour dropped as unreadable is null too: JSI leaves out an\n * undefined key, and Fabric keeps what a clone leaves out.\n */\n private processed(props: Record<string, unknown>, update: boolean): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n const value = props[key];\n if (value === null) out[key] = cleared(key);\n else if (value === undefined) out[key] = value;\n else if (isColorProp(key)) out[key] = this.colourProp(key, value, update);\n // A list of sources has already been resolved by whoever built it, as RN's resolver\n // also assumes: it passes any object through and only turns a number into one.\n else if (ASSET_PROPS.has(key) && !Array.isArray(value))\n out[key] = this.resolveAssetSource(value);\n else if (NESTED_COLOR_LIST_PROPS.has(key)) out[key] = this.processNestedColors(value);\n else if (key === 'experimental_backgroundImage') out[key] = this.processGradients(value);\n else if (key === 'filter') out[key] = this.processFilters(value);\n // A bound style's transform is still the CSS string: see `inline-transform.ts`.\n else if (key === 'transform' && typeof value === 'string') out[key] = transformOf(value);\n else out[key] = value;\n }\n return out;\n }\n\n /** Copy a list of shadow-like objects, running each `color` through the host's converter. */\n private processNestedColors(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const item = entry as Record<string, unknown>;\n if (item?.['color'] === undefined) return entry;\n return { ...item, color: this.color(item['color'] as string | number) };\n });\n }\n\n /**\n * Copy a filter list, running a drop shadow's colour through the host's converter. Android reads\n * that colour as a number and throws on a string, taking the whole surface down with it.\n */\n private processFilters(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const shadow = (entry as { dropShadow?: Record<string, unknown> })?.dropShadow;\n if (shadow?.['color'] === undefined) return entry;\n return {\n dropShadow: { ...shadow, color: this.color(shadow['color'] as string | number) },\n };\n });\n }\n\n /**\n * Mark the text field each box of a row aligned by baseline takes its baseline from, before\n * the field is merged, and unmark it when the row is aligned another way.\n */\n private noteBaselineFields(row: EngineNode): void {\n const aligned = readStyle(row, 'alignItems') === 'baseline';\n const before = row.baselineFields;\n if (!aligned && !before) return;\n const now = new Set(\n aligned ? row.childList.filter(inFlow).map(fieldOnBaseline).filter(isNode) : [],\n );\n // One that is no longer this row's, and that no other row has marked since.\n for (const field of before ?? []) {\n if (!now.has(field) && field.onBaseline === row) this.onBaselineOf(field, undefined);\n }\n for (const field of now) if (field.onBaseline !== row) this.onBaselineOf(field, row);\n row.baselineFields = now.size ? now : undefined;\n }\n\n private onBaselineOf(field: EngineNode, row: EngineNode | undefined): void {\n field.onBaseline = row;\n this.markProps(field, false);\n }\n\n /**\n * Have the text a row aligned by baseline takes a baseline from measured again, where that\n * text is inside one of the row's boxes and the row is committed again. React Native keeps\n * what a paragraph measured on the one copy of its node that was measured, and Yoga copies a\n * node it lays out around: a row that is laid out again asks a box for its baseline, the box\n * asks the paragraph in it, and a copy that was never measured works it out then, on a node\n * that is by then not to be changed. A debug build stops there. Committed to be measured\n * again (`remeasure`), the paragraph is measured in this commit and has the answer.\n *\n * ponytail: the first box in the flow at each level, which is the one Yoga asks unless\n * another is aligned by baseline itself. A row a commit lays out again without the engine\n * cloning it, as its room changing does, is not reached: clone on a layout event if one is\n * seen to stop there.\n */\n private freshBaselines(row: EngineNode): void {\n if (!row.committed || ownLayout(row, 'alignItems') !== 'baseline') return;\n for (const item of row.childList) {\n let at = firstInFlow(item);\n while (at?.committed && committedViewName(at) !== PARAGRAPH) at = firstInFlow(at);\n if (!at?.committed) continue;\n at.remeasure = true;\n for (let up: EngineNode | null = at; up && up !== row; up = up.parent) up.subtreeDirty = true;\n }\n }\n\n /**\n * Copy a list of gradients, running every stop's colour through the host's converter.\n *\n * A stop's colour is a colour like any other, but it is two levels down and nothing else looks\n * there: without this the device is handed the string `rgb(255, 0, 0)` where it wants a number,\n * and paints nothing. The stops are first rewritten so native's interpolation paints what\n * CSS's premultiplied one does (see `premultipliedStops`).\n */\n private processGradients(value: unknown): unknown {\n if (!Array.isArray(value)) return value;\n return value.map((entry) => {\n const gradient = entry as { colorStops?: { color?: unknown }[] };\n if (!Array.isArray(gradient?.colorStops)) return entry;\n return {\n ...gradient,\n colorStops: premultipliedStops(gradient.colorStops).map((stop) => ({\n ...stop,\n color: this.color(stop.color),\n })),\n };\n });\n }\n\n private clearFlags(node: EngineNode): void {\n if ((node.propsDirty || node.structureDirty) && this.asked & LAYOUTS) this.noteChanged(node);\n node.propsDirty = false;\n node.structureDirty = false;\n node.subtreeDirty = false;\n }\n\n // Exempt from the complexity limit as `mergeProps` is: run for every node a commit restyles,\n // where the clone in a function of its own was a call more a node in `pnpm bench:tailwind`.\n // eslint-disable-next-line complexity\n private reconcile(node: EngineNode): FabricNode {\n // A clean node can still need re-rendering: if an ancestor's class changed, what this node\n // inherits changed with it, and nothing marked this node dirty. The resolver hands back the\n // very same cache object when nothing has changed, so one reference comparison settles it,\n // and a subtree whose inherited context is unmoved is skipped exactly as before.\n const style = node.nodeKind === 'element' ? this.styles.resolve(node, this.styleEpoch) : null;\n const styleChanged = node.styleCommitted !== style;\n if (this.isClean(node) && !styleChanged) return node.committed!.handle;\n // What a commit changed is noted, and a box planned again, for a layout of the engine's.\n const layouts = this.asked & LAYOUTS;\n if (layouts !== 0 && styleChanged) this.noteChanged(node);\n node.styleCommitted = style;\n repaint(node);\n this.refitChildren(node);\n if (layouts !== 0) this.relayout(node);\n const scroller = node.scrollsOverflow === true && this.settleScrolling(node);\n const viewName = committedViewName(node);\n this.forgetRenamed(node, viewName);\n this.noteBaselineFields(node);\n this.freshBaselines(node);\n const childHandles = this.reconcileChildren(node, viewName, style);\n if (this.fixedIn.size) this.fixedHandles(node, childHandles);\n this.raise(node, viewName);\n noteTouches(node, style);\n if (scroller) return this.reconcileScroller(node, viewName, childHandles, styleChanged);\n const previous = node.committed;\n this.notePresented(node, viewName);\n if (!previous)\n return this.create(node, viewName, this.mergeProps(node, viewName), childHandles);\n // A node that is committed, cloned for what changed of it: its props, its children.\n // `propsDirty` is precise: Angular only calls setProperty when a binding actually changed.\n // It is not sufficient on its own, though. A node whose ancestor's class changed inherits\n // something new without any binding of its own having moved, so it is not propsDirty and\n // would never re-clone. `styleChanged` is the other half of that question. An ancestor that\n // is here only because something beneath it moved has the props it had.\n const propsMoved = node.propsDirty || styleChanged;\n const props = propsMoved ? this.mergeProps(node, viewName) : previous.props;\n const propsPayload = propsMoved ? this.propsPayload(node, previous.props, props) : null;\n if (this.asked & LAYOUTS) this.noteHow(node, propsPayload);\n const childrenChanged = this.childrenMoved(node, childHandles, previous.childHandles);\n if (this.notesMoves)\n this.noteClone(node, propsPayload, childrenChanged, childHandles, previous);\n let handle = previous.handle;\n if (childrenChanged || propsPayload) {\n handle = this.clone(\n previous.handle,\n propsPayload && this.processed(propsPayload, true),\n childrenChanged ? childHandles : null,\n );\n // A clone is the same view, so it keeps the tag it was created with, not the newest tag\n // handed out, which is some other node's.\n node.committed = { handle, tag: previous.tag, props, childHandles, viewName };\n }\n this.clearFlags(node);\n return handle;\n }\n\n /**\n * Note a commit that resizes or moves a box in no transition native lays out: a prop of one\n * that moves boxes, children that came or went, text longer or shorter than it was.\n */\n private noteMoved(\n node: EngineNode,\n payload: Record<string, unknown> | null,\n children: number,\n words: unknown,\n ): void {\n if (children) this.movesOthers = !!this.movedOrGrown(children).add(node);\n for (const key in payload) {\n // Text as long as it was is taken to be as wide, as a grid takes it: see `shapeOf`.\n const change = key === 'text' ? String(payload[key]).length - String(words).length : 0;\n if (!MOVES_BOXES.has(key) && !change) continue;\n this.movedOrGrown(change).add(node);\n if (!laidByNative(node, key)) this.movesOthers = true;\n }\n }\n\n /** Note a clone that moves or resizes a box, where moves are noted: see `notesMoves`. */\n private noteClone(\n node: EngineNode,\n payload: Record<string, unknown> | null,\n childrenChanged: boolean,\n childHandles: readonly FabricNode[],\n previous: NonNullable<EngineNode['committed']>,\n ): void {\n if (!this.laying.length && !payload && !childrenChanged) return;\n const by = childHandles.length - previous.childHandles.length;\n this.noteMoved(node, payload, by, previous.props['text']);\n }\n\n /** Where a box is noted that holds this many more children or letters: none is another change. */\n private movedOrGrown(more: number): Set<EngineNode> {\n return more > 0 ? this.grownBoxes : this.movedBoxes;\n }\n\n /**\n * Whether an element said to scroll its overflow is to: its style says `auto` or `scroll`. Noted\n * on the node, for the view it is committed as, and answered.\n */\n private settleScrolling(node: EngineNode): boolean {\n // A sheet's `auto` is compiled to `scroll`; an inline style's is not.\n const overflow = readStyle(node, 'overflow');\n if (overflow === 'scroll' || overflow === 'auto') node.scrollView = true;\n else node.scrollView = undefined;\n return node.scrollView === true;\n }\n\n /**\n * `reconcile` for an element that scrolls its overflow: a scroll view, and in it the one view\n * its children are in. Each is created once and cloned for what changed of its own: the\n * content for the children and for how they are laid out, the scroll view for its box and\n * for a content that was cloned.\n */\n private reconcileScroller(\n node: EngineNode,\n viewName: string,\n childHandles: FabricNode[],\n styleChanged: boolean,\n ): FabricNode {\n const previous = node.committed;\n const held = node.inside;\n if (!previous || !held) return this.createScroller(node, viewName, childHandles);\n const propsMoved = node.propsDirty || styleChanged;\n const props = propsMoved ? this.mergeProps(node, viewName) : previous.props;\n const payload = propsMoved ? this.propsPayload(node, previous.props, props) : null;\n if (this.asked & LAYOUTS) this.noteHow(node, payload);\n const moved = this.childrenMoved(node, childHandles, held.childHandles);\n const { box, content } = splitScroller(payload ?? {});\n // All of it: the content's padding moves what it holds, and can resize the element.\n if (this.notesMoves) this.noteClone(node, payload, moved, childHandles, previous);\n const inside = this.clonedFor(held.handle, someProps(content), moved ? childHandles : null);\n const handle = this.clonedFor(\n previous.handle,\n someProps(box),\n inside === held.handle ? null : [inside],\n );\n node.committed = { handle, tag: previous.tag, props, childHandles, viewName };\n node.inside = { handle: inside, childHandles };\n this.clearFlags(node);\n return handle;\n }\n\n /** A view cloned for the props and the children that changed, or itself where neither did. */\n private clonedFor(\n handle: FabricNode,\n props: Record<string, unknown> | null,\n children: FabricNode[] | null,\n ): FabricNode {\n if (!props && !children) return handle;\n return this.clone(handle, props && this.processed(props, true), children);\n }\n\n private createScroller(\n node: EngineNode,\n viewName: string,\n childHandles: FabricNode[],\n ): FabricNode {\n const props = this.mergeProps(node, viewName);\n const { box, content } = scrollerProps(props);\n // The element is what a touch on its content lands on.\n const inside = this.fabric.createNode(\n nextTag(),\n DEFAULT_VIEW,\n this.rootTag,\n this.processed(content, false),\n node,\n );\n this.stats.createdNodes++;\n for (const child of childHandles) this.fabric.appendChild(inside, child);\n const handle = this.create(node, viewName, box, [inside]);\n node.committed = { ...node.committed!, props, childHandles };\n node.inside = { handle: inside, childHandles };\n return handle;\n }\n\n /** What a clone sends: the props that changed, and a text input's font once it registered. */\n private propsPayload(\n node: EngineNode,\n previous: Record<string, unknown>,\n props: Record<string, unknown>,\n ): Record<string, unknown> | null {\n const payload = diffProps(previous, props);\n if (payload) borderColoursAgain(payload, props);\n if (payload && node.owned) this.setOwned(node, payload, props);\n // A frame of a transform is committed with no layout settled after it: see `composeSticky`.\n if (payload && node.sticky?.drive && 'transform' in payload) {\n this.composeSticky(node, props['transform']);\n }\n if (payload && this.fontsRefreshed && this.fontResends.delete(node)) {\n payload['fontFamily'] = props['fontFamily'];\n }\n return payload;\n }\n\n /**\n * Whether a node has to be committed with its children again.\n *\n * A child that re-cloned has a new handle, so the parent must re-clone too. This is the bubble\n * that persistent trees force, and it is why dirty marking propagates upwards. A node to be\n * measured again is cloned with its children even when they are the same ones: new children\n * is what makes Fabric dirty a measured node (`remeasureText`).\n */\n private childrenMoved(node: EngineNode, next: FabricNode[], previous: FabricNode[]): boolean {\n const remeasure = node.remeasure === true;\n node.remeasure = undefined;\n return remeasure || !sameHandles(next, previous);\n }\n\n /**\n * The handles of a node's children, reconciling only the ones that can have changed.\n *\n * One changed row in a list of a thousand makes the list re-clone, and the other 999 are asked\n * for their handle. A clean child whose style still holds under this node's is its committed\n * handle as it stands, so it is answered here without the call, the resolve and the walk -\n * which, per child, was most of what a one-row update cost.\n */\n // Exempt from the complexity limit as `mergeProps` is: run for every node with children, where\n // the loop in a function of its own was a call more a node in `pnpm bench`.\n // eslint-disable-next-line complexity\n private reconcileChildren(\n node: EngineNode,\n viewName: string,\n style: StyleCache | null,\n ): FabricNode[] {\n const context = style?.context;\n if (HOIST_ONLY.has(node.tag)) return this.reconcileOnlyHoisted(node);\n if (HOIST_TARGETS.has(node.tag)) return this.reconcileHoistTarget(node, context);\n if (node.flow !== undefined) return this.reconcileInFlow(node, node.flow, viewName, context);\n // A node with no flow of its own holds nothing in a line: each child is its own view under it.\n const handles: FabricNode[] = [];\n for (const child of node.childList) {\n const clean = this.cleanUnder(node, child, context);\n if (clean) {\n handles.push(clean);\n continue;\n }\n if (\n child.nodeKind === 'anchor' ||\n this.committedElsewhere(child) ||\n this.withheld(child) ||\n // Committed under its page: see `fixedHandles`. Only a layout of CSS's fixes a box.\n (this.asked & CSS_LAYOUT && this.onPage(child, context))\n ) {\n continue;\n }\n const handle =\n child.nodeKind === 'text'\n ? this.reconcileText(node, child, viewName, context)\n : this.reconcileUnder(node, child, context);\n if (handle) handles.push(handle);\n }\n return node.ordered ? this.inOrder(node, handles) : handles;\n }\n\n /** `reconcileChildren` for a block: its children, with each run of boxes in its line box. */\n private reconcileInFlow(\n node: EngineNode,\n flow: Flow,\n viewName: string,\n context: object | undefined,\n ): FabricNode[] {\n const handles: FabricNode[] = [];\n // The node each handle is of, kept only where some of them are to share a line box.\n const lines = flow.plan.lines.size ? flow : undefined;\n const owners: EngineNode[] = [];\n // Asked once of the node, and not of each child: most hold no words beside a box.\n const worded = wordedLine(node) && holdsParagraphs(viewName);\n for (const child of node.childList) {\n // A clean child is stepped over here as it is under a box with no flow: a block of\n // examples one of which ticks is most of a commit otherwise. See `cleanUnder`.\n const handle =\n this.cleanUnder(node, child, context) ??\n (worded && child.nodeKind === 'text'\n ? this.reconcileWordsInto(node, child, context, handles)\n : this.reconcileChild(node, child, viewName, context));\n if (!handle) continue;\n handles.push(handle);\n if (lines) owners.push(child);\n }\n if (lines) return this.inLines(node, lines, handles, owners);\n return node.ordered ? this.inOrder(node, handles) : handles;\n }\n\n /**\n * A run of text beside a box in a line: its words are each a view, which are added to\n * `handles` here, and it has no one view to answer with.\n */\n private reconcileWordsInto(\n node: EngineNode,\n child: EngineNode,\n context: object | undefined,\n handles: FabricNode[],\n ): undefined {\n handles.push(...this.reconcileWords(node, child, context));\n return undefined;\n }\n\n /** One child's view under `node`, or nothing for a child that has none there. */\n private reconcileChild(\n node: EngineNode,\n child: EngineNode,\n viewName: string,\n context: object | undefined,\n ): FabricNode | null | undefined {\n if (child.nodeKind === 'anchor' || this.committedElsewhere(child) || this.withheld(child)) {\n return undefined;\n }\n // Committed under its page: see `fixedHandles`.\n if (this.onPage(child, context)) return undefined;\n if (child.nodeKind === 'text') return this.reconcileText(node, child, viewName, context);\n // A box in a line box is under that view, which is named by the line's first box: one that\n // joins a line, leaves it, or changes lines is made again, as native never moves one.\n const first = node.flow?.lined.get(child);\n return this.reconcileUnder(first ? this.lineOf(node, first) : node, child, context);\n }\n\n /**\n * A block's children with each run of inline-level boxes in its line box: the view is where\n * the first box of the run was, and holds the run. The same view is committed while its boxes\n * and the margin over it are the same, so a commit that changes neither sends nothing for it.\n */\n private inLines(\n container: EngineNode,\n flow: Flow,\n handles: readonly FabricNode[],\n owners: readonly EngineNode[],\n ): FabricNode[] {\n const boxes = new Map<EngineNode, FabricNode[]>();\n const out: (FabricNode | EngineNode)[] = [];\n handles.forEach((handle, i) => {\n const first = flow.lined.get(owners[i]!);\n if (!first) {\n out.push(handle);\n return;\n }\n const inside = boxes.get(first);\n if (inside) inside.push(handle);\n else {\n out.push(first);\n boxes.set(first, [handle]);\n }\n });\n return out.map((each) => {\n const inside = boxes.get(each as EngineNode);\n if (!inside) return each as FabricNode;\n const first = each as EngineNode;\n return this.lineBox(container, first, flow.plan.lines.get(first)!, inside);\n });\n }\n\n private lineBox(\n container: EngineNode,\n first: EngineNode,\n { top }: { top: number },\n handles: readonly FabricNode[],\n ): FabricNode {\n const line = this.lineOf(container, first);\n const was = line.handle;\n const along = this.alongLine(container);\n const inherited = this.styles.resolve(container, this.styleEpoch).inherited;\n const strut = lineStrut(inherited, container, first, this.fontScale);\n const placed = line.top === top && line.along === along && sameStrut(line.strut, strut);\n const same =\n placed &&\n line.handles.length === handles.length &&\n handles.every((handle, i) => handle === line.handles[i]);\n if (was && same) return was;\n const where = { marginTop: top, justifyContent: along ?? 'flex-start', ...strut };\n const handle = was\n ? this.clone(was, placed ? null : where, [...handles])\n : this.fabric.createNode(\n nextTag(),\n 'View',\n this.rootTag,\n { ...LINE_BOX, ...where },\n container,\n );\n if (!was) for (const child of handles) this.fabric.appendChild(handle, child);\n Object.assign(line, { handle, top, along, strut, handles });\n return handle;\n }\n\n /**\n * Where `text-align` puts the boxes of a line in `container`, as the row the line is places\n * its items: a browser sets inline-level boxes where it would set the line's words. Nothing\n * at the start, which is where a row has them.\n *\n * ponytail: `end` and `right` are both the row's end, which is the left in a right-to-left\n * layout: right for `end` and wrong for `right`. Read the direction if that is ever seen.\n */\n private alongLine(container: EngineNode): string | undefined {\n const align = this.styles.resolve(container, this.styleEpoch).inherited['textAlign'];\n return ALONG_A_LINE[align as string];\n }\n\n /**\n * A box's part in that: the container of lines and nothing else is the row itself. A line\n * among blocks is a line box, which `lineBox` sets its boxes along.\n */\n private alignLine(node: EngineNode, props: Record<string, unknown>): void {\n if (node.flow?.plan.kind !== 'lines') return;\n const along = this.alongLine(node);\n if (along) props['justifyContent'] = along;\n }\n\n /**\n * The line box `first` starts in `container`: the one it has, or a new one with no view yet.\n * A line box is a view of its container's, so in another container it is another one, and so\n * is the one of a first box that has been made again.\n */\n private lineOf(container: EngineNode, first: EngineNode): LineBox {\n if (first.line?.in !== container) {\n first.line = { handle: null, top: 0, handles: [], in: container };\n }\n return first.line;\n }\n\n /**\n * A flex container's children in the order their `order` gives, as written among equals. A\n * block lays its children out as written whatever they say, and text in the container has no\n * order of its own.\n */\n private inOrder(node: EngineNode, handles: FabricNode[]): FabricNode[] {\n if (!node.ordered || isBlockContainer(readStyle(node, 'display'))) return handles;\n const orders = new Map<FabricNode, number>();\n for (const child of node.childList) {\n const order = child.committed && Number(readStyle(child, 'order') ?? 0);\n if (order) orders.set(child.committed!.handle, order);\n }\n if (!orders.size) return handles;\n return handles\n .map((handle, i) => ({ handle, order: orders.get(handle) ?? 0, i }))\n .sort((a, b) => a.order - b.order || a.i - b.i)\n .map((each) => each.handle);\n }\n\n /**\n * The paragraph a run of text written straight into a view is drawn in, or nothing for a run of\n * whitespace, which a browser draws nothing for between the items of a flex box either.\n *\n * It is the text's own, kept on the text node, and no part of the tree: its parent is the view,\n * so it inherits what the view's text would, and no rule matches it.\n */\n /**\n * A run of text under `parent`, which commits as `viewName`: the text itself inside a text, a\n * paragraph of its own inside any other view, and nothing where the view takes its text as a\n * prop (see `ViewNameOptions`) or the run is whitespace between a view's children.\n */\n private reconcileText(\n parent: EngineNode,\n text: EngineNode,\n viewName: string,\n context?: object,\n ): FabricNode | null {\n if (TEXT_CONTENT_PROPS[viewName] !== undefined) return null;\n if (viewName === PARAGRAPH || viewName === VIRTUAL_TEXT) {\n // Under a text element, the paragraph it had in a view is done with. Under that paragraph\n // itself, which is where a loose run is committed, it is the one to keep.\n if (text.box && text.box !== parent) text.box = undefined;\n return this.reconcileUnder(parent, text, context);\n }\n const box = this.looseText(parent, text, LOOSE_TEXT[viewName]);\n return box ? this.reconcileUnder(parent, box, context) : null;\n }\n\n /**\n * A run of text beside a box in a line, as the paragraphs of its words: a browser breaks the\n * line between any two of them, and what follows the run is where its last word ends. One\n * paragraph is a box as wide as its longest line, with the next box under all of it.\n */\n private reconcileWords(parent: EngineNode, text: EngineNode, context?: object): FabricNode[] {\n if (text.box?.committed) this.forgetCommitted(text.box);\n text.box = undefined;\n return this.wordBoxes(parent, text).map((box) => this.reconcileUnder(parent, box, context));\n }\n\n /** The paragraph of each word of a run, kept for the word in its place while there is one. */\n private wordBoxes(parent: EngineNode, text: EngineNode): EngineNode[] {\n const at = parent.childList.indexOf(text);\n const words = wordsOf(text.nodeText, at > 0, at < parent.childList.length - 1);\n const boxes = (text.words ??= []);\n for (const gone of boxes.splice(words.length)) if (gone.committed) this.forgetCommitted(gone);\n words.forEach((word, i) => {\n const box = (boxes[i] ??= this.wordBox());\n box.parent = parent;\n if (truncationMoved(box, parent)) box.propsDirty = true;\n const run = box.childList[0]!;\n if (run.nodeText !== word) this.setText(run, word);\n });\n this.clearFlags(text);\n return boxes;\n }\n\n private wordBox(): EngineNode {\n const box = new RetainedNode('element', 'text', this);\n box.anonymous = true;\n const run = new RetainedNode('text', '', this);\n run.parent = box;\n box.childList = [run];\n return box;\n }\n\n /** The box a run of loose text is drawn by: the one it has, or one made for the element. */\n private boxFor(text: EngineNode, drawnBy: string): EngineNode {\n // One made for another element, before the view was registered again, is done with.\n if (text.box && text.box.tag !== drawnBy) {\n if (text.box.committed) this.forgetCommitted(text.box);\n text.box = undefined;\n }\n if (text.box) return text.box;\n const box = new RetainedNode('element', drawnBy, this);\n box.anonymous = true;\n box.childList = [text];\n text.box = box;\n return box;\n }\n\n private looseText(parent: EngineNode, text: EngineNode, drawnBy = 'text'): EngineNode | null {\n for (const word of text.words ?? []) if (word.committed) this.forgetCommitted(word);\n text.words = undefined;\n if (!trimEnds(text.nodeText)) return null;\n const box = this.boxFor(text, drawnBy);\n box.parent = parent;\n // Merged before the view is, so the view's truncation is read here: see `truncatedAs`.\n if (truncationMoved(box, parent)) box.propsDirty = true;\n // The text is not under the box in the tree, so a change to it never marked the box.\n if (!this.isClean(text)) {\n box.subtreeDirty = true;\n // An element that says its words as a prop is merged again for them.\n if (drawnBy !== 'text') box.propsDirty = true;\n // Nor had it merged again where the text became one word, or stopped being one.\n if (box.oneWord !== undefined && unbroken(box) !== box.oneWord) box.propsDirty = true;\n }\n return box;\n }\n\n /** Remember an iOS modal host committed as showing, so hiding it waits for `topDismiss`. */\n private notePresented(node: EngineNode, viewName: string): void {\n if (viewName !== MODAL_HOST || node.props['visible'] === false) return;\n if (platformOS === 'ios') node.presented = true;\n }\n\n /**\n * Whether a child is left out of its parent's commit: a modal host whose `visible` is false.\n *\n * The native host covers the screen and takes every touch whether or not it presents anything,\n * which is why React Native's Modal.js renders null while hidden. This is the same thing, so a\n * hidden `<modal>` leaves the screen under it usable. On iOS a modal that was showing stays\n * committed, with `visible` false, until native reports `topDismiss`: Modal.js keeps it that\n * long so the dismissal animates and `(dismiss)` fires. Android drops it at once, as Modal.js\n * does there.\n *\n * A withheld host is unmounted, and Fabric drops an unmounted view's event target for good\n * (`EventEmitter::setEnabled`), so its committed handles are forgotten and it is created afresh\n * when it is shown again, as Modal.js creates it afresh. Committed again, it ignores every touch.\n */\n private withheld(child: EngineNode): boolean {\n // A box drawn and then hidden is `display: none`, as any element is.\n if (this.generated !== null && isGenerated(child.tag)) {\n return this.undrawn(child) || this.undisplayed(child);\n }\n if (this.undisplayed(child)) return true;\n if (child.props['visible'] !== false || child.presented) return false;\n if (viewNameOf(child) !== MODAL_HOST) return false;\n if (child.committed) this.forgetCommitted(child);\n return true;\n }\n\n /**\n * Whether an element is `display: none`, which has no box and so no view, nor has anything\n * in it. A view that is committed and not displayed looks the same, but Yoga marks one as\n * laid out each time it measures what holds it, and React Native clears the mark only where it\n * reads that parent's layout: a debug build stops at the mark, on a later commit that has the\n * parent's layout already. Shown again it is made again, as an element put back in the tree\n * is: what its views held of their own, a scroll offset, is not kept.\n */\n private undisplayed(child: EngineNode): boolean {\n if (child.nodeKind !== 'element') return false;\n this.styles.resolve(child, this.styleEpoch);\n if (ownLayout(child, 'display') !== 'none') return false;\n if (child.committed) {\n this.forgetCommitted(child);\n // A field in it has no view to send its blur from. Blurred once this commit is done: a\n // `:focus` rule that hid it then no longer holds, and the commit that follows shows it.\n if (isWithin(this.focusedNode, child)) this.blurAfterCommit = true;\n }\n settlePaths(child);\n return true;\n }\n\n /**\n * Whether a generated box is one no rule draws, which has no view. A view that is not\n * displayed would do for what is seen, but Yoga marks one as laid out each time it measures\n * what holds it, as `undisplayed` says. An element holds two of these for every rule that could\n * draw it one.\n */\n private undrawn(box: EngineNode): boolean {\n if (this.ruleStyle(box) !== NOT_GENERATED) {\n this.writeContent(box);\n return false;\n }\n if (box.committed) this.forgetCommitted(box);\n return true;\n }\n\n /**\n * The words a generated box's `content` writes, as the text the box holds: a label a library\n * hangs on an element by its `::before`. Read as the box is about to be committed, which is\n * when its rules are known, and before what it holds is.\n */\n private writeContent(box: EngineNode): void {\n const content = this.styles.resolve(box, this.styleEpoch).style['content'];\n const words = typeof content === 'string' ? content : '';\n const text = box.childList[0];\n if ((text?.nodeText ?? '') === words) return;\n if (!text) this.appendChild(box, this.createText(words));\n else if (words) this.setText(text, words);\n else this.removeChild(box, text);\n }\n\n /**\n * Whether a node hoisted into `target` is not displayed where it was written: it, or a box\n * between it and the child of `target` it was written in. That child is asked before this is.\n */\n private undisplayedUnder(target: EngineNode, written: EngineNode): boolean {\n for (let at: EngineNode | null = written; at && at.parent !== target; at = at.parent) {\n if (!this.undisplayed(at)) continue;\n if (written.committed) this.forgetCommitted(written);\n return true;\n }\n return false;\n }\n\n /**\n * `reconcileChildren` for a node other nodes hoist into: its own children, each followed by\n * the hoisted nodes written inside it, then those written in it directly, then the views it\n * keeps for hoisted nodes that are gone.\n */\n private reconcileHoistTarget(node: EngineNode, context: object | undefined): FabricNode[] {\n const handles: FabricNode[] = [];\n const hoisted = this.hoistedInto(node);\n const landed = new Set<string>();\n // One written directly in the node goes after its siblings: a page writes its header first,\n // and UIKit collapses a large title against the scroll view down the screen's first subviews,\n // which RNS keeps clear by never letting the header config be the first.\n const direct: EngineNode[] = [];\n for (const child of node.childList) {\n const taken = this.takenByTarget(node, child, context);\n if (taken === null) continue;\n if (taken === 'direct') direct.push(child);\n else handles.push(taken);\n const moved = hoisted?.get(child);\n for (const written of moved ?? []) {\n if (!this.undisplayedUnder(node, written)) handles.push(this.land(node, written, landed));\n }\n }\n for (const child of direct) handles.push(this.land(node, child, landed));\n if (node.kept) this.standIn(node, landed, handles);\n return handles;\n }\n\n /**\n * What a hoist target takes of a child written in it: the child's handle, `direct` for one\n * hoisted into it, which goes after its siblings, or null for none.\n */\n private takenByTarget(\n node: EngineNode,\n child: EngineNode,\n context: object | undefined,\n ): FabricNode | 'direct' | null {\n if (this.hoisted.has(child)) {\n if (this.committedElsewhere(child) || this.withheld(child)) return null;\n return 'direct';\n }\n const clean = this.cleanUnder(node, child, context);\n if (clean) return clean;\n if (child.nodeKind === 'anchor' || this.withheld(child)) return null;\n return this.reconcileUnder(node, child, context);\n }\n\n /**\n * `reconcileHoistTarget` for a node that commits only what is hoisted into it\n * (`HoistOptions.only`): those nodes, in the order they were written, and none of its own.\n */\n private reconcileOnlyHoisted(node: EngineNode): FabricNode[] {\n const handles: FabricNode[] = [];\n const hoisted = this.hoistedInto(node);\n const landed = new Set<string>();\n for (const child of node.childList) {\n if (child.nodeKind === 'anchor' || this.committedElsewhere(child) || this.withheld(child)) {\n continue;\n }\n if (this.hoisted.has(child)) {\n handles.push(this.land(node, child, landed));\n continue;\n }\n for (const written of hoisted?.get(child) ?? []) {\n if (!this.undisplayedUnder(node, written)) handles.push(this.land(node, written, landed));\n }\n // Not committed, so the marks a change left on the way down to it are cleared here.\n settlePaths(child);\n }\n if (node.kept) this.standIn(node, landed, handles);\n return handles;\n }\n\n /**\n * A child's handle as a child of `parent`, created again when it was committed under another.\n *\n * Native gives a view one parent for as long as it lives: `ShadowNodeFamily::setParent`\n * asserts it in a debug build, and a release build keeps the first parent and measures and lays\n * the view out against the wrong ancestry. A node Angular moves - content projected into a\n * container that was mounted again, a scroll view Android wraps in its swipe layout - is\n * therefore created afresh, with everything under it, as React creates an element that moves.\n * Its native state goes with it, as it would there.\n */\n private reconcileUnder(\n parent: EngineNode | LineBox,\n child: EngineNode,\n context?: object,\n ): FabricNode {\n if (child.committed && child.committedUnder !== parent) this.forgetCommitted(child);\n const handle = this.stillCommitted(child, context) ?? this.reconcile(child);\n child.committedUnder = parent;\n return handle;\n }\n\n /**\n * A node whose native view is no longer the one it was created as is created again: a text\n * element that came to hold a view, or stopped. A clone keeps the view it was made as.\n */\n private forgetRenamed(node: EngineNode, viewName: string): void {\n if (node.committed && node.committed.viewName !== viewName) this.forgetCommitted(node);\n }\n\n /**\n * Let a node and everything under it be created again at the next commit. The views it keeps\n * for hoisted names go too: they are children of the native view it is losing.\n */\n private forgetCommitted(node: EngineNode): void {\n node.committed = null;\n node.committedUnder = null;\n // Another view, with another tag, which no graph has set anything on.\n if (node.owned) this.disown(node);\n node.styleCommitted = null;\n node.kept = undefined;\n // Its content view goes with the scroll view: made again, the two are made together.\n node.inside = undefined;\n // A scroll-driven animation is bound to native views by their tags: its own, and its scroll\n // view's. Made again, each has another, so what drives it starts again with the new ones.\n if (node.scrolled?.drive) this.stopScrolled(node);\n for (const follower of this.scrollTimelines.get(node) ?? []) {\n this.stopScrolled(follower);\n this.markProps(follower, false);\n }\n if (node.box || node.words) this.forgetParagraphs(node);\n for (const child of node.childList) {\n // A line box is a view of this node's, which it is losing: the box that starts one starts\n // another. A box made again on its own keeps the line box it is in.\n child.line = undefined;\n if (child.committed || child.box || child.words) this.forgetCommitted(child);\n }\n }\n\n /** The paragraphs a run of text is drawn in, let go with it: see `paragraphsOf`. */\n private forgetParagraphs(text: EngineNode): void {\n if (text.box?.committed) this.forgetCommitted(text.box);\n for (const word of text.words ?? NO_WORDS) if (word.committed) this.forgetCommitted(word);\n }\n\n /** A hoisted node, which commits into an ancestor further up than the parent it is in. */\n private committedElsewhere(child: EngineNode): boolean {\n return this.hoisted.has(child) && this.hoistsAbove(child);\n }\n\n /**\n * Reconcile a hoisted element committing into `target`, into the native view `target` already\n * keeps for its name when it has one (`HoistOptions.standIn`), and keep the view it commits as.\n */\n private land(target: EngineNode, child: EngineNode, landed: Set<string>): FabricNode {\n if (!STAND_INS[child.tag]) return this.reconcileUnder(target, child);\n const kept = target.kept?.get(child.tag);\n if (kept && kept.node !== child && child.committed === null && !isWithin(kept.node, target)) {\n // A node taken out without being destroyed would otherwise come back holding this tag too.\n if (kept.node) kept.node.committed = null;\n child.committed = kept.committed;\n child.propsDirty = true;\n }\n const handle = this.reconcile(child);\n child.committedUnder = target;\n (target.kept ??= new Map()).set(child.tag, { node: child, committed: child.committed! });\n landed.add(child.tag);\n return handle;\n }\n\n /**\n * Commit the stand-in props onto every view `target` keeps whose element is gone, on the view\n * itself so the native side sees an update rather than a removal.\n */\n private standIn(target: EngineNode, landed: Set<string>, handles: FabricNode[]): void {\n for (const [name, kept] of target.kept!) {\n if (landed.has(name)) continue;\n if (kept.node) {\n const props = {\n ...DEFAULT_PROPS[registeredViewName(name) ?? DEFAULT_VIEW],\n ...STAND_INS[name],\n };\n const payload = diffProps(kept.committed.props, props);\n const handle = this.clone(\n kept.committed.handle,\n payload && this.processed(payload, true),\n [],\n );\n kept.committed = { ...kept.committed, handle, props, childHandles: [] };\n kept.node = null;\n }\n handles.push(kept.committed.handle);\n }\n }\n\n /**\n * A clean child's handle under `parent`, before anything else is asked of it: one committed\n * there and unchanged since was displayed, in its place, and is still. The siblings of what\n * changed are most of what a commit steps over: a page of examples one of which ticks.\n */\n private cleanUnder(\n parent: EngineNode,\n child: EngineNode,\n context: object | undefined,\n ): FabricNode | null {\n if (child.nodeKind !== 'element' || child.committedUnder !== parent) return null;\n if (child.fixedTo !== undefined) return null;\n return this.stillCommitted(child, context);\n }\n\n /** A clean child's committed handle, when its style still holds under its parent's. */\n private stillCommitted(child: EngineNode, context: object | undefined): FabricNode | null {\n const committed = child.committed;\n if (\n committed === null ||\n context === undefined ||\n child.propsDirty ||\n child.structureDirty ||\n child.subtreeDirty\n ) {\n return null;\n }\n if (child.nodeKind === 'text') return committed.handle;\n const holds = child.styleCache === child.styleCommitted && this.styles.holds(child, context);\n return holds ? committed.handle : null;\n }\n\n /**\n * The hoisted nodes that commit as direct children of `node`, keyed by the child of `node` each\n * was written inside. Null when there are none, which is nearly always.\n */\n private hoistedInto(node: EngineNode): Map<EngineNode, EngineNode[]> | null {\n let found: Map<EngineNode, EngineNode[]> | null = null;\n for (const candidate of this.hoisted) {\n if (candidate.parent === node || HOISTS[candidate.tag] !== node.tag) continue;\n let written: EngineNode = candidate;\n let above = candidate.parent;\n while (above && above !== node && above.tag !== node.tag) {\n if (HOIST_STOPS[candidate.tag]?.has(above.tag)) break;\n written = above;\n above = above.parent;\n }\n if (above !== node) continue;\n found ??= new Map();\n const list = found.get(written);\n if (list) list.push(candidate);\n else found.set(written, [candidate]);\n }\n return found;\n }\n\n /** Whether a hoisted node commits further up than the parent it was written in. */\n private hoistsAbove(node: EngineNode): boolean {\n const target = HOISTS[node.tag];\n if (node.parent?.tag === target) return false;\n for (let above = node.parent; above; above = above.parent) {\n if (above.tag === target) return true;\n if (HOIST_STOPS[node.tag]?.has(above.tag)) return false;\n }\n return false;\n }\n\n private create(\n node: EngineNode,\n viewName: string,\n props: Record<string, unknown>,\n childHandles: FabricNode[],\n ): FabricNode {\n if (this.dev) {\n this.checkClaimed(node);\n this.checkKnown(node);\n }\n const tag = nextTag();\n if (this.notesMoves)\n (node.nodeKind === 'element' ? this.movedBoxes : this.grownBoxes).add(node);\n this.stats.createdNodes++;\n // instanceHandle is the retained node itself: it is what Fabric hands back on events.\n const handle = this.fabric.createNode(\n tag,\n viewName,\n this.rootTag,\n this.processed(props, false),\n node,\n );\n for (const child of childHandles) this.fabric.appendChild(handle, child);\n node.committed = { handle, tag, props, childHandles, viewName };\n node.bornIn = this.stats.commits;\n this.clearFlags(node);\n return handle;\n }\n\n /**\n * Angular's own unknown-element check does not run in this pipeline, so a `<text>` in a\n * template that never imported `Text` compiles, draws without the component, and looks like a\n * layout bug. On the first commit of any known element with no component behind it, say so.\n */\n private checkClaimed(node: EngineNode): void {\n // The paragraph the engine wraps loose text in is its own: no template wrote it.\n if (node.nodeKind !== 'element' || node.claimed || node.anonymous) return;\n if (!PRIMITIVE_NAMES.has(node.tag)) return;\n if (this.reported.has(node.tag)) return;\n this.reported.add(node.tag);\n console.error(\n `[angular-native] <${node.tag}> is used in a template that does not import ` +\n `${className(node.tag)}. Add it to the component's \\`imports\\` from ` +\n `'@ng-native/components'; without it the element has none of the component's inputs ` +\n `or behavior, so a prop written on it stays the text it was written as.`,\n );\n }\n\n /**\n * The misspelt-prop check. Angular's own \"Can't bind to\" check needs a DOM to run, so a\n * `[numberofLines]` on a `<text>`, or a static `iosBackgroundColor` on a `<switch>`, went to\n * native as a prop no view reads, and nothing said so. A prop on a host primitive that its\n * component did not declare is reported once per element name and prop, with the declared name\n * it most likely meant when there is one.\n */\n private readonly undefinedTokens = new Set<string>();\n\n /** Said once per name: a phone has no inspector to show the declaration struck out. */\n private reportUndefinedToken(name: string, props: readonly string[], on?: string): void {\n if (this.undefinedTokens.has(name)) return;\n this.undefinedTokens.add(name);\n // A bound declaration has no rule to be found by, so it says which element it is on.\n const where = on === undefined ? props.join(', ') : `${props.join(', ')}, bound on <${on}>,`;\n console.warn(\n `[angular-native] var(${name}) in ${where} names a custom property nothing in` +\n ` scope defines, so the declaration is dropped, as a browser drops it. Define ${name} on` +\n ` :root or an ancestor, or give the var() a fallback.`,\n );\n }\n\n private readonly droppedDeclarations = new Set<string>();\n\n /**\n * A declaration in a style, written or bound, that is no value its property takes, so it is\n * dropped as a browser drops it. Said once per element name and declaration, in development.\n */\n reportDroppedDeclaration(prop: string, value: string, on: string, why: string): void {\n const report = `${on} ${prop}: ${value}`;\n if (!this.dev || this.droppedDeclarations.has(report)) return;\n this.droppedDeclarations.add(report);\n console.warn(\n `[angular-native] ${prop}: ${value}, in a style on <${on}>, is no value ${prop} takes:` +\n ` ${why}. The declaration is dropped, as a browser drops it.`,\n );\n }\n\n private readonly unreadDisplays = new Set<string>();\n\n /**\n * Said once per token and value: the compiler refuses `display: grid` written out, but a token\n * is only known here, and without this the view lays out as flex with nothing said.\n */\n private reportUnreadDisplay(name: string, value: string | undefined): void {\n const report = `${name} ${value}`;\n if (this.unreadDisplays.has(report)) return;\n this.unreadDisplays.add(report);\n console.warn(\n `[angular-native] display: var(${name}) is ${value ?? 'no keyword'}, which is no display` +\n ` native has, so display is unset and the view lays out as flex. Native has flex, none` +\n ` and contents, and reads block, inline, inline-block, flow-root and inline-flex as flex.`,\n );\n }\n\n private checkProps(node: EngineNode): void {\n if (!node.claimed || !PRIMITIVE_NAMES.has(node.tag)) return;\n const declared = DECLARED_PROPS.get(node.tag);\n if (!declared) return;\n for (const key of Object.keys(node.props)) {\n if (this.isDeclared(declared, key, node.props[key])) continue;\n const report = `${node.tag} ${key}`;\n if (this.reported.has(report)) continue;\n this.reported.add(report);\n const meant = [...declared].find((name) => name.toLowerCase() === key.toLowerCase());\n console.warn(\n `[angular-native] <${node.tag}> has no prop '${key}', so native ignores it.` +\n (meant ? ` Did you mean '${meant}'?` : '') +\n ` Check the spelling against the ${className(node.tag)} page, or declare it with` +\n ` declareNativeProps('${node.tag}', ['${key}']) if the native view does read it.`,\n );\n }\n }\n\n private isDeclared(declared: Set<string>, key: string, value: unknown): boolean {\n return (\n declared.has(key) ||\n ENGINE_PROPS.has(key) ||\n this.declaredAttributes.has(key) ||\n // A forms directive's input has a report of its own, naming the import it is missing.\n isFormsInput(key) ||\n key.includes('-') ||\n // A bare marker attribute, `<text listHeader>`, is there for a selector to match.\n value === ''\n );\n }\n\n /**\n * Element names some template's directives select by tag: every component with an element\n * selector, and directives such as Angular's `router-outlet` that own an element without\n * hosting a component. Declared by the platform adapter, which sees each template's directive\n * registry as the component is created.\n */\n private readonly declaredElements = new Set<string>();\n\n /** An element name a directive or component selects, and so is not a typo. */\n declareElement(name: string): void {\n this.declaredElements.add(name);\n }\n\n /**\n * Attribute names that belong to Angular rather than to a native view: what a directive selects\n * on or takes as an input, and what a component's `<ng-content select>` projects by. Angular\n * writes a static attribute to the node whatever consumes it, so without these a\n * `nativeRouterLink` or a `listHeader` marker would read as a misspelt prop. See `checkProps`.\n */\n private readonly declaredAttributes = new Set<string>();\n\n declareAttribute(name: string): void {\n this.declaredAttributes.add(name);\n }\n\n /**\n * The typo check. The set a name is looked up in is app-wide rather than per template, so a\n * directive imported in one template also quiets its name in another that forgot it. That is\n * the trade for not holding a registry per component, and the typo is the case that matters.\n */\n private checkKnown(node: EngineNode): void {\n if (node.nodeKind !== 'element' || node.componentHost || node.tag in VIEW_NAMES) return;\n if (this.declaredElements.has(node.tag) || this.reported.has(node.tag)) return;\n // A generated box is the engine's own, for a rule: nobody misspelt it.\n if (isGenerated(node.tag)) return;\n this.reported.add(node.tag);\n console.error(\n `[angular-native] <${node.tag}> is not a known element: no component, directive or ` +\n `registered native view claims it, so it renders as an empty view. Check the spelling, ` +\n `or import the component that owns it.`,\n );\n }\n\n // --- responder system -------------------------------------------------\n\n private readonly responders = new WeakMap<EngineNode, ResponderHandlers>();\n private currentResponder: EngineNode | null = null;\n\n /** Register a node as a candidate responder. Returns an unsubscribe. */\n setResponder(node: EngineNode, handlers: ResponderHandlers): () => void {\n this.registerEventHandler();\n this.responders.set(node, handlers);\n // A fade native is playing was given to it as a view that takes no touch fades: to\n // nothing. From here it is eased to where the view is committed.\n const fade = node.transitions?.get('opacity')?.native;\n if (fade) this.backToScriptEased(node, fade, this.now());\n this.keepNative(node, true);\n // What it is committed with can hang on whether it takes a touch: see `stillTouched`.\n this.markProps(node);\n return () => {\n this.responders.delete(node);\n this.keepNative(node, false);\n this.markProps(node);\n if (this.currentResponder !== node) return;\n // Torn down under the finger: no release is coming, so the chain it marked is cleared\n // here or it stays `:active` for good.\n const changed = this.setActiveChain(node, false);\n this.tellNative(node, false);\n this.currentResponder = null;\n if (changed) this.commit();\n };\n }\n\n /**\n * Keep a native view for this node, or stop keeping one.\n *\n * Fabric flattens a view whose props say nothing visual and nothing interactive: no native view\n * is created and its layout is folded into the parent. Responders live here, in JavaScript, and\n * Fabric cannot see them - so a transparent touch-catcher looks exactly like a view worth\n * flattening, and gets flattened, and never receives the touch it exists to catch.\n *\n * That is a popover that will not close. The full-screen catcher over the app has no background\n * and nothing else on it; the dialog's backdrop survived the same treatment only because\n * `bg-black/50` happened to make it visual.\n *\n * Only plain views: flattening is `ViewShadowNode`'s, so a paragraph, a scroll view or a text\n * input is already a native view and marking it would be a prop on every text node in the tree\n * that buys nothing.\n *\n * A floor rather than an override: `collapsable=\"true\"` written on an element is left alone,\n * because someone who writes it means it.\n */\n private keepNative(node: EngineNode, keep: boolean): void {\n if (viewNameOf(node) !== DEFAULT_VIEW) return;\n if (keep) {\n if (node.props['collapsable'] === undefined) this.setProp(node, 'collapsable', false);\n return;\n }\n if (node.props['collapsable'] === false) this.setProp(node, 'collapsable', null);\n }\n\n /**\n * A view command, by name: `focus` and `blur` on a text input, `scrollTo` on a scroll view.\n * Fabric addresses the committed shadow node, so a node that has not reached a commit yet has\n * nothing to receive it and the call is dropped.\n */\n dispatchCommand(node: EngineNode, name: string, args: readonly unknown[] = []): void {\n const handle = node.committed?.handle;\n if (handle && this.fabric.dispatchCommand) this.fabric.dispatchCommand(handle, name, args);\n }\n\n /**\n * Where a node is, in window coordinates.\n *\n * `(layout)` reports a frame in the parent's coordinates, which sizes a view and says nothing\n * about where it is relative to anything else. This is what an anchored overlay needs: a\n * popover and its trigger live in different parts of the tree and can only be compared in the\n * window's frame.\n *\n * The callback is the platform's own shape rather than a promise, and on the new architecture\n * it fires before this returns - so a caller that needs the value immediately can capture it,\n * and one that does not is unaffected if that ever changes.\n *\n * Silent when the node has never been committed, or when the host has no `measureInWindow`.\n * Reporting zeroes would be worse than reporting nothing: a zero frame is a position, and an\n * overlay would believe it and place itself in the corner.\n */\n /**\n * A node's box as it is laid out, with no transform on it or above it: nothing where it has\n * not been committed, or on a host that cannot say. `measure` answers where it is drawn,\n * which is smaller for a panel scaling in.\n */\n layoutOf(node: EngineNode): WindowFrame | undefined {\n const box = this.boxOf(node);\n return box && { x: box[0], y: box[1], width: box[2], height: box[3] };\n }\n\n /**\n * Where a node is, in window coordinates.\n *\n * `(layout)` reports a frame in the parent's coordinates, which sizes a view and says nothing\n * about where it is relative to anything else. This is what an anchored overlay needs: a\n * popover and its trigger live in different parts of the tree and can only be compared in the\n * window's frame.\n *\n * The callback is the platform's own shape rather than a promise, and on the new architecture\n * it fires before this returns - so a caller that needs the value immediately can capture it,\n * and one that does not is unaffected if that ever changes.\n *\n * Silent when the node has never been committed, or when the host has no `measureInWindow`.\n * Reporting zeroes would be worse than reporting nothing: a zero frame is a position, and an\n * overlay would believe it and place itself in the corner.\n */\n measure(node: EngineNode, into: (frame: WindowFrame) => void): void {\n const handle = node.committed?.handle;\n if (handle) this.measureHandle(handle, into);\n }\n\n /** `measure` for a committed view by its handle, which a node's own may not be. */\n private measureHandle(handle: FabricNode, into: (frame: WindowFrame) => void): void {\n this.fabric.measureInWindow?.(handle, (x, y, width, height) => into({ x, y, width, height }));\n }\n\n /**\n * The react tag a node was committed with, or null if it has never reached a commit.\n *\n * This is what the native animation driver writes to: `connectAnimatedNodeToView` takes a tag,\n * and `findNodeHandle` hands a number straight back, so an animated graph can point at one of\n * our nodes without a React instance existing anywhere.\n */\n tagOf(node: EngineNode): number | null {\n return node.committed?.tag ?? null;\n }\n\n /**\n * The shadow node Fabric currently holds for a node, or null before its first commit.\n *\n * A clone-on-write tree hands back a different object every time a node's props change, so\n * this is not an identity. What is stable is the family behind it, which is what native keys a\n * node by, and is why a UI-thread animation given one of these keeps writing to the right view\n * however many times the node is cloned afterwards.\n */\n shadowNodeOf(node: EngineNode): FabricNode | null {\n return node.committed?.handle ?? null;\n }\n\n /** The node currently owning the gesture, if any. */\n get responder(): EngineNode | null {\n return this.currentResponder;\n }\n\n /**\n * The node native last reported focused, if any: the text input the keyboard belongs to.\n *\n * Checked against the tree rather than trusted, because a focused node that outlives its view\n * is not a stale style - it is every tap in the application being swallowed. Every scroll view\n * reads this on every touch to decide whether the touch means \"dismiss the keyboard\", and one\n * that decides yes *captures* the touch before any child sees it. So a field left focused after\n * its view is gone makes the whole app untappable until it is restarted.\n *\n * Neither teardown hook can be relied on to clear it. `removeChild` unlinks the subtree's root\n * and leaves everything under it pointing at its own parent, so a focused descendant still looks\n * attached; and Angular calls `destroyNode` for the nodes it tracks, not for every node in a\n * removed subtree. An overlay closing with a field inside it misses both.\n *\n * So it is answered by looking: a node still in the tree reaches the root by walking up. That\n * costs the depth of one node, on a touch, and only while something is focused.\n */\n get focused(): EngineNode | null {\n if (this.focusedNode && !this.isAttached(this.focusedNode)) this.dropFocus();\n return this.focusedNode;\n }\n\n /** Whether a node is still part of the tree, rather than in a subtree that was removed. */\n private isAttached(node: EngineNode): boolean {\n let current: EngineNode | null = node;\n while (current) {\n if (current === this.root) return true;\n current = current.parent;\n }\n return false;\n }\n\n /** The host's `resolveAssetSource`, for a component that needs an asset's size up front. */\n resolveAsset(value: unknown): unknown {\n return this.resolveAssetSource(value);\n }\n\n /** A colour prop as `processed` sends it: one dropped as unreadable is null on an update. */\n private colourProp(key: string, value: unknown, update: boolean): unknown {\n const painted = this.painted(key, value);\n return painted === undefined && update ? null : painted;\n }\n\n /**\n * A colour prop as native takes it. A shape's `fill` or `stroke` the cascade settled from a\n * token is the solid brush react-native-svg takes, `none` no paint at all, and one the host\n * reads no colour in no paint of the shape's own.\n */\n private painted(key: string, value: unknown): unknown {\n if (!BRUSH_PROPS.has(key)) return this.color(value);\n // Already a brush, as the icon wrote it: only one the cascade settled is still text. An\n // icon's solid brush holds whatever the host read, which is nothing for an unreadable colour.\n if (typeof value !== 'string') return emptyBrush(value) ? undefined : value;\n if (value === 'none') return null;\n // A colour the host cannot read is dropped, as a browser drops it: a solid brush with no\n // colour in it stops the app.\n const payload = this.color(value);\n return payload == null ? undefined : { type: 0, payload };\n }\n\n /**\n * The host's `processColor`, and the one place a platform colour becomes one.\n *\n * Props are processed by name - anything ending in `color` - which covers every colour that is\n * a prop. A colour *nested* inside a prop native parses itself is invisible to that rule: a tab\n * bar's appearance carries eight of them, and unprocessed they arrive as strings native reads\n * as nothing at all. So this is public, and the commit walk uses it too.\n *\n * `platform-color(label)` cannot be resolved at build time - the same declaration is\n * `{semantic}` on iOS and `{resource_paths}` on Android - so the names travel and the shape is\n * put on here. `processColor` understands both, exactly as it does for RN's own `PlatformColor`.\n */\n color(value: unknown): unknown {\n if (value === undefined) return undefined;\n\n const names = (value as { platformColor?: readonly string[] })?.platformColor;\n if (!names) return this.processColor(value as string | number);\n\n const key = nativePlatform() === 'android' ? 'resource_paths' : 'semantic';\n return this.processColor({ [key]: [...names] } as never);\n }\n\n /** Root-first, so a capture pass reads forwards and a bubble pass reads backwards. */\n private pathTo(node: EngineNode): EngineNode[] {\n const path: EngineNode[] = [];\n for (let current: EngineNode | null = node; current; current = current.parent)\n path.push(current);\n return path.reverse();\n }\n\n private negotiate(\n target: EngineNode,\n event: ResponderEvent,\n phase: 'Start' | 'Move',\n ): EngineNode | null {\n const path = this.pathTo(target);\n const capture = `on${phase}ShouldSetResponderCapture` as const;\n const bubble = `on${phase}ShouldSetResponder` as const;\n\n // Capture runs root -> target, so an ancestor can claim before its children see it.\n for (const node of path) {\n if (this.responders.get(node)?.[capture]?.(event, target)) return node;\n }\n // Bubble runs target -> root: the innermost interested node wins.\n for (let i = path.length - 1; i >= 0; i--) {\n if (this.responders.get(path[i]!)?.[bubble]?.(event, target)) return path[i]!;\n }\n return null;\n }\n\n private grant(node: EngineNode, event: ResponderEvent): void {\n const previous = this.currentResponder;\n if (previous === node) return;\n\n if (previous) {\n const handlers = this.responders.get(previous);\n // An undefined handler means \"yes\": RN's default is to allow the takeover.\n if (handlers?.onResponderTerminationRequest?.(event) === false) return;\n this.tellNative(previous, false);\n handlers?.onResponderTerminate?.(event);\n }\n\n // After the takeover is agreed, not before: a refusal would otherwise leave `:active` on a\n // node that never became the responder. Both calls run, so neither is short-circuited away.\n const cleared = this.setActiveChain(previous, false);\n const marked = this.setActiveChain(node, true);\n\n this.currentResponder = node;\n this.tellNative(node, true);\n this.responders.get(node)?.onResponderGrant?.(event);\n if (cleared || marked) this.commit();\n }\n\n private release(event: ResponderEvent, terminated: boolean): void {\n const node = this.currentResponder;\n if (!node) return;\n const changed = this.setActiveChain(node, false);\n this.currentResponder = null;\n this.tellNative(node, false);\n const handlers = this.responders.get(node);\n // Before the handler is told: what it does is for the render pass after it to commit\n // whole, and not to be drawn part made with the view no longer pressed.\n if (changed) this.commit();\n if (terminated) handlers?.onResponderTerminate?.(event);\n else handlers?.onResponderRelease?.(event);\n }\n\n private tellNative(node: EngineNode, isResponder: boolean): void {\n const handle = node.committed?.handle;\n if (!handle || !this.fabric.setIsJSResponder) return;\n const asked = this.responders.get(node)?.blockNativeResponder ?? false;\n // And for a drag an element's `touch-action` keeps from the page: see `holdSwipe`.\n const block = asked || this.drag?.held === true || this.dragKept;\n this.fabric.setIsJSResponder(handle, isResponder, block);\n }\n\n /** Runs before listener propagation, as React's responder plugin does. */\n private runResponder(target: EngineNode, type: string, event: ResponderEvent): void {\n if (type === TOUCH_START) {\n const elected = this.negotiate(target, event, 'Start');\n if (elected) this.grant(elected, event);\n return;\n }\n if (type === TOUCH_MOVE) {\n if (this.currentResponder) {\n this.responders.get(this.currentResponder)?.onResponderMove?.(event);\n } else {\n const elected = this.negotiate(target, event, 'Move');\n if (elected) this.grant(elected, event);\n }\n return;\n }\n if (type === TOUCH_END) this.release(event, false);\n else if (type === TOUCH_CANCEL) this.release(event, true);\n }\n\n // --- events -----------------------------------------------------------\n\n private registerEventHandler(): void {\n if (this.eventsRegistered || !this.fabric.registerEventHandler) return;\n this.eventsRegistered = true;\n this.fabric.registerEventHandler((instanceHandle, topLevelType, nativeEvent) =>\n this.dispatchEvent(instanceHandle, topLevelType, nativeEvent),\n );\n }\n\n /**\n * Fabric's `(instanceHandle, topLevelType, nativeEvent)` callback.\n *\n * **Events propagate up the retained tree.** Fabric hands JS only the hit target; React\n * implements two-phase propagation itself by walking the fiber tree, and so must we. Without\n * it a tap on a `<text>` label inside a `<pressable>` reaches the text node and stops, so the\n * button only responds on its padding. That reads as \"taps sometimes do not register\".\n *\n * ponytail: event priority (`unstable_getCurrentEventPriority` and the\n * `unstable_*EventPriority` constants) is read into the facade but not acted on. Angular's\n * zoneless scheduler already flushes on a microtask, which is soon enough for taps. It stops\n * being soon enough for a controlled TextInput, where the echo has to beat the next\n * keystroke. `mostRecentEventCount` covers that today by letting native reject a stale write;\n * a synchronous flush for discrete priority is the fix if it ever stops being enough.\n *\n * **Nothing thrown here may escape.** Fabric calls this synchronously from C++\n * (`UIManagerBinding::dispatchEventToJS`), often from inside a mounting transaction, and a throw\n * unwinds through that transaction: for a screen push the next commit then reads props freed on\n * the way out and the process dies with no JS stack at all. Angular\n * already catches what its own template listeners throw; everything else on this path - the\n * responder handlers, listeners registered on the engine directly, a commit started by a focus\n * change - is caught here and handed to `onError`, which the platform points at the app's\n * `ErrorHandler`. Each listener is guarded on its own, so one that throws does not stop the\n * bubble for the rest, as in the DOM.\n */\n dispatchEvent(instanceHandle: unknown, topLevelType: string, nativeEvent: unknown): void {\n const target = this.guardedTarget(\n instanceHandle as EngineNode | null,\n topLevelType,\n nativeEvent,\n );\n this.trace(target, topLevelType);\n // What has the focus does not take it again: native answering a focus it was told of, where\n // whoever asked has already said so.\n if (topLevelType === 'topFocus' && target !== null && this.focusedNode === target) return;\n\n // Listeners get RN's documented shape, `{nativeEvent}`. Fabric hands us the payload bare;\n // React wraps it in a synthetic event and every RN API is written against `event.nativeEvent`,\n // so handlers ported from RN would silently read undefined otherwise.\n const event = new SyntheticEvent(nativeEvent, target);\n\n try {\n if (topLevelType === 'topDismiss' && target) this.dismissed(target);\n if (topLevelType === 'topScroll' && target && this.scrollTimelines.has(target)) {\n this.measuredScroll(target, nativeEvent);\n }\n this.holdSwipe(target, topLevelType, nativeEvent);\n this.trackFinger(target, topLevelType, nativeEvent);\n this.trackFocus(target, topLevelType);\n if (target) this.cancelPressForScroll(target, topLevelType, event as ResponderEvent);\n if (target) this.runResponder(target, topLevelType, event as ResponderEvent);\n } catch (error) {\n this.reportEventError(error, topLevelType);\n }\n this.propagate(target, topLevelType, event);\n }\n\n /**\n * Where a touch is taken to be, by a package that finds it better than native's hit test: a\n * drawing's shape a browser finds by its box, where native finds none. Asked as a touch\n * starts, and kept for each finger until it lifts, as a touch stays on what it started on.\n */\n private retarget: ((target: EngineNode, nativeEvent: unknown) => EngineNode) | null = null;\n private readonly fingersOn = new Map<unknown, EngineNode>();\n\n /**\n * The target a touch is dispatched to, where a package's retarget runs: nothing it throws may\n * reach native, so a throw is reported and the touch goes to native's own target.\n */\n private guardedTarget(\n hit: EngineNode | null,\n topLevelType: string,\n nativeEvent: unknown,\n ): EngineNode | null {\n try {\n return this.touchTarget(hit, topLevelType, nativeEvent);\n } catch (error) {\n this.reportEventError(error, topLevelType);\n return hit;\n }\n }\n\n /** Say where a touch that starts on a node is taken to be, or nothing to leave it to native. */\n setTouchTarget(\n retarget: ((target: EngineNode, nativeEvent: unknown) => EngineNode) | null,\n ): void {\n this.retarget = retarget;\n this.fingersOn.clear();\n }\n\n private touchTarget(\n target: EngineNode | null,\n type: string,\n nativeEvent: unknown,\n ): EngineNode | null {\n if (!this.retarget || !target || !type.startsWith('topTouch')) return target;\n const finger = (nativeEvent as { identifier?: unknown } | null)?.identifier;\n if (type === TOUCH_START) {\n const taken = this.retarget(target, nativeEvent);\n if (taken === target) this.fingersOn.delete(finger);\n else this.fingersOn.set(finger, taken);\n return taken;\n }\n const taken = this.fingersOn.get(finger) ?? target;\n if (type === 'topTouchEnd' || type === 'topTouchCancel') this.fingersOn.delete(finger);\n return taken;\n }\n\n /** The screen whose swipe back is held off while a finger is on what keeps a sideways drag. */\n private swipeHeld: EngineNode | null = null;\n\n /**\n * Hold a screen's swipe back off for a touch that starts on an element whose `touch-action`\n * keeps a drag to the side for itself, and give it back when the last finger lifts. From iOS\n * 26 the swipe starts anywhere on a screen once a finger has moved a little to the right, and\n * takes the touch from whatever was following it: a slider's thumb stops and the screen\n * leaves. The screen is told before the finger has moved that far.\n */\n private holdSwipe(target: EngineNode | null, type: string, nativeEvent: unknown): void {\n if (type === TOUCH_START) this.holdFrom(target, nativeEvent);\n else if (type === 'topTouchMove') this.settleDrag(nativeEvent);\n else if (type === 'topTouchEnd' || type === 'topTouchCancel') this.releaseSwipe(nativeEvent);\n }\n\n /**\n * A touch on an element that keeps a drag to the side: where it began, and whether native's\n * own gestures are held off for it. Held from the start where the element keeps a drag down\n * the page too (`none`); from the moment the finger sets off across where it leaves that one\n * to the page (`pan-y`), and never for that touch where it sets off down.\n */\n private drag: {\n x: number;\n y: number;\n settled: boolean;\n held: boolean;\n on: EngineNode;\n } | null = null;\n\n private holdFrom(target: EngineNode | null, nativeEvent: unknown): void {\n // A first finger down is a new touch: the last one's end never came where what it was on\n // went from under the finger.\n const fingers = (nativeEvent as { touches?: readonly unknown[] } | null)?.touches?.length;\n if ((this.drag || this.dragKept) && fingers === 1) this.releaseSwipe(null);\n if (this.drag || !target) return;\n const actions = touchActions(target);\n if (!keeps(actions, PANS_ACROSS)) return;\n const all = keeps(actions, PANS_ALONG);\n this.drag = { ...pointOf(nativeEvent), settled: all, held: all, on: target };\n if (all) this.holdScroll(target);\n const screen = this.screenOf(target);\n if (!screen) return;\n this.swipeHeld = screen;\n this.tellScreen(screen);\n }\n\n /** The scroll views whose scrolling is off while a drag over them is an element's own. */\n private readonly scrollHeld = new Set<EngineNode>();\n\n /** Whether a package has kept the drag now under way from the page: see `keepDrag`. */\n private dragKept = false;\n\n /**\n * Keep the drag now under way from the page, as a browser does for a `touchmove` a listener\n * prevented the default of: the scroll view the node is in stops scrolling, and native is told\n * that whoever holds the touch keeps it, until the last finger lifts. Told from a move, a\n * frame or so after native saw it, so a scroll that had already begun stops where it is.\n */\n keepDrag(node: EngineNode): void {\n if (this.dragKept) return;\n this.dragKept = true;\n if (this.currentResponder) this.tellNative(this.currentResponder, true);\n if (!this.scrollHeld.size) this.holdScroll(node);\n }\n\n /**\n * Stop every scroll view a node is in from scrolling, until the touch ends: one held off hands\n * the drag to the one around it. Telling native who holds the touch does this on Android. On\n * iOS a scroll view is held off only by a responder that is over it, never one inside it, so\n * each is told not to scroll.\n */\n private holdScroll(node: EngineNode): void {\n for (let up = node.parent; up; up = up.parent) {\n if (up.nodeKind !== 'element' || !SCROLL_VIEWS.has(committedViewName(up))) continue;\n this.scrollHeld.add(up);\n this.tellScreen(up);\n }\n }\n\n /** Settle which way a drag set off, and hold native's own off one that set off across. */\n private settleDrag(nativeEvent: unknown): void {\n const drag = this.drag;\n if (!drag || drag.settled) return;\n const at = pointOf(nativeEvent);\n const [across, along] = [Math.abs(at.x - drag.x), Math.abs(at.y - drag.y)];\n if (Math.max(across, along) < DRAG_SLOP) return;\n drag.settled = true;\n drag.held = across > along;\n if (!drag.held) return;\n if (this.currentResponder) this.tellNative(this.currentResponder, true);\n this.holdScroll(drag.on);\n }\n\n /** Give the swipe back once the last finger has lifted. */\n private releaseSwipe(nativeEvent: unknown): void {\n const left = (nativeEvent as { touches?: readonly unknown[] } | null)?.touches?.length ?? 0;\n if (left > 0) return;\n this.drag = null;\n this.dragKept = false;\n const held = [...this.scrollHeld, this.swipeHeld];\n this.scrollHeld.clear();\n this.swipeHeld = null;\n for (const each of held) if (each) this.tellScreen(each);\n }\n\n /**\n * Commit a screen or a scroll view again now, not with whatever next changes: the swipe begins\n * once the finger has moved ten points or so, which is a frame or two after it came down.\n */\n private tellScreen(screen: EngineNode): void {\n // Its props alone: nothing a selector reads moved, so nothing under it is styled again.\n this.markProps(screen, false);\n this.commit();\n }\n\n /** The screen of a native stack a node is on, or nothing where it is on none. */\n private screenOf(node: EngineNode): EngineNode | null {\n for (let up: EngineNode | null = node; up; up = up.parent) {\n if (up.nodeKind === 'element' && viewNameOf(up) === STACK_SCREEN) return up;\n }\n return null;\n }\n\n /** A presented modal host has finished leaving, so a hidden one can come out of the tree. */\n private dismissed(target: EngineNode): void {\n if (!target.presented) return;\n target.presented = undefined;\n if (target.props['visible'] === false) this.markProps(target, false);\n }\n\n private reportEventError(error: unknown, topLevelType: string): void {\n if (this.onError) {\n this.onError(error, topLevelType);\n return;\n }\n console.error(`[angular-native] an error was thrown while dispatching ${topLevelType}`, error);\n }\n\n /**\n * A list that scrolls under a finger takes the touch away from whatever it started on.\n *\n * Distance alone cannot tell a scroll from a tap. The press rect is the control's own bounds\n * plus a retention offset, which is right - a 15pt threshold cancels an ordinary thumb tap on a\n * full-width button - but on a 72pt list row it means a 72pt drag still counts as a tap, and a\n * 72pt drag is unmistakably a scroll. So the list is asked instead of the arithmetic: it knows\n * it is scrolling, and every platform cancels the touch at that moment.\n *\n * Only a responder *inside* the thing that scrolled, so a scroll view moving does not cancel a\n * press somewhere else on screen. And only while a touch is in progress: momentum after the\n * finger has lifted, and programmatic scrolling, have no press to cancel.\n */\n private cancelPressForScroll(target: EngineNode, type: string, event: ResponderEvent): void {\n if (!SCROLL_CANCELS_PRESS.has(type)) return;\n const responder = this.currentResponder;\n if (!responder || responder === target) return;\n for (let node: EngineNode | null = responder; node; node = node.parent) {\n if (node === target) {\n this.release(event, true);\n return;\n }\n }\n }\n\n /**\n * Tell \"the native side never sent it\" from \"it arrived and nothing was listening\", which are\n * otherwise identical symptoms. One line per event, so it is off unless asked for.\n */\n private trace(target: EngineNode | null, topLevelType: string): void {\n if (!(globalThis as { __angularNativeEventLog?: boolean }).__angularNativeEventLog) return;\n let matched = 0;\n for (let n = target; n; n = DIRECT_EVENTS.has(topLevelType) ? null : n.parent) {\n matched += n.listeners?.get(topLevelType)?.size ?? 0;\n }\n console.log('[event]', topLevelType, target?.tag ?? '(no handle)', matched);\n }\n\n /**\n * `:focus` follows the native events rather than being inferred from a tap, so it is right for a\n * field focused programmatically or by the keyboard's next-field button.\n */\n private trackFocus(target: EngineNode | null, topLevelType: string): void {\n if (topLevelType === 'topFocus') this.setFocused(target);\n else if (topLevelType === 'topBlur' && this.focusedNode === target) this.setFocused(null);\n }\n\n /** Walk target to root. Fabric hands JS only the hit target; the propagation is ours to do. */\n private propagate(target: EngineNode | null, topLevelType: string, event: SyntheticEvent): void {\n for (let node = target; node; node = node.parent) {\n const listeners = node.listeners?.get(topLevelType);\n if (listeners) {\n for (const fn of [...listeners]) {\n try {\n fn(event);\n } catch (error) {\n this.reportEventError(error, topLevelType);\n }\n }\n }\n if (DIRECT_EVENTS.has(topLevelType) || event.isPropagationStopped()) return;\n }\n }\n\n /**\n * Clone a committed node with whatever changed. Fabric's persistent tree has no in-place edit:\n * a new revision is a new node, which is why a changed child forces its parent to clone too.\n *\n * `children` is null when the child list is unchanged, in which case Fabric keeps the previous\n * revision's children and there is nothing to append.\n *\n * Otherwise the clone is handed its children in the one call, as an array: a call into native\n * for each of them is most of what cloning a box of hundreds costs, and each box over a change\n * is cloned on every commit. React Native's binding (`UIManagerBinding.cpp`, the one on iOS\n * and Android) reads an array there in every version the packages support, and takes it as the\n * second argument of three where there are props as well.\n */\n private clone(\n previous: FabricNode,\n props: Record<string, unknown> | null,\n children: FabricNode[] | null,\n ): FabricNode {\n this.stats.clonedNodes++;\n\n if (children === null) return this.fabric.cloneNodeWithNewProps(previous, props!);\n\n return props\n ? this.fabric.cloneNodeWithNewChildrenAndProps(previous, children, props)\n : this.fabric.cloneNodeWithNewChildren(previous, children);\n }\n\n private detach(child: EngineNode): void {\n if (child.parent) this.removeChild(child.parent, child);\n }\n}\n\n/**\n * Clear the marks that lead a commit down to a change, under a node no commit goes into: one with\n * no box. Left set, a later change under it stops climbing at them, as it stops at any mark already\n * there, and never reaches the root: nothing is committed, and an ancestor's `:has()` reading into\n * it is not asked again. What is under it has no views, so it is reconciled whole when it is shown.\n */\nfunction settlePaths(node: EngineNode): void {\n if (!node.subtreeDirty) return;\n node.subtreeDirty = false;\n for (const child of node.childList) settlePaths(child);\n}\n"]}
|