@symbiote-native/angular 0.8.0 → 2.0.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 (256) hide show
  1. package/README.md +13 -10
  2. package/babel-register-composed.cjs +58 -18
  3. package/bin/symbiote-angular-dev.cjs +16 -4
  4. package/build/angular/anchor-host-registry.js +1 -15
  5. package/build/angular/anchor-host-registry.js.map +1 -1
  6. package/build/angular/change-detection-flush.d.ts +31 -0
  7. package/build/angular/change-detection-flush.js +110 -0
  8. package/build/angular/change-detection-flush.js.map +1 -0
  9. package/build/angular/components/activity-indicator-props.d.ts +2 -0
  10. package/build/angular/components/activity-indicator-props.js +2 -0
  11. package/build/angular/components/activity-indicator-props.js.map +1 -0
  12. package/build/angular/components/button-props.d.ts +2 -0
  13. package/build/angular/components/button-props.js +2 -0
  14. package/build/angular/components/button-props.js.map +1 -0
  15. package/build/angular/components/flat-list/index.d.ts +2 -1
  16. package/build/angular/components/flat-list/index.js +22 -10
  17. package/build/angular/components/flat-list/index.js.map +1 -1
  18. package/build/angular/components/image-background-props.d.ts +6 -0
  19. package/build/angular/components/image-background-props.js +2 -0
  20. package/build/angular/components/image-background-props.js.map +1 -0
  21. package/build/angular/components/{image/shared.d.ts → image-shared.d.ts} +4 -4
  22. package/build/angular/components/{image/shared.js → image-shared.js} +39 -28
  23. package/build/angular/components/image-shared.js.map +1 -0
  24. package/build/angular/components/input-accessory-view-props.d.ts +7 -0
  25. package/build/angular/components/input-accessory-view-props.js +9 -0
  26. package/build/angular/components/input-accessory-view-props.js.map +1 -0
  27. package/build/angular/components/keyboard-avoiding-view/index.d.ts +2 -1
  28. package/build/angular/components/keyboard-avoiding-view/index.js +28 -27
  29. package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
  30. package/build/angular/components/modal/index.d.ts +2 -0
  31. package/build/angular/components/modal/index.js +33 -20
  32. package/build/angular/components/modal/index.js.map +1 -1
  33. package/build/angular/components/pressable-props.d.ts +32 -0
  34. package/build/angular/components/pressable-props.js +11 -0
  35. package/build/angular/components/pressable-props.js.map +1 -0
  36. package/build/angular/components/refresh-control-props.d.ts +16 -0
  37. package/build/angular/components/refresh-control-props.js +14 -0
  38. package/build/angular/components/refresh-control-props.js.map +1 -0
  39. package/build/angular/components/safe-area-view-props.d.ts +7 -0
  40. package/build/angular/components/safe-area-view-props.js +11 -0
  41. package/build/angular/components/safe-area-view-props.js.map +1 -0
  42. package/build/angular/components/scroll-view-props.d.ts +76 -0
  43. package/build/angular/components/scroll-view-props.js +18 -0
  44. package/build/angular/components/scroll-view-props.js.map +1 -0
  45. package/build/angular/components/section-list/index.d.ts +3 -0
  46. package/build/angular/components/section-list/index.js +10 -1
  47. package/build/angular/components/section-list/index.js.map +1 -1
  48. package/build/angular/components/text-input-props.d.ts +45 -0
  49. package/build/angular/components/text-input-props.js +18 -0
  50. package/build/angular/components/text-input-props.js.map +1 -0
  51. package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.d.ts +6 -0
  52. package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js +2 -0
  53. package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js.map +1 -0
  54. package/build/angular/components/touchable-props.d.ts +14 -0
  55. package/build/angular/components/touchable-props.js +13 -0
  56. package/build/angular/components/touchable-props.js.map +1 -0
  57. package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.d.ts +3 -0
  58. package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js +2 -0
  59. package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js.map +1 -0
  60. package/build/angular/components/virtualized-list/index.d.ts +8 -1
  61. package/build/angular/components/virtualized-list/index.js +373 -278
  62. package/build/angular/components/virtualized-list/index.js.map +1 -1
  63. package/build/angular/components/virtualized-section-list/index.d.ts +3 -0
  64. package/build/angular/components/virtualized-section-list/index.js +10 -1
  65. package/build/angular/components/virtualized-section-list/index.js.map +1 -1
  66. package/build/angular/components.d.ts +21 -27
  67. package/build/angular/components.js +13 -15
  68. package/build/angular/components.js.map +1 -1
  69. package/build/angular/create-portal/index.d.ts +11 -2
  70. package/build/angular/create-portal/index.js +37 -11
  71. package/build/angular/create-portal/index.js.map +1 -1
  72. package/build/angular/create-tunnel/index.js +1 -1
  73. package/build/angular/element-props.d.ts +53 -0
  74. package/build/angular/element-props.js +2 -0
  75. package/build/angular/element-props.js.map +1 -0
  76. package/build/angular/elements.d.ts +528 -0
  77. package/build/angular/elements.js +1444 -0
  78. package/build/angular/elements.js.map +1 -0
  79. package/build/angular/gate-demand.d.ts +37 -0
  80. package/build/angular/gate-demand.js +84 -0
  81. package/build/angular/gate-demand.js.map +1 -0
  82. package/build/angular/host-instance/index.js +1 -1
  83. package/build/angular/index.d.ts +5 -2
  84. package/build/angular/index.js +16 -1
  85. package/build/angular/index.js.map +1 -1
  86. package/build/angular/modules/animated/create-animated-component.d.ts +6 -6
  87. package/build/angular/modules/animated/create-animated-component.js +73 -81
  88. package/build/angular/modules/animated/create-animated-component.js.map +1 -1
  89. package/build/angular/modules/animated/index.js +1 -1
  90. package/build/angular/modules/animated/index.js.map +1 -1
  91. package/build/angular/modules/image/index.d.ts +3 -0
  92. package/build/angular/modules/image/index.js +16 -0
  93. package/build/angular/modules/image/index.js.map +1 -0
  94. package/build/angular/primitives/index.d.ts +28 -16
  95. package/build/angular/primitives/index.js +77 -31
  96. package/build/angular/primitives/index.js.map +1 -1
  97. package/build/angular/primitives/shared.d.ts +2 -3
  98. package/build/angular/primitives/shared.js +8 -53
  99. package/build/angular/primitives/shared.js.map +1 -1
  100. package/build/angular/register.d.ts +1 -0
  101. package/build/angular/register.js +16 -0
  102. package/build/angular/register.js.map +1 -0
  103. package/build/angular/render/index.js +4 -2
  104. package/build/angular/render/index.js.map +1 -1
  105. package/build/angular/renderer/index.js +207 -60
  106. package/build/angular/renderer/index.js.map +1 -1
  107. package/build/angular/renderer/value-change.d.ts +2 -0
  108. package/build/angular/renderer/value-change.js +9 -0
  109. package/build/angular/renderer/value-change.js.map +1 -0
  110. package/metro-config.cjs +23 -5
  111. package/metro-css-parser.cjs +2 -1
  112. package/package.json +17 -7
  113. package/src/anchor-host-registry.ts +1 -15
  114. package/src/change-detection-flush.ts +120 -0
  115. package/src/components/activity-indicator-props.ts +21 -0
  116. package/src/components/button-props.ts +26 -0
  117. package/src/components/flat-list/index.ts +12 -4
  118. package/src/components/image-background-props.ts +24 -0
  119. package/src/components/{image/shared.ts → image-shared.ts} +57 -26
  120. package/src/components/input-accessory-view-props.ts +21 -0
  121. package/src/components/keyboard-avoiding-view/index.ts +27 -16
  122. package/src/components/modal/index.ts +32 -11
  123. package/src/components/pressable-props.ts +73 -0
  124. package/src/components/refresh-control-props.ts +43 -0
  125. package/src/components/safe-area-view-props.ts +28 -0
  126. package/src/components/scroll-view-props.ts +109 -0
  127. package/src/components/section-list/index.ts +18 -0
  128. package/src/components/text-input-props.ts +72 -0
  129. package/src/components/touchable-native-feedback/touchable-native-feedback-props.ts +23 -0
  130. package/src/components/touchable-props.ts +30 -0
  131. package/src/components/touchable-without-feedback/touchable-without-feedback-props.ts +21 -0
  132. package/src/components/virtualized-list/index.ts +254 -153
  133. package/src/components/virtualized-section-list/index.ts +18 -0
  134. package/src/components.ts +86 -35
  135. package/src/create-portal/index.ts +39 -9
  136. package/src/create-tunnel/index.ts +1 -1
  137. package/src/diagnostics.ts +1 -1
  138. package/src/element-props.ts +90 -0
  139. package/src/elements.ts +919 -0
  140. package/src/gate-demand.ts +109 -0
  141. package/src/host-instance/index.ts +1 -1
  142. package/src/index.ts +54 -15
  143. package/src/modules/animated/create-animated-component.ts +73 -59
  144. package/src/modules/animated/index.ts +1 -1
  145. package/src/modules/image/index.ts +18 -0
  146. package/src/primitives/index.ts +47 -16
  147. package/src/primitives/shared.ts +11 -44
  148. package/src/register.ts +15 -0
  149. package/src/render/index.ts +4 -2
  150. package/src/renderer/index.ts +239 -80
  151. package/src/renderer/value-change.ts +8 -0
  152. package/build/angular/components/activity-indicator/index.android.d.ts +0 -13
  153. package/build/angular/components/activity-indicator/index.android.js +0 -29
  154. package/build/angular/components/activity-indicator/index.android.js.map +0 -1
  155. package/build/angular/components/activity-indicator/index.d.ts +0 -1
  156. package/build/angular/components/activity-indicator/index.ios.d.ts +0 -9
  157. package/build/angular/components/activity-indicator/index.ios.js +0 -26
  158. package/build/angular/components/activity-indicator/index.ios.js.map +0 -1
  159. package/build/angular/components/activity-indicator/index.js +0 -4
  160. package/build/angular/components/activity-indicator/index.js.map +0 -1
  161. package/build/angular/components/activity-indicator/shared.d.ts +0 -67
  162. package/build/angular/components/activity-indicator/shared.js +0 -260
  163. package/build/angular/components/activity-indicator/shared.js.map +0 -1
  164. package/build/angular/components/button.d.ts +0 -65
  165. package/build/angular/components/button.js +0 -351
  166. package/build/angular/components/button.js.map +0 -1
  167. package/build/angular/components/image/index.android.d.ts +0 -15
  168. package/build/angular/components/image/index.android.js +0 -91
  169. package/build/angular/components/image/index.android.js.map +0 -1
  170. package/build/angular/components/image/index.d.ts +0 -1
  171. package/build/angular/components/image/index.ios.d.ts +0 -15
  172. package/build/angular/components/image/index.ios.js +0 -91
  173. package/build/angular/components/image/index.ios.js.map +0 -1
  174. package/build/angular/components/image/index.js +0 -3
  175. package/build/angular/components/image/index.js.map +0 -1
  176. package/build/angular/components/image/shared.js.map +0 -1
  177. package/build/angular/components/image-background.d.ts +0 -82
  178. package/build/angular/components/image-background.js +0 -434
  179. package/build/angular/components/image-background.js.map +0 -1
  180. package/build/angular/components/input-accessory-view/index.d.ts +0 -65
  181. package/build/angular/components/input-accessory-view/index.js +0 -290
  182. package/build/angular/components/input-accessory-view/index.js.map +0 -1
  183. package/build/angular/components/pressable/index.d.ts +0 -129
  184. package/build/angular/components/pressable/index.js +0 -473
  185. package/build/angular/components/pressable/index.js.map +0 -1
  186. package/build/angular/components/refresh-control/index.d.ts +0 -90
  187. package/build/angular/components/refresh-control/index.js +0 -380
  188. package/build/angular/components/refresh-control/index.js.map +0 -1
  189. package/build/angular/components/safe-area-view/index.d.ts +0 -62
  190. package/build/angular/components/safe-area-view/index.js +0 -287
  191. package/build/angular/components/safe-area-view/index.js.map +0 -1
  192. package/build/angular/components/scroll-view/index.android.d.ts +0 -20
  193. package/build/angular/components/scroll-view/index.android.js +0 -262
  194. package/build/angular/components/scroll-view/index.android.js.map +0 -1
  195. package/build/angular/components/scroll-view/index.d.ts +0 -3
  196. package/build/angular/components/scroll-view/index.ios.d.ts +0 -8
  197. package/build/angular/components/scroll-view/index.ios.js +0 -92
  198. package/build/angular/components/scroll-view/index.ios.js.map +0 -1
  199. package/build/angular/components/scroll-view/index.js +0 -6
  200. package/build/angular/components/scroll-view/index.js.map +0 -1
  201. package/build/angular/components/scroll-view/projection.d.ts +0 -67
  202. package/build/angular/components/scroll-view/projection.js +0 -560
  203. package/build/angular/components/scroll-view/projection.js.map +0 -1
  204. package/build/angular/components/scroll-view/shared.d.ts +0 -239
  205. package/build/angular/components/scroll-view/shared.js +0 -832
  206. package/build/angular/components/scroll-view/shared.js.map +0 -1
  207. package/build/angular/components/scroll-view/sticky-header.d.ts +0 -40
  208. package/build/angular/components/scroll-view/sticky-header.js +0 -224
  209. package/build/angular/components/scroll-view/sticky-header.js.map +0 -1
  210. package/build/angular/components/switch/index.android.d.ts +0 -24
  211. package/build/angular/components/switch/index.android.js +0 -112
  212. package/build/angular/components/switch/index.android.js.map +0 -1
  213. package/build/angular/components/switch/index.d.ts +0 -1
  214. package/build/angular/components/switch/index.ios.d.ts +0 -23
  215. package/build/angular/components/switch/index.ios.js +0 -111
  216. package/build/angular/components/switch/index.ios.js.map +0 -1
  217. package/build/angular/components/switch/index.js +0 -4
  218. package/build/angular/components/switch/index.js.map +0 -1
  219. package/build/angular/components/switch/shared.d.ts +0 -49
  220. package/build/angular/components/switch/shared.js +0 -191
  221. package/build/angular/components/switch/shared.js.map +0 -1
  222. package/build/angular/components/text-input.d.ts +0 -161
  223. package/build/angular/components/text-input.js +0 -659
  224. package/build/angular/components/text-input.js.map +0 -1
  225. package/build/angular/components/touchable/index.d.ts +0 -276
  226. package/build/angular/components/touchable/index.js +0 -1422
  227. package/build/angular/components/touchable/index.js.map +0 -1
  228. package/build/angular/components/touchable-native-feedback/index.d.ts +0 -86
  229. package/build/angular/components/touchable-native-feedback/index.js +0 -407
  230. package/build/angular/components/touchable-native-feedback/index.js.map +0 -1
  231. package/src/components/activity-indicator/index.android.ts +0 -23
  232. package/src/components/activity-indicator/index.ios.ts +0 -21
  233. package/src/components/activity-indicator/index.ts +0 -4
  234. package/src/components/activity-indicator/shared.ts +0 -225
  235. package/src/components/button.ts +0 -220
  236. package/src/components/image/index.android.ts +0 -99
  237. package/src/components/image/index.ios.ts +0 -99
  238. package/src/components/image/index.ts +0 -3
  239. package/src/components/image-background.ts +0 -290
  240. package/src/components/input-accessory-view/index.ts +0 -240
  241. package/src/components/pressable/index.ts +0 -462
  242. package/src/components/refresh-control/index.ts +0 -340
  243. package/src/components/safe-area-view/index.ts +0 -231
  244. package/src/components/scroll-view/index.android.ts +0 -205
  245. package/src/components/scroll-view/index.ios.ts +0 -81
  246. package/src/components/scroll-view/index.ts +0 -7
  247. package/src/components/scroll-view/projection.ts +0 -713
  248. package/src/components/scroll-view/shared.ts +0 -1066
  249. package/src/components/scroll-view/sticky-header.ts +0 -267
  250. package/src/components/switch/index.android.ts +0 -113
  251. package/src/components/switch/index.ios.ts +0 -112
  252. package/src/components/switch/index.ts +0 -4
  253. package/src/components/switch/shared.ts +0 -284
  254. package/src/components/text-input.ts +0 -613
  255. package/src/components/touchable/index.ts +0 -913
  256. package/src/components/touchable-native-feedback/index.ts +0 -317
