@symbiote-native/angular 0.6.0 → 0.6.2

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 (193) hide show
  1. package/README.md +1 -1
  2. package/babel-register-composed.cjs +11 -3
  3. package/build/angular/anchor-host-registry.d.ts +2 -0
  4. package/build/angular/anchor-host-registry.js +84 -0
  5. package/build/angular/anchor-host-registry.js.map +1 -0
  6. package/build/angular/components/input-accessory-view/index.d.ts +2 -1
  7. package/build/angular/components/input-accessory-view/index.js +28 -39
  8. package/build/angular/components/input-accessory-view/index.js.map +1 -1
  9. package/build/angular/components/scroll-view/projection.js +70 -48
  10. package/build/angular/components/scroll-view/projection.js.map +1 -1
  11. package/build/angular/components/scroll-view/shared.js +28 -25
  12. package/build/angular/components/scroll-view/shared.js.map +1 -1
  13. package/build/angular/components/scroll-view/sticky-header.d.ts +6 -7
  14. package/build/angular/components/scroll-view/sticky-header.js +82 -65
  15. package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
  16. package/build/angular/components/touchable/index.d.ts +2 -5
  17. package/build/angular/components/touchable/index.js +36 -56
  18. package/build/angular/components/touchable/index.js.map +1 -1
  19. package/build/angular/components/virtualized-list/index.d.ts +5 -20
  20. package/build/angular/components/virtualized-list/index.js +145 -275
  21. package/build/angular/components/virtualized-list/index.js.map +1 -1
  22. package/build/angular/components/virtualized-section-list/index.js +2 -4
  23. package/build/angular/components/virtualized-section-list/index.js.map +1 -1
  24. package/build/angular/index.d.ts +2 -1
  25. package/build/angular/index.js +6 -1
  26. package/build/angular/index.js.map +1 -1
  27. package/build/angular/renderer/index.d.ts +0 -1
  28. package/build/angular/renderer/index.js +5 -60
  29. package/build/angular/renderer/index.js.map +1 -1
  30. package/package.json +8 -4
  31. package/src/anchor-host-registry.ts +88 -0
  32. package/src/components/input-accessory-view/index.ts +30 -39
  33. package/src/components/scroll-view/projection.ts +76 -46
  34. package/src/components/scroll-view/shared.ts +27 -19
  35. package/src/components/scroll-view/sticky-header.ts +89 -64
  36. package/src/components/touchable/index.ts +52 -66
  37. package/src/components/virtualized-list/index.ts +157 -368
  38. package/src/components/virtualized-section-list/index.ts +6 -3
  39. package/src/index.ts +6 -1
  40. package/src/renderer/index.ts +5 -63
  41. package/build/bootstrap.d.ts +0 -7
  42. package/build/bootstrap.js +0 -14
  43. package/build/components/activity-indicator/index.android.d.ts +0 -9
  44. package/build/components/activity-indicator/index.android.js +0 -64
  45. package/build/components/activity-indicator/index.d.ts +0 -1
  46. package/build/components/activity-indicator/index.ios.d.ts +0 -5
  47. package/build/components/activity-indicator/index.ios.js +0 -64
  48. package/build/components/activity-indicator/index.js +0 -3
  49. package/build/components/activity-indicator/shared.d.ts +0 -64
  50. package/build/components/activity-indicator/shared.js +0 -424
  51. package/build/components/button.d.ts +0 -60
  52. package/build/components/button.js +0 -456
  53. package/build/components/flat-list/index.d.ts +0 -119
  54. package/build/components/flat-list/index.js +0 -691
  55. package/build/components/image/index.android.d.ts +0 -7
  56. package/build/components/image/index.android.js +0 -88
  57. package/build/components/image/index.d.ts +0 -1
  58. package/build/components/image/index.ios.d.ts +0 -7
  59. package/build/components/image/index.ios.js +0 -88
  60. package/build/components/image/index.js +0 -2
  61. package/build/components/image/shared.d.ts +0 -101
  62. package/build/components/image/shared.js +0 -405
  63. package/build/components/image-background.d.ts +0 -78
  64. package/build/components/image-background.js +0 -583
  65. package/build/components/input-accessory-view/index.d.ts +0 -56
  66. package/build/components/input-accessory-view/index.js +0 -403
  67. package/build/components/keyboard-avoiding-view/index.d.ts +0 -79
  68. package/build/components/keyboard-avoiding-view/index.js +0 -504
  69. package/build/components/modal/index.d.ts +0 -89
  70. package/build/components/modal/index.js +0 -529
  71. package/build/components/pressable/index.d.ts +0 -120
  72. package/build/components/pressable/index.js +0 -639
  73. package/build/components/refresh-control/index.d.ts +0 -83
  74. package/build/components/refresh-control/index.js +0 -509
  75. package/build/components/safe-area-view/index.d.ts +0 -54
  76. package/build/components/safe-area-view/index.js +0 -388
  77. package/build/components/scroll-view/index.android.d.ts +0 -16
  78. package/build/components/scroll-view/index.android.js +0 -228
  79. package/build/components/scroll-view/index.d.ts +0 -3
  80. package/build/components/scroll-view/index.ios.d.ts +0 -6
  81. package/build/components/scroll-view/index.ios.js +0 -113
  82. package/build/components/scroll-view/index.js +0 -5
  83. package/build/components/scroll-view/projection.d.ts +0 -32
  84. package/build/components/scroll-view/projection.js +0 -311
  85. package/build/components/scroll-view/shared.d.ts +0 -225
  86. package/build/components/scroll-view/shared.js +0 -757
  87. package/build/components/scroll-view/sticky-header.d.ts +0 -38
  88. package/build/components/scroll-view/sticky-header.js +0 -257
  89. package/build/components/section-list/index.d.ts +0 -113
  90. package/build/components/section-list/index.js +0 -768
  91. package/build/components/switch/index.android.d.ts +0 -17
  92. package/build/components/switch/index.android.js +0 -107
  93. package/build/components/switch/index.d.ts +0 -1
  94. package/build/components/switch/index.ios.d.ts +0 -16
  95. package/build/components/switch/index.ios.js +0 -106
  96. package/build/components/switch/index.js +0 -3
  97. package/build/components/switch/shared.d.ts +0 -37
  98. package/build/components/switch/shared.js +0 -176
  99. package/build/components/text-input.d.ts +0 -150
  100. package/build/components/text-input.js +0 -821
  101. package/build/components/touchable/index.d.ts +0 -241
  102. package/build/components/touchable/index.js +0 -1672
  103. package/build/components/touchable-native-feedback/index.d.ts +0 -80
  104. package/build/components/touchable-native-feedback/index.js +0 -545
  105. package/build/components/virtualized-list/directives.d.ts +0 -41
  106. package/build/components/virtualized-list/directives.js +0 -249
  107. package/build/components/virtualized-list/index.d.ts +0 -265
  108. package/build/components/virtualized-list/index.js +0 -1343
  109. package/build/components/virtualized-section-list/directives.d.ts +0 -28
  110. package/build/components/virtualized-section-list/directives.js +0 -148
  111. package/build/components/virtualized-section-list/index.d.ts +0 -175
  112. package/build/components/virtualized-section-list/index.js +0 -854
  113. package/build/components.d.ts +0 -39
  114. package/build/components.js +0 -37
  115. package/build/create-portal/index.d.ts +0 -17
  116. package/build/create-portal/index.js +0 -128
  117. package/build/create-tunnel/index.d.ts +0 -29
  118. package/build/create-tunnel/index.js +0 -181
  119. package/build/descriptor-to-angular/index.d.ts +0 -19
  120. package/build/descriptor-to-angular/index.js +0 -186
  121. package/build/host-instance/index.d.ts +0 -2
  122. package/build/host-instance/index.js +0 -36
  123. package/build/index.d.ts +0 -21
  124. package/build/index.js +0 -40
  125. package/build/modules/animated/animated-leaf-binder/index.d.ts +0 -14
  126. package/build/modules/animated/animated-leaf-binder/index.js +0 -90
  127. package/build/modules/animated/animated-leaf-binder.d.ts +0 -14
  128. package/build/modules/animated/animated-leaf-binder.js +0 -90
  129. package/build/modules/animated/create-animated-component.d.ts +0 -48
  130. package/build/modules/animated/create-animated-component.js +0 -425
  131. package/build/modules/animated/index.d.ts +0 -51
  132. package/build/modules/animated/index.js +0 -58
  133. package/build/modules/app-registry/index.d.ts +0 -7
  134. package/build/modules/app-registry/index.js +0 -22
  135. package/build/modules/status-bar/index.d.ts +0 -17
  136. package/build/modules/status-bar/index.js +0 -121
  137. package/build/primitives/index.d.ts +0 -32
  138. package/build/primitives/index.js +0 -386
  139. package/build/primitives/shared.d.ts +0 -83
  140. package/build/primitives/shared.js +0 -230
  141. package/build/render/index.d.ts +0 -11
  142. package/build/render/index.js +0 -170
  143. package/build/renderer/index.d.ts +0 -38
  144. package/build/renderer/index.js +0 -355
  145. package/build/services/color-scheme.service.d.ts +0 -13
  146. package/build/services/color-scheme.service.js +0 -72
  147. package/build/services/index.d.ts +0 -2
  148. package/build/services/index.js +0 -2
  149. package/build/services/window-dimensions.service.d.ts +0 -13
  150. package/build/services/window-dimensions.service.js +0 -83
  151. package/src/__tests__/responder-change-detection.test.ts +0 -102
  152. package/src/__tests__/responder-nested-cd.test.ts +0 -113
  153. package/src/angular-gaps.test.ts +0 -142
  154. package/src/angular-imports.test.ts +0 -100
  155. package/src/components/activity-indicator/activity-indicator-class-style.test.ts +0 -44
  156. package/src/components/activity-indicator/activity-indicator.test.ts +0 -131
  157. package/src/components/flat-list/column-wrapper-style-class.test.ts +0 -116
  158. package/src/components/flat-list/flat-list-array-style.test.ts +0 -131
  159. package/src/components/flat-list/flat-list-class-style.test.ts +0 -74
  160. package/src/components/flat-list/flat-list-scroll-containment.test.ts +0 -107
  161. package/src/components/flat-list/flat-list.test.ts +0 -99
  162. package/src/components/image/image-class-style.test.ts +0 -46
  163. package/src/components/image-background-class-style.test.ts +0 -48
  164. package/src/components/image-background-style-class.test.ts +0 -79
  165. package/src/components/input-accessory-view/input-accessory-view.test.ts +0 -43
  166. package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +0 -54
  167. package/src/components/modal/modal.test.ts +0 -43
  168. package/src/components/pressable/pressable.test.ts +0 -85
  169. package/src/components/refresh-control/refresh-control.test.ts +0 -41
  170. package/src/components/safe-area-view/safe-area-view.test.ts +0 -43
  171. package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +0 -123
  172. package/src/components/scroll-view/content-container-style-class.test.ts +0 -75
  173. package/src/components/scroll-view/scroll-view-class-style.test.ts +0 -134
  174. package/src/components/scroll-view/scroll-view-projection.test.ts +0 -194
  175. package/src/components/switch/android-switch-class.test.ts +0 -42
  176. package/src/components/switch/switch.test.ts +0 -92
  177. package/src/components/text-input-class-style.test.ts +0 -54
  178. package/src/components/touchable/touchable.test.ts +0 -102
  179. package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +0 -49
  180. package/src/components/virtualized-list/virtualized-list-class-style.test.ts +0 -76
  181. package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +0 -60
  182. package/src/create-portal/create-portal.test.ts +0 -90
  183. package/src/create-tunnel/create-tunnel.test.ts +0 -120
  184. package/src/descriptor-to-angular/descriptor-outlet.test.ts +0 -94
  185. package/src/host-instance/host-instance.test.ts +0 -49
  186. package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +0 -116
  187. package/src/modules/animated/animated-leaf-binder.test.ts +0 -116
  188. package/src/modules/animated/animated-scroll-view.test.ts +0 -102
  189. package/src/modules/app-registry/app-registry.test.ts +0 -106
  190. package/src/modules/status-bar/status-bar.test.ts +0 -50
  191. package/src/render/render.test.ts +0 -147
  192. package/src/renderer/renderer.test.ts +0 -202
  193. package/src/services/services.test.ts +0 -163
