@ng-native/components 0.0.1 → 0.1.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.
Files changed (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -1
  3. package/dist/activity-indicator.d.ts +41 -0
  4. package/dist/activity-indicator.js +66 -0
  5. package/dist/activity-indicator.js.map +1 -0
  6. package/dist/animated-style.d.ts +31 -0
  7. package/dist/animated-style.js +102 -0
  8. package/dist/animated-style.js.map +1 -0
  9. package/dist/animated.d.ts +125 -0
  10. package/dist/animated.js +538 -0
  11. package/dist/animated.js.map +1 -0
  12. package/dist/animation.d.ts +40 -0
  13. package/dist/animation.js +20 -0
  14. package/dist/animation.js.map +1 -0
  15. package/dist/animations-web.d.ts +8 -0
  16. package/dist/animations-web.js +31 -0
  17. package/dist/animations-web.js.map +1 -0
  18. package/dist/animations.d.ts +7 -0
  19. package/dist/animations.js +58 -0
  20. package/dist/animations.js.map +1 -0
  21. package/dist/controlled-model.d.ts +33 -0
  22. package/dist/controlled-model.js +47 -0
  23. package/dist/controlled-model.js.map +1 -0
  24. package/dist/easing.d.ts +21 -0
  25. package/dist/easing.js +50 -0
  26. package/dist/easing.js.map +1 -0
  27. package/dist/events.d.ts +169 -0
  28. package/dist/events.js +2 -0
  29. package/dist/events.js.map +1 -0
  30. package/dist/gesture-backend.d.ts +26 -0
  31. package/dist/gesture-backend.js +14 -0
  32. package/dist/gesture-backend.js.map +1 -0
  33. package/dist/gesture-dispatch.d.ts +67 -0
  34. package/dist/gesture-dispatch.js +106 -0
  35. package/dist/gesture-dispatch.js.map +1 -0
  36. package/dist/gestures.d.ts +23 -0
  37. package/dist/gestures.js +164 -0
  38. package/dist/gestures.js.map +1 -0
  39. package/dist/height-index.d.ts +31 -0
  40. package/dist/height-index.js +80 -0
  41. package/dist/height-index.js.map +1 -0
  42. package/dist/image-background.d.ts +32 -0
  43. package/dist/image-background.js +80 -0
  44. package/dist/image-background.js.map +1 -0
  45. package/dist/image.d.ts +79 -0
  46. package/dist/image.js +155 -0
  47. package/dist/image.js.map +1 -0
  48. package/dist/index.d.ts +38 -0
  49. package/dist/index.js +39 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/input-accessory-view.d.ts +16 -0
  52. package/dist/input-accessory-view.js +29 -0
  53. package/dist/input-accessory-view.js.map +1 -0
  54. package/dist/keyboard-avoiding-view.d.ts +79 -0
  55. package/dist/keyboard-avoiding-view.js +172 -0
  56. package/dist/keyboard-avoiding-view.js.map +1 -0
  57. package/dist/keyboard-dock.d.ts +126 -0
  58. package/dist/keyboard-dock.js +327 -0
  59. package/dist/keyboard-dock.js.map +1 -0
  60. package/dist/keyboard-taps.d.ts +12 -0
  61. package/dist/keyboard-taps.js +51 -0
  62. package/dist/keyboard-taps.js.map +1 -0
  63. package/dist/modal.d.ts +56 -0
  64. package/dist/modal.js +102 -0
  65. package/dist/modal.js.map +1 -0
  66. package/dist/native-gesture.d.ts +21 -0
  67. package/dist/native-gesture.js +56 -0
  68. package/dist/native-gesture.js.map +1 -0
  69. package/dist/native-ref.d.ts +7 -0
  70. package/dist/native-ref.js +13 -0
  71. package/dist/native-ref.js.map +1 -0
  72. package/dist/pressable.d.ts +220 -0
  73. package/dist/pressable.js +484 -0
  74. package/dist/pressable.js.map +1 -0
  75. package/dist/reanimated.d.ts +19 -0
  76. package/dist/reanimated.js +111 -0
  77. package/dist/reanimated.js.map +1 -0
  78. package/dist/refresh-control.d.ts +50 -0
  79. package/dist/refresh-control.js +103 -0
  80. package/dist/refresh-control.js.map +1 -0
  81. package/dist/safe-area-provider.d.ts +11 -0
  82. package/dist/safe-area-provider.js +70 -0
  83. package/dist/safe-area-provider.js.map +1 -0
  84. package/dist/safe-area-view.d.ts +22 -0
  85. package/dist/safe-area-view.js +77 -0
  86. package/dist/safe-area-view.js.map +1 -0
  87. package/dist/safe-area.d.ts +12 -0
  88. package/dist/safe-area.js +27 -0
  89. package/dist/safe-area.js.map +1 -0
  90. package/dist/scroll-view-props.d.ts +89 -0
  91. package/dist/scroll-view-props.js +153 -0
  92. package/dist/scroll-view-props.js.map +1 -0
  93. package/dist/scroll-view.d.ts +95 -0
  94. package/dist/scroll-view.js +181 -0
  95. package/dist/scroll-view.js.map +1 -0
  96. package/dist/section-list.d.ts +146 -0
  97. package/dist/section-list.js +300 -0
  98. package/dist/section-list.js.map +1 -0
  99. package/dist/sticky-headers.d.ts +41 -0
  100. package/dist/sticky-headers.js +118 -0
  101. package/dist/sticky-headers.js.map +1 -0
  102. package/dist/swipe-refresh-layout.d.ts +51 -0
  103. package/dist/swipe-refresh-layout.js +162 -0
  104. package/dist/swipe-refresh-layout.js.map +1 -0
  105. package/dist/switch.d.ts +54 -0
  106. package/dist/switch.js +110 -0
  107. package/dist/switch.js.map +1 -0
  108. package/dist/template-slot.d.ts +18 -0
  109. package/dist/template-slot.js +30 -0
  110. package/dist/template-slot.js.map +1 -0
  111. package/dist/text-input.d.ts +168 -0
  112. package/dist/text-input.js +312 -0
  113. package/dist/text-input.js.map +1 -0
  114. package/dist/text.d.ts +70 -0
  115. package/dist/text.js +111 -0
  116. package/dist/text.js.map +1 -0
  117. package/dist/touchable-opacity.d.ts +36 -0
  118. package/dist/touchable-opacity.js +76 -0
  119. package/dist/touchable-opacity.js.map +1 -0
  120. package/dist/transforms.d.ts +2 -0
  121. package/dist/transforms.js +17 -0
  122. package/dist/transforms.js.map +1 -0
  123. package/dist/view-base.d.ts +332 -0
  124. package/dist/view-base.js +534 -0
  125. package/dist/view-base.js.map +1 -0
  126. package/dist/view.d.ts +12 -0
  127. package/dist/view.js +18 -0
  128. package/dist/view.js.map +1 -0
  129. package/dist/virtual-list.d.ts +530 -0
  130. package/dist/virtual-list.js +1150 -0
  131. package/dist/virtual-list.js.map +1 -0
  132. package/dist/worklet-scroll.d.ts +13 -0
  133. package/dist/worklet-scroll.js +49 -0
  134. package/dist/worklet-scroll.js.map +1 -0
  135. package/dist/worklet-style.d.ts +13 -0
  136. package/dist/worklet-style.js +47 -0
  137. package/dist/worklet-style.js.map +1 -0
  138. package/dist/worklets.d.ts +89 -0
  139. package/dist/worklets.js +42 -0
  140. package/dist/worklets.js.map +1 -0
  141. package/dist/written-props.d.ts +6 -0
  142. package/dist/written-props.js +180 -0
  143. package/dist/written-props.js.map +1 -0
  144. package/package.json +88 -3
@@ -0,0 +1,332 @@
1
+ /**
2
+ * The props every native view accepts, as typed inputs forwarded to the host node.
3
+ *
4
+ * Each input is mirrored by a host binding of the same name, which is what carries the value to
5
+ * the renderer: once a directive declares an input, Angular routes the binding to the directive
6
+ * rather than the element. An unset input stays `undefined` and never reaches native, so a view
7
+ * that mentions none of these sends none of them.
8
+ *
9
+ * Web-style `aria-*` names are accepted as aliases and land on the `accessibility*` props React
10
+ * Native's own `View.js` maps them to. `id` maps to `nativeID` and `tabIndex` to `focusable` the
11
+ * same way.
12
+ *
13
+ * Events are element events, typed in `events.ts`: `(layout)`, `(touchStart)`,
14
+ * `(accessibilityAction)` and so on. They are deliberately not outputs; see that file.
15
+ */
16
+ import { type SimpleChanges } from '@angular/core';
17
+ import { HostEngine, type HostNode } from '@ng-native/fabric';
18
+ import type { Insets } from './events.ts';
19
+ import * as i0 from "@angular/core";
20
+ /** The roles assistive technologies understand. `Role` is the web spelling of the same set. */
21
+ export type AccessibilityRole = 'none' | 'button' | 'togglebutton' | 'link' | 'search' | 'image' | 'keyboardkey' | 'text' | 'adjustable' | 'imagebutton' | 'header' | 'summary' | 'alert' | 'checkbox' | 'combobox' | 'menu' | 'menubar' | 'menuitem' | 'progressbar' | 'radio' | 'radiogroup' | 'scrollbar' | 'spinbutton' | 'switch' | 'tab' | 'tabbar' | 'tablist' | 'timer' | 'list' | 'toolbar' | 'grid' | 'pager' | 'scrollview' | 'horizontalscrollview' | 'viewgroup' | 'webview' | 'drawerlayout' | 'slidingdrawer' | 'iconmenu';
22
+ export interface AccessibilityState {
23
+ readonly disabled?: boolean;
24
+ readonly selected?: boolean;
25
+ readonly checked?: boolean | 'mixed';
26
+ readonly busy?: boolean;
27
+ readonly expanded?: boolean;
28
+ }
29
+ export interface AccessibilityValue {
30
+ readonly min?: number;
31
+ readonly max?: number;
32
+ readonly now?: number;
33
+ readonly text?: string;
34
+ }
35
+ export interface AccessibilityAction {
36
+ readonly name: string;
37
+ readonly label?: string;
38
+ }
39
+ /** Android's `nativeBackgroundAndroid` and `nativeForegroundAndroid`. */
40
+ export type AndroidDrawable = {
41
+ readonly type: 'RippleAndroid';
42
+ readonly color?: string | number;
43
+ readonly borderless?: boolean;
44
+ readonly rippleRadius?: number;
45
+ } | {
46
+ readonly type: 'ThemeAttrAndroid';
47
+ readonly attribute: string;
48
+ };
49
+ export type PointerEvents = 'box-none' | 'none' | 'box-only' | 'auto';
50
+ export type ImportantForAccessibility = 'auto' | 'yes' | 'no' | 'no-hide-descendants';
51
+ export type AccessibilityLiveRegion = 'none' | 'polite' | 'assertive';
52
+ /**
53
+ * What a directive on the same node says this view *is*, for a screen reader.
54
+ *
55
+ * A host primitive knows it is a view; only the thing composed onto it knows it is a button, a
56
+ * checkbox or an accordion trigger. Without this seam that knowledge has nowhere to go: the role
57
+ * and the state are written here, from this class's own inputs, and a later `ngOnChanges` would
58
+ * overwrite anything a directive had set behind its back.
59
+ *
60
+ * Registered on the element with `contributeAccessibility`, and several primitives may contribute
61
+ * to one element - a trigger that is also a button.
62
+ */
63
+ export interface AccessibilityContribution {
64
+ /** The role, if this directive implies one. An explicit `role` on the element still wins. */
65
+ readonly role?: AccessibilityRole;
66
+ /**
67
+ * State to merge in, read on every write so it may be a signal read.
68
+ *
69
+ * Spelled in full because `state` is what a primitive calls the thing it publishes for a
70
+ * stylesheet - `data-state="checked"` - and the two are not the same thing.
71
+ */
72
+ readonly accessibilityState?: () => AccessibilityState | undefined;
73
+ }
74
+ /**
75
+ * Tell the primitive on this element what it is, for a screen reader: a role, and state to merge
76
+ * into what it announces. Call it from a directive's field initialiser or constructor, on the
77
+ * element the primitive is on:
78
+ *
79
+ * private readonly contribution = contributeAccessibility({ role: 'button' });
80
+ * private readonly contribution = contributeAccessibility(this);
81
+ *
82
+ * Kept on the node rather than provided through DI, because asking the injector costs every
83
+ * element on screen a lookup to learn that nothing contributes - about a tenth of creating a list.
84
+ * Reading a property that is not there costs nothing.
85
+ */
86
+ export declare function contributeAccessibility<T extends AccessibilityContribution>(contribution: T): T;
87
+ export declare abstract class ViewBase {
88
+ /** The retained node this directive sits on. */
89
+ protected readonly node: HostNode;
90
+ /**
91
+ * The engine, because the props these inputs carry are written straight onto the node. Read
92
+ * off the node where the host put it there, which is one property read against an injector
93
+ * lookup that walks every ancestor element, for every element on screen.
94
+ */
95
+ protected readonly engine: HostEngine;
96
+ /**
97
+ * See `contributeAccessibility`. Empty for every element nothing is composed onto. Read, never
98
+ * cached, from `ngOnInit` onwards: by then every directive on the node has been constructed and
99
+ * registered what it has to say.
100
+ */
101
+ private get contributions();
102
+ constructor();
103
+ /** Whether `ngOnInit` has run, which is what writes the props every element starts with. */
104
+ private initialised;
105
+ /**
106
+ * Write what the inputs say, for an element whose view has not been checked by the time the
107
+ * host commits it. Nothing for one that has.
108
+ *
109
+ * The props are written from `ngOnChanges` and `ngOnInit`, which Angular runs in the parent
110
+ * view's update pass. A component that detaches itself before its first check never gets one,
111
+ * and on the web that pattern still works, because a listener and an attribute are there from
112
+ * creation. So the host calls this before the commit that first mounts the element, by when its
113
+ * static inputs are set: the press handling, the role and the `testID` are there, and the view
114
+ * behaves as written once something calls `detectChanges()`.
115
+ */
116
+ settleProps(): void;
117
+ /** Whether the view is an accessibility element. Defaults to false for a plain view. */
118
+ readonly accessible: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
119
+ /** What a screen reader announces for the view. */
120
+ readonly accessibilityLabel: import("@angular/core").InputSignal<string | undefined>;
121
+ /** `aria-label`: web spelling of `accessibilityLabel`. */
122
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
123
+ /** Android: `nativeID`s of the views that label this one. */
124
+ readonly accessibilityLabelledBy: import("@angular/core").InputSignal<string | readonly string[] | undefined>;
125
+ /** `aria-labelledby`: web spelling of `accessibilityLabelledBy`. */
126
+ readonly ariaLabelledBy: import("@angular/core").InputSignal<string | readonly string[] | undefined>;
127
+ /** What happens when the user acts on the view, when the label alone does not say. */
128
+ readonly accessibilityHint: import("@angular/core").InputSignal<string | undefined>;
129
+ /** The kind of control this is, for assistive technologies. */
130
+ readonly accessibilityRole: import("@angular/core").InputSignal<AccessibilityRole | undefined>;
131
+ /** `role`: the web spelling of `accessibilityRole`. */
132
+ readonly role: import("@angular/core").InputSignal<AccessibilityRole | undefined>;
133
+ /** Disabled, selected, checked, busy and expanded, as one object. */
134
+ readonly accessibilityState: import("@angular/core").InputSignal<AccessibilityState | undefined>;
135
+ /** `aria-busy`. */
136
+ readonly ariaBusy: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
137
+ /** `aria-checked`. */
138
+ readonly ariaChecked: import("@angular/core").InputSignal<boolean | "mixed" | undefined>;
139
+ /** `aria-disabled`. */
140
+ readonly ariaDisabled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
141
+ /** `aria-expanded`. */
142
+ readonly ariaExpanded: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
143
+ /** `aria-selected`. */
144
+ readonly ariaSelected: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
145
+ /** The current value of an adjustable control, for a screen reader. */
146
+ readonly accessibilityValue: import("@angular/core").InputSignal<AccessibilityValue | undefined>;
147
+ /** `aria-valuemin`. */
148
+ readonly ariaValueMin: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
149
+ /** `aria-valuemax`. */
150
+ readonly ariaValueMax: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
151
+ /** `aria-valuenow`. */
152
+ readonly ariaValueNow: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
153
+ /** `aria-valuetext`. */
154
+ readonly ariaValueText: import("@angular/core").InputSignal<string | undefined>;
155
+ /** Custom actions a screen reader can invoke; each arrives as `(accessibilityAction)`. */
156
+ readonly accessibilityActions: import("@angular/core").InputSignal<readonly AccessibilityAction[] | undefined>;
157
+ /** Android: announce changes to this view's content without focus moving to it. */
158
+ readonly accessibilityLiveRegion: import("@angular/core").InputSignal<AccessibilityLiveRegion | undefined>;
159
+ /** `aria-live`. */
160
+ readonly ariaLive: import("@angular/core").InputSignal<AccessibilityLiveRegion | undefined>;
161
+ /** iOS: hide this view and its children from assistive technologies. */
162
+ readonly accessibilityElementsHidden: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
163
+ /** `aria-hidden`: `accessibilityElementsHidden` on iOS, `no-hide-descendants` on Android. */
164
+ readonly ariaHidden: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
165
+ /** Android: whether this view is exposed to accessibility, and whether its children are. */
166
+ readonly importantForAccessibility: import("@angular/core").InputSignal<ImportantForAccessibility | undefined>;
167
+ /** iOS: VoiceOver ignores every sibling while this view is shown, as a modal expects. */
168
+ readonly accessibilityViewIsModal: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
169
+ /** `aria-modal`. */
170
+ readonly ariaModal: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
171
+ /** iOS: keep the view's colours when the Invert Colors setting is on; images want this. */
172
+ readonly accessibilityIgnoresInvertColors: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
173
+ /** iOS: the language VoiceOver reads the label in, as a BCP 47 tag. */
174
+ readonly accessibilityLanguage: import("@angular/core").InputSignal<string | undefined>;
175
+ /** iOS: the title shown by the Large Content Viewer on a long press with large text on. */
176
+ readonly accessibilityLargeContentTitle: import("@angular/core").InputSignal<string | undefined>;
177
+ /** iOS: opt this view into the Large Content Viewer. */
178
+ readonly accessibilityShowsLargeContentViewer: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
179
+ /** iOS: tell VoiceOver the view responds to a tap even without a role that implies it. */
180
+ readonly accessibilityRespondsToUserInteraction: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
181
+ /** A handle native code can find the view by; also what `:id` selectors match. */
182
+ readonly nativeID: import("@angular/core").InputSignal<string | undefined>;
183
+ /** `id`: the web spelling of `nativeID`. */
184
+ readonly id: import("@angular/core").InputSignal<string | undefined>;
185
+ /** A handle for end-to-end test tooling. */
186
+ readonly testID: import("@angular/core").InputSignal<string | undefined>;
187
+ /** Extend the touchable area beyond the view's bounds, without moving anything visible. */
188
+ readonly hitSlop: import("@angular/core").InputSignal<number | Insets | undefined>;
189
+ /** Whether this view, its children, or neither can be the target of a touch. */
190
+ readonly pointerEvents: import("@angular/core").InputSignal<PointerEvents | undefined>;
191
+ /** Set to false to keep a layout-only view alive; Fabric otherwise removes it from the tree. */
192
+ readonly collapsable: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
193
+ /** Set to false to keep this view's layout-only children from being flattened. */
194
+ readonly collapsableChildren: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
195
+ /** Detach children that are outside the visible bounds. A scroll view optimisation. */
196
+ readonly removeClippedSubviews: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
197
+ /** Composite the view offscreen so a translucent view with children blends correctly. */
198
+ readonly needsOffscreenAlphaCompositing: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
199
+ /** Android: whether the view takes keyboard or TV focus. RN's `tabIndex` is this. */
200
+ readonly focusable: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
201
+ /** iOS: render the view to a bitmap once and reuse it; for a static view that animates. */
202
+ readonly shouldRasterizeIOS: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
203
+ /** Android: cache the view in a hardware texture; the same trade as `shouldRasterizeIOS`. */
204
+ readonly renderToHardwareTextureAndroid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
205
+ /** Android: a ripple or theme drawable painted behind the view's content. */
206
+ readonly nativeBackgroundAndroid: import("@angular/core").InputSignal<AndroidDrawable | undefined>;
207
+ /** Android: a ripple or theme drawable painted over the view's content. */
208
+ readonly nativeForegroundAndroid: import("@angular/core").InputSignal<AndroidDrawable | undefined>;
209
+ /**
210
+ * What React Native's own JavaScript wrapper would have defaulted, per component.
211
+ *
212
+ * Driving the native views directly skips those wrappers, and what is lost is invisible: the
213
+ * app looks identical and is unusable with a screen reader, because nothing on it is an
214
+ * accessibility element. Each hook is overridden by the component whose wrapper sets it, and
215
+ * cites the file it came from.
216
+ */
217
+ /** True for anything that behaves like a control. `Pressable.js`: `accessible !== false`. */
218
+ protected accessibleByDefault(): boolean;
219
+ /** Whether the platform's focus order should include this. `Pressable.js` again. */
220
+ protected focusableByDefault(): boolean;
221
+ /** A role the component itself implies. `Switch.js`: `accessibilityRole ?? 'switch'`. */
222
+ protected roleByDefault(): AccessibilityRole | undefined;
223
+ /**
224
+ * The component's own `disabled`, for the state a screen reader announces.
225
+ *
226
+ * React Native merges this whenever the prop was passed, even as false. An input here always
227
+ * has a value, so there is no telling "passed false" from "not passed"; only true is merged,
228
+ * and a control that is not disabled says nothing rather than saying so on every node.
229
+ */
230
+ protected disabledForAccessibility(): boolean | undefined;
231
+ /**
232
+ * The component's own `checked`, for a control whose checked state is not an accessibility
233
+ * input at all - `Switch`'s `checked` is a `model()`, not one of this class's inputs, so it
234
+ * cannot reach `ngOnChanges` here any more than `disabled` can.
235
+ */
236
+ protected checkedForAccessibility(): boolean | 'mixed' | undefined;
237
+ /**
238
+ * Write what the inputs say onto the node.
239
+ *
240
+ * This is what thirty host bindings used to do, and it is here rather than there for a reason
241
+ * that was measured: a host binding costs every element that carries it, on every pass, whether
242
+ * or not the app ever set the prop, and mounting four hundred rows spent a third of its time on
243
+ * the accessibility surface alone. Angular calls this once with everything that changed instead.
244
+ *
245
+ * It works with signal inputs, which is easy to assume it does not: `ngOnChanges` fires for
246
+ * them as it does for any other input, because `ngOnChangesSetInput` records a `SimpleChange`
247
+ * before writing the signal. `signal-onchanges.test.ts` is there to keep that fact honest.
248
+ *
249
+ * What remains is the allocation - a signal input builds its node whether or not anything binds
250
+ * to it, and there are forty-six here. Moving prop groups into directives selected by the props
251
+ * they carry (`[accessibilityLabel], [aria-label], ...`) is how that goes away: an element that
252
+ * binds none of them would allocate nothing. Measured on a 400-row mount it is worth about 40ms,
253
+ * at the price of an import per group.
254
+ */
255
+ ngOnChanges(_changes?: SimpleChanges): void;
256
+ private writeAccessibility;
257
+ /** The half of accessibility that is about what assistive technology may see, and in which language. */
258
+ private writeVisibility;
259
+ /**
260
+ * Writes a prop, and says nothing when it has nothing to say.
261
+ *
262
+ * The `undefined` guard is the whole of it, and it fixes a silent failure that had already been
263
+ * hit twice. These two methods rewrite roughly forty props from this class's own inputs on every
264
+ * `ngOnChanges`, so anything that reached the node by another route was overwritten the first
265
+ * time any input changed. Two routes get here without going through an input of this class:
266
+ *
267
+ * - A host binding on the composing component. `ui-alert` sets `[accessible]` that way and
268
+ * `ui-separator` sets `[accessibilityLabel]`; both are documented as working, and both were
269
+ * one input change away from stopping.
270
+ * - An element property binding. A component whose `hostDirectives` entry lists `disabled` but
271
+ * not `nativeID` leaves `[nativeID]` to be applied as a plain property, and then a bound
272
+ * `[disabled]` beside it clobbered the id on the next change. `ui-checkbox` carries a
273
+ * per-component workaround for that, listing the identity inputs through explicitly, and
274
+ * `ui-select-item` and `ui-dropdown-menu-item` do not - which is the shape of a bug that gets
275
+ * copied rather than fixed.
276
+ *
277
+ * An input that goes back to `undefined` clears the prop only when this is what set it, so a
278
+ * binding such as `[pointerEvents]="busy() ? 'none' : undefined"` still switches off, and a
279
+ * prop that arrived by one of those other routes is still never touched. Clearing a *class*
280
+ * clears the style it brought, because that goes through the cascade rather than through here.
281
+ */
282
+ private writer;
283
+ /** The props `writer` has set from an input, so it can clear one when its input is unset. */
284
+ private written;
285
+ private writeIdentity;
286
+ /**
287
+ * The defaults a React Native wrapper would have applied, written once when the element is
288
+ * created. `ngOnChanges` writes them again whenever an input changes, so an app that later
289
+ * clears a prop falls back to the default rather than to nothing.
290
+ */
291
+ /**
292
+ * The defaults a React Native wrapper would have applied, for an element nothing was bound on.
293
+ *
294
+ * In `ngOnInit` rather than the constructor because a hook like `accessibleByDefault` is
295
+ * answered from the subclass's own inputs - `Text` asks whether it is pressable - and those
296
+ * fields do not exist yet while the base constructor runs. Each is guarded on its input being
297
+ * unset, because `ngOnChanges` has already run by now and its answer, which merges the default
298
+ * in, is the better one.
299
+ */
300
+ ngOnInit(): void;
301
+ /** The first role any directive on this node claims. Two claiming different ones is a bug. */
302
+ private contributedRole;
303
+ /** A label the component itself can supply, as `Image` does from `alt`. */
304
+ protected labelByDefault(): string | undefined;
305
+ /**
306
+ * The merged state, for a component whose own inputs feed it - `disabled` on a pressable or a
307
+ * switch, which is a signal of theirs and so cannot reach `ngOnChanges` here.
308
+ *
309
+ * Those components bind this from their host. It returns the *same object* when nothing has
310
+ * changed, which is what keeps a host binding from marking the node dirty on every pass.
311
+ */
312
+ protected accessibilityStateProp(): AccessibilityState | undefined;
313
+ private lastAccessibilityState;
314
+ /** Whether anything could put state on this node. For nearly every node on screen, no. */
315
+ private hasState;
316
+ private mergedAccessibilityState;
317
+ private mergedAccessibilityValue;
318
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewBase, never>;
319
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ViewBase, never, never, { "accessible": { "alias": "accessible"; "required": false; "isSignal": true; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "accessibilityLabelledBy": { "alias": "accessibilityLabelledBy"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; "isSignal": true; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; "isSignal": true; }; "ariaBusy": { "alias": "aria-busy"; "required": false; "isSignal": true; }; "ariaChecked": { "alias": "aria-checked"; "required": false; "isSignal": true; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "aria-expanded"; "required": false; "isSignal": true; }; "ariaSelected": { "alias": "aria-selected"; "required": false; "isSignal": true; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; "isSignal": true; }; "ariaValueMin": { "alias": "aria-valuemin"; "required": false; "isSignal": true; }; "ariaValueMax": { "alias": "aria-valuemax"; "required": false; "isSignal": true; }; "ariaValueNow": { "alias": "aria-valuenow"; "required": false; "isSignal": true; }; "ariaValueText": { "alias": "aria-valuetext"; "required": false; "isSignal": true; }; "accessibilityActions": { "alias": "accessibilityActions"; "required": false; "isSignal": true; }; "accessibilityLiveRegion": { "alias": "accessibilityLiveRegion"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "aria-live"; "required": false; "isSignal": true; }; "accessibilityElementsHidden": { "alias": "accessibilityElementsHidden"; "required": false; "isSignal": true; }; "ariaHidden": { "alias": "aria-hidden"; "required": false; "isSignal": true; }; "importantForAccessibility": { "alias": "importantForAccessibility"; "required": false; "isSignal": true; }; "accessibilityViewIsModal": { "alias": "accessibilityViewIsModal"; "required": false; "isSignal": true; }; "ariaModal": { "alias": "aria-modal"; "required": false; "isSignal": true; }; "accessibilityIgnoresInvertColors": { "alias": "accessibilityIgnoresInvertColors"; "required": false; "isSignal": true; }; "accessibilityLanguage": { "alias": "accessibilityLanguage"; "required": false; "isSignal": true; }; "accessibilityLargeContentTitle": { "alias": "accessibilityLargeContentTitle"; "required": false; "isSignal": true; }; "accessibilityShowsLargeContentViewer": { "alias": "accessibilityShowsLargeContentViewer"; "required": false; "isSignal": true; }; "accessibilityRespondsToUserInteraction": { "alias": "accessibilityRespondsToUserInteraction"; "required": false; "isSignal": true; }; "nativeID": { "alias": "nativeID"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "testID": { "alias": "testID"; "required": false; "isSignal": true; }; "hitSlop": { "alias": "hitSlop"; "required": false; "isSignal": true; }; "pointerEvents": { "alias": "pointerEvents"; "required": false; "isSignal": true; }; "collapsable": { "alias": "collapsable"; "required": false; "isSignal": true; }; "collapsableChildren": { "alias": "collapsableChildren"; "required": false; "isSignal": true; }; "removeClippedSubviews": { "alias": "removeClippedSubviews"; "required": false; "isSignal": true; }; "needsOffscreenAlphaCompositing": { "alias": "needsOffscreenAlphaCompositing"; "required": false; "isSignal": true; }; "focusable": { "alias": "focusable"; "required": false; "isSignal": true; }; "shouldRasterizeIOS": { "alias": "shouldRasterizeIOS"; "required": false; "isSignal": true; }; "renderToHardwareTextureAndroid": { "alias": "renderToHardwareTextureAndroid"; "required": false; "isSignal": true; }; "nativeBackgroundAndroid": { "alias": "nativeBackgroundAndroid"; "required": false; "isSignal": true; }; "nativeForegroundAndroid": { "alias": "nativeForegroundAndroid"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
320
+ }
321
+ /**
322
+ * `ViewBase` on its own, for a component whose host is a plain view.
323
+ *
324
+ * No selector: this is only ever a `hostDirectives` entry, and it is the counterpart to
325
+ * `PressBehavior` for the parts of a control that do not take a touch. A radio group is the case
326
+ * that asked for it - it announces itself as a group and holds a value, but pressing it means
327
+ * nothing, and without a `ViewBase` on the node there is nothing to write that role.
328
+ */
329
+ export declare class ViewBehavior extends ViewBase {
330
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewBehavior, never>;
331
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ViewBehavior, never, never, {}, {}, never, never, true, never>;
332
+ }