UNPKG

@fourite/avtr

Version:

Avataaars avatar style for fourite web

45 lines (44 loc) 1.7 kB
/** * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma. * * Plugin: https://www.figma.com/community/plugin/1005765655729342787 * File: https://www.figma.com/file/HBLdITkkTnLs4M09BmCe4h */ import { getComponents } from './utils/getComponents.js'; import { getColors } from './utils/getColors.js'; import { onPostCreate } from './hooks/onPostCreate.js'; export const meta = { title: 'Avataaars', creator: 'Pablo Stanley', source: 'https://avataaars.com/', homepage: 'https://twitter.com/pablostanley', license: { name: 'Free for personal and commercial use', url: 'https://avataaars.com/', }, }; export const create = ({ prng, options }) => { var _a, _b; const components = getComponents({ prng, options }); const colors = getColors({ prng, options }); onPostCreate({ prng, options, components, colors }); return { attributes: { viewBox: '0 0 280 280', fill: 'none', 'shape-rendering': 'auto' }, body: `<g transform="translate(8)">${(_b = (_a = components.style) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g>`, extra: () => ({ ...Object.entries(components).reduce((acc, [key, value]) => { acc[key] = value === null || value === void 0 ? void 0 : value.name; return acc; }, {}), ...Object.entries(colors).reduce((acc, [key, value]) => { acc[`${key}Color`] = value; return acc; }, {}), }), }; }; export { schema } from './schema.js';