@symbiote-native/angular 0.7.0 → 0.8.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 (158) hide show
  1. package/README.md +3 -3
  2. package/build/angular/bootstrap.js +1 -1
  3. package/build/angular/bootstrap.js.map +1 -1
  4. package/build/angular/components/activity-indicator/index.android.js +7 -2
  5. package/build/angular/components/activity-indicator/index.android.js.map +1 -1
  6. package/build/angular/components/activity-indicator/index.ios.js +3 -1
  7. package/build/angular/components/activity-indicator/index.ios.js.map +1 -1
  8. package/build/angular/components/activity-indicator/shared.d.ts +1 -1
  9. package/build/angular/components/activity-indicator/shared.js +1 -1
  10. package/build/angular/components/activity-indicator/shared.js.map +1 -1
  11. package/build/angular/components/button.js +13 -5
  12. package/build/angular/components/button.js.map +1 -1
  13. package/build/angular/components/flat-list/index.d.ts +1 -1
  14. package/build/angular/components/flat-list/index.js +47 -14
  15. package/build/angular/components/flat-list/index.js.map +1 -1
  16. package/build/angular/components/image/index.android.js +4 -2
  17. package/build/angular/components/image/index.android.js.map +1 -1
  18. package/build/angular/components/image/index.ios.js +4 -2
  19. package/build/angular/components/image/index.ios.js.map +1 -1
  20. package/build/angular/components/image/shared.js +18 -6
  21. package/build/angular/components/image/shared.js.map +1 -1
  22. package/build/angular/components/image-background.js +22 -8
  23. package/build/angular/components/image-background.js.map +1 -1
  24. package/build/angular/components/input-accessory-view/index.js +7 -2
  25. package/build/angular/components/input-accessory-view/index.js.map +1 -1
  26. package/build/angular/components/keyboard-avoiding-view/index.d.ts +1 -0
  27. package/build/angular/components/keyboard-avoiding-view/index.js +39 -9
  28. package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
  29. package/build/angular/components/modal/index.js +7 -2
  30. package/build/angular/components/modal/index.js.map +1 -1
  31. package/build/angular/components/pressable/index.d.ts +1 -1
  32. package/build/angular/components/pressable/index.js +6 -2
  33. package/build/angular/components/pressable/index.js.map +1 -1
  34. package/build/angular/components/refresh-control/index.js +3 -1
  35. package/build/angular/components/refresh-control/index.js.map +1 -1
  36. package/build/angular/components/safe-area-view/index.js +3 -1
  37. package/build/angular/components/safe-area-view/index.js.map +1 -1
  38. package/build/angular/components/scroll-view/index.android.js +44 -14
  39. package/build/angular/components/scroll-view/index.android.js.map +1 -1
  40. package/build/angular/components/scroll-view/index.ios.js +13 -5
  41. package/build/angular/components/scroll-view/index.ios.js.map +1 -1
  42. package/build/angular/components/scroll-view/projection.d.ts +32 -0
  43. package/build/angular/components/scroll-view/projection.js +212 -47
  44. package/build/angular/components/scroll-view/projection.js.map +1 -1
  45. package/build/angular/components/scroll-view/shared.js +28 -7
  46. package/build/angular/components/scroll-view/shared.js.map +1 -1
  47. package/build/angular/components/scroll-view/sticky-header.js +7 -3
  48. package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
  49. package/build/angular/components/section-list/index.d.ts +6 -1
  50. package/build/angular/components/section-list/index.js +63 -18
  51. package/build/angular/components/section-list/index.js.map +1 -1
  52. package/build/angular/components/switch/index.android.js +17 -3
  53. package/build/angular/components/switch/index.android.js.map +1 -1
  54. package/build/angular/components/switch/index.ios.js +17 -3
  55. package/build/angular/components/switch/index.ios.js.map +1 -1
  56. package/build/angular/components/switch/shared.d.ts +1 -1
  57. package/build/angular/components/switch/shared.js +5 -2
  58. package/build/angular/components/switch/shared.js.map +1 -1
  59. package/build/angular/components/text-input.d.ts +1 -1
  60. package/build/angular/components/text-input.js +25 -5
  61. package/build/angular/components/text-input.js.map +1 -1
  62. package/build/angular/components/touchable/index.d.ts +29 -7
  63. package/build/angular/components/touchable/index.js +246 -69
  64. package/build/angular/components/touchable/index.js.map +1 -1
  65. package/build/angular/components/touchable-native-feedback/index.js +2 -2
  66. package/build/angular/components/touchable-native-feedback/index.js.map +1 -1
  67. package/build/angular/components/virtualized-list/directives.js +4 -0
  68. package/build/angular/components/virtualized-list/directives.js.map +1 -1
  69. package/build/angular/components/virtualized-list/index.d.ts +5 -2
  70. package/build/angular/components/virtualized-list/index.js +197 -60
  71. package/build/angular/components/virtualized-list/index.js.map +1 -1
  72. package/build/angular/components/virtualized-section-list/directives.js.map +1 -1
  73. package/build/angular/components/virtualized-section-list/index.d.ts +18 -1
  74. package/build/angular/components/virtualized-section-list/index.js +90 -21
  75. package/build/angular/components/virtualized-section-list/index.js.map +1 -1
  76. package/build/angular/components.d.ts +1 -1
  77. package/build/angular/components.js.map +1 -1
  78. package/build/angular/create-portal/index.js +5 -1
  79. package/build/angular/create-portal/index.js.map +1 -1
  80. package/build/angular/create-tunnel/index.js.map +1 -1
  81. package/build/angular/descriptor-to-angular/index.js +3 -1
  82. package/build/angular/descriptor-to-angular/index.js.map +1 -1
  83. package/build/angular/diagnostics.d.ts +33 -0
  84. package/build/angular/diagnostics.js +82 -0
  85. package/build/angular/diagnostics.js.map +1 -0
  86. package/build/angular/host-instance/index.js +1 -1
  87. package/build/angular/host-instance/index.js.map +1 -1
  88. package/build/angular/index.d.ts +5 -2
  89. package/build/angular/index.js +15 -1
  90. package/build/angular/index.js.map +1 -1
  91. package/build/angular/modules/animated/create-animated-component.js +27 -9
  92. package/build/angular/modules/animated/create-animated-component.js.map +1 -1
  93. package/build/angular/modules/app-registry/index.js.map +1 -1
  94. package/build/angular/modules/status-bar/index.js +1 -1
  95. package/build/angular/modules/status-bar/index.js.map +1 -1
  96. package/build/angular/primitives/index.d.ts +19 -2
  97. package/build/angular/primitives/index.js +39 -3
  98. package/build/angular/primitives/index.js.map +1 -1
  99. package/build/angular/primitives/shared.d.ts +9 -1
  100. package/build/angular/primitives/shared.js +49 -3
  101. package/build/angular/primitives/shared.js.map +1 -1
  102. package/build/angular/render/index.js +48 -5
  103. package/build/angular/render/index.js.map +1 -1
  104. package/build/angular/renderer/index.d.ts +1 -0
  105. package/build/angular/renderer/index.js +37 -2
  106. package/build/angular/renderer/index.js.map +1 -1
  107. package/build/angular/services/color-scheme.service.js.map +1 -1
  108. package/build/angular/services/window-dimensions.service.js +1 -1
  109. package/build/angular/services/window-dimensions.service.js.map +1 -1
  110. package/package.json +5 -5
  111. package/src/bootstrap.ts +4 -1
  112. package/src/components/activity-indicator/index.android.ts +7 -2
  113. package/src/components/activity-indicator/index.ios.ts +3 -1
  114. package/src/components/activity-indicator/shared.ts +32 -13
  115. package/src/components/button.ts +19 -6
  116. package/src/components/flat-list/index.ts +91 -29
  117. package/src/components/image/index.android.ts +9 -2
  118. package/src/components/image/index.ios.ts +9 -2
  119. package/src/components/image/shared.ts +58 -19
  120. package/src/components/image-background.ts +29 -10
  121. package/src/components/input-accessory-view/index.ts +27 -10
  122. package/src/components/keyboard-avoiding-view/index.ts +55 -15
  123. package/src/components/modal/index.ts +22 -8
  124. package/src/components/pressable/index.ts +51 -21
  125. package/src/components/refresh-control/index.ts +22 -8
  126. package/src/components/safe-area-view/index.ts +16 -7
  127. package/src/components/scroll-view/index.android.ts +31 -9
  128. package/src/components/scroll-view/index.ios.ts +17 -4
  129. package/src/components/scroll-view/projection.ts +290 -63
  130. package/src/components/scroll-view/shared.ts +93 -26
  131. package/src/components/scroll-view/sticky-header.ts +25 -8
  132. package/src/components/section-list/index.ts +61 -19
  133. package/src/components/switch/index.android.ts +14 -3
  134. package/src/components/switch/index.ios.ts +14 -3
  135. package/src/components/switch/shared.ts +15 -4
  136. package/src/components/text-input.ts +45 -13
  137. package/src/components/touchable/index.ts +296 -72
  138. package/src/components/touchable-native-feedback/index.ts +32 -10
  139. package/src/components/virtualized-list/directives.ts +19 -5
  140. package/src/components/virtualized-list/index.ts +274 -72
  141. package/src/components/virtualized-section-list/directives.ts +6 -3
  142. package/src/components/virtualized-section-list/index.ts +146 -34
  143. package/src/components.ts +4 -1
  144. package/src/create-portal/index.ts +8 -2
  145. package/src/create-tunnel/index.ts +3 -1
  146. package/src/descriptor-to-angular/index.ts +29 -8
  147. package/src/diagnostics.ts +138 -0
  148. package/src/host-instance/index.ts +9 -3
  149. package/src/index.ts +31 -2
  150. package/src/modules/animated/create-animated-component.ts +44 -15
  151. package/src/modules/app-registry/index.ts +3 -1
  152. package/src/modules/status-bar/index.ts +13 -4
  153. package/src/primitives/index.ts +46 -2
  154. package/src/primitives/shared.ts +70 -9
  155. package/src/render/index.ts +56 -6
  156. package/src/renderer/index.ts +76 -14
  157. package/src/services/color-scheme.service.ts +3 -1
  158. package/src/services/window-dimensions.service.ts +11 -4
