@symbiote-native/angular 0.0.0-canary-20260724081123

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 (276) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -0
  3. package/babel-linker.cjs +7 -0
  4. package/babel-register-composed.cjs +127 -0
  5. package/bin/symbiote-angular-dev.cjs +93 -0
  6. package/build/angular/anchor-host-registry.d.ts +2 -0
  7. package/build/angular/anchor-host-registry.js +84 -0
  8. package/build/angular/anchor-host-registry.js.map +1 -0
  9. package/build/angular/bootstrap.d.ts +7 -0
  10. package/build/angular/bootstrap.js +15 -0
  11. package/build/angular/bootstrap.js.map +1 -0
  12. package/build/angular/components/activity-indicator/index.android.d.ts +12 -0
  13. package/build/angular/components/activity-indicator/index.android.js +21 -0
  14. package/build/angular/components/activity-indicator/index.android.js.map +1 -0
  15. package/build/angular/components/activity-indicator/index.d.ts +1 -0
  16. package/build/angular/components/activity-indicator/index.ios.d.ts +8 -0
  17. package/build/angular/components/activity-indicator/index.ios.js +21 -0
  18. package/build/angular/components/activity-indicator/index.ios.js.map +1 -0
  19. package/build/angular/components/activity-indicator/index.js +4 -0
  20. package/build/angular/components/activity-indicator/index.js.map +1 -0
  21. package/build/angular/components/activity-indicator/shared.d.ts +67 -0
  22. package/build/angular/components/activity-indicator/shared.js +260 -0
  23. package/build/angular/components/activity-indicator/shared.js.map +1 -0
  24. package/build/angular/components/button.d.ts +63 -0
  25. package/build/angular/components/button.js +332 -0
  26. package/build/angular/components/button.js.map +1 -0
  27. package/build/angular/components/flat-list/index.d.ts +122 -0
  28. package/build/angular/components/flat-list/index.js +688 -0
  29. package/build/angular/components/flat-list/index.js.map +1 -0
  30. package/build/angular/components/image/index.android.d.ts +10 -0
  31. package/build/angular/components/image/index.android.js +59 -0
  32. package/build/angular/components/image/index.android.js.map +1 -0
  33. package/build/angular/components/image/index.d.ts +1 -0
  34. package/build/angular/components/image/index.ios.d.ts +10 -0
  35. package/build/angular/components/image/index.ios.js +59 -0
  36. package/build/angular/components/image/index.ios.js.map +1 -0
  37. package/build/angular/components/image/index.js +3 -0
  38. package/build/angular/components/image/index.js.map +1 -0
  39. package/build/angular/components/image/shared.d.ts +101 -0
  40. package/build/angular/components/image/shared.js +406 -0
  41. package/build/angular/components/image/shared.js.map +1 -0
  42. package/build/angular/components/image-background.d.ts +81 -0
  43. package/build/angular/components/image-background.js +418 -0
  44. package/build/angular/components/image-background.js.map +1 -0
  45. package/build/angular/components/input-accessory-view/index.d.ts +60 -0
  46. package/build/angular/components/input-accessory-view/index.js +251 -0
  47. package/build/angular/components/input-accessory-view/index.js.map +1 -0
  48. package/build/angular/components/keyboard-avoiding-view/index.d.ts +82 -0
  49. package/build/angular/components/keyboard-avoiding-view/index.js +358 -0
  50. package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -0
  51. package/build/angular/components/modal/index.d.ts +92 -0
  52. package/build/angular/components/modal/index.js +360 -0
  53. package/build/angular/components/modal/index.js.map +1 -0
  54. package/build/angular/components/pressable/index.d.ts +123 -0
  55. package/build/angular/components/pressable/index.js +420 -0
  56. package/build/angular/components/pressable/index.js.map +1 -0
  57. package/build/angular/components/refresh-control/index.d.ts +86 -0
  58. package/build/angular/components/refresh-control/index.js +342 -0
  59. package/build/angular/components/refresh-control/index.js.map +1 -0
  60. package/build/angular/components/safe-area-view/index.d.ts +57 -0
  61. package/build/angular/components/safe-area-view/index.js +248 -0
  62. package/build/angular/components/safe-area-view/index.js.map +1 -0
  63. package/build/angular/components/scroll-view/index.android.d.ts +21 -0
  64. package/build/angular/components/scroll-view/index.android.js +235 -0
  65. package/build/angular/components/scroll-view/index.android.js.map +1 -0
  66. package/build/angular/components/scroll-view/index.d.ts +3 -0
  67. package/build/angular/components/scroll-view/index.ios.d.ts +9 -0
  68. package/build/angular/components/scroll-view/index.ios.js +86 -0
  69. package/build/angular/components/scroll-view/index.ios.js.map +1 -0
  70. package/build/angular/components/scroll-view/index.js +6 -0
  71. package/build/angular/components/scroll-view/index.js.map +1 -0
  72. package/build/angular/components/scroll-view/projection.d.ts +32 -0
  73. package/build/angular/components/scroll-view/projection.js +334 -0
  74. package/build/angular/components/scroll-view/projection.js.map +1 -0
  75. package/build/angular/components/scroll-view/shared.d.ts +230 -0
  76. package/build/angular/components/scroll-view/shared.js +682 -0
  77. package/build/angular/components/scroll-view/shared.js.map +1 -0
  78. package/build/angular/components/scroll-view/sticky-header.d.ts +40 -0
  79. package/build/angular/components/scroll-view/sticky-header.js +225 -0
  80. package/build/angular/components/scroll-view/sticky-header.js.map +1 -0
  81. package/build/angular/components/section-list/index.d.ts +116 -0
  82. package/build/angular/components/section-list/index.js +641 -0
  83. package/build/angular/components/section-list/index.js.map +1 -0
  84. package/build/angular/components/switch/index.android.d.ts +20 -0
  85. package/build/angular/components/switch/index.android.js +70 -0
  86. package/build/angular/components/switch/index.android.js.map +1 -0
  87. package/build/angular/components/switch/index.d.ts +1 -0
  88. package/build/angular/components/switch/index.ios.d.ts +19 -0
  89. package/build/angular/components/switch/index.ios.js +69 -0
  90. package/build/angular/components/switch/index.ios.js.map +1 -0
  91. package/build/angular/components/switch/index.js +4 -0
  92. package/build/angular/components/switch/index.js.map +1 -0
  93. package/build/angular/components/switch/shared.d.ts +40 -0
  94. package/build/angular/components/switch/shared.js +127 -0
  95. package/build/angular/components/switch/shared.js.map +1 -0
  96. package/build/angular/components/text-input.d.ts +153 -0
  97. package/build/angular/components/text-input.js +599 -0
  98. package/build/angular/components/text-input.js.map +1 -0
  99. package/build/angular/components/touchable/index.d.ts +245 -0
  100. package/build/angular/components/touchable/index.js +1186 -0
  101. package/build/angular/components/touchable/index.js.map +1 -0
  102. package/build/angular/components/touchable-native-feedback/index.d.ts +83 -0
  103. package/build/angular/components/touchable-native-feedback/index.js +371 -0
  104. package/build/angular/components/touchable-native-feedback/index.js.map +1 -0
  105. package/build/angular/components/virtualized-list/directives.d.ts +54 -0
  106. package/build/angular/components/virtualized-list/directives.js +153 -0
  107. package/build/angular/components/virtualized-list/directives.js.map +1 -0
  108. package/build/angular/components/virtualized-list/index.d.ts +253 -0
  109. package/build/angular/components/virtualized-list/index.js +1031 -0
  110. package/build/angular/components/virtualized-list/index.js.map +1 -0
  111. package/build/angular/components/virtualized-section-list/directives.d.ts +37 -0
  112. package/build/angular/components/virtualized-section-list/directives.js +76 -0
  113. package/build/angular/components/virtualized-section-list/directives.js.map +1 -0
  114. package/build/angular/components/virtualized-section-list/index.d.ts +178 -0
  115. package/build/angular/components/virtualized-section-list/index.js +720 -0
  116. package/build/angular/components/virtualized-section-list/index.js.map +1 -0
  117. package/build/angular/components.d.ts +39 -0
  118. package/build/angular/components.js +38 -0
  119. package/build/angular/components.js.map +1 -0
  120. package/build/angular/create-portal/index.d.ts +22 -0
  121. package/build/angular/create-portal/index.js +74 -0
  122. package/build/angular/create-portal/index.js.map +1 -0
  123. package/build/angular/create-tunnel/index.d.ts +34 -0
  124. package/build/angular/create-tunnel/index.js +126 -0
  125. package/build/angular/create-tunnel/index.js.map +1 -0
  126. package/build/angular/descriptor-to-angular/index.d.ts +22 -0
  127. package/build/angular/descriptor-to-angular/index.js +142 -0
  128. package/build/angular/descriptor-to-angular/index.js.map +1 -0
  129. package/build/angular/host-instance/index.d.ts +2 -0
  130. package/build/angular/host-instance/index.js +37 -0
  131. package/build/angular/host-instance/index.js.map +1 -0
  132. package/build/angular/index.d.ts +22 -0
  133. package/build/angular/index.js +46 -0
  134. package/build/angular/index.js.map +1 -0
  135. package/build/angular/modules/animated/animated-leaf-binder/index.d.ts +14 -0
  136. package/build/angular/modules/animated/animated-leaf-binder/index.js +91 -0
  137. package/build/angular/modules/animated/animated-leaf-binder/index.js.map +1 -0
  138. package/build/angular/modules/animated/animated-leaf-binder.d.ts +14 -0
  139. package/build/angular/modules/animated/animated-leaf-binder.js +91 -0
  140. package/build/angular/modules/animated/animated-leaf-binder.js.map +1 -0
  141. package/build/angular/modules/animated/create-animated-component.d.ts +59 -0
  142. package/build/angular/modules/animated/create-animated-component.js +364 -0
  143. package/build/angular/modules/animated/create-animated-component.js.map +1 -0
  144. package/build/angular/modules/animated/index.d.ts +51 -0
  145. package/build/angular/modules/animated/index.js +59 -0
  146. package/build/angular/modules/animated/index.js.map +1 -0
  147. package/build/angular/modules/app-registry/index.d.ts +7 -0
  148. package/build/angular/modules/app-registry/index.js +23 -0
  149. package/build/angular/modules/app-registry/index.js.map +1 -0
  150. package/build/angular/modules/status-bar/index.d.ts +20 -0
  151. package/build/angular/modules/status-bar/index.js +59 -0
  152. package/build/angular/modules/status-bar/index.js.map +1 -0
  153. package/build/angular/primitives/index.d.ts +63 -0
  154. package/build/angular/primitives/index.js +189 -0
  155. package/build/angular/primitives/index.js.map +1 -0
  156. package/build/angular/primitives/shared.d.ts +88 -0
  157. package/build/angular/primitives/shared.js +171 -0
  158. package/build/angular/primitives/shared.js.map +1 -0
  159. package/build/angular/render/index.d.ts +11 -0
  160. package/build/angular/render/index.js +171 -0
  161. package/build/angular/render/index.js.map +1 -0
  162. package/build/angular/renderer/index.d.ts +37 -0
  163. package/build/angular/renderer/index.js +301 -0
  164. package/build/angular/renderer/index.js.map +1 -0
  165. package/build/angular/services/color-scheme.service.d.ts +16 -0
  166. package/build/angular/services/color-scheme.service.js +31 -0
  167. package/build/angular/services/color-scheme.service.js.map +1 -0
  168. package/build/angular/services/index.d.ts +2 -0
  169. package/build/angular/services/index.js +3 -0
  170. package/build/angular/services/index.js.map +1 -0
  171. package/build/angular/services/window-dimensions.service.d.ts +16 -0
  172. package/build/angular/services/window-dimensions.service.js +42 -0
  173. package/build/angular/services/window-dimensions.service.js.map +1 -0
  174. package/metro-config.cjs +48 -0
  175. package/metro-css-parser.cjs +13 -0
  176. package/package.json +80 -0
  177. package/src/__tests__/responder-change-detection.test.ts +102 -0
  178. package/src/__tests__/responder-nested-cd.test.ts +113 -0
  179. package/src/anchor-host-registry.ts +88 -0
  180. package/src/angular-gaps.test.ts +142 -0
  181. package/src/angular-imports.test.ts +100 -0
  182. package/src/bootstrap.ts +26 -0
  183. package/src/components/activity-indicator/activity-indicator-class-style.test.ts +44 -0
  184. package/src/components/activity-indicator/activity-indicator.test.ts +131 -0
  185. package/src/components/activity-indicator/index.android.ts +16 -0
  186. package/src/components/activity-indicator/index.ios.ts +17 -0
  187. package/src/components/activity-indicator/index.ts +4 -0
  188. package/src/components/activity-indicator/shared.ts +206 -0
  189. package/src/components/button.ts +193 -0
  190. package/src/components/flat-list/column-wrapper-style-class.test.ts +116 -0
  191. package/src/components/flat-list/flat-list-array-style.test.ts +131 -0
  192. package/src/components/flat-list/flat-list-class-style.test.ts +74 -0
  193. package/src/components/flat-list/flat-list-scroll-containment.test.ts +107 -0
  194. package/src/components/flat-list/flat-list.test.ts +99 -0
  195. package/src/components/flat-list/index.ts +574 -0
  196. package/src/components/image/image-class-style.test.ts +46 -0
  197. package/src/components/image/index.android.ts +48 -0
  198. package/src/components/image/index.ios.ts +48 -0
  199. package/src/components/image/index.ts +3 -0
  200. package/src/components/image/shared.ts +479 -0
  201. package/src/components/image-background-class-style.test.ts +48 -0
  202. package/src/components/image-background-style-class.test.ts +79 -0
  203. package/src/components/image-background.ts +270 -0
  204. package/src/components/input-accessory-view/index.ts +185 -0
  205. package/src/components/input-accessory-view/input-accessory-view.test.ts +43 -0
  206. package/src/components/keyboard-avoiding-view/index.ts +303 -0
  207. package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +54 -0
  208. package/src/components/modal/index.ts +299 -0
  209. package/src/components/modal/modal.test.ts +43 -0
  210. package/src/components/pressable/index.ts +373 -0
  211. package/src/components/pressable/pressable.test.ts +85 -0
  212. package/src/components/refresh-control/index.ts +284 -0
  213. package/src/components/refresh-control/refresh-control.test.ts +41 -0
  214. package/src/components/safe-area-view/index.ts +177 -0
  215. package/src/components/safe-area-view/safe-area-view.test.ts +43 -0
  216. package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +123 -0
  217. package/src/components/scroll-view/content-container-style-class.test.ts +75 -0
  218. package/src/components/scroll-view/index.android.ts +190 -0
  219. package/src/components/scroll-view/index.ios.ts +79 -0
  220. package/src/components/scroll-view/index.ts +7 -0
  221. package/src/components/scroll-view/projection.ts +414 -0
  222. package/src/components/scroll-view/scroll-view-class-style.test.ts +134 -0
  223. package/src/components/scroll-view/scroll-view-projection.test.ts +194 -0
  224. package/src/components/scroll-view/shared.ts +844 -0
  225. package/src/components/scroll-view/sticky-header.ts +255 -0
  226. package/src/components/section-list/index.ts +445 -0
  227. package/src/components/switch/android-switch-class.test.ts +42 -0
  228. package/src/components/switch/index.android.ts +61 -0
  229. package/src/components/switch/index.ios.ts +60 -0
  230. package/src/components/switch/index.ts +4 -0
  231. package/src/components/switch/shared.ts +197 -0
  232. package/src/components/switch/switch.test.ts +92 -0
  233. package/src/components/text-input-class-style.test.ts +54 -0
  234. package/src/components/text-input.ts +531 -0
  235. package/src/components/touchable/index.ts +629 -0
  236. package/src/components/touchable/touchable.test.ts +102 -0
  237. package/src/components/touchable-native-feedback/index.ts +254 -0
  238. package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +49 -0
  239. package/src/components/virtualized-list/directives.ts +168 -0
  240. package/src/components/virtualized-list/index.ts +992 -0
  241. package/src/components/virtualized-list/virtualized-list-class-style.test.ts +76 -0
  242. package/src/components/virtualized-section-list/directives.ts +90 -0
  243. package/src/components/virtualized-section-list/index.ts +601 -0
  244. package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +60 -0
  245. package/src/components.ts +149 -0
  246. package/src/create-portal/create-portal.test.ts +90 -0
  247. package/src/create-portal/index.ts +74 -0
  248. package/src/create-tunnel/create-tunnel.test.ts +120 -0
  249. package/src/create-tunnel/index.ts +136 -0
  250. package/src/descriptor-to-angular/descriptor-outlet.test.ts +94 -0
  251. package/src/descriptor-to-angular/index.ts +190 -0
  252. package/src/host-instance/host-instance.test.ts +49 -0
  253. package/src/host-instance/index.ts +36 -0
  254. package/src/index.ts +261 -0
  255. package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +116 -0
  256. package/src/modules/animated/animated-leaf-binder/index.ts +101 -0
  257. package/src/modules/animated/animated-leaf-binder.test.ts +116 -0
  258. package/src/modules/animated/animated-leaf-binder.ts +101 -0
  259. package/src/modules/animated/animated-scroll-view.test.ts +102 -0
  260. package/src/modules/animated/create-animated-component.ts +365 -0
  261. package/src/modules/animated/index.ts +105 -0
  262. package/src/modules/app-registry/app-registry.test.ts +106 -0
  263. package/src/modules/app-registry/index.ts +60 -0
  264. package/src/modules/status-bar/index.ts +57 -0
  265. package/src/modules/status-bar/status-bar.test.ts +50 -0
  266. package/src/primitives/index.ts +119 -0
  267. package/src/primitives/shared.ts +190 -0
  268. package/src/render/index.ts +235 -0
  269. package/src/render/render.test.ts +147 -0
  270. package/src/renderer/index.ts +347 -0
  271. package/src/renderer/renderer.test.ts +203 -0
  272. package/src/services/color-scheme.service.ts +27 -0
  273. package/src/services/index.ts +2 -0
  274. package/src/services/services.test.ts +163 -0
  275. package/src/services/window-dimensions.service.ts +41 -0
  276. package/tsconfig.angular.base.json +30 -0
