Skip to content

Commit 96c99ca

Browse files
committed
Relocate native style builders to the common dir
1 parent 3b46b45 commit 96c99ca

File tree

31 files changed

+96
-77
lines changed

31 files changed

+96
-77
lines changed

packages/react-native-reanimated/src/common/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ function isWindowAvailable() {
1010
}
1111

1212
export const IS_ANDROID: boolean = Platform.OS === 'android';
13-
/** @knipIgnore */
1413
export const IS_IOS: boolean = Platform.OS === 'ios';
1514
export const IS_WEB: boolean = Platform.OS === 'web';
1615
export const IS_JEST: boolean = !!process.env.JEST_WORKER_ID;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './style';

packages/react-native-reanimated/src/css/native/style/__tests__/createStyleBuilder.test.ts renamed to packages/react-native-reanimated/src/common/native/style/__tests__/createStyleBuilder.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
import type { PlainStyle } from '../../../types';
2+
import type { PlainStyle } from '../../../../css/types';
33
import createStyleBuilder from '../createStyleBuilder';
44

55
// TODO - add more tests

packages/react-native-reanimated/src/css/native/style/config.ts renamed to packages/react-native-reanimated/src/common/native/style/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
2+
import type { PlainStyle } from '../../../css/types';
23
import {
34
IS_ANDROID,
45
processBoxShadowNative,
56
processColor,
67
processTransformOrigin,
7-
} from '../../../common';
8-
import type { PlainStyle } from '../../types';
8+
} from '../..';
99
import {
1010
processAspectRatio,
1111
processFontWeight,

packages/react-native-reanimated/src/css/native/style/createStyleBuilder.ts renamed to packages/react-native-reanimated/src/common/native/style/createStyleBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
import type { AnyRecord } from '../../../common';
4-
import { isConfigPropertyAlias, isDefined, isRecord } from '../../utils';
3+
import { isConfigPropertyAlias, isDefined, isRecord } from '../../../css/utils';
4+
import type { AnyRecord } from '../..';
55
import type {
66
StyleBuilder,
77
StyleBuilderConfig,

packages/react-native-reanimated/src/css/native/style/processors/__tests__/colors.test.ts renamed to packages/react-native-reanimated/src/common/native/style/processors/__tests__/colors.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
import { ReanimatedError } from '../../../../../common';
2+
import { ReanimatedError } from '../../../..';
33
import { ERROR_MESSAGES, processColor } from '../colors';
44

55
describe(processColor, () => {

packages/react-native-reanimated/src/css/native/style/processors/__tests__/others.test.ts renamed to packages/react-native-reanimated/src/common/native/style/processors/__tests__/others.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
import { ReanimatedError } from '../../../../../common';
2+
import { ReanimatedError } from '../../../..';
33
import { ERROR_MESSAGES, processAspectRatio } from '../others';
44

55
describe(processAspectRatio, () => {

packages/react-native-reanimated/src/common/processors/__tests__/shadows.test.ts renamed to packages/react-native-reanimated/src/common/native/style/processors/__tests__/shadows.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import type { BoxShadowValue } from 'react-native';
33

4-
import { processColor } from '../colors';
4+
import { processColor } from '../../../../processors/colors';
55
import type { ProcessedBoxShadowValue } from '../shadows';
66
import { processBoxShadowNative } from '../shadows';
77

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
2-
import { ReanimatedError } from '../../../../../common';
3-
import type { TransformsArray } from '../../../../types';
2+
import type { TransformsArray } from '../../../../../css/types';
3+
import { ReanimatedError } from '../../../..';
44
import { ERROR_MESSAGES, processTransform } from '../transform';
55

66
describe(processTransform, () => {

0 commit comments

Comments
 (0)