/** * @namespace * @name Property */ import PropertyObject from "../PropertyObject"; import { IObject } from "@daybrush/utils"; import { NameType } from "../types"; export declare function splitStyle(str: string): { styles: IObject; length: number; }; /** * convert array to PropertyObject[type=color]. * default model "rgba" * @memberof Property * @function arrayToColorObject * @param {Array|PropertyObject} value ex) [0, 0, 0, 1] * @return {PropertyObject} PropertyObject[type=color] * @example arrayToColorObject([0, 0, 0]) // => PropertyObject(type="color", model="rgba", value=[0, 0, 0, 1], separator=",") */ export declare function arrayToColorObject(arr: number[]): PropertyObject; /** * convert text with parentheses to object. * @memberof Property * @function stringToBracketObject * @param {String} value ex) "rgba(0,0,0,1)" * @return {PropertyObject} PropertyObject * @example stringToBracketObject("abcde(0, 0, 0,1)") // => PropertyObject(model="abcde", value=[0, 0, 0,1], separator=",") */ export declare function stringToBracketObject(text: string): string | PropertyObject; export declare function arrayToPropertyObject(arr: any[], separator: string): PropertyObject; /** * convert text with parentheses to PropertyObject[type=color]. * If the values are not RGBA model, change them RGBA mdoel. * @memberof Property * @function stringToColorObject * @param {String|PropertyObject} value ex) "rgba(0,0,0,1)" * @return {PropertyObject} PropertyObject[type=color] * @example stringToColorObject("rgba(0, 0, 0,1)") // => PropertyObject(type="color", model="rgba", value=[0, 0, 0,1], separator=",") */ export declare function stringToColorObject(value: string): string | PropertyObject; /** * convert CSS Value to PropertyObject * @memberof Property * @function toPropertyObject * @param {String} value it's text contains the array. * @return {String} Not Array, Not Separator, Only Number & Unit * @return {PropertyObject} Array with Separator. * @see referenced regular expression {@link http://stackoverflow.com/questions/20215440/parse-css-gradient-rule-with-javascript-regex} * @example toPropertyObject("1px solid #000"); // => PropertyObject(["1px", "solid", rgba(0, 0, 0, 1)]) */ export declare function toPropertyObject(value: any[], model?: NameType): PropertyObject; export declare function toPropertyObject(value: IObject, model?: NameType): IObject; export declare function toPropertyObject(value: string, model?: NameType): PropertyObject | string; export declare function toObject(object: PropertyObject, result?: IObject): IObject;