@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.
- package/README.md +1 -1
- package/babel-register-composed.cjs +11 -3
- package/build/angular/anchor-host-registry.d.ts +2 -0
- package/build/angular/anchor-host-registry.js +84 -0
- package/build/angular/anchor-host-registry.js.map +1 -0
- package/build/angular/components/input-accessory-view/index.d.ts +2 -1
- package/build/angular/components/input-accessory-view/index.js +28 -39
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/projection.js +70 -48
- package/build/angular/components/scroll-view/projection.js.map +1 -1
- package/build/angular/components/scroll-view/shared.js +28 -25
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.d.ts +6 -7
- package/build/angular/components/scroll-view/sticky-header.js +82 -65
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +2 -5
- package/build/angular/components/touchable/index.js +36 -56
- package/build/angular/components/touchable/index.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +5 -20
- package/build/angular/components/virtualized-list/index.js +145 -275
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.js +2 -4
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/index.d.ts +2 -1
- package/build/angular/index.js +6 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/renderer/index.d.ts +0 -1
- package/build/angular/renderer/index.js +5 -60
- package/build/angular/renderer/index.js.map +1 -1
- package/package.json +8 -4
- package/src/anchor-host-registry.ts +88 -0
- package/src/components/input-accessory-view/index.ts +30 -39
- package/src/components/scroll-view/projection.ts +76 -46
- package/src/components/scroll-view/shared.ts +27 -19
- package/src/components/scroll-view/sticky-header.ts +89 -64
- package/src/components/touchable/index.ts +52 -66
- package/src/components/virtualized-list/index.ts +157 -368
- package/src/components/virtualized-section-list/index.ts +6 -3
- package/src/index.ts +6 -1
- package/src/renderer/index.ts +5 -63
- package/build/bootstrap.d.ts +0 -7
- package/build/bootstrap.js +0 -14
- package/build/components/activity-indicator/index.android.d.ts +0 -9
- package/build/components/activity-indicator/index.android.js +0 -64
- package/build/components/activity-indicator/index.d.ts +0 -1
- package/build/components/activity-indicator/index.ios.d.ts +0 -5
- package/build/components/activity-indicator/index.ios.js +0 -64
- package/build/components/activity-indicator/index.js +0 -3
- package/build/components/activity-indicator/shared.d.ts +0 -64
- package/build/components/activity-indicator/shared.js +0 -424
- package/build/components/button.d.ts +0 -60
- package/build/components/button.js +0 -456
- package/build/components/flat-list/index.d.ts +0 -119
- package/build/components/flat-list/index.js +0 -691
- package/build/components/image/index.android.d.ts +0 -7
- package/build/components/image/index.android.js +0 -88
- package/build/components/image/index.d.ts +0 -1
- package/build/components/image/index.ios.d.ts +0 -7
- package/build/components/image/index.ios.js +0 -88
- package/build/components/image/index.js +0 -2
- package/build/components/image/shared.d.ts +0 -101
- package/build/components/image/shared.js +0 -405
- package/build/components/image-background.d.ts +0 -78
- package/build/components/image-background.js +0 -583
- package/build/components/input-accessory-view/index.d.ts +0 -56
- package/build/components/input-accessory-view/index.js +0 -403
- package/build/components/keyboard-avoiding-view/index.d.ts +0 -79
- package/build/components/keyboard-avoiding-view/index.js +0 -504
- package/build/components/modal/index.d.ts +0 -89
- package/build/components/modal/index.js +0 -529
- package/build/components/pressable/index.d.ts +0 -120
- package/build/components/pressable/index.js +0 -639
- package/build/components/refresh-control/index.d.ts +0 -83
- package/build/components/refresh-control/index.js +0 -509
- package/build/components/safe-area-view/index.d.ts +0 -54
- package/build/components/safe-area-view/index.js +0 -388
- package/build/components/scroll-view/index.android.d.ts +0 -16
- package/build/components/scroll-view/index.android.js +0 -228
- package/build/components/scroll-view/index.d.ts +0 -3
- package/build/components/scroll-view/index.ios.d.ts +0 -6
- package/build/components/scroll-view/index.ios.js +0 -113
- package/build/components/scroll-view/index.js +0 -5
- package/build/components/scroll-view/projection.d.ts +0 -32
- package/build/components/scroll-view/projection.js +0 -311
- package/build/components/scroll-view/shared.d.ts +0 -225
- package/build/components/scroll-view/shared.js +0 -757
- package/build/components/scroll-view/sticky-header.d.ts +0 -38
- package/build/components/scroll-view/sticky-header.js +0 -257
- package/build/components/section-list/index.d.ts +0 -113
- package/build/components/section-list/index.js +0 -768
- package/build/components/switch/index.android.d.ts +0 -17
- package/build/components/switch/index.android.js +0 -107
- package/build/components/switch/index.d.ts +0 -1
- package/build/components/switch/index.ios.d.ts +0 -16
- package/build/components/switch/index.ios.js +0 -106
- package/build/components/switch/index.js +0 -3
- package/build/components/switch/shared.d.ts +0 -37
- package/build/components/switch/shared.js +0 -176
- package/build/components/text-input.d.ts +0 -150
- package/build/components/text-input.js +0 -821
- package/build/components/touchable/index.d.ts +0 -241
- package/build/components/touchable/index.js +0 -1672
- package/build/components/touchable-native-feedback/index.d.ts +0 -80
- package/build/components/touchable-native-feedback/index.js +0 -545
- package/build/components/virtualized-list/directives.d.ts +0 -41
- package/build/components/virtualized-list/directives.js +0 -249
- package/build/components/virtualized-list/index.d.ts +0 -265
- package/build/components/virtualized-list/index.js +0 -1343
- package/build/components/virtualized-section-list/directives.d.ts +0 -28
- package/build/components/virtualized-section-list/directives.js +0 -148
- package/build/components/virtualized-section-list/index.d.ts +0 -175
- package/build/components/virtualized-section-list/index.js +0 -854
- package/build/components.d.ts +0 -39
- package/build/components.js +0 -37
- package/build/create-portal/index.d.ts +0 -17
- package/build/create-portal/index.js +0 -128
- package/build/create-tunnel/index.d.ts +0 -29
- package/build/create-tunnel/index.js +0 -181
- package/build/descriptor-to-angular/index.d.ts +0 -19
- package/build/descriptor-to-angular/index.js +0 -186
- package/build/host-instance/index.d.ts +0 -2
- package/build/host-instance/index.js +0 -36
- package/build/index.d.ts +0 -21
- package/build/index.js +0 -40
- package/build/modules/animated/animated-leaf-binder/index.d.ts +0 -14
- package/build/modules/animated/animated-leaf-binder/index.js +0 -90
- package/build/modules/animated/animated-leaf-binder.d.ts +0 -14
- package/build/modules/animated/animated-leaf-binder.js +0 -90
- package/build/modules/animated/create-animated-component.d.ts +0 -48
- package/build/modules/animated/create-animated-component.js +0 -425
- package/build/modules/animated/index.d.ts +0 -51
- package/build/modules/animated/index.js +0 -58
- package/build/modules/app-registry/index.d.ts +0 -7
- package/build/modules/app-registry/index.js +0 -22
- package/build/modules/status-bar/index.d.ts +0 -17
- package/build/modules/status-bar/index.js +0 -121
- package/build/primitives/index.d.ts +0 -32
- package/build/primitives/index.js +0 -386
- package/build/primitives/shared.d.ts +0 -83
- package/build/primitives/shared.js +0 -230
- package/build/render/index.d.ts +0 -11
- package/build/render/index.js +0 -170
- package/build/renderer/index.d.ts +0 -38
- package/build/renderer/index.js +0 -355
- package/build/services/color-scheme.service.d.ts +0 -13
- package/build/services/color-scheme.service.js +0 -72
- package/build/services/index.d.ts +0 -2
- package/build/services/index.js +0 -2
- package/build/services/window-dimensions.service.d.ts +0 -13
- package/build/services/window-dimensions.service.js +0 -83
- package/src/__tests__/responder-change-detection.test.ts +0 -102
- package/src/__tests__/responder-nested-cd.test.ts +0 -113
- package/src/angular-gaps.test.ts +0 -142
- package/src/angular-imports.test.ts +0 -100
- package/src/components/activity-indicator/activity-indicator-class-style.test.ts +0 -44
- package/src/components/activity-indicator/activity-indicator.test.ts +0 -131
- package/src/components/flat-list/column-wrapper-style-class.test.ts +0 -116
- package/src/components/flat-list/flat-list-array-style.test.ts +0 -131
- package/src/components/flat-list/flat-list-class-style.test.ts +0 -74
- package/src/components/flat-list/flat-list-scroll-containment.test.ts +0 -107
- package/src/components/flat-list/flat-list.test.ts +0 -99
- package/src/components/image/image-class-style.test.ts +0 -46
- package/src/components/image-background-class-style.test.ts +0 -48
- package/src/components/image-background-style-class.test.ts +0 -79
- package/src/components/input-accessory-view/input-accessory-view.test.ts +0 -43
- package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +0 -54
- package/src/components/modal/modal.test.ts +0 -43
- package/src/components/pressable/pressable.test.ts +0 -85
- package/src/components/refresh-control/refresh-control.test.ts +0 -41
- package/src/components/safe-area-view/safe-area-view.test.ts +0 -43
- package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +0 -123
- package/src/components/scroll-view/content-container-style-class.test.ts +0 -75
- package/src/components/scroll-view/scroll-view-class-style.test.ts +0 -134
- package/src/components/scroll-view/scroll-view-projection.test.ts +0 -194
- package/src/components/switch/android-switch-class.test.ts +0 -42
- package/src/components/switch/switch.test.ts +0 -92
- package/src/components/text-input-class-style.test.ts +0 -54
- package/src/components/touchable/touchable.test.ts +0 -102
- package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +0 -49
- package/src/components/virtualized-list/virtualized-list-class-style.test.ts +0 -76
- package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +0 -60
- package/src/create-portal/create-portal.test.ts +0 -90
- package/src/create-tunnel/create-tunnel.test.ts +0 -120
- package/src/descriptor-to-angular/descriptor-outlet.test.ts +0 -94
- package/src/host-instance/host-instance.test.ts +0 -49
- package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +0 -116
- package/src/modules/animated/animated-leaf-binder.test.ts +0 -116
- package/src/modules/animated/animated-scroll-view.test.ts +0 -102
- package/src/modules/app-registry/app-registry.test.ts +0 -106
- package/src/modules/status-bar/status-bar.test.ts +0 -50
- package/src/render/render.test.ts +0 -147
- package/src/renderer/renderer.test.ts +0 -202
- 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>;
|