import * as CSS from 'csstype'; type CSSProperties = CSS.PropertiesFallback; type CSSPropertiesWithCallback = { [K in keyof CSSProperties]: CSSProperties[K] | Array> | ((props: Props) => CSSProperties[K]); }; type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject; }; interface CSSOthersObject { [selector: string]: CSSObject; } type CSSObject = CSSPropertiesWithCallback | CSSPseudos | CSSOthersObject; interface ThemeInput extends Record { /** * The prefix to be used for the CSS variables. */ cssVarPrefix?: string; /** * The color schemes to be used for the theme. */ colorSchemes?: Record; /** * The default color scheme to be used for the theme. It must be one of the keys from `theme.colorSchemes`. * Required when `colorSchemes` is provided. * @default 'light' */ defaultColorScheme?: ColorScheme; /** * If provided, it will be used to create a selector for the color scheme. * This is useful if you want to use class or data-* attributes to apply the color scheme. * * The callback receives the colorScheme with the possible values of: * - undefined: the selector for tokens that are not color scheme dependent * - string: the selector for the color scheme * * @example * // class selector * (colorScheme) => colorScheme !== 'light' ? `.theme-${colorScheme}` : ":root" * * @example * // data-* attribute selector * (colorScheme) => colorScheme !== 'light' ? `[data-theme="${colorScheme}"]` : ":root" */ getSelector?: (colorScheme: ColorScheme | undefined, css: Record) => string | Record; /** * A function to skip generating a CSS variable for a specific path or value. * * Note: properties with function as a value are always skipped. * * @example * // skip the `meta.*` fields from generating CSS variables and `theme.vars` * (keys, value) => keys[0] === 'meta' * */ shouldSkipGeneratingVar?: (objectPathKeys: Array, value: string | number) => boolean; components?: Partial; defaultProps: Record; }>>; } type ExtendTheme; } = { colorScheme: string; tokens: Record; }> = ThemeInput & Options['tokens'] & { vars: Options['tokens']; applyStyles: (colorScheme: Options['colorScheme'], styles: CSSObject) => Record>; getColorSchemeSelector: (colorScheme: Options['colorScheme']) => string; generateStyleSheets: () => Array>; }; type Theme = Record; /** * A utility to tell zero-runtime to generate CSS variables for the theme. */ declare function extendTheme; } = { colorScheme: string; tokens: Record; }>(theme: ThemeInput): ExtendTheme<{ colorScheme: Options["colorScheme"]; tokens: Options["tokens"]; }>; type PluginCustomOptions = { /** * Object to pass as parameter to the styled css callback functions. */ themeArgs?: { theme?: Theme; }; /** * Customize the output CSS. Mainly used for RTL support right now. */ css?: { /** * To denote that whatever default css is being authored pertains to this * direction so that when Pigment CSS generates the CSS for the other direction, * it can revert the direction of the selector accordingly. * @default 'ltr' */ defaultDirection: 'ltr' | 'rtl'; /** * Pass this as true if you want to output the CSS for both ltr and rtl. * The css of the non-default direction will be wrapped in a `dir` selector. */ generateForBothDir: boolean; /** * Pass this callback to customize the selector for the `dir` attribute. The default * is [dir=ltr] or [dir=rtl]. */ getDirSelector?: (dir: 'ltr' | 'rtl') => string; }; /** * Customize the replacement package name that should be added in-place of * the actually imported package name, ie, * * ```js * import { styled } from '@pigment-css/react'; * ``` * * will turn into * * ```js * import { styled } from '@mui/material-pigment-css'; * ``` * * if packageMap has this * * ```js * { * packageMap: { * '@pigment-css/react': '@mui/material-pigment-css', * } * } * ``` */ packageMap?: Record; }; declare function getGlobalSelector(asSelector: string): string; declare function preprocessor(selector: string, cssText: string, options?: PluginCustomOptions['css']): string; declare function matchAdapterPath(path: string): boolean; declare function generateTokenCss(theme?: Theme): string; declare function generateThemeTokens(theme?: Theme): { vars?: undefined; } | { vars: any; }; declare function generateThemeSource(theme?: Theme): any; export { type ExtendTheme, type PluginCustomOptions, type Theme, type ThemeInput, extendTheme, generateThemeSource, generateThemeTokens, generateTokenCss, getGlobalSelector, matchAdapterPath, preprocessor };