11import type { IMangleScopeContext } from '@weapp-tailwindcss/mangle'
22import type { Rule } from 'postcss'
3+ import type { PostCssCalcOptions } from 'postcss-calc'
34import type { Result } from 'postcss-load-config'
45import type { pluginOptions as PresetEnvOptions } from 'postcss-preset-env'
5- import type { UserDefinedOptions as rem2rpxOptions } from 'postcss-rem-to-responsive-pixel'
6+ import type { PxtransformOptions as Px2rpxOptions } from 'postcss-pxtransform'
7+ import type { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel'
68import type { IContext as PostcssContext } from './plugins/ctx'
79import type { InjectPreflight } from './preflight'
810
@@ -36,6 +38,7 @@ export type RequiredStyleHandlerOptions = {
3638 | 'injectAdditionalCssVarScope'
3739 | 'cssSelectorReplacement'
3840 | 'rem2rpx'
41+ | 'px2rpx'
3942>
4043
4144export interface InternalCssSelectorReplacerOptions {
@@ -51,6 +54,7 @@ export type IStyleHandlerOptions = {
5154 cssRemoveProperty ?: boolean
5255 cssRemoveHoverPseudoClass ?: boolean
5356 cssPresetEnv ?: PresetEnvOptions
57+ cssCalc ?: PostCssCalcOptions
5458 atRules ?: {
5559 property ?: boolean
5660 // A 新增 wxss 支持 @supports 反馈详情
@@ -72,7 +76,8 @@ export interface UserDefinedPostcssOptions {
7276 root ?: string | string [ ] | false
7377 universal ?: string | string [ ] | false
7478 }
75- rem2rpx ?: boolean | rem2rpxOptions
79+ rem2rpx ?: boolean | Rem2rpxOptions
80+ px2rpx ?: boolean | Px2rpxOptions
7681 postcssOptions ?: LoadedPostcssOptions
7782 cssRemoveHoverPseudoClass ?: boolean
7883 cssRemoveProperty ?: boolean
0 commit comments