@@ -1,560 +0,0 @@
1
- import { AnimatedProps, dlog, isDebug, isAnchor, reduceProps, routeProp, whenCommitted, createElement, appendChild, insertBefore, removeChild, } from '@symbiote-native/engine';
2
- import { countAngular } from '../../diagnostics';
3
- import { createInitialStickyState, readLayoutNumber, reduceSticky, STICKY_HEADER_Z_INDEX, } from '@symbiote-native/components';
4
- import { descriptorFor } from '@symbiote-native/components';
5
- import { Platform } from '@symbiote-native/engine';
6
- const contentProjection = new WeakMap();
7
- // Which controller owns a projected child. Keyed by EVERY projected child, not only the wrapped
8
- // ones: sticky indices are positional, so a child removed behind the controller's back leaves a dead
9
- // record that inflates every later child's paint index (see removeScrollViewProjectedChild). A
10
- // windowed list recycles cells continuously, so that drift grows with scroll distance.
11
- const projectedOwners = new WeakMap();
12
- // Controllers with a coalesced sticky reconcile owed, drained once per change-detection pass by
13
- // flushScrollViewProjections (see ScrollViewProjectionController.scheduleReconcile for why the
14
- // flush must be synchronous rather than a microtask). A strong Set is correct here: an entry lives
15
- // only from the mutation that queued it to the end of that same pass.
16
- const pendingProjections = new Set();
17
- /**
18
- * Run every sticky reconcile owed by this change-detection pass. Wired to the renderer factory's
19
- * `end()`, which Angular calls at the end of `ApplicationRef.tick` — after both channels that feed
20
- * a projection controller have written (children through the renderer, `stickyHeaderIndices` through
21
- * an `@Input`), and before the surface's microtask-coalesced commit runs.
22
- */
23
- export function flushScrollViewProjections() {
24
- if (pendingProjections.size === 0)
25
- return;
26
- // Snapshot: a reconcile can wrap a record, and wrapping is itself a projected mutation.
27
- const owed = [...pendingProjections];
28
- pendingProjections.clear();
29
- for (const controller of owed)
30
- controller.flushReconcile();
31
- }
32
- function createViewNode() {
33
- const descriptor = descriptorFor('symbiote-view');
34
- return createElement(descriptor.component, descriptor.isText);
35
- }
36
- function directNode(record) {
37
- return record.wrapper ?? record.child;
38
- }
39
- function isProjectedRefreshControl(node) {
40
- if (node.component === 'PullToRefreshView' ||
41
- node.component === 'AndroidSwipeRefreshLayout') {
42
- return true;
43
- }
44
- // Angular public <RefreshControl> is an anchor host whose real native refresh node lives inside
45
- // its component view. Projection filtering must recognize that anchor, otherwise iOS re-renders
46
- // a RefreshControl sibling and also leaves the projected one inside the scroll content.
47
- return isAnchor(node) && node.children.some(isProjectedRefreshControl);
48
- }
49
- // The SECOND Angular sticky effect-runner (auto-projected children can't be arbitrary Angular
50
- // component classes, so the controller drives engine nodes directly). It shares the ONE
51
- // reduceSticky state machine with ScrollViewStickyHeader — the DECISIONS (zero-swallow gate, debounce
52
- // delay, rebuild ranges, cross-talk record) live there; this runner only EXECUTES the effects on the
53
- // engine node (build interpolation + wire listener, hold the debounce timer, re-apply the node props).
54
- // Because it owns the child index, it consumes the reducer's record-header-y effect for cross-talk.
55
- // Diagnostic-only: a process-wide counter so each controller's log lines are attributable.
56
- let projectionControllerSeq = 0;
57
- class StickyProjectionWrapper {
58
- controller;
59
- childIndex;
60
- node;
61
- state = createInitialStickyState();
62
- animatedTranslateY;
63
- interpolation;
64
- animatedProps;
65
- cancelBind;
66
- listenerId;
67
- debounceTimer;
68
- constructor(controller,
69
- // NOT readonly: a window step renumbers every paint index below it without changing which child
70
- // this header is. See setChildIndex.
71
- childIndex, node) {
72
- this.controller = controller;
73
- this.childIndex = childIndex;
74
- this.node = node;
75
- this.animatedTranslateY =
76
- this.controller.config.scrollAnimatedValue.interpolate({
77
- inputRange: [-1, 0],
78
- outputRange: [0, 0],
79
- });
80
- dlog(`STICKY[wrap] created index=${childIndex} scrollValueIsNative=${this.controller.config.scrollAnimatedValue.__isNative()}`);
81
- this.dispatch({ kind: 'inputs-changed' });
82
- }
83
- destroy() {
84
- this.cancelBind?.();
85
- this.cancelBind = undefined;
86
- if (this.interpolation !== undefined && this.listenerId !== undefined) {
87
- this.interpolation.removeListener(this.listenerId);
88
- this.listenerId = undefined;
89
- }
90
- if (this.debounceTimer !== undefined) {
91
- clearTimeout(this.debounceTimer);
92
- this.debounceTimer = undefined;
93
- }
94
- if (this.animatedProps !== undefined) {
95
- this.animatedProps.__detach();
96
- this.animatedProps = undefined;
97
- }
98
- }
99
- // The controller calls this when a cross-talk input changed (a sibling recorded its y): rebuild the
100
- // ranges off the new nextStickyHeaderY.
101
- rebuild() {
102
- this.dispatch({ kind: 'inputs-changed' });
103
- }
104
- // A window step renumbers every paint index below it while the header itself is unchanged: same
105
- // child, same measured layout, new position among the projected children. Recreating the wrapper
106
- // for that throws away `measured`/`layoutY` so the header re-measures from scratch, and costs a
107
- // native round trip per step (restoreDefaultValues + dropAnimatedNode out, a fresh interpolation +
108
- // AnimatedProps in). Feed the new index to the SAME state machine and let the reducer's range
109
- // guard decide whether anything must be rebuilt.
110
- //
111
- // Identity is the CHILD - it owns the record, the record owns this wrapper - never the position.
112
- // Angular CDK's virtual scroll makes the same call: on a window move `_updateContext` writes
113
- // `view.context.index = renderedRange.start + i` into the EXISTING view rather than recreating it,
114
- // and its trackBy is offset by `renderedRange.start` so identity stays absolute
115
- // (`cdk/scrolling/virtual-for-of.ts`).
116
- setChildIndex(next) {
117
- if (this.childIndex === next)
118
- return;
119
- this.childIndex = next;
120
- this.dispatch({ kind: 'inputs-changed' });
121
- }
122
- inputs() {
123
- return {
124
- os: Platform.OS,
125
- inverted: this.controller.config.invertStickyHeaders,
126
- scrollViewHeight: this.controller.config.scrollViewHeight,
127
- nextHeaderLayoutY: this.controller.nextStickyHeaderY(this.childIndex),
128
- index: this.childIndex,
129
- };
130
- }
131
- dispatch(action) {
132
- this.runEffects(reduceSticky(this.state, action, this.inputs()).effects);
133
- }
134
- runEffects(effects) {
135
- for (const effect of effects) {
136
- switch (effect.kind) {
137
- case 'rebuild-interpolation': {
138
- if (this.interpolation !== undefined &&
139
- this.listenerId !== undefined) {
140
- this.interpolation.removeListener(this.listenerId);
141
- this.listenerId = undefined;
142
- }
143
- const next = this.controller.config.scrollAnimatedValue.interpolate({
144
- inputRange: effect.inputRange,
145
- outputRange: effect.outputRange,
146
- });
147
- this.listenerId = next.addListener(this.animatedValueListener);
148
- this.interpolation = next;
149
- this.animatedTranslateY = next;
150
- this.applyProps();
151
- dlog(`STICKY[wrap] rebuilt index=${this.childIndex} measured=${this.state.measured} y=${this.state.layoutY}`);
152
- break;
153
- }
154
- case 'schedule-debounce':
155
- if (this.debounceTimer !== undefined)
156
- clearTimeout(this.debounceTimer);
157
- this.debounceTimer = setTimeout(() => {
158
- this.debounceTimer = undefined;
159
- this.dispatch({ kind: 'debounce-fired', value: effect.value });
160
- }, effect.delay);
161
- break;
162
- case 'apply-passthrough':
163
- this.applyProps();
164
- break;
165
- case 'record-header-y':
166
- this.controller.recordHeaderLayoutY(effect.index, effect.y);
167
- break;
168
- }
169
- }
170
- }
171
- onLayout = (event) => {
172
- const y = readLayoutNumber(event, 'y');
173
- const height = readLayoutNumber(event, 'height');
174
- dlog(`STICKY[wrap] index=${this.childIndex} onLayout y=${y} height=${height}`);
175
- // Keep the previous value when a field is absent (RN sets state only on a defined read).
176
- this.dispatch({
177
- kind: 'layout',
178
- y: y ?? this.state.layoutY,
179
- height: height ?? this.state.layoutHeight,
180
- });
181
- };
182
- // The ONLY thing that drives the committed pin on this path: applyProps has no __makeNative(),
183
- // so the wrapper is JS-driven end to end. If the scroll value has been made native up front the
184
- // cascade to child listeners stops (AnimatedWithChildren.__callListeners skips children once
185
- // isNative) and this never fires - the header then renders in place and never moves.
186
- animatedValueListener = ({ value, }) => {
187
- dlog(() => `STICKY[wrap] index=${this.childIndex} animated-tick value=${String(value)}`);
188
- if (typeof value === 'number')
189
- this.dispatch({ kind: 'animated-tick', value });
190
- };
191
- props() {
192
- const style = {
193
- transform: [{ translateY: this.animatedTranslateY }],
194
- zIndex: STICKY_HEADER_Z_INDEX,
195
- };
196
- const passthrough = this.state.translateY === null
197
- ? undefined
198
- : {
199
- transform: [{ translateY: this.state.translateY }],
200
- zIndex: STICKY_HEADER_Z_INDEX,
201
- };
202
- return {
203
- style: passthrough === undefined ? style : [style, passthrough],
204
- onLayout: this.onLayout,
205
- collapsable: false,
206
- };
207
- }
208
- applyProps() {
209
- const props = this.props();
210
- const reduced = reduceProps(props);
211
- // Thunk: applyProps is on the scroll-driven path (every animated-tick while the pin is
212
- // JS-driven), and JSON.stringify of a reduced transform is not free.
213
- dlog(() => `STICKY[wrap] index=${this.childIndex} applyProps translateY=${String(this.state.translateY)} ` +
214
- `measured=${this.state.measured} layoutY=${this.state.layoutY} ` +
215
- `scrollValueIsNative=${this.controller.config.scrollAnimatedValue.__isNative()} ` +
216
- `reducedTransform=${JSON.stringify(reduced.transform ?? reduced.style)}`);
217
- for (const [key, value] of Object.entries(reduced))
218
- routeProp(this.node, key, value);
219
- const next = new AnimatedProps(props);
220
- next.__attach();
221
- // No explicit __makeNative() here on purpose: __attach joins the leaf to the interpolation,
222
- // which sits under the shared scroll value, and AnimatedWithChildren.__addChild promotes a
223
- // child joining an ALREADY-native parent (graph.ts). So the pin is native exactly when the
224
- // scroll value is - logged below, because "is this actually on the UI thread" is otherwise
225
- // invisible until you read three files.
226
- dlog(() => `STICKY[wrap] index=${this.childIndex} leaf attached isNative=${next.__isNative()} ` +
227
- `interpolationIsNative=${this.animatedTranslateY.__isNative()} ` +
228
- `scrollValueIsNative=${this.controller.config.scrollAnimatedValue.__isNative()}`);
229
- if (this.animatedProps !== undefined)
230
- this.animatedProps.__detach();
231
- this.animatedProps = next;
232
- this.cancelBind?.();
233
- this.cancelBind = whenCommitted(this.node, () => {
234
- next.setNativeView(this.node);
235
- dlog(`STICKY[wrap] index=${this.childIndex} setNativeView isNative=${next.__isNative()}`);
236
- });
237
- }
238
- }
239
- export class ScrollViewProjectionController {
240
- config;
241
- contentNode;
242
- records = [];
243
- headerLayoutYs = new Map();
244
- // Diagnostic-only: one ScrollView can host several projection controllers over its lifetime,
245
- // and an app has several ScrollViews at once. Without an id every log line below is
246
- // indistinguishable between instances, which is what made a "logs never stop" report
247
- // impossible to read as either a real loop or two lists warming up in turn.
248
- instanceId = ++projectionControllerSeq;
249
- reconcileSeq = 0;
250
- isReconcilePending = false;
251
- shouldNotifyAll = false;
252
- constructor(config) {
253
- this.config = config;
254
- }
255
- update(config) {
256
- this.config = config;
257
- // The one caller that must notify every wrapper: scrollViewHeight / invertStickyHeaders live in
258
- // this config and reach the wrappers through nothing else.
259
- this.scheduleReconcile(true);
260
- }
261
- /**
262
- * Coalesce every reconcile request of one change-detection pass into a SINGLE walk.
263
- *
264
- * Cost is half the reason: the walk is O(records), so running it per projected mutation makes
265
- * mounting M children O(M^2) - 801 children on the benchmark screen's PATH A. Correctness is the
266
- * worse half. A windowed list feeds the controller through TWO channels that land at different
267
- * moments in the same pass: children arrive through the renderer (insert/remove), while
268
- * `stickyHeaderIndices` arrive as an ordinary `@Input` via `update()` from ngOnChanges. Reconciling
269
- * on each mutation therefore guarantees at least one walk matching the NEW children against the
270
- * OLD indices - and those indices are positions in the rendered child array
271
- * (`stickyChildPositions`), which shift by 1-3 the moment VirtualizedList grows a leading spacer or
272
- * a forced sticky cell. Every mismatch re-labels a header and re-parents engine nodes for nothing.
273
- *
274
- * The flush point is `RendererFactory2.end()`: the end of the pass, still SYNCHRONOUS. It must not
275
- * be a microtask - engine mutations only `markDirty`, the commit is microtask-coalesced by the
276
- * surface, and a reconcile queued after that commit mutates a tree nobody commits again. Headless
277
- * the sticky wrapper then never reaches Fabric at all (six tests caught exactly this); on device it
278
- * lands a frame late or not at all. `end()` runs inside `ApplicationRef.tick`, so it precedes every
279
- * microtask queued during the pass.
280
- */
281
- scheduleReconcile(notifyAll = false) {
282
- countAngular('projectionSchedules');
283
- this.shouldNotifyAll ||= notifyAll;
284
- if (this.isReconcilePending)
285
- return;
286
- this.isReconcilePending = true;
287
- pendingProjections.add(this);
288
- }
289
- // Called by the renderer factory's end(). Public only for that seam.
290
- flushReconcile() {
291
- countAngular('projectionFlushes');
292
- this.isReconcilePending = false;
293
- const notifyAll = this.shouldNotifyAll;
294
- this.shouldNotifyAll = false;
295
- this.reconcileStickyRecords(notifyAll);
296
- }
297
- bindContentNode(node) {
298
- dlog(`Angular ScrollView projection bindContentNode node=${node.component} preExistingChildren=${node.children.length} recordsBefore=${this.records.length}`);
299
- this.contentNode = node;
300
- contentProjection.set(node, this);
301
- if (this.records.length === 0 && node.children.length > 0) {
302
- for (const child of [...node.children]) {
303
- this.records.push({
304
- child,
305
- wrapper: undefined,
306
- sticky: undefined,
307
- stickyIndex: undefined,
308
- });
309
- projectedOwners.set(child, this);
310
- }
311
- }
312
- this.scheduleReconcile();
313
- }
314
- appendProjectedChild(parent, child, insert) {
315
- dlog(`Angular ScrollView projection appendProjectedChild parent=${parent.component} child=${child.component} recordsBefore=${this.records.length}`);
316
- const existing = this.records.find(record => record.child === child);
317
- if (existing !== undefined)
318
- this.records.splice(this.records.indexOf(existing), 1);
319
- const record = {
320
- child,
321
- wrapper: undefined,
322
- sticky: undefined,
323
- stickyIndex: undefined,
324
- };
325
- this.records.push(record);
326
- projectedOwners.set(child, this);
327
- this.insertRecord(parent, record, undefined, insert);
328
- this.scheduleReconcile();
329
- }
330
- insertProjectedChild(parent, child, beforeChild, insert) {
331
- dlog(`Angular ScrollView projection insertProjectedChild parent=${parent.component} child=${child.component} before=${beforeChild ? `${beforeChild.component}` : 'null'} recordsBefore=${this.records.length}`);
332
- const existing = this.records.find(record => record.child === child);
333
- if (existing !== undefined)
334
- this.records.splice(this.records.indexOf(existing), 1);
335
- const beforeRecord = beforeChild === null
336
- ? undefined
337
- : this.records.find(record => record.child === beforeChild || record.wrapper === beforeChild);
338
- const record = {
339
- child,
340
- wrapper: undefined,
341
- sticky: undefined,
342
- stickyIndex: undefined,
343
- };
344
- // An insert-BEFORE whose anchor is not a record degrades into an append, here and again in
345
- // insertRecord below - silently, which is how an ordering fault stays invisible until the screen
346
- // is already wrong. A list that only ever appends (the benchmark screen's PATH A) never hits it;
347
- // a virtualized list recycling cells into the middle does.
348
- if (beforeChild !== null && beforeRecord === undefined) {
349
- dlog(() => `STICKY[proj#${this.instanceId}] ORDER insert-before anchor NOT a record ` +
350
- `child=${child.component} before=${beforeChild.component} -> APPENDED to end`);
351
- }
352
- const index = beforeRecord === undefined
353
- ? this.records.length
354
- : this.records.indexOf(beforeRecord);
355
- this.records.splice(index, 0, record);
356
- projectedOwners.set(child, this);
357
- this.insertRecord(parent, record, beforeRecord, insert);
358
- this.scheduleReconcile();
359
- }
360
- removeProjectedChild(child, remove) {
361
- const record = this.records.find(entry => entry.child === child || entry.wrapper === child);
362
- if (record === undefined || this.contentNode === undefined)
363
- return false;
364
- record.sticky?.destroy();
365
- projectedOwners.delete(record.child);
366
- const direct = directNode(record);
367
- // The wrapper, when there is one, is the node actually parented to the content — detach
368
- // whichever of the two carries the link, so a wrapped child never leaves its wrapper behind.
369
- if (direct.parent !== undefined)
370
- remove(direct.parent, direct);
371
- this.records.splice(this.records.indexOf(record), 1);
372
- this.scheduleReconcile();
373
- return true;
374
- }
375
- nextStickyHeaderY(index) {
376
- const stickyIndices = this.config.stickyHeaderIndices ?? [];
377
- const next = stickyIndices.find(entry => entry > index);
378
- const y = next === undefined ? undefined : this.headerLayoutYs.get(next);
379
- dlog(`STICKY[proj] nextStickyHeaderY(index=${index}) next=${next} y=${y}`);
380
- return y;
381
- }
382
- recordHeaderLayoutY(index, y) {
383
- dlog(`STICKY[proj] recordHeaderLayoutY index=${index} y=${y}`);
384
- if (this.headerLayoutYs.get(index) === y)
385
- return;
386
- this.headerLayoutYs.set(index, y);
387
- // EXACTLY ONE wrapper reads this value. `nextStickyHeaderY(i)` returns the first sticky index
388
- // greater than i, so `index` is the "next header" of the closest sticky index BELOW it and of
389
- // no one else. Broadcasting to all of them instead cost O(N) per layout and O(N^2) to settle a
390
- // screen - 200 headers answered "ranges unchanged, skipped rebuild" 199 times per layout event,
391
- // 40 000 dispatches to lay out the benchmark screen's PATH A.
392
- const stickyIndices = this.config.stickyHeaderIndices ?? [];
393
- let previous;
394
- // Same ascending-order assumption nextStickyHeaderY already makes.
395
- for (const entry of stickyIndices) {
396
- if (entry >= index)
397
- break;
398
- previous = entry;
399
- }
400
- if (previous === undefined)
401
- return;
402
- this.records
403
- .find(record => record.stickyIndex === previous)
404
- ?.sticky?.rebuild();
405
- }
406
- insertRecord(parent, record, beforeRecord, insert) {
407
- const before = beforeRecord === undefined ? undefined : directNode(beforeRecord);
408
- dlog(`STICKY[proj#${this.instanceId}] insertRecord child=${record.child.component} ` +
409
- `before=${before ? before.component : 'append'} parentIsContentNode=${parent === this.contentNode}`);
410
- if (before === undefined)
411
- insert(parent, record.child);
412
- else
413
- insert(parent, record.child, before);
414
- }
415
- // notifyAll re-dispatches every sticky wrapper's inputs. Only a CONFIG change needs that
416
- // (scrollViewHeight / invertStickyHeaders arrive through update() and reach the wrappers nowhere
417
- // else). An INSERT must not: this walk runs once per projected child, so notifying N wrappers on
418
- // each of M inserts is M x N - 801 x 200 = 160 200 dispatches to mount the benchmark screen's
419
- // PATH A, versus 70 x 3 = 210 on the canary, which is why only the big screen dies. The two input
420
- // changes an insert can actually cause are covered without a broadcast: a shifted childIndex by
421
- // the stickyIndex branch below, and a moved neighbour by recordHeaderLayoutY.
422
- reconcileStickyRecords(notifyAll = false) {
423
- if (this.contentNode === undefined)
424
- return;
425
- const seq = ++this.reconcileSeq;
426
- dlog(() => `STICKY[proj#${this.instanceId}] reconcile#${seq} records=${this.records.length} ` +
427
- `children=${this.contentNode?.children.length} sticky=${JSON.stringify(this.config.stickyHeaderIndices ?? [])}`);
428
- const stickyIndices = new Set(this.config.stickyHeaderIndices ?? []);
429
- if (this.config.customStickyHeaderComponent !== undefined &&
430
- stickyIndices.size > 0) {
431
- dlog('STICKY[proj] uses built-in sticky wrapper; custom StickyHeaderComponent is explicit-composition only');
432
- }
433
- let paintIndex = 0;
434
- for (const record of [...this.records]) {
435
- if (this.config.excludeRefreshControl &&
436
- isProjectedRefreshControl(record.child)) {
437
- // Removed INLINE, not through removeProjectedChild: that method ends with its own
438
- // reconcileStickyRecords(), so calling it from inside this walk re-enters the walk while
439
- // this.records is being spliced under it - one refresh control could then drive an
440
- // unbounded recursion. Same removal, without the re-entry.
441
- this.dropRecord(record);
442
- continue;
443
- }
444
- const countsAsChild = !isAnchor(record.child) && !isProjectedRefreshControl(record.child);
445
- const childIndex = paintIndex;
446
- if (countsAsChild)
447
- paintIndex += 1;
448
- const shouldWrap = countsAsChild && stickyIndices.has(childIndex);
449
- // Deliberately NOT logged per child per walk: reconcile runs on every projected insert, so
450
- // that shape is O(children x inserts) and buries the few lines that carry information. Only
451
- // a state TRANSITION is logged, below.
452
- if (shouldWrap && record.wrapper === undefined)
453
- this.wrapRecord(record, childIndex);
454
- else if (!shouldWrap && record.wrapper !== undefined)
455
- this.unwrapRecord(record);
456
- else if (shouldWrap && record.stickyIndex !== childIndex) {
457
- countAngular('stickyWrapperReuses');
458
- record.sticky?.setChildIndex(childIndex);
459
- record.stickyIndex = childIndex;
460
- }
461
- else if (shouldWrap && notifyAll)
462
- record.sticky?.rebuild();
463
- }
464
- // `paintIndex` above is counted off RECORDS, but the screen paints `contentNode.children`. The
465
- // reconcile line at the top prints only the two COUNTS, which stay equal under any permutation
466
- // - so it can never see this. Once the orders diverge, every sticky index addresses the wrong
467
- // child and each wrap moves another node, so the fault compounds with scroll distance instead
468
- // of correcting itself. Guarded by isDebug because it walks both lists.
469
- if (!isDebug())
470
- return;
471
- const expected = this.records.map(record => directNode(record));
472
- const painted = this.contentNode?.children ?? [];
473
- const at = expected.findIndex((node, index) => node !== painted[index]);
474
- if (at >= 0 || expected.length !== painted.length) {
475
- dlog(`STICKY[proj#${this.instanceId}] ORDER DIVERGED at ${at} ` +
476
- `records=${expected.length} painted=${painted.length} ` +
477
- `expected=${expected[at]?.component ?? 'none'} painted=${painted[at]?.component ?? 'none'}`);
478
- }
479
- }
480
- // The removal half of removeProjectedChild, without its trailing reconcile - safe to call from
481
- // inside the reconcile walk itself.
482
- dropRecord(record) {
483
- if (this.contentNode === undefined)
484
- return;
485
- record.sticky?.destroy();
486
- projectedOwners.delete(record.child);
487
- const direct = directNode(record);
488
- if (direct.parent === this.contentNode)
489
- removeChild(this.contentNode, direct);
490
- const index = this.records.indexOf(record);
491
- if (index !== -1)
492
- this.records.splice(index, 1);
493
- }
494
- // Auto projection runs after Angular has already created projected child host nodes. At this
495
- // renderer boundary we can AOT-safely rearrange engine nodes, but we cannot instantiate an
496
- // arbitrary Angular component class as a wrapper without owning a ViewContainerRef/injector and
497
- // Angular projectable nodes for its <ng-content>. Therefore the automatic sticky path always uses
498
- // the built-in engine-node wrapper; custom StickyHeaderComponent wrappers remain supported by
499
- // explicit Angular composition with <ScrollViewStickyHeader>/<symbiote-sticky-header> or a user
500
- // component that composes it in the template.
501
- wrapRecord(record, childIndex) {
502
- if (this.contentNode === undefined)
503
- return;
504
- const wrapper = createViewNode();
505
- // The slot comes from `records`, the list that always knows where this record sits, never from
506
- // the child's own current parent. Read off the child, a child not sitting DIRECTLY in the content
507
- // has no slot to give up and the wrapper lands at the END - the wrapped cell jumps to the bottom
508
- // of the scroll content, a silent reordering that compounds with scroll distance instead of
509
- // correcting itself, and a windowed list reaches that state routinely. Angular CDK carries the
510
- // same warning at its own insert site: insert AT the index, never insert-then-move, because an
511
- // extra anchor node in between throws the move off (`cdk/scrolling/virtual-for-of.ts`,
512
- // `_getEmbeddedViewArgs`) - and this file's tree is full of anchors.
513
- //
514
- // Order is load-bearing: place the wrapper at the slot FIRST, then move the child into it. The
515
- // engine's appendChild detaches the child from its old parent, so the wrapper slides into the
516
- // position the child vacates and no explicit removeChild is needed.
517
- const after = this.nextDirectAfter(record);
518
- if (after === undefined)
519
- appendChild(this.contentNode, wrapper);
520
- else
521
- insertBefore(this.contentNode, wrapper, after);
522
- appendChild(wrapper, record.child);
523
- record.wrapper = wrapper;
524
- countAngular('stickyWrapperCreates');
525
- record.sticky = new StickyProjectionWrapper(this, childIndex, wrapper);
526
- record.stickyIndex = childIndex;
527
- dlog(`STICKY[proj#${this.instanceId}] WRAP child=${record.child.component} paintIndex=${childIndex}`);
528
- }
529
- // The painted node of the first record AFTER `record` that is actually parented to the content —
530
- // i.e. the anchor the wrapper must be inserted before. Records whose node has not been inserted
531
- // yet are skipped rather than treated as a slot: a record exists from the moment the renderer
532
- // reports the child, which can precede its placement.
533
- nextDirectAfter(record) {
534
- for (let index = this.records.indexOf(record) + 1; index < this.records.length; index += 1) {
535
- const node = directNode(this.records[index]);
536
- if (node.parent === this.contentNode)
537
- return node;
538
- }
539
- return undefined;
540
- }
541
- unwrapRecord(record) {
542
- if (this.contentNode === undefined || record.wrapper === undefined)
543
- return;
544
- dlog(`STICKY[proj#${this.instanceId}] UNWRAP child=${record.child.component}`);
545
- record.sticky?.destroy();
546
- record.sticky = undefined;
547
- record.stickyIndex = undefined;
548
- const wrapper = record.wrapper;
549
- insertBefore(this.contentNode, record.child, wrapper);
550
- removeChild(this.contentNode, wrapper);
551
- record.wrapper = undefined;
552
- }
553
- }
554
- export function getScrollViewProjection(node) {
555
- return contentProjection.get(node);
556
- }
557
- export function removeScrollViewProjectedChild(child, remove) {
558
- return (projectedOwners.get(child)?.removeProjectedChild(child, remove) ?? false);
559
- }
560
- //# sourceMappingURL=projection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../../src/components/scroll-view/projection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,GAIZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,GAItB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AASnD,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAGlC,CAAC;AACJ,gGAAgG;AAChG,qGAAqG;AACrG,+FAA+F;AAC/F,uFAAuF;AACvF,MAAM,eAAe,GAAG,IAAI,OAAO,EAGhC,CAAC;AAEJ,gGAAgG;AAChG,+FAA+F;AAC/F,mGAAmG;AACnG,sEAAsE;AACtE,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAkC,CAAC;AAErE;;;;;GAKG;AACH,M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