@@ -1,249 +0,0 @@
1
- // VirtualizedList authoring directives: the Angular-faithful equivalent of React/Vue
2
- // `renderItem` / `ListHeaderComponent` / `ListFooterComponent` / `ListEmptyComponent` /
3
- // `ItemSeparatorComponent`. React/Vue pass an element-returning callback; that does NOT
4
- // translate to Angular, where per-item content is a TEMPLATE. So the app supplies each
5
- // slot as an `<ng-template>` carrying one of these structural directives, and the list
6
- // stamps the windowed slice through them. The agnostic windowing surface stays shared,
7
- // only the cell-AUTHORING shape is framework-specific.
8
- //
9
- // Authoring API (what FlatList / SectionList build on, and what the app imports):
10
- // <VirtualizedList [data]="rows" [getItem]="getItem" [getItemCount]="count">
11
- // <ng-template vListItem let-item let-index="index" let-separators="separators"> … </ng-template>
12
- // <ng-template vListHeader> … </ng-template>
13
- // <ng-template vListFooter> … </ng-template>
14
- // <ng-template vListEmpty> … </ng-template>
15
- // <ng-template vListSeparator let-highlighted="highlighted" let-leadingItem="leadingItem"> … </ng-template>
16
- // </VirtualizedList>
17
- //
18
- // `vListItem` carries a static ngTemplateContextGuard so `let-item` infers as ItemT and
19
- // `let-index` / `let-separators` are typed — the Angular twin of `renderItem`'s typed info arg.
20
- //
21
- // VListOutletDirective is the INTERNAL renderer the list uses to stamp those templates. It is
22
- // a core-only reimplementation of `@angular/common`'s NgTemplateOutlet (the adapter depends on
23
- // @angular/core ONLY — see package.json), built on ViewContainerRef / TemplateRef from
24
- // @angular/core: create on template change, update the embedded view's context in place on a
25
- // context change (no churn of the cell's own view across windowing recomputes).
26
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
27
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
28
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
29
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
30
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
31
- var _, done = false;
32
- for (var i = decorators.length - 1; i >= 0; i--) {
33
- var context = {};
34
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
35
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
36
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
37
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
38
- if (kind === "accessor") {
39
- if (result === void 0) continue;
40
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
41
- if (_ = accept(result.get)) descriptor.get = _;
42
- if (_ = accept(result.set)) descriptor.set = _;
43
- if (_ = accept(result.init)) initializers.unshift(_);
44
- }
45
- else if (_ = accept(result)) {
46
- if (kind === "field") initializers.unshift(_);
47
- else descriptor[key] = _;
48
- }
49
- }
50
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
51
- done = true;
52
- };
53
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
54
- var useValue = arguments.length > 2;
55
- for (var i = 0; i < initializers.length; i++) {
56
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
57
- }
58
- return useValue ? value : void 0;
59
- };
60
- import { Directive, Input, TemplateRef, ViewContainerRef, inject, } from '@angular/core';
61
- import { dlog } from '@symbiote-native/engine';
62
- let vListOutletInstanceCounter = 0;
63
- function isRecord(value) {
64
- return typeof value === 'object' && value !== null;
65
- }
66
- // `<ng-template vListItem>` — the per-cell content. The static guard makes the `let-` bindings
67
- // typed at the call site (let-item: ItemT, let-index: number, let-separators: ISeparators).
68
- let VListItemDirective = (() => {
69
- let _classDecorators = [Directive({ selector: '[vListItem]', standalone: true })];
70
- let _classDescriptor;
71
- let _classExtraInitializers = [];
72
- let _classThis;
73
- var VListItemDirective = class {
74
- static { _classThis = this; }
75
- static {
76
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
77
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
78
- VListItemDirective = _classThis = _classDescriptor.value;
79
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
80
- __runInitializers(_classThis, _classExtraInitializers);
81
- }
82
- templateRef = inject(TemplateRef);
83
- static ngTemplateContextGuard(_dir, _ctx) {
84
- return true;
85
- }
86
- };
87
- return VListItemDirective = _classThis;
88
- })();
89
- export { VListItemDirective };
90
- // `<ng-template vListHeader>` — rendered once above the cells (RN ListHeaderComponent).
91
- let VListHeaderDirective = (() => {
92
- let _classDecorators = [Directive({ selector: '[vListHeader]', standalone: true })];
93
- let _classDescriptor;
94
- let _classExtraInitializers = [];
95
- let _classThis;
96
- var VListHeaderDirective = class {
97
- static { _classThis = this; }
98
- static {
99
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
100
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
101
- VListHeaderDirective = _classThis = _classDescriptor.value;
102
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
103
- __runInitializers(_classThis, _classExtraInitializers);
104
- }
105
- templateRef = inject(TemplateRef);
106
- };
107
- return VListHeaderDirective = _classThis;
108
- })();
109
- export { VListHeaderDirective };
110
- // `<ng-template vListFooter>` — rendered once below the cells (RN ListFooterComponent).
111
- let VListFooterDirective = (() => {
112
- let _classDecorators = [Directive({ selector: '[vListFooter]', standalone: true })];
113
- let _classDescriptor;
114
- let _classExtraInitializers = [];
115
- let _classThis;
116
- var VListFooterDirective = class {
117
- static { _classThis = this; }
118
- static {
119
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
120
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
121
- VListFooterDirective = _classThis = _classDescriptor.value;
122
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
123
- __runInitializers(_classThis, _classExtraInitializers);
124
- }
125
- templateRef = inject(TemplateRef);
126
- };
127
- return VListFooterDirective = _classThis;
128
- })();
129
- export { VListFooterDirective };
130
- // `<ng-template vListEmpty>` — rendered in place of the cells when the list is empty
131
- // (RN ListEmptyComponent).
132
- let VListEmptyDirective = (() => {
133
- let _classDecorators = [Directive({ selector: '[vListEmpty]', standalone: true })];
134
- let _classDescriptor;
135
- let _classExtraInitializers = [];
136
- let _classThis;
137
- var VListEmptyDirective = class {
138
- static { _classThis = this; }
139
- static {
140
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
141
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
142
- VListEmptyDirective = _classThis = _classDescriptor.value;
143
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
144
- __runInitializers(_classThis, _classExtraInitializers);
145
- }
146
- templateRef = inject(TemplateRef);
147
- };
148
- return VListEmptyDirective = _classThis;
149
- })();
150
- export { VListEmptyDirective };
151
- // `<ng-template vListSeparator>` — rendered between cells (RN ItemSeparatorComponent). The guard
152
- // types the `let-` bindings against the separator props.
153
- let VListSeparatorDirective = (() => {
154
- let _classDecorators = [Directive({ selector: '[vListSeparator]', standalone: true })];
155
- let _classDescriptor;
156
- let _classExtraInitializers = [];
157
- let _classThis;
158
- var VListSeparatorDirective = class {
159
- static { _classThis = this; }
160
- static {
161
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
162
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
163
- VListSeparatorDirective = _classThis = _classDescriptor.value;
164
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
165
- __runInitializers(_classThis, _classExtraInitializers);
166
- }
167
- templateRef = inject(TemplateRef);
168
- static ngTemplateContextGuard(_dir, _ctx) {
169
- return true;
170
- }
171
- };
172
- return VListSeparatorDirective = _classThis;
173
- })();
174
- export { VListSeparatorDirective };
175
- // Core-only NgTemplateOutlet twin. The adapter cannot import @angular/common's NgTemplateOutlet
176
- // (not a dependency), so the list stamps templates through this: it creates the embedded view when
177
- // the template changes and updates the live view's context IN PLACE on a context change, so a
178
- // windowing recompute (a fresh context object every CD) refreshes the cell without tearing it down.
179
- let VListOutletDirective = (() => {
180
- let _classDecorators = [Directive({ selector: '[vListOutlet]', standalone: true })];
181
- let _classDescriptor;
182
- let _classExtraInitializers = [];
183
- let _classThis;
184
- let _templateRef_decorators;
185
- let _templateRef_initializers = [];
186
- let _templateRef_extraInitializers = [];
187
- let _context_decorators;
188
- let _context_initializers = [];
189
- let _context_extraInitializers = [];
190
- var VListOutletDirective = class {
191
- static { _classThis = this; }
192
- static {
193
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
194
- _templateRef_decorators = [Input({ alias: 'vListOutlet' })];
195
- _context_decorators = [Input({ alias: 'vListOutletContext' })];
196
- __esDecorate(null, null, _templateRef_decorators, { kind: "field", name: "templateRef", static: false, private: false, access: { has: obj => "templateRef" in obj, get: obj => obj.templateRef, set: (obj, value) => { obj.templateRef = value; } }, metadata: _metadata }, _templateRef_initializers, _templateRef_extraInitializers);
197
- __esDecorate(null, null, _context_decorators, { kind: "field", name: "context", static: false, private: false, access: { has: obj => "context" in obj, get: obj => obj.context, set: (obj, value) => { obj.context = value; } }, metadata: _metadata }, _context_initializers, _context_extraInitializers);
198
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
199
- VListOutletDirective = _classThis = _classDescriptor.value;
200
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
201
- __runInitializers(_classThis, _classExtraInitializers);
202
- }
203
- templateRef = __runInitializers(this, _templateRef_initializers, void 0);
204
- context = (__runInitializers(this, _templateRef_extraInitializers), __runInitializers(this, _context_initializers, void 0));
205
- viewRef = (__runInitializers(this, _context_extraInitializers), null);
206
- viewContainer = inject(ViewContainerRef);
207
- instanceId = (vListOutletInstanceCounter += 1);
208
- ngOnChanges(changes) {
209
- if (changes['templateRef'] !== undefined) {
210
- dlog(`Angular VListOutlet#${this.instanceId} templateRef CHANGED (was=${changes['templateRef'].previousValue !== undefined} now=${this.templateRef !== undefined}) -> clear + recreate`);
211
- this.viewContainer.clear();
212
- this.viewRef =
213
- this.templateRef === undefined
214
- ? null
215
- : this.viewContainer.createEmbeddedView(this.templateRef, this.context);
216
- return;
217
- }
218
- if (this.viewRef !== null && this.context !== undefined) {
219
- dlog(`Angular VListOutlet#${this.instanceId} context updated, markForCheck`);
220
- this.updateContext(this.viewRef.context, this.context);
221
- this.viewRef.markForCheck();
222
- }
223
- }
224
- ngOnDestroy() {
225
- dlog(`Angular VListOutlet#${this.instanceId} destroyed`);
226
- this.viewContainer.clear();
227
- }
228
- // Copy the new context's fields onto the live embedded view's context object (whose identity the
229
- // consumer's `let-` bindings already read), dropping keys that disappeared. The generic `C` can't
230
- // be index-WRITTEN even once narrowed (TS2862), so the copy runs in a non-generic helper the
231
- // guarded records flow into — no cast (NgTemplateOutlet does the same copy via `as any`).
232
- updateContext(viewContext, nextContext) {
233
- if (!isRecord(viewContext) || !isRecord(nextContext))
234
- return;
235
- copyContextFields(viewContext, nextContext);
236
- }
237
- };
238
- return VListOutletDirective = _classThis;
239
- })();
240
- export { VListOutletDirective };
241
- function copyContextFields(target, source) {
242
- for (const key of Object.keys(target)) {
243
- if (!(key in source))
244
- delete target[key];
245
- }
246
- for (const key of Object.keys(source)) {
247
- target[key] = source[key];
248
- }
249
- }
@@ -1,265 +0,0 @@
1
- import { EventEmitter, type AfterViewChecked, type DoCheck, type OnDestroy } from '@angular/core';
2
- import { type IAccessibilityProps, type IAccessibilityStateValue, type IAriaProps, type IScrollViewHandle, type IViewabilityConfig, type IViewabilityConfigCallbackPair, type IViewableItemsChangedInfo, type IVirtualizedListHandle } from '@symbiote-native/components';
3
- import { type IStyleProp, type ISymbioteEvent, type ISymbioteNode, type IViewStyle } from '@symbiote-native/engine';
4
- import { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, type IVListItemContext, type IVListSeparatorContext } from './directives';
5
- export type { ICellLayout, ISeparators, ISeparatorProps, IViewToken, IViewableItemsChangedInfo, IViewabilityConfig, IViewabilityConfigCallbackPair, IVirtualizedListHandle, } from '@symbiote-native/components';
6
- export { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, } from './directives';
7
- export type { IVListItemContext, IVListSeparatorContext } from './directives';
8
- export interface IVirtualizedListProps<ItemT> extends IAccessibilityProps, IAriaProps {
9
- data: unknown;
10
- getItem: (data: unknown, index: number) => ItemT;
11
- getItemCount: (data: unknown) => number;
12
- keyExtractor?: (item: ItemT, index: number) => string;
13
- getItemLayout?: (data: unknown, index: number) => {
14
- length: number;
15
- offset: number;
16
- index: number;
17
- };
18
- horizontal?: boolean;
19
- inverted?: boolean;
20
- extraData?: unknown;
21
- onEndReached?: (info: {
22
- distanceFromEnd: number;
23
- }) => void;
24
- onEndReachedThreshold?: number;
25
- onStartReached?: (info: {
26
- distanceFromStart: number;
27
- }) => void;
28
- onStartReachedThreshold?: number;
29
- onRefresh?: () => void;
30
- refreshing?: boolean | null;
31
- progressViewOffset?: number;
32
- onViewableItemsChanged?: (info: IViewableItemsChangedInfo<ItemT>) => void;
33
- viewabilityConfig?: IViewabilityConfig;
34
- viewabilityConfigCallbackPairs?: IViewabilityConfigCallbackPair<ItemT>[];
35
- onScrollToIndexFailed?: (info: {
36
- index: number;
37
- highestMeasuredFrameIndex: number;
38
- averageItemLength: number;
39
- }) => void;
40
- initialNumToRender?: number;
41
- initialScrollIndex?: number;
42
- maxToRenderPerBatch?: number;
43
- updateCellsBatchingPeriod?: number;
44
- windowSize?: number;
45
- stickyHeaderIndices?: number[];
46
- maintainVisibleContentPosition?: {
47
- minIndexForVisible: number;
48
- autoscrollToTopThreshold?: number;
49
- };
50
- onScroll?: (event: ISymbioteEvent) => void;
51
- onScrollBeginDrag?: (event: ISymbioteEvent) => void;
52
- onScrollEndDrag?: (event: ISymbioteEvent) => void;
53
- onMomentumScrollBegin?: (event: ISymbioteEvent) => void;
54
- onMomentumScrollEnd?: (event: ISymbioteEvent) => void;
55
- scrollEventThrottle?: number;
56
- keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
57
- keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
58
- style?: IStyleProp<IViewStyle>;
59
- contentContainerStyle?: IStyleProp<IViewStyle>;
60
- }
61
- export type IVirtualizedListInputs<ItemT> = Omit<IVirtualizedListProps<ItemT>, 'onEndReached' | 'onStartReached' | 'onRefresh' | 'onViewableItemsChanged' | 'onScrollToIndexFailed' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
62
- interface IWindowCell<ItemT> {
63
- key: string;
64
- index: number;
65
- context: IVListItemContext<ItemT>;
66
- measure: (event: ISymbioteEvent) => void;
67
- separatorContext?: IVListSeparatorContext<ItemT>;
68
- }
69
- export declare class VirtualizedList<ItemT = unknown> implements IVirtualizedListInputs<ItemT>, IVirtualizedListHandle, DoCheck, AfterViewChecked, OnDestroy {
70
- readonly endReached: EventEmitter<{
71
- distanceFromEnd: number;
72
- }>;
73
- readonly startReached: EventEmitter<{
74
- distanceFromStart: number;
75
- }>;
76
- readonly refresh: EventEmitter<void>;
77
- readonly viewableItemsChanged: EventEmitter<IViewableItemsChangedInfo<ItemT>>;
78
- readonly scrollToIndexFailed: EventEmitter<{
79
- index: number;
80
- highestMeasuredFrameIndex: number;
81
- averageItemLength: number;
82
- }>;
83
- readonly accessibilityAction: EventEmitter<ISymbioteEvent>;
84
- readonly accessibilityTap: EventEmitter<ISymbioteEvent>;
85
- readonly magicTap: EventEmitter<ISymbioteEvent>;
86
- readonly accessibilityEscape: EventEmitter<ISymbioteEvent>;
87
- data: unknown;
88
- getItem: (data: unknown, index: number) => ItemT;
89
- getItemCount: (data: unknown) => number;
90
- keyExtractor?: (item: ItemT, index: number) => string;
91
- getItemLayout?: (data: unknown, index: number) => {
92
- length: number;
93
- offset: number;
94
- index: number;
95
- };
96
- horizontal?: boolean;
97
- inverted?: boolean;
98
- extraData?: unknown;
99
- onEndReachedThreshold?: number;
100
- onStartReachedThreshold?: number;
101
- refreshing?: boolean | null;
102
- progressViewOffset?: number;
103
- refreshRequested?: boolean;
104
- viewabilityConfig?: IViewabilityConfig;
105
- viewabilityConfigCallbackPairs?: IViewabilityConfigCallbackPair<ItemT>[];
106
- initialNumToRender?: number;
107
- initialScrollIndex?: number;
108
- maxToRenderPerBatch?: number;
109
- updateCellsBatchingPeriod?: number;
110
- windowSize?: number;
111
- stickyHeaderIndices?: number[];
112
- maintainVisibleContentPosition?: {
113
- minIndexForVisible: number;
114
- autoscrollToTopThreshold?: number;
115
- };
116
- onScroll?: (event: ISymbioteEvent) => void;
117
- onScrollBeginDrag?: (event: ISymbioteEvent) => void;
118
- onScrollEndDrag?: (event: ISymbioteEvent) => void;
119
- onMomentumScrollBegin?: (event: ISymbioteEvent) => void;
120
- onMomentumScrollEnd?: (event: ISymbioteEvent) => void;
121
- scrollEventThrottle?: number;
122
- keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
123
- keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
124
- style?: IStyleProp<IViewStyle>;
125
- contentContainerStyle?: IStyleProp<IViewStyle>;
126
- testID?: string;
127
- nativeID?: string;
128
- accessible?: boolean;
129
- accessibilityLabel?: string;
130
- accessibilityHint?: string;
131
- accessibilityRole?: IAccessibilityProps['accessibilityRole'];
132
- accessibilityState?: IAccessibilityStateValue;
133
- accessibilityValue?: IAccessibilityProps['accessibilityValue'];
134
- accessibilityActions?: IAccessibilityProps['accessibilityActions'];
135
- accessibilityLabelledBy?: string | string[];
136
- importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
137
- accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
138
- screenReaderFocusable?: boolean;
139
- accessibilityViewIsModal?: boolean;
140
- accessibilityElementsHidden?: boolean;
141
- accessibilityIgnoresInvertColors?: boolean;
142
- accessibilityLanguage?: string;
143
- accessibilityRespondsToUserInteraction?: boolean;
144
- accessibilityShowsLargeContentViewer?: boolean;
145
- accessibilityLargeContentTitle?: string;
146
- role?: IAriaProps['role'];
147
- ariaLabel?: string;
148
- ariaLabelledBy?: string;
149
- ariaLive?: IAriaProps['aria-live'];
150
- ariaHidden?: boolean;
151
- ariaBusy?: boolean;
152
- ariaChecked?: boolean | 'mixed';
153
- ariaDisabled?: boolean;
154
- ariaExpanded?: boolean;
155
- ariaSelected?: boolean;
156
- ariaModal?: boolean;
157
- ariaValueMax?: number;
158
- ariaValueMin?: number;
159
- ariaValueNow?: number;
160
- ariaValueText?: string;
161
- itemDir?: VListItemDirective<ItemT>;
162
- headerDir?: VListHeaderDirective;
163
- footerDir?: VListFooterDirective;
164
- emptyDir?: VListEmptyDirective;
165
- separatorDir?: VListSeparatorDirective<ItemT>;
166
- private scrollView?;
167
- itemCount: number;
168
- windowCells: IWindowCell<ItemT>[];
169
- leadingSpacerStyle: IViewStyle | null;
170
- trailingSpacerStyle: IViewStyle | null;
171
- cellStyle: IViewStyle | undefined;
172
- renderedStickyIndices: number[] | undefined;
173
- resolvedStyle: IViewStyle | undefined;
174
- resolvedContentContainerStyle: IStyleProp<IViewStyle> | undefined;
175
- resolvedMaintainVisibleContentPosition: {
176
- minIndexForVisible: number;
177
- autoscrollToTopThreshold?: number;
178
- } | undefined;
179
- commandedOffset: {
180
- x: number;
181
- y: number;
182
- } | undefined;
183
- private scrollOffset;
184
- private viewportLength;
185
- private measureVersion;
186
- private metricsCore;
187
- private readonly measured;
188
- private readonly cellMeasures;
189
- private readonly separatorOverrides;
190
- private committedWindow;
191
- private sentEndForContentLength;
192
- private sentStartForContentLength;
193
- private lastViewable;
194
- private viewableTimer;
195
- private batchTimer;
196
- private hasInteracted;
197
- private appliedInitialScroll;
198
- private firstVisibleKey;
199
- private lastEffectSignature;
200
- private lastRecompute;
201
- private readonly cdr;
202
- private readonly elementRef;
203
- get foldedAccessibility(): IAccessibilityProps & IAriaProps & Record<string, unknown>;
204
- get shouldRenderRefreshControl(): boolean;
205
- get isHorizontal(): boolean;
206
- private get isInverted();
207
- private get windowSizeValue();
208
- private get initialNumToRenderValue();
209
- private get maxToRenderPerBatchValue();
210
- private get updateCellsBatchingPeriodValue();
211
- private get onEndReachedThresholdValue();
212
- private get onStartReachedThresholdValue();
213
- onScrollTick: (event: ISymbioteEvent) => void;
214
- onLayoutTick: (event: ISymbioteEvent) => void;
215
- handleRefresh: () => void;
216
- accessibilityActionTick: (event: ISymbioteEvent) => void;
217
- accessibilityTapTick: (event: ISymbioteEvent) => void;
218
- magicTapTick: (event: ISymbioteEvent) => void;
219
- accessibilityEscapeTick: (event: ISymbioteEvent) => void;
220
- private keyFor;
221
- ngDoCheck(): void;
222
- ngAfterViewChecked(): void;
223
- ngOnDestroy(): void;
224
- private recomputeMetrics;
225
- private recomputeView;
226
- private buildSeparatorContext;
227
- private spacerStyle;
228
- private cellMeasure;
229
- handleCellLayout(measure: (event: ISymbioteEvent) => void, event: unknown): void;
230
- private isSymbioteEvent;
231
- private mergeSeparator;
232
- private makeSeparators;
233
- scrollToOffset(params: {
234
- offset: number;
235
- animated?: boolean;
236
- }): void;
237
- scrollToIndex(params: {
238
- index: number;
239
- animated?: boolean;
240
- viewOffset?: number;
241
- viewPosition?: number;
242
- }): void;
243
- scrollToItem(params: {
244
- item: unknown;
245
- animated?: boolean;
246
- viewPosition?: number;
247
- }): void;
248
- scrollToEnd(params?: {
249
- animated?: boolean;
250
- }): void;
251
- flashScrollIndicators(): void;
252
- getNativeScrollRef(): IScrollViewHandle | null;
253
- getScrollableNode(): IScrollViewHandle | null;
254
- getScrollResponder(): IScrollViewHandle | null;
255
- getScrollNode(): ISymbioteNode | null;
256
- recordInteraction(): void;
257
- private scrollToPixel;
258
- private offsetForIndexLocal;
259
- private effectBatchFill;
260
- private effectEndReached;
261
- private effectStartReached;
262
- private effectViewability;
263
- private effectInitialScroll;
264
- private effectMaintainVisibleContentPosition;
265
- }