@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
@@ -86,12 +86,19 @@ import {
86
86
  TextInputHost,
87
87
  } from '../primitives';
88
88
 
89
- export type { ITextInputHandle, ITextInputSelection, IInputMode, IEnterKeyHint, ISubmitBehavior };
89
+ export type {
90
+ ITextInputHandle,
91
+ ITextInputSelection,
92
+ IInputMode,
93
+ IEnterKeyHint,
94
+ ISubmitBehavior,
95
+ };
90
96
 
91
97
  // Mirrors React's ITextInputProps minus nothing (TextInput has no children) — declared
92
98
  // per-adapter over the shared accessibility base because Angular's input surface aliases the
93
99
  // aria-* keys to camelCase @Inputs, unlike the plain agnostic fields shared across adapters.
94
- export interface IAngularTextInputProps extends IAccessibilityProps, IAriaProps {
100
+ export interface IAngularTextInputProps
101
+ extends IAccessibilityProps, IAriaProps {
95
102
  value?: string;
96
103
  defaultValue?: string;
97
104
  placeholder?: string;
@@ -158,12 +165,18 @@ export type IAngularTextInputInputs = Omit<
158
165
  @Component({
159
166
  selector: 'TextInput',
160
167
  standalone: true,
161
- hostDirectives: [{ directive: SymbioteStyleInputDirective, inputs: ['style'] }],
168
+ hostDirectives: [
169
+ { directive: SymbioteStyleInputDirective, inputs: ['style'] },
170
+ ],
162
171
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
163
172
  imports: [SymbioteHostPropsDirective, TextInputHost, MultilineTextInputHost],
164
173
  changeDetection: ChangeDetectionStrategy.OnPush,
165
174
  providers: [
166
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TextInput), multi: true },
175
+ {
176
+ provide: NG_VALUE_ACCESSOR,
177
+ useExisting: forwardRef(() => TextInput),
178
+ multi: true,
179
+ },
167
180
  ],
168
181
  template: `
169
182
  @if (isMultiline) {
@@ -277,8 +290,10 @@ export class TextInput
277
290
  @Input() accessibilityValue?: IAccessibilityProps['accessibilityValue'];
278
291
  @Input() accessibilityActions?: IAccessibilityProps['accessibilityActions'];
279
292
  @Input() accessibilityLabelledBy?: string | string[];
280
- @Input() importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
281
- @Input() accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
293
+ @Input()
294
+ importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
295
+ @Input()
296
+ accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
282
297
  @Input() screenReaderFocusable?: boolean;
283
298
  @Input() accessibilityViewIsModal?: boolean;
284
299
  @Input() accessibilityElementsHidden?: boolean;
@@ -390,7 +405,9 @@ export class TextInput
390
405
  const node = this.hostNode;
391
406
  if (node === undefined) return;
392
407
  dlog('TextInput autoFocus -> focus command');
393
- this.cancelAutoFocus = whenCommitted(node, () => dispatchViewCommand(node, 'focus', []));
408
+ this.cancelAutoFocus = whenCommitted(node, () =>
409
+ dispatchViewCommand(node, 'focus', []),
410
+ );
394
411
  }
395
412
 
396
413
  ngOnDestroy(): void {
@@ -458,7 +475,12 @@ export class TextInput
458
475
  clear(): void {
459
476
  const node = this.hostNode;
460
477
  if (node === undefined) return;
461
- dispatchViewCommand(node, 'setTextAndSelection', [this.mostRecentEventCount, '', 0, 0]);
478
+ dispatchViewCommand(node, 'setTextAndSelection', [
479
+ this.mostRecentEventCount,
480
+ '',
481
+ 0,
482
+ 0,
483
+ ]);
462
484
  this.lastNativeText = '';
463
485
  }
464
486
 
@@ -488,12 +510,20 @@ export class TextInput
488
510
  const value = this.value;
489
511
  if (!shouldCommandText(this.lastNativeText, value)) return;
490
512
  const selStart = this.selection?.start ?? SELECTION_NONE;
491
- const selEnd = this.selection?.end ?? this.selection?.start ?? SELECTION_NONE;
513
+ const selEnd =
514
+ this.selection?.end ?? this.selection?.start ?? SELECTION_NONE;
492
515
  const count = this.mostRecentEventCount;
493
- dlog(`TextInput setTextAndSelection count=${count} text=${JSON.stringify(value)}`);
516
+ dlog(
517
+ `TextInput setTextAndSelection count=${count} text=${JSON.stringify(value)}`,
518
+ );
494
519
  this.lastNativeText = value;
495
520
  whenCommitted(node, () =>
496
- dispatchViewCommand(node, 'setTextAndSelection', [count, value, selStart, selEnd]),
521
+ dispatchViewCommand(node, 'setTextAndSelection', [
522
+ count,
523
+ value,
524
+ selStart,
525
+ selEnd,
526
+ ]),
497
527
  );
498
528
  }
499
529
 
@@ -558,8 +588,10 @@ export class TextInput
558
588
  accessibilityElementsHidden: this.accessibilityElementsHidden,
559
589
  accessibilityIgnoresInvertColors: this.accessibilityIgnoresInvertColors,
560
590
  accessibilityLanguage: this.accessibilityLanguage,
561
- accessibilityRespondsToUserInteraction: this.accessibilityRespondsToUserInteraction,
562
- accessibilityShowsLargeContentViewer: this.accessibilityShowsLargeContentViewer,
591
+ accessibilityRespondsToUserInteraction:
592
+ this.accessibilityRespondsToUserInteraction,
593
+ accessibilityShowsLargeContentViewer:
594
+ this.accessibilityShowsLargeContentViewer,
563
595
  accessibilityLargeContentTitle: this.accessibilityLargeContentTitle,
564
596
  role: this.role,
565
597
  'aria-label': this.ariaLabel,