1- import { Transformation } from '@cld-apis/types'
1+ import type { Transformation } from '@cld-apis/types'
22import { TRANSFORMERS } from '../constants'
33import { AcceptNumbericVars } from '../constants/arithmetic'
44import { condition } from './condition'
@@ -9,21 +9,22 @@ import { rawTransformation } from './rawTransformation'
99import { variables } from './variables'
1010import { fps } from './video/fps'
1111import { offset } from './video/offset'
12+ import { resize } from './resize'
13+ import { border } from './border'
14+ import { position } from './position'
1215
1316export const getResize = ( options ) :string => {
1417 const hasResize = options . resize || options . width || options . height || options . aspectRatio
1518
1619 if ( ! hasResize ) return ''
1720
18- const { resize } = require ( './resize' )
1921
2022 return resize ( options . resize || { width : options . width , height : options . height , type : options . crop , aspectRatio : options . aspectRatio } )
2123}
2224
2325export const getBorder = ( options ) :string => {
2426 if ( ! options . border ) return ''
2527
26- const { border } = require ( './border' )
2728
2829 const borderModification = ( typeof options . border === 'string' ) ? `bo_${ options . border } ` : border ( options . border )
2930
@@ -33,7 +34,6 @@ export const getBorder = (options):string => {
3334export const getPosition = ( options ) : string => {
3435 if ( ! options . x && ! options . y && ! options . position ) return ''
3536
36- const { position } = require ( './position' )
3737
3838 return position ( options . position || { x : options . x , y : options . y } )
3939}
0 commit comments