@symbiote-native/engine 0.1.1 → 0.1.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 +10 -0
- package/build/accessibility-info/index.android.js +6 -6
- package/build/accessibility-info/index.ios.js +6 -6
- package/build/accessibility-info/index.js +1 -1
- package/build/action-sheet-ios/index.js +2 -2
- package/build/alert/index.android.js +3 -3
- package/build/alert/index.ios.js +2 -2
- package/build/alert/index.js +2 -2
- package/build/animated/animated-component-shared.js +2 -2
- package/build/animated/animations/base.js +3 -3
- package/build/animated/animations/composition.js +8 -8
- package/build/animated/animations/decay.js +3 -3
- package/build/animated/animations/spring.js +4 -4
- package/build/animated/animations/timing.js +4 -4
- package/build/animated/animations/tracking.js +1 -1
- package/build/animated/color.js +2 -2
- package/build/animated/easing.js +1 -1
- package/build/animated/event.js +5 -5
- package/build/animated/graph.js +1 -1
- package/build/animated/index.js +19 -19
- package/build/animated/interpolation-node.js +2 -2
- package/build/animated/interpolation.js +2 -2
- package/build/animated/mock.js +8 -8
- package/build/animated/native/native-animated.js +3 -3
- package/build/animated/operators.js +4 -4
- package/build/animated/props.js +6 -6
- package/build/animated/style.js +2 -2
- package/build/animated/value-xy.js +1 -1
- package/build/animated/value.js +3 -3
- package/build/app-registry/index.js +2 -2
- package/build/app-state/index.js +3 -3
- package/build/appearance/index.js +3 -3
- package/build/back-handler/index.js +3 -3
- package/build/commit.js +15 -15
- package/build/dimensions/index.js +3 -3
- package/build/events/index.js +5 -5
- package/build/fabric.js +1 -1
- package/build/host-instance/index.js +3 -3
- package/build/i18n-manager/index.js +2 -2
- package/build/index.js +47 -47
- package/build/interaction-manager/index.js +1 -1
- package/build/keyboard/index.js +5 -5
- package/build/layout-animation/index.js +2 -2
- package/build/linking/index.android.js +1 -1
- package/build/linking/index.ios.js +1 -1
- package/build/linking/index.js +1 -1
- package/build/linking/shared.js +3 -3
- package/build/native-events.js +2 -2
- package/build/native-modules.js +1 -1
- package/build/node.js +2 -2
- package/build/pan-responder/index.js +1 -1
- package/build/permissions-android/index.js +2 -2
- package/build/pixel-ratio/index.js +1 -1
- package/build/platform/index.android.js +1 -1
- package/build/platform/index.ios.js +1 -1
- package/build/platform/index.js +1 -1
- package/build/platform/shared.js +2 -2
- package/build/process-aspect-ratio.js +1 -1
- package/build/process-background-image/index.js +3 -3
- package/build/process-box-shadow/index.js +3 -3
- package/build/process-filter.js +3 -3
- package/build/process-transform/index.js +1 -1
- package/build/process-transform-origin/index.js +1 -1
- package/build/settings/index.js +3 -3
- package/build/share/index.android.js +3 -3
- package/build/share/index.ios.js +3 -3
- package/build/share/index.js +1 -1
- package/build/status-bar/index.android.js +4 -4
- package/build/status-bar/index.ios.js +3 -3
- package/build/status-bar/index.js +1 -1
- package/build/style-sheet/index.js +3 -3
- package/build/surface.js +3 -3
- package/build/text-input-state.js +2 -2
- package/build/toast-android/index.js +2 -2
- package/build/vibration/index.android.js +1 -1
- package/build/vibration/index.ios.js +1 -1
- package/build/vibration/index.js +1 -1
- package/build/vibration/shared.js +2 -2
- package/build/view-config.js +1 -1
- package/package.json +2 -2
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// allowRTL(allowRTL: boolean)
|
|
13
13
|
// forceRTL(forceRTL: boolean)
|
|
14
14
|
// swapLeftAndRightInRTL(flipStyles: boolean)
|
|
15
|
-
import { dlog } from '../debug';
|
|
16
|
-
import { getNativeModule } from '../native-modules';
|
|
15
|
+
import { dlog } from '../debug.js';
|
|
16
|
+
import { getNativeModule } from '../native-modules.js';
|
|
17
17
|
// The iOS native module name RN registers this under (the same name on both
|
|
18
18
|
// platforms). NOTE: per the symbiote invariant, a module name is only provable on
|
|
19
19
|
// a real host (a headless fake answers to any name); this name is
|
package/build/index.js
CHANGED
|
@@ -2,71 +2,71 @@
|
|
|
2
2
|
// Every framework adapter drives this tiny mutation API; all Fabric-specific
|
|
3
3
|
// logic (tag allocation, view-name resolution, clone-on-write, event
|
|
4
4
|
// normalization) lives behind it, in one place.
|
|
5
|
-
export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, getExplicitStyle, setText, isSymbioteNode, RAW_TEXT_COMPONENT, } from './node';
|
|
6
|
-
export { isEventFor } from './view-config';
|
|
7
|
-
export { registerComponent, setNativeViewConfigSource } from './registry';
|
|
5
|
+
export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, getExplicitStyle, setText, isSymbioteNode, RAW_TEXT_COMPONENT, } from './node.js';
|
|
6
|
+
export { isEventFor } from './view-config.js';
|
|
7
|
+
export { registerComponent, setNativeViewConfigSource } from './registry.js';
|
|
8
8
|
// InteractionManager: pure JS (timers + emitter), framework-agnostic, so it lives
|
|
9
9
|
// here; every adapter re-exports it.
|
|
10
|
-
export { InteractionManager, Events as InteractionManagerEvents } from './interaction-manager';
|
|
10
|
+
export { InteractionManager, Events as InteractionManagerEvents } from './interaction-manager/index.js';
|
|
11
11
|
// PanResponder: pure JS gesture recognition over the View responder props,
|
|
12
12
|
// framework-agnostic, so it lives here; every adapter re-exports it.
|
|
13
|
-
export { default as PanResponder } from './pan-responder';
|
|
14
|
-
export { SymbioteSurface, createSurface } from './surface';
|
|
15
|
-
export { setEventDispatcher } from './dispatch';
|
|
16
|
-
export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, } from './commit';
|
|
13
|
+
export { default as PanResponder } from './pan-responder/index.js';
|
|
14
|
+
export { SymbioteSurface, createSurface } from './surface.js';
|
|
15
|
+
export { setEventDispatcher } from './dispatch.js';
|
|
16
|
+
export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, } from './commit.js';
|
|
17
17
|
// The public instance grafted onto a host node by every adapter (React's getPublicInstance,
|
|
18
18
|
// the Vue renderer's createElement): the imperative measure/setNativeProps/focus API. Lives
|
|
19
19
|
// here because it depends only on engine internals, so all adapters inherit it identically.
|
|
20
|
-
export { toPublicInstance } from './host-instance';
|
|
21
|
-
export { PlatformColor, DynamicColorIOS, isOpaqueColorValue } from './platform-color';
|
|
20
|
+
export { toPublicInstance } from './host-instance/index.js';
|
|
21
|
+
export { PlatformColor, DynamicColorIOS, isOpaqueColorValue } from './platform-color.js';
|
|
22
22
|
// CSS-style processors (boxShadow/filter): RN parses these in JS before native because
|
|
23
23
|
// enableNativeCSSParsing() defaults to false. Exported so an adapter / test can reuse them.
|
|
24
|
-
export { processBoxShadow } from './process-box-shadow';
|
|
25
|
-
export { processFilter } from './process-filter';
|
|
26
|
-
export { processTransformOrigin } from './process-transform-origin';
|
|
27
|
-
export { processTransform } from './process-transform';
|
|
28
|
-
export { processAspectRatio } from './process-aspect-ratio';
|
|
29
|
-
export { processFontVariant } from './process-font-variant';
|
|
30
|
-
export { processBackgroundImage } from './process-background-image';
|
|
31
|
-
export { flattenStyle } from './style';
|
|
32
|
-
export { StyleSheet, computeHairlineWidth } from './style-sheet';
|
|
33
|
-
export { registerStyles, resolveClassName, clearGlobalStyles, scopeClassName, isClassNameValue, } from './style-registry';
|
|
34
|
-
export { Platform } from './platform';
|
|
35
|
-
export { dlog, isDebug } from './debug';
|
|
36
|
-
export { getNativeModule, getEnforcingNativeModule } from './native-modules';
|
|
37
|
-
export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource } from './native-events';
|
|
38
|
-
export { AnimatedNode, AnimatedWithChildren, AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedInterpolation, AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, AnimatedEvent, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, flushValue, Easing, createNumericInterpolation, checkValidRanges, TimingAnimation, SpringAnimation, DecayAnimation, AnimatedTracking, timing, spring, decay, parallel, sequence, stagger, loop, delay, nativeAnimated, isNativeAnimatedAvailable, AnimatedProps, AnimatedStyle, AnimatedTransform, AnimatedMock, reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated';
|
|
39
|
-
export { getSlot } from './fabric';
|
|
24
|
+
export { processBoxShadow } from './process-box-shadow/index.js';
|
|
25
|
+
export { processFilter } from './process-filter.js';
|
|
26
|
+
export { processTransformOrigin } from './process-transform-origin/index.js';
|
|
27
|
+
export { processTransform } from './process-transform/index.js';
|
|
28
|
+
export { processAspectRatio } from './process-aspect-ratio.js';
|
|
29
|
+
export { processFontVariant } from './process-font-variant.js';
|
|
30
|
+
export { processBackgroundImage } from './process-background-image/index.js';
|
|
31
|
+
export { flattenStyle } from './style/index.js';
|
|
32
|
+
export { StyleSheet, computeHairlineWidth } from './style-sheet/index.js';
|
|
33
|
+
export { registerStyles, resolveClassName, clearGlobalStyles, scopeClassName, isClassNameValue, } from './style-registry/index.js';
|
|
34
|
+
export { Platform } from './platform/index.js';
|
|
35
|
+
export { dlog, isDebug } from './debug.js';
|
|
36
|
+
export { getNativeModule, getEnforcingNativeModule } from './native-modules.js';
|
|
37
|
+
export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource } from './native-events.js';
|
|
38
|
+
export { AnimatedNode, AnimatedWithChildren, AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedInterpolation, AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, AnimatedEvent, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, flushValue, Easing, createNumericInterpolation, checkValidRanges, TimingAnimation, SpringAnimation, DecayAnimation, AnimatedTracking, timing, spring, decay, parallel, sequence, stagger, loop, delay, nativeAnimated, isNativeAnimatedAvailable, AnimatedProps, AnimatedStyle, AnimatedTransform, AnimatedMock, reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated/index.js';
|
|
39
|
+
export { getSlot } from './fabric.js';
|
|
40
40
|
// Imperative runtime modules: framework-agnostic native-bridge consumers (no visual, no
|
|
41
41
|
// lifecycle), moved here from @symbiote-native/react so every adapter re-exports the SAME module.
|
|
42
42
|
// Native module names are platform-selected and device-verified, not headless (CLAUDE.md
|
|
43
43
|
// <native_module_name_is_platform_specific>).
|
|
44
|
-
export { Alert } from './alert';
|
|
45
|
-
export { Share } from './share';
|
|
46
|
-
export { ActionSheetIOS } from './action-sheet-ios';
|
|
47
|
-
export { Linking } from './linking';
|
|
48
|
-
export { Vibration } from './vibration';
|
|
49
|
-
export { ToastAndroid } from './toast-android';
|
|
50
|
-
export { Settings } from './settings';
|
|
51
|
-
export { I18nManager } from './i18n-manager';
|
|
44
|
+
export { Alert } from './alert/index.js';
|
|
45
|
+
export { Share } from './share/index.js';
|
|
46
|
+
export { ActionSheetIOS } from './action-sheet-ios/index.js';
|
|
47
|
+
export { Linking } from './linking/index.js';
|
|
48
|
+
export { Vibration } from './vibration/index.js';
|
|
49
|
+
export { ToastAndroid } from './toast-android/index.js';
|
|
50
|
+
export { Settings } from './settings/index.js';
|
|
51
|
+
export { I18nManager } from './i18n-manager/index.js';
|
|
52
52
|
// Device-state / event modules (Dimensions, Appearance, AppState, Keyboard, …).
|
|
53
|
-
export { Dimensions } from './dimensions';
|
|
53
|
+
export { Dimensions } from './dimensions/index.js';
|
|
54
54
|
// PixelRatio: derives from the Dimensions singleton, framework-agnostic, so it lives
|
|
55
55
|
// here; every adapter re-exports it.
|
|
56
|
-
export { PixelRatio } from './pixel-ratio';
|
|
57
|
-
export { Appearance } from './appearance';
|
|
58
|
-
export { AppState } from './app-state';
|
|
56
|
+
export { PixelRatio } from './pixel-ratio/index.js';
|
|
57
|
+
export { Appearance } from './appearance/index.js';
|
|
58
|
+
export { AppState } from './app-state/index.js';
|
|
59
59
|
// AppRegistry core: registry bookkeeping + host-registrar bridge + headless tasks, shared by
|
|
60
60
|
// every adapter. Each adapter calls createAppRegistry with its own runnableFor (the one
|
|
61
61
|
// framework-specific seam — how to build a runnable from a component provider).
|
|
62
|
-
export { createAppRegistry } from './app-registry';
|
|
63
|
-
export { Keyboard, KEYBOARD_EVENT } from './keyboard';
|
|
64
|
-
export { currentlyFocusedInput, setInputFocused, setInputBlurred, blurTextInput, } from './text-input-state';
|
|
65
|
-
export { LayoutAnimation } from './layout-animation';
|
|
66
|
-
export { BackHandler } from './back-handler';
|
|
67
|
-
export { PermissionsAndroid, PERMISSIONS, RESULTS } from './permissions-android';
|
|
68
|
-
export { AccessibilityInfo } from './accessibility-info';
|
|
62
|
+
export { createAppRegistry } from './app-registry/index.js';
|
|
63
|
+
export { Keyboard, KEYBOARD_EVENT } from './keyboard/index.js';
|
|
64
|
+
export { currentlyFocusedInput, setInputFocused, setInputBlurred, blurTextInput, } from './text-input-state.js';
|
|
65
|
+
export { LayoutAnimation } from './layout-animation/index.js';
|
|
66
|
+
export { BackHandler } from './back-handler/index.js';
|
|
67
|
+
export { PermissionsAndroid, PERMISSIONS, RESULTS } from './permissions-android/index.js';
|
|
68
|
+
export { AccessibilityInfo } from './accessibility-info/index.js';
|
|
69
69
|
// StatusBar: values from the platform-selected './status-bar', types from '-shared' (the
|
|
70
70
|
// .ios re-export would otherwise duplicate-export the type symbols).
|
|
71
|
-
export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight } from './status-bar';
|
|
72
|
-
export { hideTransition, STATUS_BAR_MANAGER, ANIMATED_HIDE_TRANSITION, STATIC_HIDE_TRANSITION, } from './status-bar/shared';
|
|
71
|
+
export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight } from './status-bar/index.js';
|
|
72
|
+
export { hideTransition, STATUS_BAR_MANAGER, ANIMATED_HIDE_TRANSITION, STATIC_HIDE_TRANSITION, } from './status-bar/shared.js';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// count that blocks the flush; `clearInteractionHandle` decrements it and, when the
|
|
13
13
|
// last handle clears, schedules a flush on the next tick. `interactionStart` /
|
|
14
14
|
// `interactionComplete` fire as the count crosses 0.
|
|
15
|
-
import { dlog } from '../debug';
|
|
15
|
+
import { dlog } from '../debug.js';
|
|
16
16
|
// A positive deadline (ms) makes the flush yield via setTimeout once that much event-
|
|
17
17
|
// loop time has elapsed within one batch, letting touches interrupt; 0 (default) runs
|
|
18
18
|
// the whole batch in one setImmediate.
|
package/build/keyboard/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// subscribes through a NativeEventEmitter bound to the KeyboardObserver native
|
|
4
4
|
// module, which RN keys its keyboard events off of. Mirrors RN's
|
|
5
5
|
// Libraries/Components/Keyboard/Keyboard.js, slimmed to the parts we need.
|
|
6
|
-
import { getNativeModule } from '../native-modules';
|
|
7
|
-
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
|
|
8
|
-
import { dlog } from '../debug';
|
|
9
|
-
import { blurTextInput, currentlyFocusedInput } from '../text-input-state';
|
|
10
|
-
import { LayoutAnimation } from '../layout-animation';
|
|
6
|
+
import { getNativeModule } from '../native-modules.js';
|
|
7
|
+
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
|
|
8
|
+
import { dlog } from '../debug.js';
|
|
9
|
+
import { blurTextInput, currentlyFocusedInput } from '../text-input-state.js';
|
|
10
|
+
import { LayoutAnimation } from '../layout-animation/index.js';
|
|
11
11
|
// RN's scheduleLayoutAnimation falls back to the 'keyboard' animation type when the
|
|
12
12
|
// event's easing string isn't a known LayoutAnimation type (Keyboard.js:200).
|
|
13
13
|
const KEYBOARD_ANIMATION_TYPE = 'keyboard';
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
//
|
|
8
8
|
// It is a native-bridge consumer (RN's `Platform`/`StyleSheet` purity split puts
|
|
9
9
|
// these in the adapter, not in shared, like Keyboard / StatusBar).
|
|
10
|
-
import { getNativeModule } from '../native-modules';
|
|
11
|
-
import { dlog } from '../debug';
|
|
10
|
+
import { getNativeModule } from '../native-modules.js';
|
|
11
|
+
import { dlog } from '../debug.js';
|
|
12
12
|
// ---- native module routing ----------------------------------------------
|
|
13
13
|
// DEVICE-VERIFY-PENDING: on bridgeless Fabric the layout-animation configure call
|
|
14
14
|
// is exposed by RN through the UIManager surface (RN's non-Fabric path calls
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// device-verify-pending: the `IntentAndroid` name and routing are confirmed from RN
|
|
7
7
|
// source but not yet exercised on a real Android host; only a bridgeless resolution
|
|
8
8
|
// log there can prove the name. See .docs/native-module-platform-routing.md.
|
|
9
|
-
import { createLinking } from './shared';
|
|
9
|
+
import { createLinking } from './shared.js';
|
|
10
10
|
export const Linking = createLinking({
|
|
11
11
|
moduleName: 'IntentAndroid',
|
|
12
12
|
sendIntent: (module, action, extras) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// (RN's TurboModuleRegistry.get('LinkingManager')); iOS has no `sendIntent`, so per
|
|
3
3
|
// RN's Linking.js it rejects 'Unsupported'. Everything else is the shared core. Metro
|
|
4
4
|
// picks this file on an iOS host; the base linking.ts re-exports it for web/headless.
|
|
5
|
-
import { createLinking } from './shared';
|
|
5
|
+
import { createLinking } from './shared.js';
|
|
6
6
|
export const Linking = createLinking({
|
|
7
7
|
moduleName: 'LinkingManager',
|
|
8
8
|
sendIntent: () => Promise.reject(new Error('Unsupported')),
|
package/build/linking/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// real iOS/Android host; off those, the iOS build is the fallback (its LinkingManager
|
|
4
4
|
// resolves null elsewhere → graceful no-op). The barrel imports './linking', which
|
|
5
5
|
// resolves here under tsc/tsx and to the platform file under Metro. See ADR 0019.
|
|
6
|
-
export * from './index.ios';
|
|
6
|
+
export * from './index.ios.js';
|
package/build/linking/shared.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
// Metro selects the platform file on a real host (linking.android.ts > linking.ts);
|
|
8
8
|
// the base linking.ts re-exports the iOS build for web/headless. There is no runtime
|
|
9
9
|
// `Platform.OS` read; the filename is the selector. See ADR 0019.
|
|
10
|
-
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
|
|
11
|
-
import { getNativeModule } from '../native-modules';
|
|
12
|
-
import { dlog } from '../debug';
|
|
10
|
+
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
|
|
11
|
+
import { getNativeModule } from '../native-modules.js';
|
|
12
|
+
import { dlog } from '../debug.js';
|
|
13
13
|
// The one event symbiote observes: an incoming deep link. RN's LinkingEventDefinitions.
|
|
14
14
|
const URL_EVENT = 'url';
|
|
15
15
|
// RN's _validateURL: a typo / empty URL must fail loudly at the call, not reach native.
|
package/build/native-events.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// real host: the app injects RN's DeviceEventEmitter (the bus native actually
|
|
8
8
|
// calls) via `setDeviceEventSource`, exactly like setColorProcessor. The built-in
|
|
9
9
|
// hub below stays as the fallback bus for headless/non-RN runs. See .docs/decisions/0012.
|
|
10
|
-
import { dlog } from './debug';
|
|
11
|
-
import { runWrapped } from './dispatch';
|
|
10
|
+
import { dlog } from './debug.js';
|
|
11
|
+
import { runWrapped } from './dispatch.js';
|
|
12
12
|
// The single device-event bus. Native pushes into `emit`; subscribers (wrapped by
|
|
13
13
|
// NativeEventEmitter) live in `listeners`, keyed by event name.
|
|
14
14
|
const listeners = new Map();
|
package/build/native-modules.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// KeyboardObserver, …). Third-party RN packages import `TurboModuleRegistry` from
|
|
9
9
|
// `'react-native'` and read the same global themselves; they do not go through
|
|
10
10
|
// here. See .docs/decisions/0012.
|
|
11
|
-
import { dlog } from './debug';
|
|
11
|
+
import { dlog } from './debug.js';
|
|
12
12
|
// The native module value crosses from an untyped HostObject into our types here;
|
|
13
13
|
// the caller vouches for its shape via T (the single trust-boundary narrowing, no
|
|
14
14
|
// per-call `as`). Native modules are always non-null objects.
|
package/build/node.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// whole thing into Fabric's clone-on-write child sets. Keeping the retained
|
|
4
4
|
// tree mutable while the Fabric mirror stays persistent is the core R2 trick,
|
|
5
5
|
// and it lives here in shared so no adapter re-implements it.
|
|
6
|
-
import { isEventFor } from './view-config';
|
|
7
|
-
import { isClassNameValue, resolveClassName } from './style-registry';
|
|
6
|
+
import { isEventFor } from './view-config.js';
|
|
7
|
+
import { isClassNameValue, resolveClassName } from './style-registry/index.js';
|
|
8
8
|
const BRAND = Symbol('symbiote.node');
|
|
9
9
|
// A node carries the Fabric view name directly, so adding a primitive (Image,
|
|
10
10
|
// ScrollView, TextInput) is just a new string from the adapter, no core change.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// events instead carry the live touches on `event.nativeEvent.touches` (and the
|
|
12
12
|
// changed ones on `changedTouches`), so the centroid/velocity math here reads
|
|
13
13
|
// those directly while keeping RN's accumulate-deltas-over-time behavior.
|
|
14
|
-
import { dlog } from '../debug';
|
|
14
|
+
import { dlog } from '../debug.js';
|
|
15
15
|
const SINGLE_TOUCH_COUNT = 1;
|
|
16
16
|
// onShouldBlockNativeResponder defaults to true (RN: block native by default).
|
|
17
17
|
const DEFAULT_BLOCK_NATIVE_RESPONDER = true;
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
// requestPermission(permission): Promise<string>
|
|
18
18
|
// shouldShowRequestPermissionRationale(permission): Promise<boolean>
|
|
19
19
|
// requestMultiplePermissions(permissions): Promise<{[permission]: string}>
|
|
20
|
-
import { getNativeModule } from '../native-modules';
|
|
21
|
-
import { dlog } from '../debug';
|
|
20
|
+
import { getNativeModule } from '../native-modules.js';
|
|
21
|
+
import { dlog } from '../debug.js';
|
|
22
22
|
// The native module name RN registers this TurboModule under
|
|
23
23
|
// (`TurboModuleRegistry.get<Spec>('PermissionsAndroid')`). NOTE: per the
|
|
24
24
|
// symbiote invariant, a module name is only provable on a real host (a headless
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// text-size factor (falling back to scale when unset), and the two conversion
|
|
5
5
|
// helpers snap layout sizes (dp) onto the physical pixel grid. iOS-only
|
|
6
6
|
// startDetecting() is a no-op, kept for API parity.
|
|
7
|
-
import { Dimensions } from '../dimensions';
|
|
7
|
+
import { Dimensions } from '../dimensions/index.js';
|
|
8
8
|
export const PixelRatio = {
|
|
9
9
|
get() {
|
|
10
10
|
return Dimensions.get('window').scale;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// from the PlatformConstants native module (RN spec NativePlatformConstantsAndroid.js,
|
|
4
4
|
// a different payload from iOS). Metro picks this on an Android host. The module name is
|
|
5
5
|
// the same 'PlatformConstants'; only the shape differs. See .docs/decisions/0022.
|
|
6
|
-
import { createConstantsResolver } from './shared';
|
|
6
|
+
import { createConstantsResolver } from './shared.js';
|
|
7
7
|
// The filename already selected this host: 'android' is a literal, not a probe.
|
|
8
8
|
const OS_ANDROID = 'android';
|
|
9
9
|
// RN reads isTV off the uiMode constant.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// (RN spec NativePlatformConstantsIOS.js), read lazily and cached via the shared
|
|
4
4
|
// resolver. Metro picks this on an iOS host; it is also the base re-export target
|
|
5
5
|
// (platform.ts) so tsc / tsx / web (no Metro) land here too. See .docs/decisions/0022.
|
|
6
|
-
import { createConstantsResolver, UNKNOWN_VERSION, } from './shared';
|
|
6
|
+
import { createConstantsResolver, UNKNOWN_VERSION, } from './shared.js';
|
|
7
7
|
// interfaceIdiom values RN compares against for the device-class getters.
|
|
8
8
|
const IDIOM_PAD = 'pad';
|
|
9
9
|
const IDIOM_TV = 'tv';
|
package/build/platform/index.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// with platform.ios.ts / platform.android.ts on a real host; under tsc / tsx / web
|
|
3
3
|
// (no Metro) resolution lands here. The filename is the selector, no Platform.OS read.
|
|
4
4
|
// See .docs/decisions/0022 (and 0020 for the same split on component names).
|
|
5
|
-
export * from './index.ios';
|
|
5
|
+
export * from './index.ios.js';
|
package/build/platform/shared.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// select precedence, and the device-class getters. The filename is the selector (Metro
|
|
6
6
|
// picks platform.ios / platform.android by host); no Platform.OS read lives here.
|
|
7
7
|
// See .docs/decisions/0022 (and 0020 for the same split on component names).
|
|
8
|
-
import { dlog } from '../debug';
|
|
9
|
-
import { getNativeModule } from '../native-modules';
|
|
8
|
+
import { dlog } from '../debug.js';
|
|
9
|
+
import { getNativeModule } from '../native-modules.js';
|
|
10
10
|
// The native module name RN registers PlatformConstants under, identical on both
|
|
11
11
|
// platforms; only getConstants()'s SHAPE differs, which each platform file guards.
|
|
12
12
|
export const PLATFORM_CONSTANTS = 'PlatformConstants';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// already-working form) passes through untouched; this is a no-op for it.
|
|
6
6
|
//
|
|
7
7
|
// RN throws via invariant() in __DEV__ on a malformed value; we dlog and return undefined.
|
|
8
|
-
import { dlog } from './debug';
|
|
8
|
+
import { dlog } from './debug.js';
|
|
9
9
|
// RN processAspectRatio.js:15-63. number → number; ratio string → number; invalid → undefined.
|
|
10
10
|
export function processAspectRatio(aspectRatio) {
|
|
11
11
|
if (typeof aspectRatio === 'number') {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
// processColor is referenced from ../commit at RUNTIME only (inside function bodies), never at
|
|
8
8
|
// module-init, so the cyclic import (commit -> here -> commit) has no TDZ hazard — same pattern
|
|
9
9
|
// as process-box-shadow/process-filter.
|
|
10
|
-
import { processColor } from '../commit';
|
|
11
|
-
import { isOpaqueColorValue } from '../platform-color';
|
|
12
|
-
import { dlog } from '../debug';
|
|
10
|
+
import { processColor } from '../commit.js';
|
|
11
|
+
import { isOpaqueColorValue } from '../platform-color.js';
|
|
12
|
+
import { dlog } from '../debug.js';
|
|
13
13
|
// RN processBackgroundImage.js: pre-compiled patterns.
|
|
14
14
|
const NEWLINE_REGEX = /\n/g;
|
|
15
15
|
const GRADIENT_REGEX = /^(linear|radial)-gradient\(((?:\([^)]*\)|[^()])*)\)/;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
//
|
|
8
8
|
// processColor is referenced from ./commit at RUNTIME only (inside the function bodies),
|
|
9
9
|
// never at module-init, so the cyclic import (commit -> here -> commit) has no TDZ hazard.
|
|
10
|
-
import { processColor } from '../commit';
|
|
11
|
-
import { isOpaqueColorValue } from '../platform-color';
|
|
12
|
-
import { dlog } from '../debug';
|
|
10
|
+
import { processColor } from '../commit.js';
|
|
11
|
+
import { isOpaqueColorValue } from '../platform-color.js';
|
|
12
|
+
import { dlog } from '../debug.js';
|
|
13
13
|
// RN processBoxShadow.js:16-19: split args only on the delimiters that are NOT inside
|
|
14
14
|
// a parenthesized color like rgba(0,0,0,1).
|
|
15
15
|
const COMMA_SPLIT_REGEX = /,(?![^()]*\))/;
|
package/build/process-filter.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
//
|
|
8
8
|
// processColor is referenced from ./commit at RUNTIME only (inside function bodies),
|
|
9
9
|
// never at module-init, so the cyclic import (commit -> here -> commit) has no TDZ hazard.
|
|
10
|
-
import { processColor } from './commit';
|
|
11
|
-
import { isOpaqueColorValue } from './platform-color';
|
|
12
|
-
import { dlog } from './debug';
|
|
10
|
+
import { processColor } from './commit.js';
|
|
11
|
+
import { isOpaqueColorValue } from './platform-color.js';
|
|
12
|
+
import { dlog } from './debug.js';
|
|
13
13
|
// RN processFilter.js:19-24: pre-compiled patterns.
|
|
14
14
|
const NEWLINE_REGEX = /\n/g;
|
|
15
15
|
const FILTER_FUNCTION_REGEX = /([\w-]+)\(([^()]*|\([^()]*\)|[^()]*\([^()]*\)[^()]*)\)/g;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// _validateTransforms, which is __DEV__-only and THROWS via invariant; we never throw
|
|
15
15
|
// into the commit path, so we run a non-throwing check that dlogs and still returns the
|
|
16
16
|
// array unchanged (matching the boxShadow/transformOrigin idiom).
|
|
17
|
-
import { dlog } from '../debug';
|
|
17
|
+
import { dlog } from '../debug.js';
|
|
18
18
|
// RN processTransform.js:28: matches each `name(args)` in the CSS string.
|
|
19
19
|
const TRANSFORM_REGEX = /(\w+)\(([^)]+)\)/g;
|
|
20
20
|
// RN processTransform.js:59: splits one arg into [, number, , unit?].
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
//
|
|
10
10
|
// RN throws via invariant() on a malformed value; we instead dlog and keep the partial array
|
|
11
11
|
// (matching the boxShadow/filter idiom of never throwing into the commit path).
|
|
12
|
-
import { dlog } from '../debug';
|
|
12
|
+
import { dlog } from '../debug.js';
|
|
13
13
|
// RN processTransformOrigin.js:14, pre-compiled pattern matching each keyword / length token.
|
|
14
14
|
const TRANSFORM_ORIGIN_REGEX = /(top|bottom|left|right|center|\d+(?:%|px)|0)/gi;
|
|
15
15
|
// RN processTransformOrigin.js:16-18.
|
package/build/settings/index.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
// watched key's value changes. Native re-broadcasts external edits through the
|
|
6
6
|
// device event `settingsUpdated`, which feeds the same change->fire path. Mirrors
|
|
7
7
|
// RN's Libraries/Settings/Settings.ios.js, iOS surface only.
|
|
8
|
-
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
|
|
9
|
-
import { getNativeModule } from '../native-modules';
|
|
10
|
-
import { dlog } from '../debug';
|
|
8
|
+
import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
|
|
9
|
+
import { getNativeModule } from '../native-modules.js';
|
|
10
|
+
import { dlog } from '../debug.js';
|
|
11
11
|
// The iOS native module name RN registers this under. NOTE: this is the name the
|
|
12
12
|
// iOS JS wrapper resolves via `TurboModuleRegistry.getEnforcing('SettingsManager')`.
|
|
13
13
|
// The spec filename is `INativeSettingsManager`. Per the symbiote invariant, a
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// TurboModuleRegistry.get('ShareModule') from RN source, but headless fakes resolve any
|
|
9
9
|
// name, so it is only proven on a real Android host (a bridgeless resolution log there).
|
|
10
10
|
// See .docs/native-module-platform-routing.md, ADR 0012.
|
|
11
|
-
import { dlog } from '../debug';
|
|
12
|
-
import { getNativeModule } from '../native-modules';
|
|
13
|
-
import { validateContent, shareActions, SHARED_ACTION, DISMISSED_ACTION } from './shared';
|
|
11
|
+
import { dlog } from '../debug.js';
|
|
12
|
+
import { getNativeModule } from '../native-modules.js';
|
|
13
|
+
import { validateContent, shareActions, SHARED_ACTION, DISMISSED_ACTION } from './shared.js';
|
|
14
14
|
const SHARE_MODULE = 'ShareModule';
|
|
15
15
|
// ShareModule.share resolves an untyped value at the native boundary; narrow it before
|
|
16
16
|
// reading `action` (no `as`).
|
package/build/share/index.ios.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// options onto the native share options, and resolve the IShareAction from the success
|
|
5
5
|
// callback. Metro picks this file on an iOS host; the base share.ts re-exports it for
|
|
6
6
|
// web/headless. See ADR 0019.
|
|
7
|
-
import { dlog } from '../debug';
|
|
8
|
-
import { getNativeModule } from '../native-modules';
|
|
9
|
-
import { validateContent, shareActions, SHARED_ACTION, DISMISSED_ACTION } from './shared';
|
|
7
|
+
import { dlog } from '../debug.js';
|
|
8
|
+
import { getNativeModule } from '../native-modules.js';
|
|
9
|
+
import { validateContent, shareActions, SHARED_ACTION, DISMISSED_ACTION } from './shared.js';
|
|
10
10
|
const ACTION_SHEET_MANAGER = 'ActionSheetManager';
|
|
11
11
|
export const Share = {
|
|
12
12
|
...shareActions,
|
package/build/share/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// iOS/Android host; off those, the iOS build is the fallback (its ActionSheetManager
|
|
4
4
|
// resolves null elsewhere → graceful reject). The barrel imports './share', which
|
|
5
5
|
// resolves here under tsc/tsx and to the platform file under Metro. See ADR 0019.
|
|
6
|
-
export * from './index.ios';
|
|
6
|
+
export * from './index.ios.js';
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
// replace. Now that render.ts installs RN$stopSurface and tears surfaces down cleanly, the
|
|
11
11
|
// relayout survives and the bar updates without blanking (verified on device: show/hide +
|
|
12
12
|
// light/dark text). See render.ts installStopSurfaceGlobal + native-module-platform-routing.
|
|
13
|
-
import { getNativeModule } from '../native-modules';
|
|
14
|
-
import { processColor } from '../commit';
|
|
15
|
-
import { dlog } from '../debug';
|
|
16
|
-
import { STATUS_BAR_MANAGER } from './shared';
|
|
13
|
+
import { getNativeModule } from '../native-modules.js';
|
|
14
|
+
import { processColor } from '../commit.js';
|
|
15
|
+
import { dlog } from '../debug.js';
|
|
16
|
+
import { STATUS_BAR_MANAGER } from './shared.js';
|
|
17
17
|
// processColor returns `unknown` (its result is platform-dependent); narrow to the
|
|
18
18
|
// number Fabric/native expects, like RN's invariant before setColor. A non-number
|
|
19
19
|
// (null for an unparseable color, headless identity passthrough of a string) is dropped.
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
// boundary getNativeModule<T> resolves against. Metro picks this on an iOS host; the base
|
|
10
10
|
// status-bar.ts re-exports it for tsc / tsx / headless. Each adapter wraps these with its own
|
|
11
11
|
// declarative component.
|
|
12
|
-
import { getNativeModule } from '../native-modules';
|
|
13
|
-
import { dlog } from '../debug';
|
|
14
|
-
import { STATUS_BAR_MANAGER, STATIC_HIDE_TRANSITION, hideTransition, } from './shared';
|
|
12
|
+
import { getNativeModule } from '../native-modules.js';
|
|
13
|
+
import { dlog } from '../debug.js';
|
|
14
|
+
import { STATUS_BAR_MANAGER, STATIC_HIDE_TRANSITION, hideTransition, } from './shared.js';
|
|
15
15
|
// Apply a StatusBar component's props to the native module. The adapter calls this from its
|
|
16
16
|
// declarative component's effect, on mount and on every prop change. Resolves lazily inside
|
|
17
17
|
// the call, not at import; keeps this module importable headless before a fake
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Base / default StatusBar engine surface; re-exports the iOS build. Metro overrides this
|
|
2
2
|
// with status-bar.ios.ts / .android.ts on a real host; under tsx / tsc / web the host config
|
|
3
3
|
// resolves here. Filename is the selector, no Platform.OS read. See status-bar-shared.ts.
|
|
4
|
-
export * from './index.ios';
|
|
4
|
+
export * from './index.ios.js';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// array, `compose` picks/pairs two styles, plus the `hairlineWidth` / `absoluteFill`
|
|
5
5
|
// constants. The typed ViewStyle/TextStyle live next door in styles.ts, so `create`
|
|
6
6
|
// is typed against them like RN's, not left generic over a plain Record.
|
|
7
|
-
import { dlog } from '../debug';
|
|
8
|
-
import { getNativeModule } from '../native-modules';
|
|
9
|
-
import { flattenStyle } from '../style';
|
|
7
|
+
import { dlog } from '../debug.js';
|
|
8
|
+
import { getNativeModule } from '../native-modules.js';
|
|
9
|
+
import { flattenStyle } from '../style/index.js';
|
|
10
10
|
// RN's hairline factor: a "1 physical pixel" line is ~0.4 logical px, rounded to the
|
|
11
11
|
// nearest device pixel. Named so the 0.4 isn't a bare magic number (RN source uses
|
|
12
12
|
// the same literal in PixelRatio.roundToNearestPixel(0.4)).
|
package/build/surface.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// A surface is one mounted root: it owns the rootTag handed down by the native
|
|
2
2
|
// Fabric host and the list of top-level retained nodes. Adapters mutate it and
|
|
3
3
|
// ask it to commit; the surface coalesces commits and drives the engine.
|
|
4
|
-
import { commitChildren } from './commit';
|
|
5
|
-
import { dlog } from './debug';
|
|
6
|
-
import { installEventHandler } from './events';
|
|
4
|
+
import { commitChildren } from './commit.js';
|
|
5
|
+
import { dlog } from './debug.js';
|
|
6
|
+
import { installEventHandler } from './events/index.js';
|
|
7
7
|
export class SymbioteSurface {
|
|
8
8
|
rootTag;
|
|
9
9
|
children = [];
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// JS-side because native exposes no focus getter. TextInput reports focus/blur here so
|
|
3
3
|
// Keyboard.dismiss can blur whatever holds focus without a ref, exactly how RN's
|
|
4
4
|
// dismissKeyboard() works (blurTextInput(currentlyFocusedInput())).
|
|
5
|
-
import { dispatchViewCommand } from './commit';
|
|
6
|
-
import { dlog } from './debug';
|
|
5
|
+
import { dispatchViewCommand } from './commit.js';
|
|
6
|
+
import { dlog } from './debug.js';
|
|
7
7
|
let currentlyFocused = null;
|
|
8
8
|
// The input that last reported focus and hasn't reported blur, or null.
|
|
9
9
|
export function currentlyFocusedInput() {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
// show(message: string, duration: number)
|
|
14
14
|
// showWithGravity(message: string, duration: number, gravity: number)
|
|
15
15
|
// showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset)
|
|
16
|
-
import { dlog } from '../debug';
|
|
17
|
-
import { getNativeModule } from '../native-modules';
|
|
16
|
+
import { dlog } from '../debug.js';
|
|
17
|
+
import { getNativeModule } from '../native-modules.js';
|
|
18
18
|
// The native module name RN registers this under. NOTE: this is the name the spec
|
|
19
19
|
// resolves via `TurboModuleRegistry.getEnforcing<Spec>('ToastAndroid')`, NOT the
|
|
20
20
|
// spec filename `INativeToastAndroid`. Per the symbiote invariant, a module name is
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// confirmed from RN source but not yet exercised on a real Android host: only a
|
|
8
8
|
// bridgeless resolution log there can prove the name. See
|
|
9
9
|
// .docs/native-module-platform-routing.md.
|
|
10
|
-
import { createVibration } from './shared';
|
|
10
|
+
import { createVibration } from './shared.js';
|
|
11
11
|
// RN encodes "do not repeat" as -1 and "repeat from start" as 0 in vibrateByPattern.
|
|
12
12
|
const REPEAT_NONE = -1;
|
|
13
13
|
const REPEAT_FROM_START = 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Everything else (the single-number buzz, cancel, the module resolver) is the shared
|
|
4
4
|
// core. Metro picks this file on an iOS host; the base vibration.ts re-exports it for
|
|
5
5
|
// web/headless.
|
|
6
|
-
import { createVibration, DEFAULT_VIBRATION_LENGTH } from './shared';
|
|
6
|
+
import { createVibration, DEFAULT_VIBRATION_LENGTH } from './shared.js';
|
|
7
7
|
// JS scheduler state, mirroring RN's _vibrating / _id. `scheduleId` guards against a
|
|
8
8
|
// stale timer from a previous run firing into a new one.
|
|
9
9
|
let vibrating = false;
|
package/build/vibration/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// real iOS/Android host; off those, the iOS build is the fallback (its Vibration module
|
|
4
4
|
// resolves null elsewhere → graceful no-op). The barrel imports './vibration', which
|
|
5
5
|
// resolves here under tsc/tsx and to the platform file under Metro. See ADR 0019.
|
|
6
|
-
export * from './index.ios';
|
|
6
|
+
export * from './index.ios.js';
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// the base vibration.ts re-exports the iOS build for web/headless. There is no runtime
|
|
17
17
|
// `Platform.OS` read; the filename is the selector. See ADR 0019. No Fabric view,
|
|
18
18
|
// pure JS->native.
|
|
19
|
-
import { dlog } from '../debug';
|
|
20
|
-
import { getNativeModule } from '../native-modules';
|
|
19
|
+
import { dlog } from '../debug.js';
|
|
20
|
+
import { getNativeModule } from '../native-modules.js';
|
|
21
21
|
const VIBRATION_MODULE = 'Vibration';
|
|
22
22
|
// RN's _default_vibration_length: the single-buzz duration when no pattern is given,
|
|
23
23
|
// and the per-segment buzz length the iOS scheduler emits between waits.
|
package/build/view-config.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// reaches Fabric). Structural adapters (Svelte `addEventListener`, Angular
|
|
12
12
|
// `Renderer2.listen`) deliver events pre-separated and call `setEventListener`
|
|
13
13
|
// directly, bypassing this entirely.
|
|
14
|
-
import { isRegisteredEvent } from './registry';
|
|
14
|
+
import { isRegisteredEvent } from './registry.js';
|
|
15
15
|
// Accessibility events from RN's base ViewConfig: every view can emit them.
|
|
16
16
|
// accessibilityAction fires on iOS + Android; the other three are iOS-only and inert
|
|
17
17
|
// on Android (no native producer), exactly like `scrollToTop` below.
|