@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.
Files changed (80) hide show
  1. package/README.md +10 -0
  2. package/build/accessibility-info/index.android.js +6 -6
  3. package/build/accessibility-info/index.ios.js +6 -6
  4. package/build/accessibility-info/index.js +1 -1
  5. package/build/action-sheet-ios/index.js +2 -2
  6. package/build/alert/index.android.js +3 -3
  7. package/build/alert/index.ios.js +2 -2
  8. package/build/alert/index.js +2 -2
  9. package/build/animated/animated-component-shared.js +2 -2
  10. package/build/animated/animations/base.js +3 -3
  11. package/build/animated/animations/composition.js +8 -8
  12. package/build/animated/animations/decay.js +3 -3
  13. package/build/animated/animations/spring.js +4 -4
  14. package/build/animated/animations/timing.js +4 -4
  15. package/build/animated/animations/tracking.js +1 -1
  16. package/build/animated/color.js +2 -2
  17. package/build/animated/easing.js +1 -1
  18. package/build/animated/event.js +5 -5
  19. package/build/animated/graph.js +1 -1
  20. package/build/animated/index.js +19 -19
  21. package/build/animated/interpolation-node.js +2 -2
  22. package/build/animated/interpolation.js +2 -2
  23. package/build/animated/mock.js +8 -8
  24. package/build/animated/native/native-animated.js +3 -3
  25. package/build/animated/operators.js +4 -4
  26. package/build/animated/props.js +6 -6
  27. package/build/animated/style.js +2 -2
  28. package/build/animated/value-xy.js +1 -1
  29. package/build/animated/value.js +3 -3
  30. package/build/app-registry/index.js +2 -2
  31. package/build/app-state/index.js +3 -3
  32. package/build/appearance/index.js +3 -3
  33. package/build/back-handler/index.js +3 -3
  34. package/build/commit.js +15 -15
  35. package/build/dimensions/index.js +3 -3
  36. package/build/events/index.js +5 -5
  37. package/build/fabric.js +1 -1
  38. package/build/host-instance/index.js +3 -3
  39. package/build/i18n-manager/index.js +2 -2
  40. package/build/index.js +47 -47
  41. package/build/interaction-manager/index.js +1 -1
  42. package/build/keyboard/index.js +5 -5
  43. package/build/layout-animation/index.js +2 -2
  44. package/build/linking/index.android.js +1 -1
  45. package/build/linking/index.ios.js +1 -1
  46. package/build/linking/index.js +1 -1
  47. package/build/linking/shared.js +3 -3
  48. package/build/native-events.js +2 -2
  49. package/build/native-modules.js +1 -1
  50. package/build/node.js +2 -2
  51. package/build/pan-responder/index.js +1 -1
  52. package/build/permissions-android/index.js +2 -2
  53. package/build/pixel-ratio/index.js +1 -1
  54. package/build/platform/index.android.js +1 -1
  55. package/build/platform/index.ios.js +1 -1
  56. package/build/platform/index.js +1 -1
  57. package/build/platform/shared.js +2 -2
  58. package/build/process-aspect-ratio.js +1 -1
  59. package/build/process-background-image/index.js +3 -3
  60. package/build/process-box-shadow/index.js +3 -3
  61. package/build/process-filter.js +3 -3
  62. package/build/process-transform/index.js +1 -1
  63. package/build/process-transform-origin/index.js +1 -1
  64. package/build/settings/index.js +3 -3
  65. package/build/share/index.android.js +3 -3
  66. package/build/share/index.ios.js +3 -3
  67. package/build/share/index.js +1 -1
  68. package/build/status-bar/index.android.js +4 -4
  69. package/build/status-bar/index.ios.js +3 -3
  70. package/build/status-bar/index.js +1 -1
  71. package/build/style-sheet/index.js +3 -3
  72. package/build/surface.js +3 -3
  73. package/build/text-input-state.js +2 -2
  74. package/build/toast-android/index.js +2 -2
  75. package/build/vibration/index.android.js +1 -1
  76. package/build/vibration/index.ios.js +1 -1
  77. package/build/vibration/index.js +1 -1
  78. package/build/vibration/shared.js +2 -2
  79. package/build/view-config.js +1 -1
  80. package/package.json +2 -2
package/README.md CHANGED
@@ -30,6 +30,16 @@ dance Fabric requires, done **once**, for every framework.
30
30
  The mutation API below is intentionally low-level and closely mirrors Fabric's own persistent
31
31
  semantics — it is an internal seam, not an app-facing API.
32
32
 
33
+ ### Install
34
+
35
+ Most apps get this transitively, through an adapter (`@symbiote-native/react`,
36
+ `@symbiote-native/vue`, `@symbiote-native/angular` all depend on it). Writing or debugging an
37
+ adapter yourself:
38
+
39
+ ```bash
40
+ npm install @symbiote-native/engine
41
+ ```
42
+
33
43
  ---
