import { ElementRef } from '@angular/core'; import type { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import type { IElementProps } from './element-props'; import * as i0 from "@angular/core"; /** * The shared half of every element directive: the prop surface all tags accept, and the ONE * generic forward that puts a claimed binding back on the engine node. * * The forward is the deciding fact of this whole route. A binding claimed by a directive input * never reaches `Renderer2.setProperty` on its own — Angular writes it to the directive instance * — so without this loop a bare tag commits nothing at all. It stays generic on purpose: per-prop * forwarding code is a component wrapper by another name, which is what this migration removes. * `renderer.setProperty` lands in the adapter's own renderer, which routes the value through the * engine's `routeProp` and applies the `id` -> `nativeID` alias. */ export declare abstract class SymbioteElement implements OnChanges { private readonly renderer; protected readonly host: ElementRef; testID?: IElementProps['testID']; nativeID?: IElementProps['nativeID']; id?: IElementProps['id']; accessible?: IElementProps['accessible']; accessibilityLabel?: IElementProps['accessibilityLabel']; accessibilityHint?: IElementProps['accessibilityHint']; accessibilityRole?: IElementProps['accessibilityRole']; accessibilityState?: IElementProps['accessibilityState']; accessibilityValue?: IElementProps['accessibilityValue']; accessibilityActions?: IElementProps['accessibilityActions']; experimental_accessibilityOrder?: IElementProps['experimental_accessibilityOrder']; accessibilityLabelledBy?: IElementProps['accessibilityLabelledBy']; importantForAccessibility?: IElementProps['importantForAccessibility']; accessibilityLiveRegion?: IElementProps['accessibilityLiveRegion']; screenReaderFocusable?: IElementProps['screenReaderFocusable']; accessibilityViewIsModal?: IElementProps['accessibilityViewIsModal']; accessibilityElementsHidden?: IElementProps['accessibilityElementsHidden']; accessibilityIgnoresInvertColors?: IElementProps['accessibilityIgnoresInvertColors']; accessibilityLanguage?: IElementProps['accessibilityLanguage']; accessibilityRespondsToUserInteraction?: IElementProps['accessibilityRespondsToUserInteraction']; accessibilityShowsLargeContentViewer?: IElementProps['accessibilityShowsLargeContentViewer']; accessibilityLargeContentTitle?: IElementProps['accessibilityLargeContentTitle']; onAccessibilityAction?: IElementProps['onAccessibilityAction']; onAccessibilityTap?: IElementProps['onAccessibilityTap']; onMagicTap?: IElementProps['onMagicTap']; onAccessibilityEscape?: IElementProps['onAccessibilityEscape']; role?: IElementProps['role']; 'aria-label'?: IElementProps['aria-label']; 'aria-labelledby'?: IElementProps['aria-labelledby']; 'aria-live'?: IElementProps['aria-live']; 'aria-hidden'?: IElementProps['aria-hidden']; 'aria-busy'?: IElementProps['aria-busy']; 'aria-checked'?: IElementProps['aria-checked']; 'aria-disabled'?: IElementProps['aria-disabled']; 'aria-expanded'?: IElementProps['aria-expanded']; 'aria-selected'?: IElementProps['aria-selected']; 'aria-modal'?: IElementProps['aria-modal']; 'aria-valuemax'?: IElementProps['aria-valuemax']; 'aria-valuemin'?: IElementProps['aria-valuemin']; 'aria-valuenow'?: IElementProps['aria-valuenow']; 'aria-valuetext'?: IElementProps['aria-valuetext']; onStartShouldSetResponder?: IElementProps['onStartShouldSetResponder']; onStartShouldSetResponderCapture?: IElementProps['onStartShouldSetResponderCapture']; onMoveShouldSetResponder?: IElementProps['onMoveShouldSetResponder']; onMoveShouldSetResponderCapture?: IElementProps['onMoveShouldSetResponderCapture']; onResponderGrant?: IElementProps['onResponderGrant']; onResponderReject?: IElementProps['onResponderReject']; onResponderStart?: IElementProps['onResponderStart']; onResponderMove?: IElementProps['onResponderMove']; onResponderEnd?: IElementProps['onResponderEnd']; onResponderRelease?: IElementProps['onResponderRelease']; onResponderTerminate?: IElementProps['onResponderTerminate']; onResponderTerminationRequest?: IElementProps['onResponderTerminationRequest']; onTouchStart?: IElementProps['onTouchStart']; onTouchStartCapture?: IElementProps['onTouchStartCapture']; onTouchMove?: IElementProps['onTouchMove']; onTouchMoveCapture?: IElementProps['onTouchMoveCapture']; onTouchEnd?: IElementProps['onTouchEnd']; onTouchEndCapture?: IElementProps['onTouchEndCapture']; onTouchCancel?: IElementProps['onTouchCancel']; onTouchCancelCapture?: IElementProps['onTouchCancelCapture']; onFocusCapture?: IElementProps['onFocusCapture']; onBlurCapture?: IElementProps['onBlurCapture']; onClickCapture?: IElementProps['onClickCapture']; onKeyDown?: IElementProps['onKeyDown']; onKeyDownCapture?: IElementProps['onKeyDownCapture']; onKeyUp?: IElementProps['onKeyUp']; onKeyUpCapture?: IElementProps['onKeyUpCapture']; pointerEvents?: IElementProps['pointerEvents']; hitSlop?: IElementProps['hitSlop']; focusable?: IElementProps['focusable']; collapsable?: IElementProps['collapsable']; removeClippedSubviews?: IElementProps['removeClippedSubviews']; renderToHardwareTextureAndroid?: IElementProps['renderToHardwareTextureAndroid']; shouldRasterizeIOS?: IElementProps['shouldRasterizeIOS']; needsOffscreenAlphaCompositing?: IElementProps['needsOffscreenAlphaCompositing']; style?: IElementProps['style']; styleProp?: IElementProps['styleProp']; class?: string; onPress?: IElementProps['onPress']; onPressIn?: IElementProps['onPressIn']; onPressOut?: IElementProps['onPressOut']; onPressMove?: IElementProps['onPressMove']; onLongPress?: IElementProps['onLongPress']; onLayout?: IElementProps['onLayout']; onFocus?: IElementProps['onFocus']; onBlur?: IElementProps['onBlur']; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * The base for a tag whose app callback an engine behavior READS BACK inside the same microtask * turn — ``, ``, ``. Zoneless change detection is a macrotask, * so without this the behavior sees the PRE-event value and undoes the user; the full mechanism, * and why this is `detectChanges()` on one view rather than `ApplicationRef.tick()`, is in * `./change-detection-flush`. * * The directive is the only thing in the adapter that owns a `ChangeDetectorRef` for the view * holding the binding, so it hands one to the renderer keyed on its own node. */ export declare abstract class ReadBackElement extends SymbioteElement implements OnDestroy { private readonly detector; private readonly errorHandler; constructor(); private flush; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * The `[(value)]` half of a controlled tag — `` and ``. * * The one `@Output` in this file, and it is FORCED rather than chosen. `[(value)]` desugars to * `[value]` + `(valueChange)`, and ngtsc requires both halves to resolve to the SAME target: a * declared `value` input beside an event no directive claims is NG8007, "the property and event * halves are not bound to the same target". So the sugar this adapter documents cannot work without * the output existing, whatever the file header says about events in general. * * The bridge below is NOT what makes the binding work today, and the comment says so because the * obvious reading is wrong: the file header's "an `@Output` CONSUMES the binding" holds for a * COMPONENT, and an element is the other case — Angular attaches the renderer listener for the * event as well, so `Renderer2.listen` still runs and the engine still hears the change. Measured * under JIT by deleting this whole hook: every case in `renderer/two-way-value.test.ts` stayed * green, delivery included, and exactly ONCE (nothing double-fires when both paths exist). * * It is kept because the measurement is JIT-only and this adapter has a recorded case of JIT and * AOT resolving a binding differently (`test-harness-false-greens.md` §21). If AOT routes the event * exclusively to the output, this hook is the only thing keeping `[(value)]` alive; if it routes to * both, it is one extra listener on a control an app explicitly bound. Delete it once something * executes the LINKED artifact and shows the renderer listener is attached there too. * * Opened only when something is SUBSCRIBED: the prop's PRESENCE is what a behavior reads to decide * it is controlled, so a `` given a handler nobody asked for changes how it snaps back. * `.observed` is readable from `ngOnInit` because Angular subscribes outputs in the creation pass, * before the update pass runs the hook — observed directly (true for the two bound tags, false for * an unbound one), not assumed. */ export declare abstract class ValueChangeElement extends ReadBackElement implements OnInit, OnDestroy { private readonly valueRenderer; private readonly valueHost; private unlistenValue?; /** `this.valueChange.observed` — the subclass owns the emitter so its payload type stays exact. */ protected abstract hasValueSubscriber(): boolean; /** Narrows the engine's unwrapped value to the type THIS tag emits, then emits it. */ protected abstract emitValue(value: unknown): void; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }