export declare function omit(obj: Record, fields: string[]): { [x: string]: any; }; export declare function getValidAttrs>(obj: T): Partial; export declare function removeEmptyAttrs>(obj: T): Partial; export declare function getTabElementByValue(tabs: [], value: string): object; export declare function firstUpperCase(str: string): string; export type Gradients = { [percent: string]: string; }; export type FromTo = { from: string; to: string; }; export type LinearGradient = { direction?: string; } & (Gradients | FromTo); export declare function getBackgroundColor(color: string | string[] | LinearGradient): string; /** * * @returns 获取 ie 浏览器版本 */ export declare function getIEVersion(): number; /** * Safari Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15 * FireFox Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0 * Chrome Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 * Chrome 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.3 * 搜狗 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1. * 360 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.9 Safari/537.36 QIHU 360EE */ export declare function getFlexGapPolyFill(): boolean; /** * 计算字符串字符的长度并可以截取字符串。 * @param str 传入字符串 * @param maxCharacter 规定最大字符串长度 * @returns 当没有传入maxCharacter时返回字符串字符长度,当传入maxCharacter时返回截取之后的字符串和长度。 */ export declare function getCharacterLength(str: string): number; export declare function getCharacterLength(str: string, maxCharacter?: number): { length: number; characters: string; }; /** * 返回 Unicode 字符长度 * '👨'.length === 2 * getUnicodeLength('👨') === 1 * @param str * @returns {number} */ export declare function getUnicodeLength(str?: string): number; /** * 修正 Unicode 最大字符长度 * '👨👨👨'.slice(0, 2) === '👨' * limitUnicodeMaxLength('👨👨👨', 2) === '👨👨' * @param str * @param maxLength * @param oldStr * @returns {string} */ export declare function limitUnicodeMaxLength(str?: string, maxLength?: number, oldStr?: string): string; /** * 是否样式单位 * @param value 样式值 * @returns 是否样式单位 */ export declare const hasStyleUnit: (value: string) => boolean; /** * 样式单位格式化 * @param value 样式值 * @param unit 单位,默认为'px' * @returns 格式化后的样式值 */ export declare function formatStyleUnit(value: string | number, unit?: string): string; /** * 兼容样式中支持number/string类型的传值 得出最后的结果。 * @param param number或string类型的可用于样式上的值 * @returns 可使用的样式值。 */ export declare function pxCompat(param: string | number): string; export declare function calculateNodeSize(targetElement: HTMLElement): { paddingSize: number; borderSize: number; boxSizing: number; sizingStyle: string; } | { paddingSize: number; borderSize: number; boxSizing: string; sizingStyle: string; }; export declare function isSafari(): boolean; export declare function isFirefox(): boolean;