34
44
 
35
45
  ## The mutation API — `core/engine/src/node.ts`
@@ -6,12 +6,12 @@
6
6
  // device-event NAMES also differ from iOS (e.g. screen-reader is `touchExplorationDidChange`,
7
7
  // reduce-motion is `reduceMotionDidChange`). Metro picks this on an Android host. Mirrors
8
8
  // RN's AccessibilityInfo.js Android branches.
9
- import { getNativeModule } from '../native-modules';
10
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
11
- import { isSymbioteNode } from '../node';
12
- import { sendAccessibilityEvent as sharedSendAccessibilityEvent } from '../commit';
13
- import { dlog } from '../debug';
14
- import { isBoolean, } from './shared';
9
+ import { getNativeModule } from '../native-modules.js';
10
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
11
+ import { isSymbioteNode } from '../node.js';
12
+ import { sendAccessibilityEvent as sharedSendAccessibilityEvent } from '../commit.js';
13
+ import { dlog } from '../debug.js';
14
+ import { isBoolean, } from './shared.js';
15
15
  // The Android native module name. This is the module the Android JS wrapper
16
16
  // (INativeAccessibilityInfoAndroid) resolves: the stock RN `AccessibilityInfo` Turbo/legacy
17
17
  // module. Per the symbiote invariant, a module name is only provable on a real host (a
@@ -6,12 +6,12 @@
6
6
  // NativeEventEmitter and re-broadcasts to JS listeners. Metro picks this on an iOS host;
7
7
  // the bare accessibility-info.ts re-exports it as the default for tsc / tsx / headless.
8
8
  // Mirrors RN's AccessibilityInfo.js iOS branches.
9
- import { getNativeModule } from '../native-modules';
10
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
11
- import { isSymbioteNode } from '../node';
12
- import { sendAccessibilityEvent as sharedSendAccessibilityEvent } from '../commit';
13
- import { dlog } from '../debug';
14
- import { isBoolean, } from './shared';
9
+ import { getNativeModule } from '../native-modules.js';
10
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
11
+ import { isSymbioteNode } from '../node.js';
12
+ import { sendAccessibilityEvent as sharedSendAccessibilityEvent } from '../commit.js';
13
+ import { dlog } from '../debug.js';
14
+ import { isBoolean, } from './shared.js';
15
15
  // The iOS native module name RN registers this under. NOTE: this is the name the iOS JS
16
16
  // wrapper (INativeAccessibilityManagerIOS) resolves via
17
17
  // `TurboModuleRegistry.get('AccessibilityManager')`, NOT the spec filename
@@ -2,4 +2,4 @@
2
2
  // accessibility-info.ios.ts / .android.ts on a real host; under tsx / tsc / web the host
3
3
  // config resolves here. Filename is the selector, no Platform.OS read. See
4
4
  // accessibility-info-shared.ts.
5
- export * from './index.ios';
5
+ export * from './index.ios.js';
@@ -16,8 +16,8 @@
16
16
  // through processColor before handing them to native. symbiote centralizes color
17
17
  // processing in @symbiote-native/engine, so we do NOT process colors here; options pass
18
18
  // through untouched. The canary needs no colors; revisit when wiring real colors.
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 ACTION_SHEET_MANAGER = 'ActionSheetManager';
22
22
  // The static imperative API RN exposes, mirrored as a static-method object.
