@symbiote-native/react 0.1.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 (148) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -0
  3. package/build/components/activity-indicator/index.android.d.ts +2 -0
  4. package/build/components/activity-indicator/index.android.js +13 -0
  5. package/build/components/activity-indicator/index.d.ts +1 -0
  6. package/build/components/activity-indicator/index.ios.d.ts +2 -0
  7. package/build/components/activity-indicator/index.ios.js +10 -0
  8. package/build/components/activity-indicator/index.js +4 -0
  9. package/build/components/activity-indicator/shared.d.ts +7 -0
  10. package/build/components/activity-indicator/shared.js +20 -0
  11. package/build/components/button.d.ts +6 -0
  12. package/build/components/button.js +42 -0
  13. package/build/components/drawer-layout-android/index.android.d.ts +3 -0
  14. package/build/components/drawer-layout-android/index.android.js +93 -0
  15. package/build/components/drawer-layout-android/index.d.ts +3 -0
  16. package/build/components/drawer-layout-android/index.js +19 -0
  17. package/build/components/drawer-layout-android/shared.d.ts +19 -0
  18. package/build/components/drawer-layout-android/shared.js +7 -0
  19. package/build/components/flat-list/index.d.ts +73 -0
  20. package/build/components/flat-list/index.js +86 -0
  21. package/build/components/image/index.d.ts +9 -0
  22. package/build/components/image/index.js +28 -0
  23. package/build/components/image-background/index.d.ts +10 -0
  24. package/build/components/image-background/index.js +46 -0
  25. package/build/components/input-accessory-view/index.d.ts +11 -0
  26. package/build/components/input-accessory-view/index.js +14 -0
  27. package/build/components/keyboard-avoiding-view/index.d.ts +17 -0
  28. package/build/components/keyboard-avoiding-view/index.js +85 -0
  29. package/build/components/modal/index.d.ts +24 -0
  30. package/build/components/modal/index.js +56 -0
  31. package/build/components/pressable/index.d.ts +30 -0
  32. package/build/components/pressable/index.js +100 -0
  33. package/build/components/refresh-control/index.d.ts +17 -0
  34. package/build/components/refresh-control/index.js +21 -0
  35. package/build/components/safe-area-view/index.d.ts +11 -0
  36. package/build/components/safe-area-view/index.js +18 -0
  37. package/build/components/scroll-view/index.android.d.ts +3 -0
  38. package/build/components/scroll-view/index.android.js +53 -0
  39. package/build/components/scroll-view/index.d.ts +1 -0
  40. package/build/components/scroll-view/index.ios.d.ts +3 -0
  41. package/build/components/scroll-view/index.ios.js +27 -0
  42. package/build/components/scroll-view/index.js +4 -0
  43. package/build/components/scroll-view/shared.d.ts +98 -0
  44. package/build/components/scroll-view/shared.js +195 -0
  45. package/build/components/scroll-view/sticky-header.d.ts +9 -0
  46. package/build/components/scroll-view/sticky-header.js +161 -0
  47. package/build/components/section-list/index.d.ts +8 -0
  48. package/build/components/section-list/index.js +12 -0
  49. package/build/components/switch/index.android.d.ts +2 -0
  50. package/build/components/switch/index.android.js +12 -0
  51. package/build/components/switch/index.d.ts +1 -0
  52. package/build/components/switch/index.ios.d.ts +2 -0
  53. package/build/components/switch/index.ios.js +10 -0
  54. package/build/components/switch/index.js +6 -0
  55. package/build/components/switch/shared.d.ts +10 -0
  56. package/build/components/switch/shared.js +59 -0
  57. package/build/components/text-input/index.d.ts +50 -0
  58. package/build/components/text-input/index.js +167 -0
  59. package/build/components/touchable/index.d.ts +20 -0
  60. package/build/components/touchable/index.js +95 -0
  61. package/build/components/touchable-native-feedback/index.d.ts +18 -0
  62. package/build/components/touchable-native-feedback/index.js +32 -0
  63. package/build/components/virtualized-list/index.d.ts +73 -0
  64. package/build/components/virtualized-list/index.js +552 -0
  65. package/build/components/virtualized-section-list/index.d.ts +66 -0
  66. package/build/components/virtualized-section-list/index.js +99 -0
  67. package/build/components.d.ts +54 -0
  68. package/build/components.js +17 -0
  69. package/build/create-portal.d.ts +4 -0
  70. package/build/create-portal.js +23 -0
  71. package/build/create-tunnel.d.ts +12 -0
  72. package/build/create-tunnel.js +60 -0
  73. package/build/descriptor-to-react/index.d.ts +3 -0
  74. package/build/descriptor-to-react/index.js +15 -0
  75. package/build/hooks/use-color-scheme.d.ts +2 -0
  76. package/build/hooks/use-color-scheme.js +13 -0
  77. package/build/hooks/use-window-dimensions.d.ts +2 -0
  78. package/build/hooks/use-window-dimensions.js +30 -0
  79. package/build/host-config.d.ts +7 -0
  80. package/build/host-config.js +169 -0
  81. package/build/host-instance.d.ts +3 -0
  82. package/build/host-instance.js +20 -0
  83. package/build/index.d.ts +98 -0
  84. package/build/index.js +85 -0
  85. package/build/modules/accessibility-info/index.android.d.ts +2 -0
  86. package/build/modules/accessibility-info/index.android.js +4 -0
  87. package/build/modules/accessibility-info/index.d.ts +1 -0
  88. package/build/modules/accessibility-info/index.ios.d.ts +2 -0
  89. package/build/modules/accessibility-info/index.ios.js +3 -0
  90. package/build/modules/accessibility-info/index.js +5 -0
  91. package/build/modules/accessibility-info/shared.d.ts +1 -0
  92. package/build/modules/accessibility-info/shared.js +1 -0
  93. package/build/modules/action-sheet-ios.d.ts +2 -0
  94. package/build/modules/action-sheet-ios.js +4 -0
  95. package/build/modules/alert.d.ts +2 -0
  96. package/build/modules/alert.js +5 -0
  97. package/build/modules/animated/create-animated-component.d.ts +12 -0
  98. package/build/modules/animated/create-animated-component.js +125 -0
  99. package/build/modules/animated/index.d.ts +52 -0
  100. package/build/modules/animated/index.js +84 -0
  101. package/build/modules/app-registry/index.d.ts +7 -0
  102. package/build/modules/app-registry/index.js +26 -0
  103. package/build/modules/app-state.d.ts +2 -0
  104. package/build/modules/app-state.js +3 -0
  105. package/build/modules/appearance.d.ts +2 -0
  106. package/build/modules/appearance.js +3 -0
  107. package/build/modules/back-handler.d.ts +2 -0
  108. package/build/modules/back-handler.js +3 -0
  109. package/build/modules/dimensions.d.ts +2 -0
  110. package/build/modules/dimensions.js +3 -0
  111. package/build/modules/i18n-manager.d.ts +2 -0
  112. package/build/modules/i18n-manager.js +4 -0
  113. package/build/modules/keyboard.d.ts +2 -0
  114. package/build/modules/keyboard.js +3 -0
  115. package/build/modules/layout-animation.d.ts +2 -0
  116. package/build/modules/layout-animation.js +3 -0
  117. package/build/modules/linking.d.ts +2 -0
  118. package/build/modules/linking.js +4 -0
  119. package/build/modules/permissions-android.d.ts +2 -0
  120. package/build/modules/permissions-android.js +3 -0
  121. package/build/modules/settings.d.ts +1 -0
  122. package/build/modules/settings.js +4 -0
  123. package/build/modules/share.d.ts +2 -0
  124. package/build/modules/share.js +4 -0
  125. package/build/modules/status-bar/index.android.d.ts +3 -0
  126. package/build/modules/status-bar/index.android.js +89 -0
  127. package/build/modules/status-bar/index.d.ts +1 -0
  128. package/build/modules/status-bar/index.ios.d.ts +3 -0
  129. package/build/modules/status-bar/index.ios.js +64 -0
  130. package/build/modules/status-bar/index.js +4 -0
  131. package/build/modules/status-bar/shared.d.ts +6 -0
  132. package/build/modules/status-bar/shared.js +6 -0
  133. package/build/modules/text-input-state.d.ts +1 -0
  134. package/build/modules/text-input-state.js +3 -0
  135. package/build/modules/toast-android.d.ts +1 -0
  136. package/build/modules/toast-android.js +4 -0
  137. package/build/modules/vibration.d.ts +1 -0
  138. package/build/modules/vibration.js +4 -0
  139. package/build/reconciler-constants.d.ts +7 -0
  140. package/build/reconciler-constants.js +12 -0
  141. package/build/render.d.ts +7 -0
  142. package/build/render.js +60 -0
  143. package/build/utils/responder-props.d.ts +1 -0
  144. package/build/utils/responder-props.js +1 -0
  145. package/build/utils/styles.d.ts +1 -0
  146. package/build/utils/styles.js +1 -0
  147. package/metro-css-parser.cjs +11 -0
  148. package/package.json +53 -0
