@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,36 +0,0 @@
1
- // findNodeHandle, the Angular twin of adapters/react/src/host-instance.ts and
2
- // adapters/vue/src/host-instance/index.ts. RN's "ref/instance -> native reactTag" lookup,
3
- // the seam imperative-interop libraries reach through.
4
- //
5
- // Angular template refs on a primitive host (`<View #myView>`) receive the component instance,
6
- // not the raw engine node. SymbiotePrimitiveHost exposes `nativeElement`, which holds the
7
- // engine host node that `getNativeTag` is keyed on. This adapter accepts:
8
- // - a bare number (idempotent)
9
- // - an engine host node / public instance
10
- // - an Angular ElementRef wrapping the host node
11
- // - a SymbiotePrimitiveHost component instance (via its public `nativeElement` getter)
12
- // - null/undefined -> null
13
- // An uncommitted or unknown input surfaces as null.
14
- import { ElementRef } from '@angular/core';
15
- import { getNativeTag, isSymbioteNode } from '@symbiote-native/engine';
16
- function resolveHostNode(candidate) {
17
- if (candidate === null || candidate === undefined)
18
- return null;
19
- if (isSymbioteNode(candidate))
20
- return candidate;
21
- if (candidate instanceof ElementRef)
22
- return resolveHostNode(candidate.nativeElement);
23
- const maybeHost = candidate;
24
- if (typeof maybeHost.nativeElement !== 'undefined') {
25
- return resolveHostNode(maybeHost.nativeElement);
26
- }
27
- return null;
28
- }
29
- export function findNodeHandle(componentOrHandle) {
30
- if (componentOrHandle === null || componentOrHandle === undefined)
31
- return null;
32
- if (typeof componentOrHandle === 'number')
33
- return componentOrHandle;
34
- const node = resolveHostNode(componentOrHandle);
35
- return node ? (getNativeTag(node) ?? null) : null;
36
- }
package/build/index.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export { ActivityIndicator, anchorHostStyle, Button, FlatList, HorizontalScrollContentView, HorizontalScrollView, Image, ImageBackground, InputAccessoryView, KeyboardAvoidingView, Modal, Pressable, RefreshControl, SafeAreaView, ScrollContentView, ScrollView, ScrollViewStickyHeader, SectionList, stableAnchorStyle, Switch, SymbioteHostPropsDirective, Text, TextInput, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, View, VirtualizedList, VirtualizedSectionList, VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, } from './components';
2
- export { Animated } from './modules/animated';
3
- export { AnimatedFlatList, AnimatedImage, AnimatedScrollView, AnimatedSectionList, AnimatedText, AnimatedView, } from './modules/animated';
4
- export type { IActivityIndicatorProps, IAngularImageBackgroundProps, IAngularInputAccessoryViewProps, IAngularKeyboardAvoidingViewProps, IAngularModalProps, IAngularPressableProps, IAngularRefreshControlProps, IAngularSafeAreaViewProps, IAngularScrollViewProps, IAngularTextInputProps, IAngularTouchableHighlightProps, IAngularTouchableNativeFeedbackProps, IAngularTouchableOpacityProps, IAngularTouchableWithoutFeedbackProps, IButtonProps, ICellLayout, IFlatListHandle, IFlatListProps, IEnterKeyHint, IImageCacheStatus, IImageProps, IImageSize, IImageSource, IImageSourceProp, IInputMode, IKeyboardAvoidingBehavior, IModalAnimationType, IModalOrientation, IModalOrientationChangeEvent, IModalPresentationStyle, INativeFeedbackBackground, IResizeMode, IRippleBackground, IScrollViewHandle, ISectionListHandle, ISectionListProps, ISeparatorProps, ISeparators, IStickyHeaderComponentType, ISubmitBehavior, IThemeAttrBackground, IViewabilityConfig, IViewabilityConfigCallbackPair, IViewableItemsChangedInfo, IViewToken, IVirtualizedListHandle, IVirtualizedListProps, IVirtualizedSectionListHandle, IVirtualizedSectionListProps, IVListItemContext, IVListSeparatorContext, IVSectionContext, IVSectionItemContext, ISection, ISwitchProps, ISwitchTrackColor, ITextInputHandle, ITextInputSelection, } from './components';
5
- export { setImageSourceResolver } from './components';
6
- export { mount, unmount } from './render';
7
- export { DescriptorOutlet } from './descriptor-to-angular';
8
- export { PortalDirective, PortalOutletDirective } from './create-portal';
9
- export { createTunnel, TunnelInDirective, TunnelOut, type ITunnelStore } from './create-tunnel';
10
- export { registerComposedComponent, SymbioteRenderer, SymbioteRendererFactory } from './renderer';
11
- export { findNodeHandle } from './host-instance';
12
- export type { IHostInstance } from './host-instance';
13
- export { StatusBar } from './modules/status-bar';
14
- export type { IStatusBarProps, IStatusBarStyle } from './modules/status-bar';
15
- export { AppRegistry, setHostRegistrar } from './modules/app-registry';
16
- export type { IComponentProvider, IAppParameters, IRunnable, IHostRegistrar, IWrapperComponentProvider, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from './modules/app-registry';
17
- export { ColorSchemeService, WindowDimensionsService } from './services';
18
- export { Alert, Share, ActionSheetIOS, Linking, Vibration, ToastAndroid, Settings, I18nManager, Dimensions, Appearance, AppState, Keyboard, KEYBOARD_EVENT, BackHandler, PermissionsAndroid, PERMISSIONS, RESULTS, AccessibilityInfo, LayoutAnimation, InteractionManager, PanResponder, PixelRatio, PlatformColor, DynamicColorIOS, } from '@symbiote-native/engine';
19
- export type { IAlertType, IAlertButtonStyle, IAlertButton, IAlertButtons, IAlertOptions, IShareContent, IShareOptions, IShareAction, IActionSheetIOSOptions, IShareActionSheetIOSOptions, IShareActionSheetError, IUrlEvent, II18nManagerConstants, IDisplayMetrics, IDisplayMetricsAndroid, IDimensionsPayload, IDimensionsSet, IDimensionsKey, IDimensionsChangeListener, IDimensionsStatic, IColorSchemeName, IColorSchemePreference, IAppStateStatus, IAppStateEvent, IKeyboardEventName, IKeyboardEvent, IKeyboardMetrics, IBackPressEventName, IBackPressHandler, IPermission, IPermissionStatus, IRationale, IAccessibilityChangeEvent, IAccessibilityChangeEventName, IAccessibilityChangeEventHandler, IAccessibilityAnnouncementFinishedEvent, IAnnounceForAccessibilityOptions, IAccessibilityEventType, ILayoutAnimationType, ILayoutAnimationProperty, ILayoutAnimationConfig, ILayoutAnimationAnim, IInteractionEvent, ISimpleTask, IPromiseTask, ITask, IHandle, IPanResponderGestureState, IPanResponderCallbacks, IGestureResponderHandlers, IPanResponderInstance, IPixelRatioStatic, IColorValue, IOpaqueColorValue, IDynamicColorIOSTuple, } from '@symbiote-native/engine';
20
- export { dlog, flattenStyle, isDebug, Platform, processColor, setColorProcessor, setDeviceEventSource, setNativeViewConfigSource, StyleSheet, } from '@symbiote-native/engine';
21
- export type { IRootTag, ISymbioteEvent, ISymbioteNode } from '@symbiote-native/engine';
package/build/index.js DELETED
@@ -1,40 +0,0 @@
1
- // @symbiote-native/angular: a thin Angular reconciler over @symbiote-native/engine. A custom Renderer2 +
2
- // RendererFactory2 map each node op onto the engine's mutation API; all Fabric clone-on-write
3
- // lives in the engine, shared with every other adapter. App code names only @symbiote-native/angular.
4
- //
5
- // SEAM SCAFFOLD: mount/unmount + the renderer seam + host intrinsic selectors. Full RN-like
6
- // composed components still flow through the shared @symbiote-native/components bridge.
7
- export { ActivityIndicator, anchorHostStyle, Button, FlatList, HorizontalScrollContentView, HorizontalScrollView, Image, ImageBackground, InputAccessoryView, KeyboardAvoidingView, Modal, Pressable, RefreshControl, SafeAreaView, ScrollContentView, ScrollView, ScrollViewStickyHeader, SectionList, stableAnchorStyle, Switch, SymbioteHostPropsDirective, Text, TextInput, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, View, VirtualizedList, VirtualizedSectionList, VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListItemDirective, VListSeparatorDirective, VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, } from './components';
8
- export { Animated } from './modules/animated';
9
- // Also exposed as named top-level symbols (not just Animated.View/.Text/...): ngtsc's partial-mode
10
- // static evaluator can't trace a component class through property access on an external
11
- // namespace object, only through a direct named import binding —
12
- // so `<AnimatedView>` in a template requires `import { AnimatedView } from '@symbiote-native/angular'`,
13
- // not `const AnimatedView = Animated.View`. Plain tsc/vitest don't catch this; only a real ngc run does.
14
- export { AnimatedFlatList, AnimatedImage, AnimatedScrollView, AnimatedSectionList, AnimatedText, AnimatedView, } from './modules/animated';
15
- export { setImageSourceResolver } from './components';
16
- export { mount, unmount } from './render';
17
- // The generic Descriptor→Angular bridge, the twin of descriptorToReact/descriptorToVue.
18
- // Exported so a component defined OUTSIDE this package (e.g.
19
- // @symbiote-native/slider) can render a shared @symbiote-native/components/@symbiote-native/slider Descriptor tree
20
- // without hand-writing its own Renderer2 walker.
21
- export { DescriptorOutlet } from './descriptor-to-angular';
22
- // createPortal (same-surface only — see the file header) and createTunnel (cross-surface,
23
- // see its file header) are the Angular twins of the React/Vue portal/tunnel primitives.
24
- // Angular can't synthesize components at runtime (no JIT under Metro/Hermes), so both are
25
- // static, pre-authored structural directives (`*portal`/`*tunnelIn`, the `*ngIf`/`*ngFor`
26
- // idiom) parameterized by an `@Input()`, rather than a factory returning fresh components per
27
- // call.
28
- export { PortalDirective, PortalOutletDirective } from './create-portal';
29
- export { createTunnel, TunnelInDirective, TunnelOut } from './create-tunnel';
30
- export { registerComposedComponent, SymbioteRenderer, SymbioteRendererFactory } from './renderer';
31
- export { findNodeHandle } from './host-instance';
32
- export { StatusBar } from './modules/status-bar';
33
- // AppRegistry: RN's app entry point over `mount`. setHostRegistrar wires RN's own
34
- // registrar so the native Fabric host finds our runnable by app key.
35
- export { AppRegistry, setHostRegistrar } from './modules/app-registry';
36
- export { ColorSchemeService, WindowDimensionsService } from './services';
37
- // Framework-agnostic runtime modules from @symbiote-native/engine. Every adapter re-exports them so
38
- // app code names only @symbiote-native/angular.
39
- export { Alert, Share, ActionSheetIOS, Linking, Vibration, ToastAndroid, Settings, I18nManager, Dimensions, Appearance, AppState, Keyboard, KEYBOARD_EVENT, BackHandler, PermissionsAndroid, PERMISSIONS, RESULTS, AccessibilityInfo, LayoutAnimation, InteractionManager, PanResponder, PixelRatio, PlatformColor, DynamicColorIOS, } from '@symbiote-native/engine';
40
- export { dlog, flattenStyle, isDebug, Platform, processColor, setColorProcessor, setDeviceEventSource, setNativeViewConfigSource, StyleSheet, } from '@symbiote-native/engine';
@@ -1,14 +0,0 @@
1
- import { type ISymbioteNode } from '@symbiote-native/engine';
2
- export declare class AnimatedLeafBinder {
3
- private readonly resolveNode;
4
- private readonly label;
5
- private attached;
6
- private cancelBind;
7
- private eventDetachers;
8
- constructor(resolveNode: () => ISymbioteNode | null, label: string);
9
- reconcile(props: Record<string, unknown>, wantsNative: boolean): void;
10
- private bindNode;
11
- private attachEvents;
12
- private detachEvents;
13
- destroy(): void;
14
- }
@@ -1,90 +0,0 @@
1
- // Pure Fabrication (GRASP): the leaf-lifecycle orchestration shared by every Animated*
2
- // wrapper, extracted out of AnimatedComponentBase so AnimatedImage — which cannot extend
3
- // AnimatedComponentBase, since it must extend ImageBase for TS's-native image handling —
4
- // gets the SAME logic via composition instead of copy-pasting it. Framework-thin on
5
- // purpose: it knows nothing about Angular (@ViewChild, DI, change detection), only the
6
- // engine's Animated leaf + commit primitives, so it stays testable without any Angular
7
- // bootstrap. NOTE: react/vue drive this same dance through their own runtime HOC
8
- // (createAnimatedComponent) rather than a class, so there is no cross-adapter dedup
9
- // opportunity here yet — this Pure Fabrication is local to the angular adapter.
10
- import { AnimatedProps, attachNativeEventHandler, dlog, whenCommitted, } from '@symbiote-native/engine';
11
- export class AnimatedLeafBinder {
12
- resolveNode;
13
- label;
14
- // The leaf currently wired into the value graph. Null until the first reconcile.
15
- attached = null;
16
- // The whenCommitted waiter for the current leaf's node binding, cancelled before the next.
17
- cancelBind;
18
- // Detachers for any Animated.event prop bound natively to the committed node (JS path: none).
19
- eventDetachers = [];
20
- // `resolveNode` stays a caller-supplied resolver (not a constructor-captured node) so this
21
- // class never needs to know HOW the host node is found — AnimatedComponentBase and
22
- // AnimatedImage both resolve it the same way (resolveHostNode + isSymbioteNode over their
23
- // own @ViewChild), but that's Angular DI state this binder has no business touching.
24
- // `label` is purely diagnostic (dlog), mirroring the constructor.name the pre-extraction
25
- // dlog call used.
26
- constructor(resolveNode, label) {
27
- this.resolveNode = resolveNode;
28
- this.label = label;
29
- }
30
- // Build a fresh AnimatedProps leaf from the current props (the React/Vue per-render
31
- // useMemo(rest)), wire it into the graph, and swap the previous one out. Attach the NEW leaf
32
- // BEFORE detaching the OLD one: a shared Value self-detaches (dropping its native node) the
33
- // instant its child count hits zero, so detaching first would kill a running native animation
34
- // on any unrelated re-render (mirrors RN's AnimatedComponent._attachProps). Then bind the
35
- // committed node, go native if wanted, and rebind native events.
36
- reconcile(props, wantsNative) {
37
- dlog(`${this.label} reconcile`);
38
- const newLeaf = new AnimatedProps(props);
39
- newLeaf.__attach();
40
- if (this.attached !== null && this.attached !== newLeaf)
41
- this.attached.__detach();
42
- this.attached = newLeaf;
43
- this.bindNode(newLeaf, props, wantsNative);
44
- }
45
- // Bind the leaf to the host's Fabric node THROUGH whenCommitted: under Angular's zoneless
46
- // batched change detection the inner host's tag does not exist yet at ngAfterViewInit time
47
- // (the same async-commit gotcha Vue documents), so binding eagerly would no-op. whenCommitted
48
- // runs the action now if already committed, else after the commit that assigns the tag.
49
- bindNode(leaf, props, wantsNative) {
50
- this.cancelBind?.();
51
- this.cancelBind = undefined;
52
- const node = this.resolveNode();
53
- if (node === null)
54
- return;
55
- this.cancelBind = whenCommitted(node, () => {
56
- leaf.setNativeView(node);
57
- if (wantsNative)
58
- leaf.__makeNative();
59
- this.attachEvents(node, props);
60
- });
61
- }
62
- // Native-attach any Animated.event prop (e.g. onScroll={Animated.event(…,{useNativeDriver:true})})
63
- // to the committed node. attachNativeEventHandler no-ops (returns undefined) unless the prop is a
64
- // native event handler with a committed tag, so the JS path stays the fallback. Rebound each
65
- // reconcile so a new inline event re-attaches; detached first to avoid leaking the prior binding.
66
- attachEvents(node, props) {
67
- this.detachEvents();
68
- for (const key of Object.keys(props)) {
69
- const attachment = attachNativeEventHandler(node, key, props[key]);
70
- if (attachment !== undefined)
71
- this.eventDetachers.push(attachment.detach);
72
- }
73
- }
74
- detachEvents() {
75
- for (const detach of this.eventDetachers)
76
- detach();
77
- this.eventDetachers = [];
78
- }
79
- // Tear down everything: cancel a still-pending bind, drop native event listeners, detach the
80
- // current leaf from the value graph. Safe to call even if reconcile() was never called.
81
- destroy() {
82
- this.cancelBind?.();
83
- this.cancelBind = undefined;
84
- this.detachEvents();
85
- if (this.attached !== null) {
86
- this.attached.__detach();
87
- this.attached = null;
88
- }
89
- }
90
- }
@@ -1,14 +0,0 @@
1
- import { type ISymbioteNode } from '@symbiote-native/engine';
2
- export declare class AnimatedLeafBinder {
3
- private readonly resolveNode;
4
- private readonly label;
5
- private attached;
6
- private cancelBind;
7
- private eventDetachers;
8
- constructor(resolveNode: () => ISymbioteNode | null, label: string);
9
- reconcile(props: Record<string, unknown>, wantsNative: boolean): void;
10
- private bindNode;
11
- private attachEvents;
12
- private detachEvents;
13
- destroy(): void;
14
- }
@@ -1,90 +0,0 @@
1
- // Pure Fabrication (GRASP): the leaf-lifecycle orchestration shared by every Animated*
2
- // wrapper, extracted out of AnimatedComponentBase so AnimatedImage — which cannot extend
3
- // AnimatedComponentBase, since it must extend ImageBase for TS's-native image handling —
4
- // gets the SAME logic via composition instead of copy-pasting it. Framework-thin on
5
- // purpose: it knows nothing about Angular (@ViewChild, DI, change detection), only the
6
- // engine's Animated leaf + commit primitives, so it stays testable without any Angular
7
- // bootstrap. NOTE: react/vue drive this same dance through their own runtime HOC
8
- // (createAnimatedComponent) rather than a class, so there is no cross-adapter dedup
9
- // opportunity here yet — this Pure Fabrication is local to the angular adapter.
10
- import { AnimatedProps, attachNativeEventHandler, dlog, whenCommitted, } from '@symbiote-native/engine';
11
- export class AnimatedLeafBinder {
12
- resolveNode;
13
- label;
14
- // The leaf currently wired into the value graph. Null until the first reconcile.
15
- attached = null;
16
- // The whenCommitted waiter for the current leaf's node binding, cancelled before the next.
17
- cancelBind;
18
- // Detachers for any Animated.event prop bound natively to the committed node (JS path: none).
19
- eventDetachers = [];
20
- // `resolveNode` stays a caller-supplied resolver (not a constructor-captured node) so this
21
- // class never needs to know HOW the host node is found — AnimatedComponentBase and
22
- // AnimatedImage both resolve it the same way (resolveHostNode + isSymbioteNode over their
23
- // own @ViewChild), but that's Angular DI state this binder has no business touching.
24
- // `label` is purely diagnostic (dlog), mirroring the constructor.name the pre-extraction
25
- // dlog call used.
26
- constructor(resolveNode, label) {
27
- this.resolveNode = resolveNode;
28
- this.label = label;
29
- }
30
- // Build a fresh AnimatedProps leaf from the current props (the React/Vue per-render
31
- // useMemo(rest)), wire it into the graph, and swap the previous one out. Attach the NEW leaf
32
- // BEFORE detaching the OLD one: a shared Value self-detaches (dropping its native node) the
33
- // instant its child count hits zero, so detaching first would kill a running native animation
34
- // on any unrelated re-render (mirrors RN's AnimatedComponent._attachProps). Then bind the
35
- // committed node, go native if wanted, and rebind native events.
36
- reconcile(props, wantsNative) {
37
- dlog(`${this.label} reconcile`);
38
- const newLeaf = new AnimatedProps(props);
39
- newLeaf.__attach();
40
- if (this.attached !== null && this.attached !== newLeaf)
41
- this.attached.__detach();
42
- this.attached = newLeaf;
43
- this.bindNode(newLeaf, props, wantsNative);
44
- }
45
- // Bind the leaf to the host's Fabric node THROUGH whenCommitted: under Angular's zoneless
46
- // batched change detection the inner host's tag does not exist yet at ngAfterViewInit time
47
- // (the same async-commit gotcha Vue documents), so binding eagerly would no-op. whenCommitted
48
- // runs the action now if already committed, else after the commit that assigns the tag.
49
- bindNode(leaf, props, wantsNative) {
50
- this.cancelBind?.();
51
- this.cancelBind = undefined;
52
- const node = this.resolveNode();
53
- if (node === null)
54
- return;
55
- this.cancelBind = whenCommitted(node, () => {
56
- leaf.setNativeView(node);
57
- if (wantsNative)
58
- leaf.__makeNative();
59
- this.attachEvents(node, props);
60
- });
61
- }
62
- // Native-attach any Animated.event prop (e.g. onScroll={Animated.event(…,{useNativeDriver:true})})
63
- // to the committed node. attachNativeEventHandler no-ops (returns undefined) unless the prop is a
64
- // native event handler with a committed tag, so the JS path stays the fallback. Rebound each
65
- // reconcile so a new inline event re-attaches; detached first to avoid leaking the prior binding.
66
- attachEvents(node, props) {
67
- this.detachEvents();
68
- for (const key of Object.keys(props)) {
69
- const attachment = attachNativeEventHandler(node, key, props[key]);
70
- if (attachment !== undefined)
71
- this.eventDetachers.push(attachment.detach);
72
- }
73
- }
74
- detachEvents() {
75
- for (const detach of this.eventDetachers)
76
- detach();
77
- this.eventDetachers = [];
78
- }
79
- // Tear down everything: cancel a still-pending bind, drop native event listeners, detach the
80
- // current leaf from the value graph. Safe to call even if reconcile() was never called.
81
- destroy() {
82
- this.cancelBind?.();
83
- this.cancelBind = undefined;
84
- this.detachEvents();
85
- if (this.attached !== null) {
86
- this.attached.__detach();
87
- this.attached = null;
88
- }
89
- }
90
- }
@@ -1,48 +0,0 @@
1
- import { type AfterViewInit, type OnChanges, type OnDestroy, type Type } from '@angular/core';
2
- import { FlatList } from '../../components/flat-list';
3
- import { ImageBase } from '../../components/image/shared';
4
- import { SectionList } from '../../components/section-list';
5
- export declare const ANIMATED_INPUTS: string[];
6
- export declare const ANIMATED_IMAGE_INPUTS: string[];
7
- export declare abstract class AnimatedComponentBase implements AfterViewInit, OnChanges, OnDestroy {
8
- style: unknown;
9
- animatedProps: Record<string, unknown> | undefined;
10
- passthroughAnimatedPropExplicitValues: unknown;
11
- private readonly elementRef;
12
- private hostDirective?;
13
- private readonly leafBinder;
14
- private viewReady;
15
- get reducedProps(): Record<string, unknown>;
16
- ngAfterViewInit(): void;
17
- ngOnChanges(): void;
18
- ngOnDestroy(): void;
19
- private reconcile;
20
- private mergedProps;
21
- private hostNode;
22
- }
23
- export declare class AnimatedView extends AnimatedComponentBase {
24
- }
25
- export declare class AnimatedText extends AnimatedComponentBase {
26
- }
27
- export declare class AnimatedImage extends ImageBase implements AfterViewInit, OnChanges, OnDestroy {
28
- animatedProps: Record<string, unknown> | undefined;
29
- passthroughAnimatedPropExplicitValues: unknown;
30
- private readonly elementRef;
31
- private hostDirective?;
32
- private readonly leafBinder;
33
- private viewReady;
34
- get animatedImageProps(): Record<string, unknown>;
35
- ngAfterViewInit(): void;
36
- ngOnChanges(): void;
37
- ngOnDestroy(): void;
38
- private reconcile;
39
- private mergedProps;
40
- private hostNode;
41
- }
42
- export declare class AnimatedScrollView extends AnimatedComponentBase {
43
- get reducedProps(): Record<string, unknown>;
44
- get contentProps(): Record<string, unknown>;
45
- }
46
- export declare const AnimatedFlatList: typeof FlatList;
47
- export declare const AnimatedSectionList: typeof SectionList;
48
- export declare function createAnimatedComponent(base: unknown): Type<unknown>;