@@ -0,0 +1,682 @@
1
+ // ScrollView, the Angular lifecycle half. The Fabric tree is nested: a scroll view
2
+ // wraps a content view that holds the children (RN's ScrollView.js shape). The platform-invariant
3
+ // math (decelerationRate, the per-axis intrinsics/base style, the content-size dedupe, the
4
+ // imperative handle, the native sticky scroll-attach, the aria/role fold) lives in
5
+ // @symbiote-native/components, shared verbatim with React/Vue. Here Angular supplies only the lifecycle:
6
+ // the host node held by IDENTITY through a directive's ElementRef, a forwarded-prop bag set onto
7
+ // that node through Renderer2 (-> routeProp), the imperative handle (scrollTo/scrollToEnd/
8
+ // flashScrollIndicators), the content-size dedupe, and the native sticky scroll-attach wired
9
+ // through whenCommitted. This is the Angular twin of the React useRef + Vue shallowRef host.
10
+ //
11
+ // What diverges per platform, how a RefreshControl integrates, stays in the
12
+ // .ios/.android files (Metro filename-selected): iOS renders the RefreshControl as a SIBLING
13
+ // before the content container; on Android an AndroidSwipeRefreshLayout WRAPS the scroll view.
14
+ //
15
+ // Angular cannot transform <ng-content> children in the template the way React children.map /
16
+ // Vue slots() can, so ScrollView owns a tiny projection bridge: the content host registers a
17
+ // ScrollViewProjectionController with the Angular renderer, and the renderer wraps direct projected
18
+ // children whose indices match stickyHeaderIndices. Android RefreshControl projection is handled by
19
+ // re-rendering the projected component's native prop surface as the wrapper around the scroll view
20
+ // (RN's Android shape), while excluding the original projected node from the content slot.
21
+ import { Directive, ElementRef, EventEmitter, Output, ViewChild, ContentChild, inject, } from '@angular/core';
22
+ import { attachStickyScroll, buildScrollViewHandle, didContentSizeChange, forwardScrollEvent, readLayoutDimension, resolveAccessibilityProps, resolveDecelerationRate, resolveScrollForwarding, selectScrollIntrinsics, splitLayoutProps, } from '@symbiote-native/components';
23
+ import { AnimatedValue, dlog, event as animatedEvent, isNativeAnimatedAvailable, isSymbioteNode, resolveClassName, whenCommitted, } from '@symbiote-native/engine';
24
+ import { SymbioteHostPropsDirective } from '../../primitives';
25
+ import { RefreshControl } from '../refresh-control';
26
+ import { ScrollViewProjectionController } from './projection';
27
+ import * as i0 from "@angular/core";
28
+ // The inputs every platform ScrollView accepts, listed on each concrete @Component (the adapter
29
+ // convention, mirroring Switch/Animated) so the base fields bind consistently. The aria-* /
30
+ // role aliases ride here too and are folded by resolveAccessibilityProps before reaching native.
31
+ export const SCROLL_VIEW_INPUTS = [
32
+ 'style',
33
+ 'contentContainerStyle',
34
+ 'horizontal',
35
+ 'scrollEnabled',
36
+ 'showsVerticalScrollIndicator',
37
+ 'showsHorizontalScrollIndicator',
38
+ 'pagingEnabled',
39
+ 'bounces',
40
+ 'decelerationRate',
41
+ 'scrollEventThrottle',
42
+ 'contentInset',
43
+ 'contentOffset',
44
+ 'removeClippedSubviews',
45
+ 'snapToInterval',
46
+ 'snapToOffsets',
47
+ 'snapToAlignment',
48
+ 'snapToStart',
49
+ 'snapToEnd',
50
+ 'disableIntervalMomentum',
51
+ 'stickyHeaderIndices',
52
+ 'invertStickyHeaders',
53
+ 'StickyHeaderComponent',
54
+ 'keyboardDismissMode',
55
+ 'keyboardShouldPersistTaps',
56
+ 'maintainVisibleContentPosition',
57
+ 'alwaysBounceHorizontal',
58
+ 'alwaysBounceVertical',
59
+ 'centerContent',
60
+ 'scrollIndicatorInsets',
61
+ 'indicatorStyle',
62
+ 'directionalLockEnabled',
63
+ 'automaticallyAdjustKeyboardInsets',
64
+ 'contentInsetAdjustmentBehavior',
65
+ 'minimumZoomScale',
66
+ 'maximumZoomScale',
67
+ 'zoomScale',
68
+ 'bouncesZoom',
69
+ 'pinchGestureEnabled',
70
+ 'nestedScrollEnabled',
71
+ 'overScrollMode',
72
+ 'fadingEdgeLength',
73
+ 'persistentScrollbar',
74
+ 'endFillColor',
75
+ 'onScroll',
76
+ 'onScrollBeginDrag',
77
+ 'onScrollEndDrag',
78
+ 'onMomentumScrollBegin',
79
+ 'onMomentumScrollEnd',
80
+ 'testID',
81
+ 'nativeID',
82
+ 'accessible',
83
+ 'accessibilityLabel',
84
+ 'accessibilityHint',
85
+ 'accessibilityRole',
86
+ 'accessibilityState',
87
+ 'accessibilityValue',
88
+ 'accessibilityActions',
89
+ 'accessibilityLabelledBy',
90
+ 'importantForAccessibility',
91
+ 'accessibilityLiveRegion',
92
+ 'screenReaderFocusable',
93
+ 'accessibilityViewIsModal',
94
+ 'accessibilityElementsHidden',
95
+ 'accessibilityIgnoresInvertColors',
96
+ 'accessibilityLanguage',
97
+ 'accessibilityRespondsToUserInteraction',
98
+ 'accessibilityShowsLargeContentViewer',
99
+ 'accessibilityLargeContentTitle',
100
+ 'role',
101
+ 'aria-label',
102
+ 'aria-labelledby',
103
+ 'aria-live',
104
+ 'aria-hidden',
105
+ 'aria-busy',
106
+ 'aria-checked',
107
+ 'aria-disabled',
108
+ 'aria-expanded',
109
+ 'aria-selected',
110
+ 'aria-modal',
111
+ 'aria-valuemax',
112
+ 'aria-valuemin',
113
+ 'aria-valuenow',
114
+ 'aria-valuetext',
115
+ ];
116
+ // Strip undefined entries so a prop the user never set is not forwarded to the host (an undefined
117
+ // reaching Fabric is at best a no-op, at worst clears a default). The Angular twin of React/Vue
118
+ // destructuring `...rest` past the defined props.
119
+ function compact(bag) {
120
+ const result = {};
121
+ for (const key of Object.keys(bag)) {
122
+ if (bag[key] !== undefined)
123
+ result[key] = bag[key];
124
+ }
125
+ return result;
126
+ }
127
+ // ScrollView's forwarded surface (scroll events + the snap/keyboard/zoom families) is exactly the
128
+ // flat-bag shape SymbioteHostPropsDirective spreads onto a host element via Renderer2 (-> routeProp).
129
+ // The scroll-event callbacks ride this bag (not the (event) channel) because routeProp must be free
130
+ // to wire onScroll as an Animated.event when sticky headers drive the value natively, which the
131
+ // listen()/setEventListener channel cannot carry. This mirrors React/Vue putting onScroll on
132
+ // outerProps.
133
+ export class ScrollViewProjectionDirective {
134
+ elementRef = inject(ElementRef);
135
+ set symbioteScrollViewProjection(controller) {
136
+ const node = this.elementRef.nativeElement;
137
+ if (isSymbioteNode(node))
138
+ controller.bindContentNode(node);
139
+ }
140
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ScrollViewProjectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
141
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: ScrollViewProjectionDirective, isStandalone: true, selector: "[symbioteScrollViewProjection]", inputs: { symbioteScrollViewProjection: "symbioteScrollViewProjection" }, ngImport: i0 });
142
+ }
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ScrollViewProjectionDirective, decorators: [{
144
+ type: Directive,
145
+ args: [{
146
+ selector: '[symbioteScrollViewProjection]',
147
+ standalone: true,
148
+ inputs: ['symbioteScrollViewProjection'],
149
+ }]
150
+ }] });
151
+ // @Directive() (no selector) is the Angular-sanctioned decorator for an abstract base that
152
+ // declares lifecycle hooks and @ViewChild queries (mirrors AnimatedComponentBase) — without it
153
+ // ngtsc rejects the inherited hooks/queries (NG2007). The concrete platform @Components add ONLY a
154
+ // decorator + their platform template; all behavior lives here.
155
+ export class ScrollViewBase {
156
+ style;
157
+ contentContainerStyle;
158
+ horizontal;
159
+ scrollEnabled;
160
+ showsVerticalScrollIndicator;
161
+ showsHorizontalScrollIndicator;
162
+ pagingEnabled;
163
+ bounces;
164
+ decelerationRate;
165
+ scrollEventThrottle;
166
+ contentInset;
167
+ contentOffset;
168
+ removeClippedSubviews;
169
+ snapToInterval;
170
+ snapToOffsets;
171
+ snapToAlignment;
172
+ snapToStart;
173
+ snapToEnd;
174
+ disableIntervalMomentum;
175
+ stickyHeaderIndices;
176
+ invertStickyHeaders;
177
+ StickyHeaderComponent;
178
+ keyboardDismissMode;
179
+ keyboardShouldPersistTaps;
180
+ maintainVisibleContentPosition;
181
+ alwaysBounceHorizontal;
182
+ alwaysBounceVertical;
183
+ centerContent;
184
+ scrollIndicatorInsets;
185
+ indicatorStyle;
186
+ directionalLockEnabled;
187
+ automaticallyAdjustKeyboardInsets;
188
+ contentInsetAdjustmentBehavior;
189
+ minimumZoomScale;
190
+ maximumZoomScale;
191
+ zoomScale;
192
+ bouncesZoom;
193
+ pinchGestureEnabled;
194
+ nestedScrollEnabled;
195
+ overScrollMode;
196
+ fadingEdgeLength;
197
+ persistentScrollbar;
198
+ endFillColor;
199
+ onScroll;
200
+ onScrollBeginDrag;
201
+ onScrollEndDrag;
202
+ onMomentumScrollBegin;
203
+ onMomentumScrollEnd;
204
+ // The layout/content-size/accessibility events as real Angular events: `(layout)="…"`, not
205
+ // `[onLayout]="…"`. onScroll and the drag/momentum family stay plain @Input() callbacks above —
206
+ // they must also accept an Animated.event(...) native-driver marker (see the file header note),
207
+ // which no @Output() binding can carry.
208
+ layout = new EventEmitter();
209
+ scrollToTop = new EventEmitter();
210
+ contentSizeChange = new EventEmitter();
211
+ accessibilityAction = new EventEmitter();
212
+ accessibilityTap = new EventEmitter();
213
+ magicTap = new EventEmitter();
214
+ accessibilityEscape = new EventEmitter();
215
+ testID;
216
+ nativeID;
217
+ accessible;
218
+ accessibilityLabel;
219
+ accessibilityHint;
220
+ accessibilityRole;
221
+ accessibilityState;
222
+ accessibilityValue;
223
+ accessibilityActions;
224
+ accessibilityLabelledBy;
225
+ importantForAccessibility;
226
+ accessibilityLiveRegion;
227
+ screenReaderFocusable;
228
+ accessibilityViewIsModal;
229
+ accessibilityElementsHidden;
230
+ accessibilityIgnoresInvertColors;
231
+ accessibilityLanguage;
232
+ accessibilityRespondsToUserInteraction;
233
+ accessibilityShowsLargeContentViewer;
234
+ accessibilityLargeContentTitle;
235
+ role;
236
+ 'aria-label';
237
+ 'aria-labelledby';
238
+ 'aria-live';
239
+ 'aria-hidden';
240
+ 'aria-busy';
241
+ 'aria-checked';
242
+ 'aria-disabled';
243
+ 'aria-expanded';
244
+ 'aria-selected';
245
+ 'aria-modal';
246
+ 'aria-valuemax';
247
+ 'aria-valuemin';
248
+ 'aria-valuenow';
249
+ 'aria-valuetext';
250
+ // The host directive on the scroll-view intrinsic; `.node` is the committed SymbioteNode held by
251
+ // IDENTITY (Renderer2.createElement returned the engine node, ElementRef hands it back unwrapped).
252
+ // Inherited by the decorated subclass — Angular collects base-class @ViewChild queries.
253
+ hostDirective;
254
+ projectedRefreshControl;
255
+ // A single AnimatedValue tracks the scroll offset and drives every sticky header's translateY
256
+ // (RN's _scrollAnimatedValue). A stable field (allocated once, held by identity — Angular does
257
+ // not proxy class fields, so no markRaw needed); the native attach below feeds it on the UI
258
+ // thread. Allocated unconditionally; inert until a sticky header consumes it.
259
+ scrollAnimatedValue = new AnimatedValue(0);
260
+ // The last-seen content size, used to dedupe onContentSizeChange: RN fires the content onLayout
261
+ // on every layout pass; only real size changes emit (didContentSizeChange).
262
+ lastContentSize = null;
263
+ // Inverted sticky headers stick to the BOTTOM, so they need the viewport height (RN _handleLayout).
264
+ viewportHeight = undefined;
265
+ projectionController = new ScrollViewProjectionController({
266
+ stickyHeaderIndices: undefined,
267
+ invertStickyHeaders: undefined,
268
+ scrollViewHeight: undefined,
269
+ scrollAnimatedValue: this.scrollAnimatedValue,
270
+ customStickyHeaderComponent: undefined,
271
+ excludeRefreshControl: false,
272
+ });
273
+ // Native sticky-scroll attach (RN attachNativeEvent): when the native module is available the
274
+ // scroll value is driven on the UI thread so the interpolations ride scroll natively (no JS
275
+ // jitter). Through whenCommitted because under Angular's zoneless batched CD the host's Fabric
276
+ // tag does not exist yet at ngAfterViewInit time (the async-commit gotcha Vue documents); the
277
+ // bind runs now if committed, else after the commit that assigns the tag. Detached on destroy.
278
+ detachStickyScroll;
279
+ cancelStickyBind;
280
+ lastLoggedIsHorizontal = undefined;
281
+ // Stable reference (bound once): inverted sticky headers need the viewport height captured off
282
+ // the scroll-view's own onLayout before forwarding to the user (RN _handleLayout). A getter that
283
+ // built this arrow function fresh on every `scrollProps` access would hand `[symbioteHostProps]`
284
+ // a new function reference every change-detection pass touching this component — jsonEqual
285
+ // (commit.ts) falls back to Object.is on a function leaf, so even a structurally-identical bag
286
+ // reads as "props changed" and forces a real Fabric re-clone that cascades up every ancestor
287
+ // (see AnimatedComponentBase.reconcile()'s identical warning).
288
+ handleInvertedStickyLayout = (event) => {
289
+ const height = readLayoutDimension(event, 'height');
290
+ if (height !== undefined)
291
+ this.viewportHeight = height;
292
+ this.layout.emit(event);
293
+ };
294
+ // Same reasoning as handleInvertedStickyLayout: the content view's onLayout synthesizes
295
+ // onContentSizeChange (deduped) and must stay a stable reference across `contentProps` re-reads.
296
+ handleContentLayout = (event) => {
297
+ const width = readLayoutDimension(event, 'width');
298
+ const height = readLayoutDimension(event, 'height');
299
+ if (width === undefined || height === undefined)
300
+ return;
301
+ if (!didContentSizeChange(this.lastContentSize, { width, height }))
302
+ return;
303
+ this.lastContentSize = { width, height };
304
+ dlog(`Angular ScrollView contentSizeChange ${width}x${height}`);
305
+ this.contentSizeChange.emit({ width, height });
306
+ };
307
+ // Memoizes the wrapper each `emitterCallback` builds, keyed by the emitter it closes over
308
+ // (identity holds across ScrollViewBase's own @Output()s and a projected RefreshControl's,
309
+ // since a WeakMap key is just object identity). Without this, `scrollProps`/`refreshControlProps`
310
+ // handed a fresh `(event) => emitter.emit(event)` closure to the forwarded prop bag on every
311
+ // evaluation — the same jsonEqual/Object.is function-leaf problem as the arrow fields above, one
312
+ // level further removed. `.observed` is checked BEFORE the cache so an unbound event still
313
+ // resolves to `undefined` (the "nobody cares" contract `emitterCallback`'s own comment documents),
314
+ // not a stale cached wrapper from before the last subscriber unsubscribed.
315
+ emitterCallbackCache = new WeakMap();
316
+ // The sticky JS-path Animated.event handler depends on a REAL input (onScroll), so it can't be a
317
+ // plain stable field the way handleInvertedStickyLayout/handleContentLayout are — it must track
318
+ // `this.onScroll` genuinely changing, mirroring sticky-header.ts's own rebuildInterpolation cache
319
+ // (rebuild only when the tracked dependency's reference actually differs, not on every getter
320
+ // read). A fresh `animatedEvent(...)` call every `scrollProps` access would otherwise construct a
321
+ // new listener wrapper (and a new AnimatedEvent walking `collectMappedValues`) on every unrelated
322
+ // change-detection pass while sticky headers are active.
323
+ cachedStickyOnScrollSource;
324
+ cachedStickyOnScrollHandler;
325
+ get isHorizontal() {
326
+ const value = this.horizontal === true;
327
+ if (value !== this.lastLoggedIsHorizontal) {
328
+ this.lastLoggedIsHorizontal = value;
329
+ dlog(`Angular ScrollView isHorizontal changed to ${value} (horizontal input=${this.horizontal})`);
330
+ }
331
+ return value;
332
+ }
333
+ get hasStickyHeaders() {
334
+ return this.stickyHeaderIndices !== undefined && this.stickyHeaderIndices.length > 0;
335
+ }
336
+ // A class-name string resolves through the shared registry before it reaches
337
+ // selectScrollIntrinsics, which only understands style objects/arrays.
338
+ get resolvedContentContainerStyle() {
339
+ return typeof this.contentContainerStyle === 'string'
340
+ ? resolveClassName(this.contentContainerStyle)
341
+ : this.contentContainerStyle;
342
+ }
343
+ get scrollViewBaseStyle() {
344
+ return selectScrollIntrinsics(this.isHorizontal, this.resolvedContentContainerStyle)
345
+ .scrollViewBaseStyle;
346
+ }
347
+ // The forwarded host-prop bag for the scroll-view node: aria/role folded, the native pass-through
348
+ // families, the scroll-event callbacks, then the lifecycle-managed overrides (nestedScrollEnabled
349
+ // default ON, horizontal when defined, decelerationRate resolved per-platform, the sticky onScroll
350
+ // path). Base style UNDER user style so an explicit user value still wins. Mirrors Vue's outerProps
351
+ // + scrollProps assembly.
352
+ get scrollProps() {
353
+ const bag = compact({
354
+ ...resolveAccessibilityProps(this.accessibilityInputs()),
355
+ scrollEnabled: this.scrollEnabled,
356
+ showsVerticalScrollIndicator: this.showsVerticalScrollIndicator,
357
+ showsHorizontalScrollIndicator: this.showsHorizontalScrollIndicator,
358
+ pagingEnabled: this.pagingEnabled,
359
+ bounces: this.bounces,
360
+ contentInset: this.contentInset,
361
+ contentOffset: this.contentOffset,
362
+ removeClippedSubviews: this.removeClippedSubviews,
363
+ snapToInterval: this.snapToInterval,
364
+ snapToOffsets: this.snapToOffsets,
365
+ snapToAlignment: this.snapToAlignment,
366
+ snapToStart: this.snapToStart,
367
+ snapToEnd: this.snapToEnd,
368
+ disableIntervalMomentum: this.disableIntervalMomentum,
369
+ keyboardDismissMode: this.keyboardDismissMode,
370
+ keyboardShouldPersistTaps: this.keyboardShouldPersistTaps,
371
+ maintainVisibleContentPosition: this.maintainVisibleContentPosition,
372
+ alwaysBounceHorizontal: this.alwaysBounceHorizontal,
373
+ alwaysBounceVertical: this.alwaysBounceVertical,
374
+ centerContent: this.centerContent,
375
+ scrollIndicatorInsets: this.scrollIndicatorInsets,
376
+ indicatorStyle: this.indicatorStyle,
377
+ directionalLockEnabled: this.directionalLockEnabled,
378
+ automaticallyAdjustKeyboardInsets: this.automaticallyAdjustKeyboardInsets,
379
+ contentInsetAdjustmentBehavior: this.contentInsetAdjustmentBehavior,
380
+ minimumZoomScale: this.minimumZoomScale,
381
+ maximumZoomScale: this.maximumZoomScale,
382
+ zoomScale: this.zoomScale,
383
+ bouncesZoom: this.bouncesZoom,
384
+ pinchGestureEnabled: this.pinchGestureEnabled,
385
+ overScrollMode: this.overScrollMode,
386
+ fadingEdgeLength: this.fadingEdgeLength,
387
+ persistentScrollbar: this.persistentScrollbar,
388
+ endFillColor: this.endFillColor,
389
+ onScrollBeginDrag: this.onScrollBeginDrag,
390
+ onScrollEndDrag: this.onScrollEndDrag,
391
+ onMomentumScrollBegin: this.onMomentumScrollBegin,
392
+ onMomentumScrollEnd: this.onMomentumScrollEnd,
393
+ onScrollToTop: this.emitterCallback(this.scrollToTop),
394
+ onAccessibilityAction: this.emitterCallback(this.accessibilityAction),
395
+ onAccessibilityTap: this.emitterCallback(this.accessibilityTap),
396
+ onMagicTap: this.emitterCallback(this.magicTap),
397
+ onAccessibilityEscape: this.emitterCallback(this.accessibilityEscape),
398
+ });
399
+ // RN defaults nested scrolling ON (ScrollView.js `nestedScrollEnabled ?? true`); Android needs
400
+ // it to scroll a nested scrollable independently, iOS handles nesting natively (a no-op there).
401
+ bag.nestedScrollEnabled = this.nestedScrollEnabled ?? true;
402
+ // iOS needs `horizontal` to flip RCTScrollView's axis; Android's dedicated manager ignores it.
403
+ if (this.horizontal !== undefined)
404
+ bag.horizontal = this.horizontal;
405
+ if (this.decelerationRate !== undefined) {
406
+ bag.decelerationRate = resolveDecelerationRate(this.decelerationRate);
407
+ }
408
+ // onScroll: when sticky headers are active, the offset must reach the AnimatedValue (RN
409
+ // _scrollAnimatedValueAttachment). With the native module, the value is driven on the UI thread
410
+ // by the post-commit attach below, so onScroll forwards to the user with throttle 1
411
+ // (ScrollView.js:1798). Without it, Animated.event drives the value each frame (the JS jitter)
412
+ // and forwards the user handler as the listener passthrough.
413
+ // The scroll-forwarding DECISIONS (which onScroll path, the 1/16 throttle defaults, whether to
414
+ // capture the viewport height) are folded out to the shared resolveScrollForwarding; here Angular
415
+ // only EXECUTES them, keeping its stable-reference handlers (stickyOnScrollHandler /
416
+ // handleInvertedStickyLayout / emitterCallback) so a fresh closure never forces a re-clone cascade.
417
+ const nativeStickyAvailable = this.hasStickyHeaders && isNativeAnimatedAvailable();
418
+ const forwarding = resolveScrollForwarding({
419
+ hasStickyHeaders: this.hasStickyHeaders,
420
+ nativeStickyAvailable,
421
+ invertStickyHeaders: this.invertStickyHeaders,
422
+ scrollEventThrottle: this.scrollEventThrottle,
423
+ maintainVisibleContentPosition: this.maintainVisibleContentPosition,
424
+ snapToAlignment: this.snapToAlignment,
425
+ });
426
+ // onScroll: the JS-fallback path uses the cached Animated.event handler; the native + plain paths
427
+ // forward the user handler as-is (the native driver attaches the value on the UI thread).
428
+ if (forwarding.mode === 'sticky-js') {
429
+ bag.onScroll = this.stickyOnScrollHandler(this.onScroll);
430
+ }
431
+ else if (this.onScroll !== undefined) {
432
+ bag.onScroll = this.onScroll;
433
+ }
434
+ if (forwarding.scrollEventThrottle !== undefined) {
435
+ bag.scrollEventThrottle = forwarding.scrollEventThrottle;
436
+ }
437
+ // Inverted sticky headers need the viewport height (RN _handleLayout): capture it on the
438
+ // scroll-view onLayout, then call the user's handler. Otherwise forward the layout emitter.
439
+ if (forwarding.capturesViewportHeight) {
440
+ bag.onLayout = this.handleInvertedStickyLayout;
441
+ }
442
+ else {
443
+ const layoutCallback = this.emitterCallback(this.layout);
444
+ if (layoutCallback !== undefined)
445
+ bag.onLayout = layoutCallback;
446
+ }
447
+ dlog(`Angular ScrollView -> ${this.isHorizontal ? 'horizontal' : 'vertical'} (sticky=${this.hasStickyHeaders})`);
448
+ bag.style = [this.scrollViewBaseStyle, this.style];
449
+ this.updateProjectionController();
450
+ return bag;
451
+ }
452
+ // Overridable hook, NOT `this.style` directly: `splitLayoutProps` below decides which layout
453
+ // properties (flex/height/gap/…) go on the Android outer refresh-control wrapper vs. the inner
454
+ // scroll view. `this.style` alone only ever carries the explicit `[style]` @Input — a composed
455
+ // component's OWN anchor host (see anchorHostStyle's doc comment in primitives/shared.ts) can
456
+ // hold ADDITIONAL class-derived layout style that's otherwise invisible to this split, so its
457
+ // wrapper never gets its needed layout (collapses to zero size — the Android outer wrapper
458
+ // shows literally nothing on screen). This mirrors the Vue adapter's identical
459
+ // `layoutSplitStyle` field and the real Android device bug it fixes; the Angular Android
460
+ // ScrollView (index.android.ts) overrides this to merge in `anchorHostStyle`. Default here is
461
+ // `this.style` alone, preserving current behavior for anything that doesn't override it.
462
+ get layoutSplitStyle() {
463
+ return this.style;
464
+ }
465
+ get androidWrappedScrollProps() {
466
+ const props = { ...this.scrollProps };
467
+ const { inner, outer } = splitLayoutProps(this.layoutSplitStyle);
468
+ dlog(`Angular ScrollView splitProbe layoutSplitStyle=${JSON.stringify(this.layoutSplitStyle)} ` +
469
+ `outer=${JSON.stringify(outer)} inner=${JSON.stringify(inner)}`);
470
+ props.style = [this.scrollViewBaseStyle, inner];
471
+ props.nestedScrollEnabled = true;
472
+ return props;
473
+ }
474
+ get iosRefreshControlProps() {
475
+ return this.refreshControlProps();
476
+ }
477
+ get androidRefreshControlProps() {
478
+ const { outer } = splitLayoutProps(this.layoutSplitStyle);
479
+ dlog(`Angular ScrollView refreshControlProbe outer=${JSON.stringify(outer)} ` +
480
+ `hasRefresh=${this.projectedRefreshControl !== undefined}`);
481
+ return this.refreshControlProps(outer);
482
+ }
483
+ handleProjectedRefresh(nativeNode) {
484
+ this.projectedRefreshControl?.handleRefresh(nativeNode);
485
+ }
486
+ refreshControlProps(style) {
487
+ const refresh = this.projectedRefreshControl;
488
+ if (refresh === undefined)
489
+ return {};
490
+ return compact({
491
+ ...refresh.folded,
492
+ refreshing: refresh.refreshing,
493
+ tintColor: refresh.tintColor,
494
+ title: refresh.title,
495
+ titleColor: refresh.titleColor,
496
+ progressViewOffset: refresh.progressViewOffset,
497
+ colors: refresh.colors,
498
+ progressBackgroundColor: refresh.progressBackgroundColor,
499
+ size: refresh.size,
500
+ enabled: refresh.enabled,
501
+ style,
502
+ testID: refresh.testID,
503
+ nativeID: refresh.nativeID,
504
+ accessible: refresh.accessible,
505
+ onAccessibilityAction: this.emitterCallback(refresh.accessibilityAction),
506
+ onAccessibilityTap: this.emitterCallback(refresh.accessibilityTap),
507
+ onMagicTap: this.emitterCallback(refresh.magicTap),
508
+ onAccessibilityEscape: this.emitterCallback(refresh.accessibilityEscape),
509
+ });
510
+ }
511
+ get hasProjectedRefreshControl() {
512
+ return this.projectedRefreshControl !== undefined;
513
+ }
514
+ // The content (inner) view's prop bag. `collapsable: false` keeps the layout-only content view a
515
+ // real native view (Android Fabric view-flattens it away otherwise, hoisting cells as direct
516
+ // children of a scroll view that hosts exactly one — an addViewAt crash). collapsableChildren
517
+ // false preserves the cell views maintainVisibleContentPosition/snapToAlignment anchor against.
518
+ // onLayout synthesizes onContentSizeChange (deduped). iOS never flattens; both are no-ops there.
519
+ get contentProps() {
520
+ const { contentStyle } = selectScrollIntrinsics(this.isHorizontal, this.resolvedContentContainerStyle);
521
+ const bag = { style: contentStyle, collapsable: false };
522
+ if (this.maintainVisibleContentPosition !== undefined || this.snapToAlignment !== undefined) {
523
+ bag.collapsableChildren = false;
524
+ }
525
+ bag.onLayout = this.handleContentLayout;
526
+ return bag;
527
+ }
528
+ // Wraps an @Output() as a plain callback only while it has a subscriber, so an unbound event
529
+ // still leaves the forwarded prop bag key absent — the same "undefined means nobody cares"
530
+ // contract the old @Input() callbacks had. Mirrors Pressable's emitterHandler. The wrapper itself
531
+ // is memoized per emitter (emitterCallbackCache) rather than rebuilt on every call: see that
532
+ // field's comment for why an unstable closure here breaks the forwarded prop bag.
533
+ emitterCallback(emitter) {
534
+ if (!emitter.observed)
535
+ return undefined;
536
+ let cached = this.emitterCallbackCache.get(emitter);
537
+ if (cached === undefined) {
538
+ cached = (event) => emitter.emit(event);
539
+ this.emitterCallbackCache.set(emitter, cached);
540
+ }
541
+ return cached;
542
+ }
543
+ // Rebuilds the JS-path Animated.event handler only when the tracked `onScroll` input actually
544
+ // changes reference (see cachedStickyOnScrollHandler's comment).
545
+ stickyOnScrollHandler(userOnScroll) {
546
+ if (this.cachedStickyOnScrollHandler === undefined ||
547
+ this.cachedStickyOnScrollSource !== userOnScroll) {
548
+ this.cachedStickyOnScrollSource = userOnScroll;
549
+ this.cachedStickyOnScrollHandler = animatedEvent([{ nativeEvent: { contentOffset: { y: this.scrollAnimatedValue } } }], userOnScroll === undefined
550
+ ? undefined
551
+ : { listener: (...args) => forwardScrollEvent(userOnScroll, args) });
552
+ }
553
+ return this.cachedStickyOnScrollHandler;
554
+ }
555
+ // The committed scroll-view node held by IDENTITY (the directive's ElementRef). null until the
556
+ // element commits; the imperative handle and the sticky attach both read it through this getter.
557
+ get hostNode() {
558
+ const native = this.hostDirective?.node;
559
+ return isSymbioteNode(native) ? native : null;
560
+ }
561
+ // The imperative API a parent reaches via @ViewChild(ScrollView). buildScrollViewHandle is the
562
+ // shared, proven handle (React/Vue use it verbatim); it reads the node through the LAZY getter on
563
+ // every call, so a command before commit no-ops rather than freezing a null node.
564
+ handle = buildScrollViewHandle(() => this.hostNode);
565
+ scrollTo(options) {
566
+ this.handle.scrollTo(options);
567
+ }
568
+ scrollToEnd(options) {
569
+ this.handle.scrollToEnd(options);
570
+ }
571
+ flashScrollIndicators() {
572
+ this.handle.flashScrollIndicators();
573
+ }
574
+ getScrollNode() {
575
+ return this.handle.getScrollNode();
576
+ }
577
+ ngAfterViewInit() {
578
+ this.updateProjectionController();
579
+ this.attachSticky();
580
+ }
581
+ // Wire the native sticky-scroll attach after the view exists. Re-attaches if the node identity
582
+ // changes; no-op when sticky is off or the native module is absent.
583
+ attachSticky() {
584
+ this.cancelStickyBind?.();
585
+ this.cancelStickyBind = undefined;
586
+ if (this.detachStickyScroll !== undefined) {
587
+ this.detachStickyScroll();
588
+ this.detachStickyScroll = undefined;
589
+ }
590
+ if (!this.hasStickyHeaders || !isNativeAnimatedAvailable())
591
+ return;
592
+ const node = this.hostNode;
593
+ if (node === null)
594
+ return;
595
+ this.cancelStickyBind = whenCommitted(node, () => {
596
+ this.detachStickyScroll = attachStickyScroll(node, this.scrollAnimatedValue);
597
+ });
598
+ }
599
+ ngOnDestroy() {
600
+ this.cancelStickyBind?.();
601
+ this.cancelStickyBind = undefined;
602
+ if (this.detachStickyScroll !== undefined)
603
+ this.detachStickyScroll();
604
+ }
605
+ updateProjectionController() {
606
+ this.projectionController.update({
607
+ stickyHeaderIndices: this.stickyHeaderIndices,
608
+ invertStickyHeaders: this.invertStickyHeaders,
609
+ scrollViewHeight: this.viewportHeight,
610
+ scrollAnimatedValue: this.scrollAnimatedValue,
611
+ customStickyHeaderComponent: this.StickyHeaderComponent,
612
+ excludeRefreshControl: this.hasProjectedRefreshControl,
613
+ });
614
+ }
615
+ // Typed as the a11y intersection WITH the string index so resolveAccessibilityProps's result
616
+ // stays assignable into the forwarded bag (a genuine narrowing, built at that type — no cast).
617
+ accessibilityInputs() {
618
+ return {
619
+ testID: this.testID,
620
+ nativeID: this.nativeID,
621
+ accessible: this.accessible,
622
+ accessibilityLabel: this.accessibilityLabel,
623
+ accessibilityHint: this.accessibilityHint,
624
+ accessibilityRole: this.accessibilityRole,
625
+ accessibilityState: this.accessibilityState,
626
+ accessibilityValue: this.accessibilityValue,
627
+ accessibilityActions: this.accessibilityActions,
628
+ accessibilityLabelledBy: this.accessibilityLabelledBy,
629
+ importantForAccessibility: this.importantForAccessibility,
630
+ accessibilityLiveRegion: this.accessibilityLiveRegion,
631
+ screenReaderFocusable: this.screenReaderFocusable,
632
+ accessibilityViewIsModal: this.accessibilityViewIsModal,
633
+ accessibilityElementsHidden: this.accessibilityElementsHidden,
634
+ accessibilityIgnoresInvertColors: this.accessibilityIgnoresInvertColors,
635
+ accessibilityLanguage: this.accessibilityLanguage,
636
+ accessibilityRespondsToUserInteraction: this.accessibilityRespondsToUserInteraction,
637
+ accessibilityShowsLargeContentViewer: this.accessibilityShowsLargeContentViewer,
638
+ accessibilityLargeContentTitle: this.accessibilityLargeContentTitle,
639
+ role: this.role,
640
+ 'aria-label': this['aria-label'],
641
+ 'aria-labelledby': this['aria-labelledby'],
642
+ 'aria-live': this['aria-live'],
643
+ 'aria-hidden': this['aria-hidden'],
644
+ 'aria-busy': this['aria-busy'],
645
+ 'aria-checked': this['aria-checked'],
646
+ 'aria-disabled': this['aria-disabled'],
647
+ 'aria-expanded': this['aria-expanded'],
648
+ 'aria-selected': this['aria-selected'],
649
+ 'aria-modal': this['aria-modal'],
650
+ 'aria-valuemax': this['aria-valuemax'],
651
+ 'aria-valuemin': this['aria-valuemin'],
652
+ 'aria-valuenow': this['aria-valuenow'],
653
+ 'aria-valuetext': this['aria-valuetext'],
654
+ };
655
+ }
656
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ScrollViewBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
657
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: ScrollViewBase, isStandalone: true, outputs: { layout: "layout", scrollToTop: "scrollToTop", contentSizeChange: "contentSizeChange", accessibilityAction: "accessibilityAction", accessibilityTap: "accessibilityTap", magicTap: "magicTap", accessibilityEscape: "accessibilityEscape" }, queries: [{ propertyName: "projectedRefreshControl", first: true, predicate: RefreshControl, descendants: true }], viewQueries: [{ propertyName: "hostDirective", first: true, predicate: ["host"], descendants: true, read: SymbioteHostPropsDirective }], ngImport: i0 });
658
+ }
659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ScrollViewBase, decorators: [{
660
+ type: Directive
661
+ }], propDecorators: { layout: [{
662
+ type: Output
663
+ }], scrollToTop: [{
664
+ type: Output
665
+ }], contentSizeChange: [{
666
+ type: Output
667
+ }], accessibilityAction: [{
668
+ type: Output
669
+ }], accessibilityTap: [{
670
+ type: Output
671
+ }], magicTap: [{
672
+ type: Output
673
+ }], accessibilityEscape: [{
674
+ type: Output
675
+ }], hostDirective: [{
676
+ type: ViewChild,
677
+ args: ['host', { read: SymbioteHostPropsDirective }]
678
+ }], projectedRefreshControl: [{
679
+ type: ContentChild,
680
+ args: [RefreshControl]
681
+ }] } });
682
+ //# sourceMappingURL=shared.js.map