@@ -0,0 +1,98 @@
1
+ export { View, Text } from './components';
2
+ export type { IViewProps, ITextProps } from './components';
3
+ export type { IAccessibilityProps, IAriaProps, IAccessibilityRole, IRole, IAccessibilityStateValue, IAccessibilityValue, IAccessibilityActionInfo, } from '@symbiote-native/components';
4
+ export type { IResponderProps } from './utils/responder-props';
5
+ export { Image, setImageSourceResolver } from './components/image';
6
+ export type { IImageProps, IImageSource, IImageSourceProp, IResizeMode, IImageSize, IImageCacheStatus, } from './components/image';
7
+ export { ImageBackground } from './components/image-background';
8
+ export type { IImageBackgroundProps } from './components/image-background';
9
+ export { ScrollView } from './components/scroll-view';
10
+ export type { IScrollViewProps, IScrollViewHandle } from './components/scroll-view';
11
+ export { TextInput } from './components/text-input';
12
+ export type { ITextInputProps, ITextInputHandle } from './components/text-input';
13
+ export { InputAccessoryView } from './components/input-accessory-view';
14
+ export type { IInputAccessoryViewProps } from './components/input-accessory-view';
15
+ export { Keyboard, KEYBOARD_EVENT } from './modules/keyboard';
16
+ export type { IKeyboardEventName } from './modules/keyboard';
17
+ export { KeyboardAvoidingView } from './components/keyboard-avoiding-view';
18
+ export type { IKeyboardAvoidingViewProps, IKeyboardAvoidingBehavior, } from './components/keyboard-avoiding-view';
19
+ export { StatusBar } from './modules/status-bar';
20
+ export type { IStatusBarProps, IStatusBarStyle } from './modules/status-bar';
21
+ export { Switch } from './components/switch';
22
+ export type { ISwitchProps, ISwitchTrackColor } from './components/switch';
23
+ export { ActivityIndicator } from './components/activity-indicator';
24
+ export type { IActivityIndicatorProps } from './components/activity-indicator';
25
+ export { SafeAreaView } from './components/safe-area-view';
26
+ export type { ISafeAreaViewProps } from './components/safe-area-view';
27
+ export { RefreshControl } from './components/refresh-control';
28
+ export type { IRefreshControlProps } from './components/refresh-control';
29
+ export { Modal } from './components/modal';
30
+ export type { IModalProps, IModalAnimationType, IModalPresentationStyle, IModalOrientation, } from './components/modal';
31
+ export { Pressable } from './components/pressable';
32
+ export type { IPressableProps, IPressState } from './components/pressable';
33
+ export { TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, } from './components/touchable';
34
+ export type { ITouchableOpacityProps, ITouchableHighlightProps, ITouchableWithoutFeedbackProps, } from './components/touchable';
35
+ export { Button } from './components/button';
36
+ export type { IButtonProps } from './components/button';
37
+ export { FlatList } from './components/flat-list';
38
+ export type { IFlatListProps, IFlatListHandle } from './components/flat-list';
39
+ export { SectionList } from './components/section-list';
40
+ export type { ISectionListProps, ISectionListHandle, ISection } from './components/section-list';
41
+ export { VirtualizedSectionList } from './components/virtualized-section-list';
42
+ export type { IVirtualizedSectionListProps, IVirtualizedSectionListHandle, } from './components/virtualized-section-list';
43
+ export { VirtualizedList } from './components/virtualized-list';
44
+ export type { IVirtualizedListProps, IVirtualizedListHandle, IViewToken, IViewableItemsChangedInfo, IViewabilityConfig, IViewabilityConfigCallbackPair, } from './components/virtualized-list';
45
+ export type { IViewStyle, ITextStyle, IFlexAlign, IFlexJustify } from './utils/styles';
46
+ export { mount, unmount } from './render';
47
+ export { createPortal, type IPortalContainer } from './create-portal';
48
+ export { createTunnel, type ITunnel } from './create-tunnel';
49
+ export { descriptorToReact } from './descriptor-to-react';
50
+ export { findNodeHandle } from './host-instance';
51
+ export type { IHostInstance } from './host-instance';
52
+ export { AppRegistry, setHostRegistrar } from './modules/app-registry';
53
+ export type { IComponentProvider, IAppParameters, IRunnable, IHostRegistrar, IWrapperComponentProvider, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from './modules/app-registry';
54
+ export { Animated, createAnimatedComponent } from './modules/animated';
55
+ export { Platform, StyleSheet } from '@symbiote-native/engine';
56
+ export { PlatformColor, DynamicColorIOS, processColor } from '@symbiote-native/engine';
57
+ export type { IColorValue, IOpaqueColorValue, IDynamicColorIOSTuple, } from '@symbiote-native/engine';
58
+ export { setNativeViewConfigSource } from '@symbiote-native/engine';
59
+ export type { INativeViewConfig, INativeViewConfigSource } from '@symbiote-native/engine';
60
+ export type { IPlatformStatic, IPlatformOSType, IPlatformConstantsIOS, IPlatformConstantsAndroid, IPlatformSelectSpec, } from '@symbiote-native/engine';
61
+ export { Dimensions } from './modules/dimensions';
62
+ export type { IDisplayMetrics, IDisplayMetricsAndroid, IDimensionsPayload, IDimensionsSet, IDimensionsKey, IDimensionsChangeListener, IDimensionsStatic, } from './modules/dimensions';
63
+ export { PixelRatio } from '@symbiote-native/engine';
64
+ export type { IPixelRatioStatic } from '@symbiote-native/engine';
65
+ export { useWindowDimensions } from './hooks/use-window-dimensions';
66
+ export { Appearance } from './modules/appearance';
67
+ export type { IColorSchemeName, IColorSchemePreference } from './modules/appearance';
68
+ export { useColorScheme } from './hooks/use-color-scheme';
69
+ export { AppState } from './modules/app-state';
70
+ export type { IAppStateStatus, IAppStateEvent } from './modules/app-state';
71
+ export { Alert } from './modules/alert';
72
+ export type { IAlertType, IAlertButtonStyle, IAlertButton, IAlertButtons, IAlertOptions, } from './modules/alert';
73
+ export { ActionSheetIOS } from './modules/action-sheet-ios';
74
+ export type { IActionSheetIOSOptions, IShareActionSheetIOSOptions, IShareActionSheetError, } from './modules/action-sheet-ios';
75
+ export { Linking } from './modules/linking';
76
+ export type { IUrlEvent } from './modules/linking';
77
+ export { Vibration } from './modules/vibration';
78
+ export { Share } from './modules/share';
79
+ export type { IShareContent, IShareOptions, IShareAction } from './modules/share';
80
+ export { AccessibilityInfo } from './modules/accessibility-info';
81
+ export type { IAccessibilityChangeEvent, IAccessibilityChangeEventName, IAccessibilityChangeEventHandler, IAccessibilityAnnouncementFinishedEvent, IAnnounceForAccessibilityOptions, IAccessibilityEventType, } from './modules/accessibility-info';
82
+ export { I18nManager } from './modules/i18n-manager';
83
+ export type { II18nManagerConstants } from './modules/i18n-manager';
84
+ export { Settings } from './modules/settings';
85
+ export { PanResponder } from '@symbiote-native/engine';
86
+ export type { IPanResponderGestureState, IPanResponderCallbacks, IGestureResponderHandlers, IPanResponderInstance, } from '@symbiote-native/engine';
87
+ export { LayoutAnimation } from './modules/layout-animation';
88
+ export type { ILayoutAnimationType, ILayoutAnimationProperty, ILayoutAnimationConfig, ILayoutAnimationAnim, } from './modules/layout-animation';
89
+ export { InteractionManager } from '@symbiote-native/engine';
90
+ export type { IInteractionEvent, ISimpleTask, IPromiseTask, ITask, IHandle, } from '@symbiote-native/engine';
91
+ export { BackHandler } from './modules/back-handler';
92
+ export type { IBackPressEventName, IBackPressHandler } from './modules/back-handler';
93
+ export { ToastAndroid } from './modules/toast-android';
94
+ export { PermissionsAndroid, PERMISSIONS, RESULTS } from './modules/permissions-android';
95
+ export type { IPermission, IPermissionStatus, IRationale } from './modules/permissions-android';
96
+ export { TouchableNativeFeedback } from './components/touchable-native-feedback';
97
+ export type { ITouchableNativeFeedbackProps, INativeFeedbackBackground, IThemeAttrBackground, IRippleBackground, } from './components/touchable-native-feedback';
98
+ export type { ISymbioteEvent } from '@symbiote-native/engine';
package/build/index.js ADDED
@@ -0,0 +1,85 @@
1
+ // @symbiote-native/react: a react-reconciler host config (mutation mode) over
2
+ // @symbiote-native/engine. React is a known-good driver: it proves the native pipe
3
+ // (R1) and shared's clone-on-write engine (R2) before any non-React adapter.
4
+ export { View, Text } from './components';
5
+ export { Image, setImageSourceResolver } from './components/image';
6
+ export { ImageBackground } from './components/image-background';
7
+ export { ScrollView } from './components/scroll-view';
8
+ export { TextInput } from './components/text-input';
9
+ export { InputAccessoryView } from './components/input-accessory-view';
10
+ export { Keyboard, KEYBOARD_EVENT } from './modules/keyboard';
11
+ export { KeyboardAvoidingView } from './components/keyboard-avoiding-view';
12
+ export { StatusBar } from './modules/status-bar';
13
+ export { Switch } from './components/switch';
14
+ export { ActivityIndicator } from './components/activity-indicator';
15
+ export { SafeAreaView } from './components/safe-area-view';
16
+ export { RefreshControl } from './components/refresh-control';
17
+ export { Modal } from './components/modal';
18
+ export { Pressable } from './components/pressable';
19
+ export { TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, } from './components/touchable';
20
+ export { Button } from './components/button';
21
+ export { FlatList } from './components/flat-list';
22
+ export { SectionList } from './components/section-list';
23
+ export { VirtualizedSectionList } from './components/virtualized-section-list';
24
+ export { VirtualizedList } from './components/virtualized-list';
25
+ export { mount, unmount } from './render';
26
+ // createPortal: react-reconciler's Fiber-level portal, working here because @symbiote-native/react is
27
+ // mutation-mode (unlike stock RN's persistent-mode Fabric renderer, which doesn't support it —
28
+ // see create-portal.ts). v1 scope: target must be an already-mounted node in the SAME surface.
29
+ export { createPortal } from './create-portal';
30
+ // createTunnel: cross-surface content sharing (createPortal/Teleport stay same-surface-only
31
+ // by design — see create-tunnel.tsx and the react-adapter-portal skill for why).
32
+ export { createTunnel } from './create-tunnel';
33
+ // descriptorToReact: the @symbiote-native/components Descriptor → React.createElement bridge. Exported so
34
+ // an external wrapper package (e.g. @symbiote-native/slider/react over a third-party native view) can map
35
+ // a shared render fn's Descriptor onto React elements through the SAME bridge the adapter uses.
36
+ export { descriptorToReact } from './descriptor-to-react';
37
+ export { findNodeHandle } from './host-instance';
38
+ // AppRegistry: RN's app entry point over `mount`. setHostRegistrar wires RN's own
39
+ // registrar so the native Fabric host finds our runnable by app key.
40
+ export { AppRegistry, setHostRegistrar } from './modules/app-registry';
41
+ // Animated bridge: createAnimatedComponent + Animated.View/Text/Image, driving the
42
+ // shared JS Animated engine (ADR 0016). Imperative timing/spring drivers merge into
43
+ // this namespace once they land in shared.
44
+ export { Animated, createAnimatedComponent } from './modules/animated';
45
+ // Framework-agnostic runtime utilities live in shared; the adapter re-exports them
46
+ // so app code names only @symbiote-native/react (RN's surface, one import root).
47
+ export { Platform, StyleSheet } from '@symbiote-native/engine';
48
+ // Color utilities: PlatformColor / DynamicColorIOS build opaque platform colors;
49
+ // processColor runs a color through the injected platform processor. All pure /
50
+ // seam-backed, so they live in shared and the adapter re-exports them.
51
+ export { PlatformColor, DynamicColorIOS, processColor } from '@symbiote-native/engine';
52
+ // Wired once by the app entry on a real host (like setColorProcessor): hands shared
53
+ // RN's ViewConfig registry so third-party Fabric views auto-derive their metadata:
54
+ // setNativeViewConfigSource(name => ReactNativeViewConfigRegistry.get(name))
55
+ export { setNativeViewConfigSource } from '@symbiote-native/engine';
56
+ // Runtime modules: native-bridge consumers, same shape as Keyboard/StatusBar:
57
+ // thin JS over getNativeModule + device events, no Fabric component of their own.
58
+ export { Dimensions } from './modules/dimensions';
59
+ export { PixelRatio } from '@symbiote-native/engine';
60
+ export { useWindowDimensions } from './hooks/use-window-dimensions';
61
+ export { Appearance } from './modules/appearance';
62
+ export { useColorScheme } from './hooks/use-color-scheme';
63
+ export { AppState } from './modules/app-state';
64
+ export { Alert } from './modules/alert';
65
+ export { ActionSheetIOS } from './modules/action-sheet-ios';
66
+ export { Linking } from './modules/linking';
67
+ export { Vibration } from './modules/vibration';
68
+ export { Share } from './modules/share';
69
+ export { AccessibilityInfo } from './modules/accessibility-info';
70
+ export { I18nManager } from './modules/i18n-manager';
71
+ export { Settings } from './modules/settings';
72
+ // Interaction subsystems: gestures, deferred work, and layout transitions.
73
+ export { PanResponder } from '@symbiote-native/engine';
74
+ export { LayoutAnimation } from './modules/layout-animation';
75
+ // InteractionManager is pure JS, so it lives in shared; re-exported here so app code
76
+ // names only @symbiote-native/react (RN's single import root).
77
+ export { InteractionManager } from '@symbiote-native/engine';
78
+ // Android-only surface (the second-platform pass). Each is a thin JS shim over an
79
+ // Android native module / Fabric view, inert on iOS (no module → graceful no-op,
80
+ // no native view → degrade to a plain container). Native module names are
81
+ // device-verify-pending; see .docs/native-module-platform-routing.md.
82
+ export { BackHandler } from './modules/back-handler';
83
+ export { ToastAndroid } from './modules/toast-android';
84
+ export { PermissionsAndroid, PERMISSIONS, RESULTS } from './modules/permissions-android';
85
+ export { TouchableNativeFeedback } from './components/touchable-native-feedback';
@@ -0,0 +1,2 @@
1
+ export { AccessibilityInfo } from '@symbiote-native/engine';
2
+ export type { IAccessibilityChangeEvent, IAccessibilityChangeEventName, IAccessibilityChangeEventHandler, IAccessibilityAnnouncementFinishedEvent, IAnnounceForAccessibilityOptions, IAccessibilityEventType, } from '@symbiote-native/engine';
@@ -0,0 +1,4 @@
1
+ // AccessibilityInfo (Android) moved to @symbiote-native/engine. This thin re-export keeps
2
+ // @symbiote-native/react's surface identical; Metro selects the engine's accessibility-info.android.ts
3
+ // on an Android host.
4
+ export { AccessibilityInfo } from '@symbiote-native/engine';
@@ -0,0 +1 @@
1
+ export * from './index.ios';
@@ -0,0 +1,2 @@
1
+ export { AccessibilityInfo } from '@symbiote-native/engine';
2
+ export type { IAccessibilityChangeEvent, IAccessibilityChangeEventName, IAccessibilityChangeEventHandler, IAccessibilityAnnouncementFinishedEvent, IAnnounceForAccessibilityOptions, IAccessibilityEventType, } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // AccessibilityInfo (iOS) moved to @symbiote-native/engine. This thin re-export keeps @symbiote-native/react's
2
+ // surface identical; Metro selects the engine's accessibility-info.ios.ts on an iOS host.
3
+ export { AccessibilityInfo } from '@symbiote-native/engine';
@@ -0,0 +1,5 @@
1
+ // Base / default AccessibilityInfo: re-exports the iOS build. Metro overrides this with
2
+ // accessibility-info.ios.ts / .android.ts on a real host; under tsx / tsc / web the host
3
+ // config resolves here. Filename is the selector, no Platform.OS read. See
4
+ // accessibility-info-shared.ts.
5
+ export * from './index.ios';
@@ -0,0 +1 @@
1
+ export type { IAccessibilityChangeEventName, IAccessibilityChangeEvent, IAccessibilityHandle, IAccessibilityAnnouncementFinishedEvent, IAccessibilityChangeEventHandler, IAnnounceForAccessibilityOptions, IAccessibilityInfoStatic, IAccessibilityEventType, } from '@symbiote-native/engine';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ActionSheetIOS } from '@symbiote-native/engine';
2
+ export type { IActionSheetIOSOptions, IShareActionSheetIOSOptions, IShareActionSheetError, } from '@symbiote-native/engine';
@@ -0,0 +1,4 @@
1
+ // ActionSheetIOS now lives framework-agnostic in @symbiote-native/engine (imperative
2
+ // native-bridge module, no visual, no lifecycle). The React adapter re-exports it
3
+ // verbatim so the public surface is unchanged. See ADR 0019.
4
+ export { ActionSheetIOS } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { Alert } from '@symbiote-native/engine';
2
+ export type { IAlertType, IAlertButtonStyle, IAlertButton, IAlertButtons, IAlertOptions, } from '@symbiote-native/engine';
@@ -0,0 +1,5 @@
1
+ // Alert now lives framework-agnostic in @symbiote-native/engine (imperative native-bridge
2
+ // module, no visual, no lifecycle). The React adapter re-exports it verbatim so the
3
+ // public surface is unchanged; the platform split (alert.ios/alert.android) lives
4
+ // inside engine. See ADR 0019 + the engine relocation.
5
+ export { Alert } from '@symbiote-native/engine';
@@ -0,0 +1,12 @@
1
+ import { type ComponentType, type Ref } from 'react';
2
+ export interface IAnimatedComponentProps {
3
+ style?: unknown;
4
+ ref?: Ref<unknown>;
5
+ [key: string]: unknown;
6
+ }
7
+ type IAnimatableProps = {
8
+ style?: unknown;
9
+ children?: unknown;
10
+ };
11
+ export declare function createAnimatedComponent<P extends IAnimatableProps>(Component: ComponentType<P>): ComponentType<IAnimatedComponentProps>;
12
+ export {};
@@ -0,0 +1,125 @@
1
+ // createAnimatedComponent wraps a base component (View / Text / Image / any) so
2
+ // it can take AnimatedNodes in its props. Reimplemented thin against symbiote's
3
+ // shared primitive: NO native driver, NO scheduleUpdate fallback. A frame is the
4
+ // scoped commit setNativeProps drives from the AnimatedProps leaf (ADR 0016). RN's
5
+ // createAnimatedComponent + useAnimatedProps + createAnimatedPropsHook are the
6
+ // structural reference, but their native helpers are deliberately not imported.
7
+ //
8
+ // Per render: build the AnimatedProps leaf for the current props, compute
9
+ // reducedProps (every animated node replaced by its current value) and hand those
10
+ // to the base component. A callback ref captures the rendered base component's
11
+ // public instance (the SymbioteNode the host config returns) and binds it to the
12
+ // leaf. An effect attaches the leaf to the value graph so flushValue reaches it,
13
+ // and detaches on unmount / when the leaf identity changes. The per-frame path is
14
+ // then: value.setValue / animation -> flushValue -> AnimatedProps.update() ->
15
+ // setNativeProps(node, partial).
16
+ import { createElement, useEffect, useMemo, useRef, } from 'react';
17
+ import { AnimatedProps, attachNativeEventHandler, isNativeAnimatedAvailable, reduceProps, readPassthroughStyle, resolveHostNode, } from '@symbiote-native/engine';
18
+ // A ref can be a function or a `.current` object; assign through both forms without
19
+ // casting so a forwarded ref from the caller still receives the instance. Framework-
20
+ // ref-specific, so it stays per-adapter (the rest of the wrap helpers are shared).
21
+ function assignRef(ref, value) {
22
+ if (ref === undefined || ref === null)
23
+ return;
24
+ if (typeof ref === 'function') {
25
+ ref(value);
26
+ return;
27
+ }
28
+ ref.current = value;
29
+ }
30
+ export function createAnimatedComponent(Component) {
31
+ function AnimatedComponent(props) {
32
+ const { ref: forwardedRef, passthroughAnimatedPropExplicitValues: passthrough, ...rest } = props;
33
+ // Native driving is opt-in per the passthrough prop AND requires a real native module;
34
+ // headless / unsupported hosts keep the JS flush path (and the existing JS smokes green).
35
+ const wantsNative = passthrough != null && isNativeAnimatedAvailable();
36
+ // One AnimatedProps leaf per distinct props object. Rebuilt when props change,
37
+ // so a newly-added animated value joins the graph; the effect below swaps the
38
+ // graph attachment to match.
39
+ const animatedProps = useMemo(() => new AnimatedProps(rest), [rest]);
40
+ // The leaf currently wired into the value graph. Tracked across renders so a swap
41
+ // can attach the new leaf BEFORE detaching the old one.
42
+ const attached = useRef(null);
43
+ // The committed host node, captured by the ref below. Needed in the event-attach
44
+ // effect (a native event binds to the node's tag, not the AnimatedProps leaf).
45
+ const nodeRef = useRef(null);
46
+ // Swap the graph attachment to the current leaf, attaching the new one FIRST and
47
+ // detaching the previous one SECOND. Order is load-bearing: a shared Value node
48
+ // self-detaches (and drops its native animation node) the instant its child count
49
+ // hits zero, so detaching the old leaf before the new one is attached would kill a
50
+ // running native-driven animation on any unrelated re-render. Detaching here (not
51
+ // in a cleanup, which React runs BEFORE the next setup) keeps the new-before-old
52
+ // order, mirroring RN's AnimatedComponent._attachProps.
53
+ useEffect(() => {
54
+ animatedProps.__attach();
55
+ const previous = attached.current;
56
+ attached.current = animatedProps;
57
+ if (previous !== null && previous !== animatedProps) {
58
+ previous.__detach();
59
+ }
60
+ }, [animatedProps]);
61
+ // Native-driver trigger (ADR 0017). Runs after attach: push the leaf -> style -> transform
62
+ // -> interpolation -> value chain native so the props animate on the UI thread (no JS lag).
63
+ // Cascades down to the source value; the scroll event attaches to that same value
64
+ // (idempotent). __makeNative is idempotent, so re-firing on a leaf swap is safe.
65
+ useEffect(() => {
66
+ if (wantsNative)
67
+ animatedProps.__makeNative();
68
+ }, [animatedProps, wantsNative]);
69
+ // Final teardown: detach the last-attached leaf when the component unmounts.
70
+ useEffect(() => {
71
+ return () => {
72
+ if (attached.current !== null) {
73
+ attached.current.__detach();
74
+ attached.current = null;
75
+ }
76
+ };
77
+ }, []);
78
+ // Native-attach any Animated.event prop, e.g. onScroll={Animated.event(…,
79
+ // {useNativeDriver:true})}, to the committed node, so the event drives its values on
80
+ // the UI thread. attachNativeEventHandler no-ops (returns undefined) unless the prop is
81
+ // a native event handler with a committed tag, so the JS path stays the fallback. The
82
+ // __makeNative cascade then carries the bound interpolations/props native too. Keyed on
83
+ // animatedProps (rebuilt with rest) so a new inline event re-attaches; cleanup detaches.
84
+ useEffect(() => {
85
+ const node = nodeRef.current;
86
+ if (node === null)
87
+ return;
88
+ const detachers = [];
89
+ for (const key of Object.keys(rest)) {
90
+ const attachment = attachNativeEventHandler(node, key, rest[key]);
91
+ if (attachment !== undefined)
92
+ detachers.push(attachment.detach);
93
+ }
94
+ return () => {
95
+ for (const detach of detachers)
96
+ detach();
97
+ };
98
+ }, [animatedProps]);
99
+ // Callback ref: when the base component mounts, capture its public instance, resolve
100
+ // it to the underlying host node (unwrapping a scroll-container handle), record THAT
101
+ // for the event-attach effect and bind it to the leaf, but forward the ORIGINAL
102
+ // instance to the caller, who expects the component's public handle (scrollTo, …).
103
+ const captureRef = (instance) => {
104
+ const node = resolveHostNode(instance);
105
+ nodeRef.current = node;
106
+ animatedProps.setNativeView(node);
107
+ assignRef(forwardedRef, instance);
108
+ };
109
+ // Reduced props are P-shaped (animated nodes already replaced by values); add the
110
+ // capture ref. Build via Object.assign so the merged object stays typed as P & ref
111
+ // without a cast. createElement then accepts it for the generic base component.
112
+ const reduced = reduceProps(rest);
113
+ // Override the committed style with the explicit passthrough values (last wins via the style
114
+ // array, which the commit layer flattens) so the ShadowTree carries the current transform.
115
+ const passthroughStyle = readPassthroughStyle(passthrough);
116
+ if (passthroughStyle !== undefined) {
117
+ reduced.style =
118
+ reduced.style === undefined ? passthroughStyle : [reduced.style, passthroughStyle];
119
+ }
120
+ const childProps = Object.assign(Object.create(null), reduced, { ref: captureRef });
121
+ return createElement(Component, childProps);
122
+ }
123
+ AnimatedComponent.displayName = `Animated(${Component.displayName ?? Component.name ?? 'Anonymous'})`;
124
+ return AnimatedComponent;
125
+ }
@@ -0,0 +1,52 @@
1
+ import { AnimatedValue, AnimatedValueXY, AnimatedColor, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent } from '@symbiote-native/engine';
2
+ import { createAnimatedComponent } from './create-animated-component';
3
+ export { createAnimatedComponent } from './create-animated-component';
4
+ export { AnimatedProps, AnimatedStyle, AnimatedTransform } from '@symbiote-native/engine';
5
+ export declare const Animated: {
6
+ Value: typeof AnimatedValue;
7
+ ValueXY: typeof AnimatedValueXY;
8
+ Color: typeof AnimatedColor;
9
+ Easing: {
10
+ step0(n: number): number;
11
+ step1(n: number): number;
12
+ linear(t: number): number;
13
+ ease(t: number): number;
14
+ quad(t: number): number;
15
+ cubic(t: number): number;
16
+ poly(n: number): import("@symbiote-native/engine").IEasingFunction;
17
+ sin(t: number): number;
18
+ circle(t: number): number;
19
+ exp(t: number): number;
20
+ elastic(bounciness?: number): import("@symbiote-native/engine").IEasingFunction;
21
+ back(s?: number): import("@symbiote-native/engine").IEasingFunction;
22
+ bounce(t: number): number;
23
+ bezier(x1: number, y1: number, x2: number, y2: number): import("@symbiote-native/engine").IEasingFunction;
24
+ in(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
25
+ out(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
26
+ inOut(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
27
+ };
28
+ timing: typeof timing;
29
+ spring: typeof spring;
30
+ decay: typeof decay;
31
+ parallel: typeof parallel;
32
+ sequence: typeof sequence;
33
+ stagger: typeof stagger;
34
+ loop: typeof loop;
35
+ delay: typeof delay;
36
+ add: typeof add;
37
+ subtract: typeof subtract;
38
+ multiply: typeof multiply;
39
+ divide: typeof divide;
40
+ modulo: typeof modulo;
41
+ diffClamp: typeof diffClamp;
42
+ event: typeof event;
43
+ forkEvent: typeof forkEvent;
44
+ unforkEvent: typeof unforkEvent;
45
+ View: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
46
+ Text: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
47
+ Image: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
48
+ ScrollView: ReturnType<typeof createAnimatedComponent>;
49
+ FlatList: ReturnType<typeof createAnimatedComponent>;
50
+ SectionList: ReturnType<typeof createAnimatedComponent>;
51
+ createAnimatedComponent: typeof createAnimatedComponent;
52
+ };
@@ -0,0 +1,84 @@
1
+ // The Animated namespace for @symbiote-native/react. createAnimatedComponent applied to
2
+ // the adapter's primitives gives Animated.View / Text / Image; the value graph,
3
+ // easing and imperative drivers come from @symbiote-native/engine (framework-agnostic,
4
+ // JS-driven, ADR 0016). Both halves meet here in one `Animated` object so the
5
+ // familiar surface (`Animated.timing(new Animated.Value(0), …).start()`) works.
6
+ import { AnimatedValue, AnimatedValueXY, AnimatedColor, Easing, Platform, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, } from '@symbiote-native/engine';
7
+ import { View, Text } from '../../components';
8
+ import { Image } from '../../components/image';
9
+ import { ScrollView } from '../../components/scroll-view';
10
+ import { FlatList } from '../../components/flat-list';
11
+ import { SectionList } from '../../components/section-list';
12
+ import { createAnimatedComponent } from './create-animated-component';
13
+ import { AnimatedMock } from '@symbiote-native/engine';
14
+ export { createAnimatedComponent } from './create-animated-component';
15
+ // The pure graph leaves now live in @symbiote-native/engine (they extend AnimatedWithChildren,
16
+ // no React); re-exported here so @symbiote-native/react's Animated surface is unchanged.
17
+ export { AnimatedProps, AnimatedStyle, AnimatedTransform } from '@symbiote-native/engine';
18
+ // View/Text/Image are pure host primitives, so wrap them eagerly.
19
+ const AnimatedView = createAnimatedComponent(View);
20
+ const AnimatedText = createAnimatedComponent(Text);
21
+ const AnimatedImage = createAnimatedComponent(Image);
22
+ // RN's AnimatedExports.js:13-58 exposes all six animated components. The scrolling
23
+ // containers (ScrollView/FlatList/SectionList) are wrapped behind LAZY getters,
24
+ // mirroring RN's `get ScrollView() { return require(...) }`: ScrollView's module
25
+ // chain pulls in scroll-view/sticky-header, which imports this Animated namespace
26
+ // back, and a static `createAnimatedComponent(ScrollView)` at init would read ScrollView
27
+ // inside its own TDZ. A memoized getter defers the wrap past module init, so the
28
+ // cycle never fires. The wrappers carry no per-component animation logic; they only
29
+ // add animated-prop support, so the adapter stays thin (invariant adapters_stay_thin).
30
+ // The native scroll-event attach (Animated.event onto contentOffset) is owned by
31
+ // ScrollView itself.
32
+ let animatedScrollView;
33
+ let animatedFlatList;
34
+ let animatedSectionList;
35
+ // The live, JS-driven driver namespace (real frames). RN's AnimatedImplementation.
36
+ const liveDrivers = {
37
+ Value: AnimatedValue,
38
+ ValueXY: AnimatedValueXY,
39
+ Color: AnimatedColor,
40
+ Easing,
41
+ timing,
42
+ spring,
43
+ decay,
44
+ parallel,
45
+ sequence,
46
+ stagger,
47
+ loop,
48
+ delay,
49
+ add,
50
+ subtract,
51
+ multiply,
52
+ divide,
53
+ modulo,
54
+ diffClamp,
55
+ event,
56
+ forkEvent,
57
+ unforkEvent,
58
+ };
59
+ // RN's AnimatedExports.js:21 swaps the WHOLE namespace for the mock when the host
60
+ // reports isDisableAnimations (reduced motion / test env): the mock keeps the same
61
+ // surface but jumps each animation to its final value synchronously, no frames.
62
+ // The animated COMPONENTS (View/Text/Image + the lazy container getters) are live in
63
+ // both branches; only the drivers/value/operators/events half is swapped, exactly
64
+ // like RN spreading `...Animated` (impl or mock) over the same component getters.
65
+ const drivers = Platform.isDisableAnimations ? AnimatedMock : liveDrivers;
66
+ export const Animated = {
67
+ View: AnimatedView,
68
+ Text: AnimatedText,
69
+ Image: AnimatedImage,
70
+ get ScrollView() {
71
+ animatedScrollView ??= createAnimatedComponent(ScrollView);
72
+ return animatedScrollView;
73
+ },
74
+ get FlatList() {
75
+ animatedFlatList ??= createAnimatedComponent(FlatList);
76
+ return animatedFlatList;
77
+ },
78
+ get SectionList() {
79
+ animatedSectionList ??= createAnimatedComponent(SectionList);
80
+ return animatedSectionList;
81
+ },
82
+ createAnimatedComponent,
83
+ ...drivers,
84
+ };
@@ -0,0 +1,7 @@
1
+ import { type ComponentType } from 'react';
2
+ import { type IAppParameters } from '@symbiote-native/engine';
3
+ export type IComponentProvider = () => ComponentType<object>;
4
+ export type IWrapperComponentProvider = (appParameters: IAppParameters) => ComponentType<object>;
5
+ declare const AppRegistry: import("@symbiote-native/engine").IAppRegistry<IComponentProvider, IWrapperComponentProvider>, setHostRegistrar: (registrar: import("@symbiote-native/engine").IHostRegistrar) => void;
6
+ export { AppRegistry, setHostRegistrar };
7
+ export type { IAppParameters, IRunnable, IHostRegistrar, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from '@symbiote-native/engine';
@@ -0,0 +1,26 @@
1
+ // AppRegistry: the JS entry point RN apps already use:
2
+ // AppRegistry.registerComponent(appKey, () => App)
3
+ // The registry bookkeeping (sections, host-registrar bridge, headless tasks) is
4
+ // framework-agnostic and lives in @symbiote-native/engine's createAppRegistry; this file supplies
5
+ // only the one React-specific seam — building a runnable from a component provider via
6
+ // createElement + mount — so existing RN app-entry code ports verbatim.
7
+ import { createElement } from 'react';
8
+ import { createAppRegistry, dlog, } from '@symbiote-native/engine';
9
+ import { mount } from '../../render';
10
+ function runnableFor(componentProvider, getWrapperComponentProvider) {
11
+ return appParameters => {
12
+ dlog(`AppRegistry: mounting on rootTag ${String(appParameters.rootTag)}`);
13
+ let element = createElement(componentProvider(), appParameters.initialProps);
14
+ // Wrap the root when a provider is set, mirroring RN's `registerComponent`
15
+ // passing `wrapperComponentProvider && wrapperComponentProvider(...)` into
16
+ // renderApplication (AppRegistryImpl.js:80). Read live (not at registration time) so
17
+ // setWrapperComponentProvider affects every runnable's next run, not just future ones.
18
+ const wrapperComponentProvider = getWrapperComponentProvider();
19
+ if (wrapperComponentProvider !== undefined) {
20
+ element = createElement(wrapperComponentProvider(appParameters), null, element);
21
+ }
22
+ mount(appParameters.rootTag, element);
23
+ };
24
+ }
25
+ const { AppRegistry, setHostRegistrar } = createAppRegistry(runnableFor);
26
+ export { AppRegistry, setHostRegistrar };
@@ -0,0 +1,2 @@
1
+ export { AppState } from '@symbiote-native/engine';
2
+ export type { IAppStateStatus, IAppStateEvent } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // AppState moved to @symbiote-native/engine (a framework-agnostic device-state module re-exported
2
+ // by every adapter). This thin re-export keeps @symbiote-native/react's public surface identical.
3
+ export { AppState } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { Appearance } from '@symbiote-native/engine';
2
+ export type { IColorSchemeName, IColorSchemePreference } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // Appearance moved to @symbiote-native/engine (a framework-agnostic device-state module re-exported
2
+ // by every adapter). This thin re-export keeps @symbiote-native/react's public surface identical.
3
+ export { Appearance } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { BackHandler } from '@symbiote-native/engine';
2
+ export type { IBackPressEventName, IBackPressHandler } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // BackHandler moved to @symbiote-native/engine (a framework-agnostic device-state module re-exported
2
+ // by every adapter). This thin re-export keeps @symbiote-native/react's public surface identical.
3
+ export { BackHandler } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { Dimensions } from '@symbiote-native/engine';
2
+ export type { IDisplayMetrics, IDisplayMetricsAndroid, IDimensionsPayload, IDimensionsSet, IDimensionsKey, IDimensionsChangeListener, IDimensionsStatic, } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // Dimensions moved to @symbiote-native/engine (a framework-agnostic device-state module re-exported
2
+ // by every adapter). This thin re-export keeps @symbiote-native/react's public surface identical.
3
+ export { Dimensions } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { I18nManager } from '@symbiote-native/engine';
2
+ export type { II18nManagerConstants } from '@symbiote-native/engine';
@@ -0,0 +1,4 @@
1
+ // I18nManager now lives framework-agnostic in @symbiote-native/engine (imperative
2
+ // native-bridge module, no visual, no lifecycle). The React adapter re-exports it
3
+ // verbatim so the public surface is unchanged. See ADR 0019.
4
+ export { I18nManager } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { Keyboard, KEYBOARD_EVENT } from '@symbiote-native/engine';
2
+ export type { IKeyboardEventName, IKeyboardEvent, IKeyboardMetrics } from '@symbiote-native/engine';
@@ -0,0 +1,3 @@
1
+ // Keyboard moved to @symbiote-native/engine (a framework-agnostic device-state module re-exported
2
+ // by every adapter). This thin re-export keeps @symbiote-native/react's public surface identical.
3
+ export { Keyboard, KEYBOARD_EVENT } from '@symbiote-native/engine';
@@ -0,0 +1,2 @@
1
+ export { LayoutAnimation } from '@symbiote-native/engine';
2
+ export type { ILayoutAnimationType, ILayoutAnimationProperty, ILayoutAnimationConfig, ILayoutAnimationAnim, ILayoutAnimationTypes, ILayoutAnimationProperties, } from '@symbiote-native/engine';