2023-07-27 11:31:38 +08:00
|
|
|
import type { CSSInterpolation, DerivativeFunc } from '@ant-design/cssinjs';
|
2022-11-30 11:48:47 +08:00
|
|
|
import type { AliasToken } from './alias';
|
2023-06-06 17:44:30 +08:00
|
|
|
import type { ComponentTokenMap } from './components';
|
2023-07-27 11:31:38 +08:00
|
|
|
import type { MapToken } from './maps';
|
|
|
|
import type { SeedToken } from './seeds';
|
|
|
|
|
|
|
|
export type MappingAlgorithm = DerivativeFunc<SeedToken, MapToken>;
|
2022-11-30 11:48:47 +08:00
|
|
|
|
|
|
|
export type OverrideToken = {
|
|
|
|
[key in keyof ComponentTokenMap]: Partial<ComponentTokenMap[key]> & Partial<AliasToken>;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Final token which contains the components level override */
|
|
|
|
export type GlobalToken = AliasToken & ComponentTokenMap;
|
|
|
|
|
2023-06-06 17:44:30 +08:00
|
|
|
export type { AliasToken } from './alias';
|
|
|
|
export type { ComponentTokenMap } from './components';
|
2022-11-30 11:48:47 +08:00
|
|
|
export type {
|
|
|
|
ColorMapToken,
|
|
|
|
ColorNeutralMapToken,
|
|
|
|
CommonMapToken,
|
2023-06-06 17:44:30 +08:00
|
|
|
FontMapToken,
|
2022-11-30 11:48:47 +08:00
|
|
|
HeightMapToken,
|
2023-06-06 17:44:30 +08:00
|
|
|
MapToken,
|
2022-11-30 11:48:47 +08:00
|
|
|
SizeMapToken,
|
|
|
|
StyleMapToken,
|
|
|
|
} from './maps';
|
2023-06-06 17:44:30 +08:00
|
|
|
export { PresetColors } from './presetColors';
|
|
|
|
export type {
|
|
|
|
ColorPalettes,
|
|
|
|
LegacyColorPalettes,
|
|
|
|
PresetColorKey,
|
|
|
|
PresetColorType,
|
|
|
|
} from './presetColors';
|
|
|
|
export type { SeedToken } from './seeds';
|
|
|
|
|
|
|
|
export type UseComponentStyleResult = [(node: React.ReactNode) => React.ReactElement, string];
|
|
|
|
|
|
|
|
export type GenerateStyle<
|
|
|
|
ComponentToken extends object = AliasToken,
|
|
|
|
ReturnType = CSSInterpolation,
|
|
|
|
> = (token: ComponentToken) => ReturnType;
|