23
23
  export const ActionSheetIOS = {
@@ -16,9 +16,9 @@
16
16
  // there can prove the name. See .docs/native-module-platform-routing.md.
17
17
  //
18
18
  // Non-throwing, like StatusBar: a missing native module is a no-op, never a crash.
19
- import { dlog } from '../debug';
20
- import { getNativeModule } from '../native-modules';
21
- import { DEFAULT_POSITIVE_TEXT, normalizeButtons, } from './shared';
19
+ import { dlog } from '../debug.js';
20
+ import { getNativeModule } from '../native-modules.js';
21
+ import { DEFAULT_POSITIVE_TEXT, normalizeButtons, } from './shared.js';
22
22
  const DIALOG_MANAGER = 'DialogManagerAndroid';
23
23
  // RN's hardwired Android fallbacks for the button-key constants (NativeDialogManager-
24
24
  // Android documents buttonPositive=-1, buttonNegative=-2, buttonNeutral=-3, and the
@@ -11,8 +11,8 @@
11
11
  //
12
12
  // Non-throwing, like StatusBar: a missing native module is a no-op, never a crash (on a
13
13
  // device the module may be absent).
14
- import { dlog } from '../debug';
15
- import { getNativeModule } from '../native-modules';
14
+ import { dlog } from '../debug.js';
15
+ import { getNativeModule } from '../native-modules.js';
16
16
  const ALERT_MANAGER = 'AlertManager';
17
17
  // prompt builds the native args, assigns each button its array index as id, and dispatches
18
18
  // the matching button's onPress when the native callback returns that id. Non-throwing: no
@@ -4,5 +4,5 @@
4
4
  // → graceful no-op). The barrel imports './alert', which resolves here under tsc/tsx and to
5
5
  // the platform file under Metro. The `export *` re-exports the public type names
6
6
  // (AlertType, AlertButtonStyle, AlertButton, AlertButtons, AlertOptions) so the barrel's
7
- // `export type { ... } from '../alert'` still resolves. See ADR 0019.
8
- export * from './index.ios';
7
+ // `export type { ... } from '../alert/index.js'` still resolves. See ADR 0019.
8
+ export * from './index.ios.js';
@@ -5,8 +5,8 @@
5
5
  // identical across frameworks. Only `assignRef` is framework-ref-specific and stays
6
6
  // per-adapter; everything here is shared. Extracted from the React wrapper (ADR
7
7
  // 0016/0017) so a new adapter reuses it verbatim.
8
- import { AnimatedNode } from './graph';
9
- import { AnimatedStyle } from './style';
8
+ import { AnimatedNode } from './graph.js';
9
+ import { AnimatedStyle } from './style.js';
10
10
  export function isAnimatedNode(value) {
11
11
  return value instanceof AnimatedNode;
12
12
  }
@@ -8,9 +8,9 @@
8
8
  // owns its own requestAnimationFrame loop. They are declared as methods (not
9
9
  // class fields) so a subclass override is not shadowed under
10
10
  // useDefineForClassFields.
11
- import { flushValue } from '../graph';
12
- import { dlog, isDebug } from '../../debug';
13
- import { generateNativeAnimationId, isNativeAnimatedAvailable, nativeAnimated, } from '../native/native-animated';
11
+ import { flushValue } from '../graph.js';
12
+ import { dlog, isDebug } from '../../debug.js';
13
+ import { generateNativeAnimationId, isNativeAnimatedAvailable, nativeAnimated, } from '../native/native-animated.js';
14
14
  export class BaseAnimation {
15
15
  // `protected` so subclasses read it inside their rAF loop to decide whether to
16
16
  // schedule the next frame; cleared by stop().
@@ -4,14 +4,14 @@
4
4
  // CompositeAnimation; `parallel` / `sequence` / `stagger` / `loop` / `delay`
5
5
  // orchestrate those. Vector (XY/Color) handling, tracking, AnimatedEvent and
6
6
  // every native-loop branch are dropped.
7
- import { dlog } from '../../debug';
8
- import { isNativeAnimatedAvailable } from '../native/native-animated';
9
- import { AnimatedNode } from '../graph';
10
- import { AnimatedValue } from '../value';
11
- import { AnimatedTracking } from './tracking';
12
- import { TimingAnimation } from './timing';
13
- import { SpringAnimation } from './spring';
14
- import { DecayAnimation } from './decay';
7
+ import { dlog } from '../../debug.js';
8
+ import { isNativeAnimatedAvailable } from '../native/native-animated.js';
9
+ import { AnimatedNode } from '../graph.js';
10
+ import { AnimatedValue } from '../value.js';
11
+ import { AnimatedTracking } from './tracking.js';
12
+ import { TimingAnimation } from './timing.js';
13
+ import { SpringAnimation } from './spring.js';
14
+ import { DecayAnimation } from './decay.js';
15
15
  // A loop offloads to native only when the driver was asked for the native path AND
16
16
  // the module is present; otherwise the JS-restart loop must run (a JS timing runs
17
17
  // once, it does not loop itself).
@@ -2,9 +2,9 @@
2
2
  // (ADR 0016). Models momentum bleeding off under friction: an initial velocity
3
3
  // decays exponentially toward a resting value. Ends when consecutive frames
4
4
  // move less than 0.1.
5
- import { dlog } from '../../debug';
6
- import { BaseAnimation } from './base';
7
- import { cancelFrame, requestFrame } from './raf';
5
+ import { dlog } from '../../debug.js';
6
+ import { BaseAnimation } from './base.js';
7
+ import { cancelFrame, requestFrame } from './raf.js';
8
8
  export class DecayAnimation extends BaseAnimation {
9
9
  startTime = 0;
10
10
  lastValue = 0;
@@ -4,10 +4,10 @@
4
4
  // thresholds. A spring chained after a previous spring inherits its
5
5
  // position/velocity/time (getInternalState) so retargeting mid-flight stays
6
6
  // continuous. The native-config export is dropped.
7
- import { dlog } from '../../debug';
8
- import { BaseAnimation } from './base';
9
- import { cancelFrame, clearTimer, requestFrame, setTimer } from './raf';
10
- import { fromBouncinessAndSpeed, fromOrigamiTensionAndFriction } from './spring-config';
7
+ import { dlog } from '../../debug.js';
8
+ import { BaseAnimation } from './base.js';
9
+ import { cancelFrame, clearTimer, requestFrame, setTimer } from './raf.js';
10
+ import { fromBouncinessAndSpeed, fromOrigamiTensionAndFriction } from './spring-config.js';
11
11
  function resolveStiffnessDampingMass(config) {
12
12
  if (config.stiffness !== undefined || config.damping !== undefined || config.mass !== undefined) {
13
13
  return {
@@ -2,10 +2,10 @@
2
2
  // only (ADR 0016). Walks a value from `fromValue` to `toValue` over `duration`
3
3
  // ms, shaping progress through an easing function. The native-frame export and
4
4
  // __startAnimationIfNative branch are dropped.
5
- import { Easing } from '../easing';
6
- import { dlog } from '../../debug';
7
- import { BaseAnimation } from './base';
8
- import { cancelFrame, clearTimer, requestFrame, setTimer } from './raf';
5
+ import { Easing } from '../easing.js';
6
+ import { dlog } from '../../debug.js';
7
+ import { BaseAnimation } from './base.js';
8
+ import { cancelFrame, clearTimer, requestFrame, setTimer } from './raf.js';
9
9
  let cachedEaseInOut;
10
10
  function easeInOut() {
11
11
  if (cachedEaseInOut === undefined) {
@@ -4,7 +4,7 @@
4
4
  // target changes, re-launches the animation toward the target's new value, so the
5
5
  // value chases the target continuously (a spring following a gesture). Ported from
6
6
  // RN's AnimatedTracking.js, JS path; native tracking re-uses the per-launch driver.
7
- import { AnimatedNode } from '../graph';
7
+ import { AnimatedNode } from '../graph.js';
8
8
  export class AnimatedTracking extends AnimatedNode {
9
9
  value;
10
10
  parent;
@@ -4,8 +4,8 @@
4
4
  // AnimatedColor.js: the {r,g,b,a} and CSS-color input forms are supported; named
5
5
  // colors and platform (Native) colors are deferred (they need RN's full
6
6
  // normalizeColor / processColorObject, which live outside shared).
7
- import { AnimatedWithChildren, flushValue } from './graph';
8
- import { AnimatedValue } from './value';
7
+ import { AnimatedWithChildren, flushValue } from './graph.js';
8
+ import { AnimatedValue } from './value.js';
9
9
  const DEFAULT_COLOR = { r: 0, g: 0, b: 0, a: 1 };
10
10
  function isRgbaInput(value) {
11
11
  return typeof value === 'object' && value !== null && 'r' in value && 'g' in value;
@@ -1,7 +1,7 @@
1
1
  // Common easing functions, ported from React Native's Libraries/Animated/Easing.js.
2
2
  // Pure math (the only dependency is the equally-pure bezier solver), so it lives
3
3
  // unchanged in shared and every adapter re-exports it.
4
- import { bezier } from './bezier';
4
+ import { bezier } from './bezier.js';
5
5
  let cachedEase;
6
6
  export const Easing = {
7
7
  // A stepping function: 1 for any positive n, else 0.
@@ -13,11 +13,11 @@
13
13
  // - Native path: __attach(viewTag, eventName) mirrors each leaf value into native
14
14
  // and registers the key path with the stock native module, so the event drives
15
15
  // the view with zero JS per event.
16
- import { dlog } from '../debug';
17
- import { getNativeTag, whenCommitted } from '../commit';
18
- import { isSymbioteNode } from '../node';
19
- import { AnimatedNode, flushValue } from './graph';
20
- import { isNativeAnimatedAvailable, nativeAnimated } from './native/native-animated';
16
+ import { dlog } from '../debug.js';
17
+ import { getNativeTag, whenCommitted } from '../commit.js';
18
+ import { isSymbioteNode } from '../node.js';
19
+ import { AnimatedNode, flushValue } from './graph.js';
20
+ import { isNativeAnimatedAvailable, nativeAnimated } from './native/native-animated.js';
21
21
  function isRecord(value) {
22
22
  return typeof value === 'object' && value !== null;
23
23
  }
@@ -10,7 +10,7 @@
10
10
  // ones with an `update()` method) and flag them.
11
11
  // B) bottom-up: each flagged leaf re-pulls its whole subtree via __getValue()
12
12
  // to rebuild composite props (e.g. transform from many parents).
13
- import { generateNativeNodeTag, nativeAnimated, } from './native/native-animated';
13
+ import { generateNativeNodeTag, nativeAnimated, } from './native/native-animated.js';
14
14
  let nextListenerId = 1;
15
15
  // Depth of the currently-active withSuspendedCallbacks blocks. While > 0, a
16
16
  // composite setter (AnimatedColor.setValue) is driving several channels in a row;
@@ -1,28 +1,28 @@
1
1
  // @symbiote-native/engine/animated: the framework-agnostic, JS-driven Animated engine
2
2
  // (ADR 0016). The value graph, easing, interpolation and (Phase 2) drivers are
3
3
  // pure JS with no React and no native dependency; every adapter re-exports them.
4
- export { AnimatedNode, AnimatedWithChildren, flushValue } from './graph';
5
- export { AnimatedValue } from './value';
6
- export { AnimatedValueXY } from './value-xy';
7
- export { AnimatedInterpolation } from './interpolation-node';
8
- export { AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, add, subtract, multiply, divide, modulo, diffClamp, } from './operators';
9
- export { AnimatedEvent, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, } from './event';
10
- export { AnimatedColor } from './color';
11
- export { Easing } from './easing';
12
- export { createNumericInterpolation, createInterpolation, checkValidRanges, } from './interpolation';
13
- export { TimingAnimation } from './animations/timing';
14
- export { SpringAnimation } from './animations/spring';
15
- export { DecayAnimation } from './animations/decay';
16
- export { AnimatedTracking } from './animations/tracking';
17
- export { timing, spring, decay, parallel, sequence, stagger, loop, delay, } from './animations/composition';
4
+ export { AnimatedNode, AnimatedWithChildren, flushValue } from './graph.js';
5
+ export { AnimatedValue } from './value.js';
6
+ export { AnimatedValueXY } from './value-xy.js';
7
+ export { AnimatedInterpolation } from './interpolation-node.js';
8
+ export { AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, add, subtract, multiply, divide, modulo, diffClamp, } from './operators.js';
9
+ export { AnimatedEvent, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, } from './event.js';
10
+ export { AnimatedColor } from './color.js';
11
+ export { Easing } from './easing.js';
12
+ export { createNumericInterpolation, createInterpolation, checkValidRanges, } from './interpolation.js';
13
+ export { TimingAnimation } from './animations/timing.js';
14
+ export { SpringAnimation } from './animations/spring.js';
15
+ export { DecayAnimation } from './animations/decay.js';
16
+ export { AnimatedTracking } from './animations/tracking.js';
17
+ export { timing, spring, decay, parallel, sequence, stagger, loop, delay, } from './animations/composition.js';
18
18
  // The native-driver bridge (ADR 0017). Adapters need it to connect a props leaf to
19
19
  // a host view tag and to restore default values on disconnect.
20
- export { nativeAnimated, isNativeAnimatedAvailable, } from './native/native-animated';
20
+ export { nativeAnimated, isNativeAnimatedAvailable, } from './native/native-animated.js';
21
21
  // The pure graph leaves and the mock, framework-agnostic (extend AnimatedWithChildren,
22
22
  // no React/Vue). They live here with the rest of the graph; every adapter's
23
23
  // createAnimatedComponent + Animated namespace re-exports them (ADR 0016/0017).
24
- export { AnimatedProps } from './props';
25
- export { AnimatedStyle, AnimatedTransform } from './style';
26
- export { AnimatedMock } from './mock';
24
+ export { AnimatedProps } from './props.js';
25
+ export { AnimatedStyle, AnimatedTransform } from './style.js';
26
+ export { AnimatedMock } from './mock.js';
27
27
  // Framework-agnostic createAnimatedComponent helpers. Both adapters import them.
28
- export { reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated-component-shared';
28
+ export { reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated-component-shared.js';
@@ -2,8 +2,8 @@
2
2
  // through an interpolation. Ported from RN's AnimatedInterpolation.js: numeric,
3
3
  // string-with-units, and color output ranges (the value graph; native config
4
4
  // removed). Platform (Native) colors stay out of scope, color.ts defers them.
5
- import { AnimatedNode, AnimatedWithChildren } from './graph';
6
- import { checkValidRanges, createInterpolation } from './interpolation';
5
+ import { AnimatedNode, AnimatedWithChildren } from './graph.js';
6
+ import { checkValidRanges, createInterpolation } from './interpolation.js';
7
7
  export class AnimatedInterpolation extends AnimatedWithChildren {
8
8
  parent;
9
9
  config;
@@ -4,8 +4,8 @@
4
4
  // extrapolation. A numeric output range stays number -> number; a string output
5
5
  // range (values-with-units like '0deg' or colors like '#000') is interpolated
6
6
  // per numeric token and reassembled. See createStringInterpolation below.
7
- import { normalizeColor } from './color';
8
- import { Easing } from './easing';
7
+ import { normalizeColor } from './color.js';
8
+ import { Easing } from './easing.js';
9
9
  function interpolateSegment(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight) {
10
10
  let result = input;
11
11
  // Extrapolate below the range.
@@ -6,14 +6,14 @@
6
6
  // users get the resting state without flake. The value graph, operators, easing,
7
7
  // events and createAnimatedComponent are reused verbatim from the live engine.
8
8
  // Only the driver factories (timing/spring/decay) and compositions are mocked.
9
- import { AnimatedValue } from './value';
10
- import { AnimatedValueXY } from './value-xy';
11
- import { AnimatedColor } from './color';
12
- import { AnimatedNode } from './graph';
13
- import { Easing } from './easing';
14
- import { add, subtract, multiply, divide, modulo, diffClamp } from './operators';
15
- import { event, forkEvent, unforkEvent } from './event';
16
- import { dlog } from '../debug';
9
+ import { AnimatedValue } from './value.js';
10
+ import { AnimatedValueXY } from './value-xy.js';
11
+ import { AnimatedColor } from './color.js';
12
+ import { AnimatedNode } from './graph.js';
13
+ import { Easing } from './easing.js';
14
+ import { add, subtract, multiply, divide, modulo, diffClamp } from './operators.js';
15
+ import { event, forkEvent, unforkEvent } from './event.js';
16
+ import { dlog } from '../debug.js';
17
17
  // Prevent a callback invocation from recursively triggering another callback,
18
18
  // which may trigger another animation (RN's AnimatedMock.js:36-60).
19
19
  let inAnimationCallback = false;
@@ -9,9 +9,9 @@
9
9
  // every other native module (getNativeModule), consistent with ADR 0012. The
10
10
  // module is resolved lazily on first use, so importing this file headless (no
11
11
  // native host) is inert until a native-driven animation actually starts.
12
- import { dlog } from '../../debug';
13
- import { getNativeModule } from '../../native-modules';
14
- import { NativeEventEmitter } from '../../native-events';
12
+ import { dlog } from '../../debug.js';
13
+ import { getNativeModule } from '../../native-modules.js';
14
+ import { NativeEventEmitter } from '../../native-events.js';
15
15
  // iOS bridgeless registers the Turbo variant; the legacy name is the fallback.
16
16
  const TURBO_MODULE_NAME = 'NativeAnimatedTurboModule';
17
17
  const LEGACY_MODULE_NAME = 'NativeAnimatedModule';
@@ -8,10 +8,10 @@
8
8
  // separately and wired by registering this node as a child of each input at
9
9
  // __attach (input.__addChild(this)). __getNativeConfig is creation-only: it reads
10
10
  // each input's native tag (creating the input node) but issues no connect.
11
- import { AnimatedNode, AnimatedWithChildren } from './graph';
12
- import { AnimatedValue } from './value';
13
- import { AnimatedInterpolation } from './interpolation-node';
14
- import { dlog } from '../debug';
11
+ import { AnimatedNode, AnimatedWithChildren } from './graph.js';
12
+ import { AnimatedValue } from './value.js';
13
+ import { AnimatedInterpolation } from './interpolation-node.js';
14
+ import { dlog } from '../debug.js';
15
15
  // Wrap a bare number in an AnimatedValue so every input is a graph node.
16
16
  function toNode(input) {
17
17
  return typeof input === 'number' ? new AnimatedValue(input) : input;
@@ -11,12 +11,12 @@
11
11
  // `update` MUST be a method, not a class field: flushValue detects a leaf by reading
12
12
  // a `update` function off the node, and under useDefineForClassFields a field
13
13
  // initialiser would shadow it and break subclassing. (See shared graph.ts leafUpdate.)
14
- import { AnimatedNode, AnimatedWithChildren } from './graph';
15
- import { setNativeProps, getNativeTag } from '../commit';
16
- import { isSymbioteNode } from '../node';
17
- import { registerPostCommit } from '../post-commit';
18
- import { nativeAnimated } from './native/native-animated';
19
- import { AnimatedStyle } from './style';
14
+ import { AnimatedNode, AnimatedWithChildren } from './graph.js';
15
+ import { setNativeProps, getNativeTag } from '../commit.js';
16
+ import { isSymbioteNode } from '../node.js';
17
+ import { registerPostCommit } from '../post-commit.js';
18
+ import { nativeAnimated } from './native/native-animated.js';
19
+ import { AnimatedStyle } from './style.js';
20
20
  function isAnimatedNode(value) {
21
21
  return value instanceof AnimatedNode;
22
22
  }
@@ -4,8 +4,8 @@
4
4
  // config (__makeNative / __getNativeConfig / allowlist) and the web/string/color
5
5
  // branches are stripped (ADR 0016). On __getValue() each node re-pulls its
6
6
  // animated entries into a plain flat object the props leaf hoists onto the view.
7
- import { AnimatedNode, AnimatedWithChildren } from './graph';
8
- import { flattenStyle } from '../style';
7
+ import { AnimatedNode, AnimatedWithChildren } from './graph.js';
8
+ import { flattenStyle } from '../style/index.js';
9
9
  function isAnimatedNode(value) {
10
10
  return value instanceof AnimatedNode;
11
11
  }
@@ -4,7 +4,7 @@
4
4
  // per-axis. Ported from RN's AnimatedValueXY.js with the native-driver and
5
5
  // platform-config branches removed (ADR 0016). The two child values carry their
6
6
  // own native state if they are ever made native.
7
- import { AnimatedValue } from './value';
7
+ import { AnimatedValue } from './value.js';
8
8
  let nextListenerId = 1;
9
9
  function isAnimatedValuePair(value) {
10
10
  return value.x instanceof AnimatedValue && value.y instanceof AnimatedValue;
@@ -3,9 +3,9 @@
3
3
  // animation, or setValue) stops the previous one. Ported from RN's
4
4
  // AnimatedValue.js with the native-driver branches removed (ADR 0016); tracking
5
5
  // (animating toward another animated node) is deferred.
6
- import { AnimatedWithChildren, flushValue } from './graph';
7
- import { AnimatedInterpolation } from './interpolation-node';
8
- import { nativeAnimated, } from './native/native-animated';
6
+ import { AnimatedWithChildren, flushValue } from './graph.js';
7
+ import { AnimatedInterpolation } from './interpolation-node.js';
8
+ import { nativeAnimated, } from './native/native-animated.js';
9
9
  export class AnimatedValue extends AnimatedWithChildren {
10
10
  value;
11
11
  startingValue;
@@ -11,8 +11,8 @@
11
11
  // registrar. Reached the same way shared reaches processColor: a dependency-injected seam
12
12
  // (setHostRegistrar), so the core stays react-native-free and the app glue wires the host once
13
13
  // at startup.
14
- import { getNativeModule } from '../native-modules';
15
- import { dlog } from '../debug';
14
+ import { getNativeModule } from '../native-modules.js';
15
+ import { dlog } from '../debug.js';
16
16
  const HEADLESS_TASK_MODULE = 'HeadlessJsTaskSupport';
17
17
  // Builds one adapter's AppRegistry. `runnableFor` is the sole framework-specific seam: given a
18
18
  // component provider and a getter for the CURRENT wrapper-component provider (read at mount
@@ -5,9 +5,9 @@
5
5
  // NativeEventEmitter bound to the AppState native module and maps them onto the
6
6
  // public 'change'/'memoryWarning'/'focus'/'blur' listeners, mirroring RN's
7
7
  // Libraries/AppState/AppState.js.
8
- import { getNativeModule } from '../native-modules';
9
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
10
- import { dlog } from '../debug';
8
+ import { getNativeModule } from '../native-modules.js';
9
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
10
+ import { dlog } from '../debug.js';
11
11
  // The native module name RN registers AppState under, confirmed from its spec
12
12
  // (specs_DEPRECATED/modules/INativeAppState.js, `TurboModuleRegistry.getEnforcing('AppState')`).
13
13
  const APP_STATE_MODULE = 'AppState';
@@ -4,9 +4,9 @@
4
4
  // native module (which RN keys its appearance events off of) and re-broadcasts to
5
5
  // JS listeners as a plain `{ colorScheme }` payload. Mirrors RN's
6
6
  // Libraries/Utilities/Appearance.js, slimmed to the parts we need.
7
- import { getNativeModule } from '../native-modules';
8
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
9
- import { dlog } from '../debug';
7
+ import { getNativeModule } from '../native-modules.js';
8
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
9
+ import { dlog } from '../debug.js';
10
10
  // The native module name RN registers the appearance module under, confirmed from
11
11
  // its spec (specs_DEPRECATED/modules/INativeAppearance.js, `TurboModuleRegistry.get('Appearance')`).
12
12
  const APPEARANCE_MODULE = 'Appearance';
@@ -6,9 +6,9 @@
6
6
  // Android-only by intent: iOS has no hardware back button, so the whole module
7
7
  // degrades to a no-op when the native module is absent, matching RN's
8
8
  // BackHandler.ios.js stub. Mirrors RN's Libraries/Utilities/BackHandler.android.js.
9
- import { getNativeModule } from '../native-modules';
10
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
11
- import { dlog } from '../debug';
9
+ import { getNativeModule } from '../native-modules.js';
10
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
11
+ import { dlog } from '../debug.js';
12
12
  // The native module name RN registers this under. NOTE: this is the name the
13
13
  // INativeDeviceEventManager spec resolves via
14
14
  // `TurboModuleRegistry.get('DeviceEventManager')`, NOT the spec filename
package/build/commit.js CHANGED
@@ -12,21 +12,21 @@
12
12
  // forces each ancestor to re-clone too, because a persistent parent holds
13
13
  // references to specific child handles. That bubble is inherent to a persistent
14
14
  // tree and is exactly what React's own Fabric renderer does.
15
- import { getSlot, } from './fabric';
16
- import { createElement, isAnchor, RAW_TEXT_COMPONENT, VIRTUAL_TEXT_COMPONENT, } from './node';
17
- import { dlog, isDebug } from './debug';
18
- import { flattenStyle } from './style';
19
- import { registeredProcessor } from './registry';
20
- import { nextTag } from './tags';
21
- import { isOpaqueColorValue } from './platform-color';
22
- import { processBoxShadow } from './process-box-shadow';
23
- import { registerPostCommit, runPostCommitHooks } from './post-commit';
24
- import { processFilter } from './process-filter';
25
- import { processTransformOrigin } from './process-transform-origin';
26
- import { processTransform } from './process-transform';
27
- import { processAspectRatio } from './process-aspect-ratio';
28
- import { processFontVariant } from './process-font-variant';
29
- import { processBackgroundImage } from './process-background-image';
15
+ import { getSlot, } from './fabric.js';
16
+ import { createElement, isAnchor, RAW_TEXT_COMPONENT, VIRTUAL_TEXT_COMPONENT, } from './node.js';
17
+ import { dlog, isDebug } from './debug.js';
18
+ import { flattenStyle } from './style/index.js';
19
+ import { registeredProcessor } from './registry.js';
20
+ import { nextTag } from './tags.js';
21
+ import { isOpaqueColorValue } from './platform-color.js';
22
+ import { processBoxShadow } from './process-box-shadow/index.js';
23
+ import { registerPostCommit, runPostCommitHooks } from './post-commit.js';
24
+ import { processFilter } from './process-filter.js';
25
+ import { processTransformOrigin } from './process-transform-origin/index.js';
26
+ import { processTransform } from './process-transform/index.js';
27
+ import { processAspectRatio } from './process-aspect-ratio.js';
28
+ import { processFontVariant } from './process-font-variant.js';
29
+ import { processBackgroundImage } from './process-background-image/index.js';
30
30
  // Per-commit work counters, surfaced via dlog so a device run can prove the
31
31
  // engine is incremental (created=0 with clones after the first mount).
32
32
  const stats = { created: 0, cloneProps: 0, cloneChildren: 0, reused: 0 };
@@ -12,9 +12,9 @@
12
12
  // We resolve it through the same generic native-module bridge as Platform
13
13
  // (getNativeModule), so this module stays importable headless before a fake proxy
14
14
  // is installed.
15
- import { getNativeModule } from '../native-modules';
16
- import { installDeviceEventHub, NativeEventEmitter, } from '../native-events';
17
- import { dlog } from '../debug';
15
+ import { getNativeModule } from '../native-modules.js';
16
+ import { installDeviceEventHub, NativeEventEmitter, } from '../native-events.js';
17
+ import { dlog } from '../debug.js';
18
18
  // The native module name RN registers device metrics under.
19
19
  const DEVICE_INFO_MODULE = 'DeviceInfo';
20
20
  // The device event native emits when metrics change; its payload is a fresh
@@ -5,11 +5,11 @@
5
5
  // node it started on (or a descendant). Bubbling events walk target -> root,
6
6
  // invoking each ancestor's listener until one calls stopPropagation. Layout is a
7
7
  // direct event in RN and is delivered only to its own target.
8
- import { dlog } from '../debug';
9
- import { runWrapped } from '../dispatch';
10
- import { getSlot } from '../fabric';
11
- import { isAnchor, isSymbioteNode } from '../node';
12
- import { registeredNativeEvent } from '../registry';
8
+ import { dlog } from '../debug.js';
9
+ import { runWrapped } from '../dispatch.js';
10
+ import { getSlot } from '../fabric.js';
11
+ import { isAnchor, isSymbioteNode } from '../node.js';
12
+ import { registeredNativeEvent } from '../registry.js';
13
13
  // Raw Fabric event name -> listener name. Generic bubbling events live here; press
14
14
  // is synthesized from a touch sequence and layout is direct, so both are handled
15
15
  // outside this table.
package/build/fabric.js CHANGED
@@ -4,7 +4,7 @@
4
4
  //
5
5
  // The live object is a lazy caching proxy: every property access mints a fresh
6
6
  // host function, so we read each method once and cache a plain facade.
7
- import { dlog } from './debug';
7
+ import { dlog } from './debug.js';
8
8
  let cached;
9
9
  export function getSlot() {
10
10
  if (cached)
@@ -8,9 +8,9 @@
8
8
  // This lives in the engine, not an adapter: it depends only on engine internals (the commit
9
9
  // free functions + the retained node), so every adapter inherits the SAME public instance for
10
10
  // free — React's getPublicInstance and the Vue renderer both graft this onto their host nodes.
11
- import { measure as engineMeasure, measureInWindow as engineMeasureInWindow, measureLayout as engineMeasureLayout, setNativeProps as engineSetNativeProps, dispatchViewCommand, } from '../commit';
12
- import { isSymbioteNode } from '../node';
13
- import { dlog } from '../debug';
11
+ import { measure as engineMeasure, measureInWindow as engineMeasureInWindow, measureLayout as engineMeasureLayout, setNativeProps as engineSetNativeProps, dispatchViewCommand, } from '../commit.js';
12
+ import { isSymbioteNode } from '../node.js';
13
+ import { dlog } from '../debug.js';
14
14
  const FOCUS_COMMAND = 'focus';
15
15
  const BLUR_COMMAND = 'blur';
16
16
  function isHostInstance(node) {