@dicebear/micah
Advanced tools
Comparing version
@@ -64,4 +64,4 @@ "use strict"; | ||
const glassesColor = pickColor((_e = options.glassesColor) !== null && _e !== void 0 ? _e : [], [baseColor, hairColor]); | ||
const eyeColor = pickColor((_f = options.eyeColor) !== null && _f !== void 0 ? _f : [], [baseColor, glassesColor]); | ||
const eyebrowColor = pickColor((_g = options.eyebrowColor) !== null && _g !== void 0 ? _g : [], [baseColor, glassesColor, eyeColor]); | ||
const eyeShadowColor = pickColor((_f = options.eyeShadowColor) !== null && _f !== void 0 ? _f : [], [baseColor, glassesColor]); | ||
const eyebrowColor = pickColor((_g = options.eyebrowColor) !== null && _g !== void 0 ? _g : [], [baseColor, glassesColor, eyeShadowColor]); | ||
const facialHairColor = pickColor((_h = options.facialHairColor) !== null && _h !== void 0 ? _h : [], [baseColor]); | ||
@@ -94,3 +94,3 @@ const earringsPath = pickPath(paths.earrings, options.earrings); | ||
${hair ? avatars_1.utils.svg.createGroup({ children: hair(hairColor), x: 59, y: 31 }) : ''} | ||
${eyes ? avatars_1.utils.svg.createGroup({ children: eyes(eyeColor), x: 152, y: 139 }) : ''} | ||
${eyes ? avatars_1.utils.svg.createGroup({ children: eyes(eyeShadowColor), x: 152, y: 139 }) : ''} | ||
${glasses ? avatars_1.utils.svg.createGroup({ children: glasses(glassesColor), x: 112, y: 131 }) : ''} | ||
@@ -97,0 +97,0 @@ ${nose ? avatars_1.utils.svg.createGroup({ children: nose('#000'), x: 186.37, y: 168.42 }) : ''} |
@@ -23,2 +23,2 @@ "use strict"; | ||
/** @deprecated will be removed in Version 5.0 */ | ||
exports.default = avatars_1.utils.style.createLegacyWrapper(core_1.style); | ||
exports.default = avatars_1.utils.style.createLegacyWrapper({ create, meta, schema }); |
@@ -15,3 +15,7 @@ /** | ||
export declare type Eyes = ("eyes" | "eyesShadow" | "round" | "smiling")[]; | ||
export declare type EyeColor = (("apricot" | "coast" | "topaz" | "lavender" | "sky" | "salmon" | "canary" | "calm" | "azure" | "seashell" | "mellow" | "black" | "white") | string)[]; | ||
export declare type EyeShadowColor = (("apricot" | "coast" | "topaz" | "lavender" | "sky" | "salmon" | "canary" | "calm" | "azure" | "seashell" | "mellow" | "black" | "white") | string)[]; | ||
/** | ||
* @deprecated use `eyeShadowColor` instead. | ||
*/ | ||
export declare type EyeShadowColor1 = (("apricot" | "coast" | "topaz" | "lavender" | "sky" | "salmon" | "canary" | "calm" | "azure" | "seashell" | "mellow" | "black" | "white") | string)[]; | ||
export declare type FacialHair = ("beard" | "scruff")[]; | ||
@@ -40,3 +44,4 @@ export declare type FacialHairColor = (("apricot" | "coast" | "topaz" | "lavender" | "sky" | "salmon" | "canary" | "calm" | "azure" | "seashell" | "mellow" | "black" | "white") | string)[]; | ||
eyes?: Eyes; | ||
eyeColor?: EyeColor; | ||
eyeShadowColor?: EyeShadowColor; | ||
eyeColor?: EyeShadowColor1; | ||
facialHair?: FacialHair; | ||
@@ -43,0 +48,0 @@ facialHairColor?: FacialHairColor; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.schema = void 0; | ||
exports.schema = { "title": "Options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "colors": { "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] } }, "properties": { "base": { "title": "Base", "type": "array", "items": { "type": "string", "enum": ["standard"] }, "default": ["standard"] }, "baseColor": { "title": "Base Color", "default": ["apricot", "coast", "topaz"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "earrings": { "title": "Earrings", "type": "array", "items": { "type": "string", "enum": ["hoop", "stud"] }, "default": ["hoop", "stud"] }, "earringColor": { "title": "Earring Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "earringsProbability": { "title": "Earrings Probability", "default": 30, "type": "integer", "minimum": 0, "maximum": 100 }, "eyebrows": { "title": "Eyebrows", "type": "array", "items": { "type": "string", "enum": ["down", "eyelashesDown", "eyelashesUp", "up"] }, "default": ["down", "eyelashesDown", "eyelashesUp", "up"] }, "eyebrowColor": { "title": "Eyebrow Color", "default": ["black"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "ears": { "title": "Ears", "type": "array", "items": { "type": "string", "enum": ["attached"] }, "default": ["attached"] }, "eyes": { "title": "Eyes", "type": "array", "items": { "type": "string", "enum": ["eyes", "eyesShadow", "round", "smiling"] }, "default": ["eyes", "eyesShadow", "round", "smiling"] }, "eyeColor": { "title": "Eye Color", "default": ["calm", "azure", "seashell", "mellow", "white"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "facialHair": { "title": "Facial Hair", "type": "array", "items": { "type": "string", "enum": ["beard", "scruff"] }, "default": ["beard", "scruff"] }, "facialHairColor": { "title": "Facial Hair Color", "default": ["topaz"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "facialHairProbability": { "title": "Facial Hair Probability", "default": 10, "type": "integer", "minimum": 0, "maximum": 100 }, "glasses": { "title": "Glasses", "type": "array", "items": { "type": "string", "enum": ["round", "square"] }, "default": ["round", "square"] }, "glassesColor": { "title": "Glasses Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "glassesProbability": { "title": "Glasses Probability", "default": 30, "type": "integer", "minimum": 0, "maximum": 100 }, "mouth": { "title": "Mouth", "type": "array", "items": { "type": "string", "enum": ["frown", "laughing", "nervous", "pucker", "sad", "smile", "smirk", "surprised"] }, "default": ["frown", "laughing", "nervous", "pucker", "sad", "smile", "smirk", "surprised"] }, "nose": { "title": "Nose", "type": "array", "items": { "type": "string", "enum": ["curve", "pointed", "round"] }, "default": ["curve", "pointed", "round"] }, "shirt": { "title": "Shirt", "type": "array", "items": { "type": "string", "enum": ["collared", "crew", "open"] }, "default": ["collared", "crew", "open"] }, "shirtColor": { "title": "Shirt Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "hair": { "title": "Hair", "type": "array", "items": { "type": "string", "enum": ["dannyPhantom", "dougFunny", "fonze", "full", "mrClean", "mrT", "pixie", "turban"] }, "default": ["dannyPhantom", "dougFunny", "fonze", "full", "mrClean", "mrT", "pixie", "turban"] }, "hairColor": { "title": "Hair Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "hairProbability": { "title": "Hair Probability", "default": 100, "type": "integer", "minimum": 0, "maximum": 100 } }, "additionalProperties": false }; | ||
exports.schema = { "title": "Options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "colors": { "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "eyeShadowColor": { "title": "Eye Shadow Color", "default": ["calm", "azure", "seashell", "mellow", "white"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } } }, "properties": { "base": { "title": "Base", "type": "array", "items": { "type": "string", "enum": ["standard"] }, "default": ["standard"] }, "baseColor": { "title": "Base Color", "default": ["apricot", "coast", "topaz"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "earrings": { "title": "Earrings", "type": "array", "items": { "type": "string", "enum": ["hoop", "stud"] }, "default": ["hoop", "stud"] }, "earringColor": { "title": "Earring Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "earringsProbability": { "title": "Earrings Probability", "default": 30, "type": "integer", "minimum": 0, "maximum": 100 }, "eyebrows": { "title": "Eyebrows", "type": "array", "items": { "type": "string", "enum": ["down", "eyelashesDown", "eyelashesUp", "up"] }, "default": ["down", "eyelashesDown", "eyelashesUp", "up"] }, "eyebrowColor": { "title": "Eyebrow Color", "default": ["black"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "ears": { "title": "Ears", "type": "array", "items": { "type": "string", "enum": ["attached"] }, "default": ["attached"] }, "eyes": { "title": "Eyes", "type": "array", "items": { "type": "string", "enum": ["eyes", "eyesShadow", "round", "smiling"] }, "default": ["eyes", "eyesShadow", "round", "smiling"] }, "eyeShadowColor": { "title": "Eye Shadow Color", "default": ["calm", "azure", "seashell", "mellow", "white"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "eyeColor": { "description": "@deprecated use `eyeShadowColor` instead.", "title": "Eye Shadow Color", "default": ["calm", "azure", "seashell", "mellow", "white"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "facialHair": { "title": "Facial Hair", "type": "array", "items": { "type": "string", "enum": ["beard", "scruff"] }, "default": ["beard", "scruff"] }, "facialHairColor": { "title": "Facial Hair Color", "default": ["topaz"], "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] } }, "facialHairProbability": { "title": "Facial Hair Probability", "default": 10, "type": "integer", "minimum": 0, "maximum": 100 }, "glasses": { "title": "Glasses", "type": "array", "items": { "type": "string", "enum": ["round", "square"] }, "default": ["round", "square"] }, "glassesColor": { "title": "Glasses Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "glassesProbability": { "title": "Glasses Probability", "default": 30, "type": "integer", "minimum": 0, "maximum": 100 }, "mouth": { "title": "Mouth", "type": "array", "items": { "type": "string", "enum": ["frown", "laughing", "nervous", "pucker", "sad", "smile", "smirk", "surprised"] }, "default": ["frown", "laughing", "nervous", "pucker", "sad", "smile", "smirk", "surprised"] }, "nose": { "title": "Nose", "type": "array", "items": { "type": "string", "enum": ["curve", "pointed", "round"] }, "default": ["curve", "pointed", "round"] }, "shirt": { "title": "Shirt", "type": "array", "items": { "type": "string", "enum": ["collared", "crew", "open"] }, "default": ["collared", "crew", "open"] }, "shirtColor": { "title": "Shirt Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "hair": { "title": "Hair", "type": "array", "items": { "type": "string", "enum": ["dannyPhantom", "dougFunny", "fonze", "full", "mrClean", "mrT", "pixie", "turban"] }, "default": ["dannyPhantom", "dougFunny", "fonze", "full", "mrClean", "mrT", "pixie", "turban"] }, "hairColor": { "title": "Hair Color", "type": "array", "items": { "anyOf": [{ "type": "string", "enum": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, { "type": "string", "pattern": "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})+$" }] }, "default": ["apricot", "coast", "topaz", "lavender", "sky", "salmon", "canary", "calm", "azure", "seashell", "mellow", "black", "white"] }, "hairProbability": { "title": "Hair Probability", "default": 100, "type": "integer", "minimum": 0, "maximum": 100 } }, "additionalProperties": false }; |
{ | ||
"name": "@dicebear/micah", | ||
"version": "4.6.6", | ||
"version": "4.6.7", | ||
"description": "Micah avatar style for DiceBear Avatars", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@dicebear/avatars": "^4.6.6", | ||
"@dicebear/avatars": "^4.6.7", | ||
"@tsconfig/node12": "^1.0.7", | ||
@@ -59,3 +59,3 @@ "@types/jest": "^26.0.22", | ||
}, | ||
"gitHead": "f1c11280deda141d4bb9626918c560b4dd1f7e26" | ||
"gitHead": "6a80fb54882e1de2436db0c7eb89ab6785a4aca1" | ||
} |
51482
2.43%624
1.3%