|
| 1 | +type ICssLikeObject = object; |
| 2 | + |
| 3 | +interface IUnits { |
| 4 | + px: (num: number) => string; |
| 5 | + cm: (num: number) => string; |
| 6 | + in: (num: number) => string; |
| 7 | + pt: (num: number) => string; |
| 8 | + pc: (num: number) => string; |
| 9 | + em: (num: number) => string; |
| 10 | + ex: (num: number) => string; |
| 11 | + ch: (num: number) => string; |
| 12 | + rem: (num: number) => string; |
| 13 | + vw: (num: number) => string; |
| 14 | + vh: (num: number) => string; |
| 15 | + deg: (num: number) => string; |
| 16 | + vmin: (num: number) => string; |
| 17 | + vmax: (num: number) => string; |
| 18 | +} |
| 19 | + |
| 20 | +interface NanoRenderer extends Partial<IUnits> { |
| 21 | + client: boolean; |
| 22 | + raw: string; |
| 23 | + pfx: string; |
| 24 | + putRaw: (rawCss: string) => void; |
| 25 | + put: (selector: string, css: ICssLikeObject, atrule?: string) => void; |
| 26 | + |
| 27 | + /** |
| 28 | + * Need to install `rule` addon. |
| 29 | + */ |
| 30 | + rule?: (css: ICssLikeObject, block?: string) => string; |
| 31 | + drule?: (...args) => any; |
| 32 | + sheet?: (...args) => any; |
| 33 | + dsheet?: (...args) => any; |
| 34 | + jsx?: (...args) => any; |
| 35 | + style?: (...args) => any; |
| 36 | + styled?: (...args) => any; |
| 37 | + cache?: (...args) => any; |
| 38 | + global?: (...args) => any; |
| 39 | + keyframes?: (...args) => any; |
| 40 | + hydrate?: (...args) => any; |
| 41 | + hyperstyle?: (...args) => any; |
| 42 | + pipe?: (...args) => any; |
| 43 | + ref?: (...args) => any; |
| 44 | + useStyles?: (...args) => any; |
| 45 | + withStyles?: (...args) => any; |
| 46 | + s?: object; |
| 47 | + units?: IUnits; |
| 48 | +} |
| 49 | + |
| 50 | +interface INanoOptions { |
| 51 | + pfx?: string; |
| 52 | + h?: (...args) => any; |
| 53 | + sh?: CSSStyleSheet; |
| 54 | + verbose?: boolean; |
| 55 | + assign?: (...objects: object[]) => object; |
| 56 | + stringify?: (obj: object) => string; |
| 57 | +} |
| 58 | + |
| 59 | +type TCreateNano = (options: INanoOptions) => NanoRenderer; |
| 60 | + |
| 61 | +export const create: TCreateNano; |
0 commit comments