Skip to content

Commit

Permalink
Fis issues after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiPl01 committed Aug 26, 2024
1 parent dd2c6de commit 8986ccb
Show file tree
Hide file tree
Showing 27 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/react-native-reanimated/src/Bezier.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import { ReanimatedError } from './errors';

/**
* https://github.com/gre/bezier-easing
* BezierEasing - use bezier curve for transition easing function
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/ConfigHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
import { PropsAllowlists } from './propsAllowlists';
import { jsiConfigureProps } from './core';
import { ReanimatedError } from './errors';

function assertNoOverlapInLists() {
for (const key in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type React from 'react';
import { getShadowNodeWrapperFromRef } from '../fabricUtils';
import type { LayoutAnimationBatchItem } from '../layoutReanimation/animationBuilder/commonTypes';
import ReanimatedModule from '../specs/NativeReanimatedModule';
import { ReanimatedError } from '../errors';

// this is the type of `__reanimatedModuleProxy` which is injected using JSI
export interface NativeReanimatedModule {
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/PropsRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
import { ReanimatedError } from './errors';
import { isFabric } from './PlatformChecker';
import { runOnUI } from './threads';

Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/UpdateProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { ReanimatedHTMLElement } from './js-reanimated';
import { _updatePropsJS } from './js-reanimated';
import { isFabric, isJest, shouldBeUseWeb } from './PlatformChecker';
import { runOnUIImmediately } from './threads';
import { ReanimatedError } from './errors';

let updateProps: (
viewDescriptor: SharedValue<Descriptor[]>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
InnerDecayAnimation,
} from './utils';
import { rigidDecay } from './rigidDecay';
import { ReanimatedError } from '../../errors';

export type WithDecayConfig = DecayConfig;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import { ReanimatedError } from '../../errors';

type FixedLengthArray<
T,
L extends number,
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/animation/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { shouldBeUseWeb } from '../PlatformChecker';
import type { EasingFunctionFactory } from '../Easing';
import { ReducedMotionManager } from '../ReducedMotion';
import { logger } from '../logger';
import { ReanimatedError } from '../errors';

let IN_STYLE_UPDATER = false;
const SHOULD_BE_USE_WEB = shouldBeUseWeb();
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { makeShareableCloneRecursive } from './shareables';
import { initializeUIRuntime } from './initializers';
import type { LayoutAnimationBatchItem } from './layoutReanimation/animationBuilder/commonTypes';
import { SensorContainer } from './SensorContainer';
import { ReanimatedError } from './errors';

export { startMapper, stopMapper } from './mappers';
export { runOnJS, runOnUI, executeOnUIRuntimeSync } from './threads';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { addHTMLMutationObserver } from '../layoutReanimation/web/domUtils';
import { getViewInfo } from './getViewInfo';
import { NativeEventsManager } from './NativeEventsManager';
import type { ReanimatedHTMLElement } from '../js-reanimated';
import { ReanimatedError } from '../errors';

const IS_WEB = isWeb();
const IS_JEST = isJest();
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native-reanimated/src/fabricUtils.web.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import { ReanimatedError } from './errors';

export function getShadowNodeWrapperFromRef() {
throw new ReanimatedError(
'Trying to call `getShadowNodeWrapperFromRef` on web.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import type {
AnimatedStyle,
} from '../commonTypes';
import { isWorkletFunction } from '../commonTypes';
import { ReanimatedError } from '../errors';

const SHOULD_BE_USE_WEB = shouldBeUseWeb();

Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/hook/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
import type { WorkletFunction } from '../commonTypes';
import { ReanimatedError } from '../errors';
import type { DependencyList } from './commonTypes';

// Builds one big hash from multiple worklets' hashes.
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/interpolateColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { makeMutable } from './core';
import { Extrapolation, interpolate } from './interpolation';
import type { SharedValue } from './commonTypes';
import { useSharedValue } from './hook/useSharedValue';
import { ReanimatedError } from './errors';

/**
* @deprecated Please use Extrapolation instead
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native-reanimated/src/interpolation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import { ReanimatedError } from './errors';

/**
* Extrapolation type.
*
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/jestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
} from './createAnimatedComponent/commonTypes';
import { isJest } from './PlatformChecker';
import type { DefaultStyle } from './hook/commonTypes';
import { ReanimatedError } from './errors';

declare global {
namespace jest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { WebSensor } from './WebSensor';
import { mockedRequestAnimationFrame } from '../mockedRequestAnimationFrame';
import type { WorkletRuntime } from '../runtimes';
import { logger } from '../logger';
import { ReanimatedError } from '../errors';

// In Node.js environments (like when static rendering with Expo Router)
// requestAnimationFrame is unavailable, so we use our mock.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from './webUtils';
import { PropsAllowlists } from '../propsAllowlists';
import { logger } from '../logger';
import { ReanimatedError } from '../errors';

const reanimatedJS = new JSReanimated();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {

import { ReduceMotion } from '../../commonTypes';
import { getReduceMotionFromConfig } from '../../animation/util';
import { ReanimatedError } from '../../errors';

export class BaseAnimationBuilder {
durationV?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
assertEasingIsWorklet,
getReduceMotionFromConfig,
} from '../../animation/util';
import { ReanimatedError } from '../../errors';

interface KeyframePoint {
duration: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
import { registerEventHandler, unregisterEventHandler } from '../../core';
import { Platform } from 'react-native';
import { isJest, shouldBeUseWeb } from '../../PlatformChecker';
import { ReanimatedError } from '../../errors';

type TransitionProgressEvent = {
closing: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ReduceMotion } from '../../commonTypes';
import { ProgressTransitionManager } from './ProgressTransitionManager';
import { updateLayoutAnimations } from '../../UpdateLayoutAnimations';
import { getReduceMotionFromConfig } from '../../animation/util';
import { ReanimatedError } from '../../errors';

const SUPPORTED_PROPS = [
'width',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { setElementPosition, snapshots } from './componentStyle';
import { Animations } from './config';
import type { AnimationNames } from './config';
import { logger } from '../../logger';
import { ReanimatedError } from '../../errors';

const PREDEFINED_WEB_ANIMATIONS_ID = 'ReanimatedPredefinedWebAnimationsStyle';
const CUSTOM_WEB_ANIMATIONS_ID = 'ReanimatedCustomWebAnimationsStyle';
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-reanimated/src/mutables.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
import { shouldBeUseWeb } from './PlatformChecker';
import type { Mutable } from './commonTypes';
import { ReanimatedError } from './errors';

import { shareableMappingCache } from './shareableMappingCache';
import { makeShareableCloneRecursive } from './shareables';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { jsVersion } from './jsVersion';
import { logger } from '../logger';
import { ReanimatedError } from '../errors';

export function checkCppVersion() {
const cppVersion = global._REANIMATED_VERSION_CPP;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-reanimated/src/runtimes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
import { isWorkletFunction } from './commonTypes';
import type { WorkletFunction } from './commonTypes';
import { registerReanimatedError } from './errors';
import { ReanimatedError, registerReanimatedError } from './errors';
import { setupCallGuard, setupConsole } from './initializers';
import NativeReanimatedModule from './NativeReanimated';
import { shouldBeUseWeb } from './PlatformChecker';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-reanimated/src/shareables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
WorkletFunction,
} from './commonTypes';
import { shouldBeUseWeb } from './PlatformChecker';
import { registerWorkletStackDetails } from './errors';
import { ReanimatedError, registerWorkletStackDetails } from './errors';
import { jsVersion } from './platform-specific/jsVersion';
import {
shareableMappingCache,
Expand Down

0 comments on commit 8986ccb

Please sign in to comment.