@@ -44,8 +44,16 @@ import {
44
44
  type IPressableAndroidRippleConfig,
45
45
  type IRectOffset,
46
46
  } from '@symbiote-native/components';
47
- import { dlog, isSymbioteEvent, type ISymbioteEvent } from '@symbiote-native/engine';
48
- import { anchorHostStyle, SymbioteHostPropsDirective, ViewHost } from '../../primitives';
47
+ import {
48
+ dlog,
49
+ isSymbioteEvent,
50
+ type ISymbioteEvent,
51
+ } from '@symbiote-native/engine';
52
+ import {
53
+ anchorHostStyle,
54
+ SymbioteHostPropsDirective,
55
+ ViewHost,
56
+ } from '../../primitives';
49
57
  import { Pressable, type IAngularPressableInputs } from '../pressable';
50
58
 
51
59
  export type {
@@ -58,7 +66,10 @@ export type {
58
66
  // feedback config) minus children (Angular takes children via <ng-content>) and minus the press/
59
67
  // hover events (declared as this component's OWN @Output()s below). Declared per-adapter over the
60
68
  // shared Pressable INPUT surface.
61
- export type IAngularTouchableNativeFeedbackProps = Omit<IAngularPressableInputs, 'style'> & {
69
+ export type IAngularTouchableNativeFeedbackProps = Omit<
70
+ IAngularPressableInputs,
71
+ 'style'
72
+ > & {
62
73
  background?: INativeFeedbackBackground;
63
74
  useForeground?: boolean;
64
75
  };
@@ -107,7 +118,8 @@ export class TouchableNativeFeedback
107
118
  // The static helpers are pure config-dict producers; they live as members on the component class
108
119
  // so callers reach them as `TouchableNativeFeedback.Ripple(...)`, exactly like RN.
109
120
  static readonly SelectableBackground = selectableBackground;
110
- static readonly SelectableBackgroundBorderless = selectableBackgroundBorderless;
121
+ static readonly SelectableBackgroundBorderless =
122
+ selectableBackgroundBorderless;
111
123
  static readonly Ripple = rippleBackground;
112
124
  static readonly canUseNativeForeground = canUseNativeForeground;
113
125
 
@@ -144,8 +156,10 @@ export class TouchableNativeFeedback
144
156
  @Input() accessibilityValue?: IAccessibilityProps['accessibilityValue'];
145
157
  @Input() accessibilityActions?: IAccessibilityProps['accessibilityActions'];
146
158
  @Input() accessibilityLabelledBy?: string | string[];
147
- @Input() importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
148
- @Input() accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
159
+ @Input()
160
+ importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
161
+ @Input()
162
+ accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
149
163
  @Input() screenReaderFocusable?: boolean;
150
164
  @Input() accessibilityViewIsModal?: boolean;
151
165
  @Input() accessibilityElementsHidden?: boolean;
@@ -222,7 +236,10 @@ export class TouchableNativeFeedback
222
236
  // backgroundProps picks the foreground slot only where the platform supports it, else the
223
237
  // background slot (canUseNativeForeground) — shared with React/Vue. One side is always undefined.
224
238
  get feedback(): Record<string, INativeFeedbackBackground> {
225
- return backgroundProps(this.resolvedBackground, this.useForeground === true);
239
+ return backgroundProps(
240
+ this.resolvedBackground,
241
+ this.useForeground === true,
242
+ );
226
243
  }
227
244
 
228
245
  // Assembles the SAME resolved values the template used to bind one-by-one into a single
@@ -261,7 +278,10 @@ export class TouchableNativeFeedback
261
278
  accessibilityLabel: this.accessibilityLabel,
262
279
  accessibilityHint: this.accessibilityHint,
263
280
  accessibilityRole: this.accessibilityRole,
264
- accessibilityState: resolveDisabledAccessibilityState(this.accessibilityState, this.disabled),
281
+ accessibilityState: resolveDisabledAccessibilityState(
282
+ this.accessibilityState,
283
+ this.disabled,
284
+ ),
265
285
  accessibilityValue: this.accessibilityValue,
266
286
  accessibilityActions: this.accessibilityActions,
267
287
  accessibilityLabelledBy: this.accessibilityLabelledBy,
@@ -272,8 +292,10 @@ export class TouchableNativeFeedback
272
292
  accessibilityElementsHidden: this.accessibilityElementsHidden,
273
293
  accessibilityIgnoresInvertColors: this.accessibilityIgnoresInvertColors,
274
294
  accessibilityLanguage: this.accessibilityLanguage,
275
- accessibilityRespondsToUserInteraction: this.accessibilityRespondsToUserInteraction,
276
- accessibilityShowsLargeContentViewer: this.accessibilityShowsLargeContentViewer,
295
+ accessibilityRespondsToUserInteraction:
296
+ this.accessibilityRespondsToUserInteraction,
297
+ accessibilityShowsLargeContentViewer:
298
+ this.accessibilityShowsLargeContentViewer,
277
299
  accessibilityLargeContentTitle: this.accessibilityLargeContentTitle,
278
300
  role: this.role,
279
301
  'aria-label': this.ariaLabel,
@@ -36,6 +36,7 @@ import {
36
36
  type SimpleChanges,
37
37
  } from '@angular/core';
38
38
  import { dlog } from '@symbiote-native/engine';
39
+ import { countAngular } from '../../diagnostics';
39
40
  import type { ISeparators } from '@symbiote-native/components';
40
41
 
41
42
  let vListOutletInstanceCounter = 0;
@@ -68,7 +69,8 @@ function isRecord(value: unknown): value is Record<string, unknown> {
68
69
  // typed at the call site (let-item: ItemT, let-index: number, let-separators: ISeparators).
69
70
  @Directive({ selector: '[vListItem]', standalone: true })
70
71
  export class VListItemDirective<ItemT = unknown> {
71
- readonly templateRef = inject<TemplateRef<IVListItemContext<ItemT>>>(TemplateRef);
72
+ readonly templateRef =
73
+ inject<TemplateRef<IVListItemContext<ItemT>>>(TemplateRef);
72
74
 
73
75
  static ngTemplateContextGuard<T>(
74
76
  _dir: VListItemDirective<T>,
@@ -101,7 +103,8 @@ export class VListEmptyDirective {
101
103
  // types the `let-` bindings against the separator props.
102
104
  @Directive({ selector: '[vListSeparator]', standalone: true })
103
105
  export class VListSeparatorDirective<ItemT = unknown> {
104
- readonly templateRef = inject<TemplateRef<IVListSeparatorContext<ItemT>>>(TemplateRef);
106
+ readonly templateRef =
107
+ inject<TemplateRef<IVListSeparatorContext<ItemT>>>(TemplateRef);
105
108
 
106
109
  static ngTemplateContextGuard<T>(
107
110
  _dir: VListSeparatorDirective<T>,
@@ -130,20 +133,28 @@ export class VListOutletDirective<C = unknown> implements OnChanges, OnDestroy {
130
133
  `Angular VListOutlet#${this.instanceId} templateRef CHANGED (was=${changes['templateRef'].previousValue !== undefined} now=${this.templateRef !== undefined}) -> clear + recreate`,
131
134
  );
132
135
  this.viewContainer.clear();
136
+ countAngular('outletCreates');
133
137
  this.viewRef =
134
138
  this.templateRef === undefined
135
139
  ? null
136
- : this.viewContainer.createEmbeddedView(this.templateRef, this.context);
140
+ : this.viewContainer.createEmbeddedView(
141
+ this.templateRef,
142
+ this.context,
143
+ );
137
144
  return;
138
145
  }
139
146
  if (this.viewRef !== null && this.context !== undefined) {
140
- dlog(`Angular VListOutlet#${this.instanceId} context updated, markForCheck`);
147
+ countAngular('outletUpdates');
148
+ dlog(
149
+ `Angular VListOutlet#${this.instanceId} context updated, markForCheck`,
150
+ );
141
151
  this.updateContext(this.viewRef.context, this.context);
142
152
  this.viewRef.markForCheck();
143
153
  }
144
154
  }
145
155
 
146
156
  ngOnDestroy(): void {
157
+ countAngular('outletDestroys');
147
158
  dlog(`Angular VListOutlet#${this.instanceId} destroyed`);
148
159
  this.viewContainer.clear();
149
160
  }
@@ -158,7 +169,10 @@ export class VListOutletDirective<C = unknown> implements OnChanges, OnDestroy {
158
169
  }
159
170
  }
160
171
 
161
- function copyContextFields(target: Record<string, unknown>, source: Record<string, unknown>): void {
172
+ function copyContextFields(
173
+ target: Record<string, unknown>,
174
+ source: Record<string, unknown>,
175
+ ): void {
162
176
  for (const key of Object.keys(target)) {
163
177
  if (!(key in source)) delete target[key];
164
178
  }