Socket
Socket
Sign inDemoInstall

@dicebear/identicon

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/identicon - npm Package Compare versions

Comparing version 5.0.0-alpha.6 to 5.0.0-alpha.7

dist/index.d.ts.map

26

dist/index.d.ts

@@ -1,12 +0,16 @@

/*!
* Identicon (@dicebear/identicon)
*
* Code licensed under MIT License.
* Copyright (c) 2021 Florian Körner
*
* Design "Identicon" by Florian Körner licensed under CC0 1.0.
* License: https://creativecommons.org/publicdomain/zero/1.0/
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
declare let create: import("@dicebear/core").StyleCreate<import("./options").Options>, preview: import("@dicebear/core").StylePreview<import("./options").Options> | undefined, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
export { create, preview, meta, schema };
export { Options } from './options';
export interface Options {
row1?: ("xooox" | "xxoxx" | "xoxox" | "oxxxo" | "xxxxx" | "oxoxo" | "ooxoo")[];
row2?: ("xooox" | "xxoxx" | "xoxox" | "oxxxo" | "xxxxx" | "oxoxo" | "ooxoo")[];
row3?: ("xooox" | "xxoxx" | "xoxox" | "oxxxo" | "xxxxx" | "oxoxo" | "ooxoo")[];
row4?: ("xooox" | "xxoxx" | "xoxox" | "oxxxo" | "xxxxx" | "oxoxo" | "ooxoo")[];
row5?: ("xooox" | "xxoxx" | "xoxox" | "oxxxo" | "xxxxx" | "oxoxo" | "ooxoo")[];
rowColor?: (string | ("red" | "amber" | "blue" | "blueGray" | "brown" | "cyan" | "deepOrange" | "deepPurple" | "green" | "grey" | "indigo" | "lightBlue" | "lightGreen" | "lime" | "orange" | "pink" | "purple" | "teal" | "yellow"))[];
}
export const create: import("@dicebear/core").StyleCreate<import("options").Options>, preview: import("@dicebear/core").StylePreview<import("options").Options> | undefined, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
//# sourceMappingURL=index.d.ts.map

@@ -1,520 +0,332 @@

var title = "Options";
var $schema = "http://json-schema.org/draft-07/schema#";
var properties = {
row1: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row1Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row2: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row2Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row3: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row3Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row4: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row4Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row5: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row5Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
rowColor: {
type: "array",
items: {
anyOf: [
{
type: "string",
pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
},
{
type: "string",
"enum": [
"red",
"amber",
"blue",
"blueGray",
"brown",
"cyan",
"deepOrange",
"deepPurple",
"green",
"grey",
"indigo",
"lightBlue",
"lightGreen",
"lime",
"orange",
"pink",
"purple",
"teal",
"yellow"
]
}
]
},
"default": [
"red",
"amber",
"blue",
"blueGray",
"brown",
"cyan",
"deepOrange",
"deepPurple",
"green",
"grey",
"indigo",
"lightBlue",
"lightGreen",
"lime",
"orange",
"pink",
"purple",
"teal",
"yellow"
]
}
};
var additionalProperties = false;
var schema$1 = {
title: title,
$schema: $schema,
properties: properties,
additionalProperties: additionalProperties
};
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
var $79c0419e9ba9baaf$exports = {};
$79c0419e9ba9baaf$exports = JSON.parse("{\"title\":\"Options\",\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"properties\":{\"row1\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row2\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row3\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row4\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row5\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"rowColor\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"string\",\"pattern\":\"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"},{\"type\":\"string\",\"enum\":[\"red\",\"amber\",\"blue\",\"blueGray\",\"brown\",\"cyan\",\"deepOrange\",\"deepPurple\",\"green\",\"grey\",\"indigo\",\"lightBlue\",\"lightGreen\",\"lime\",\"orange\",\"pink\",\"purple\",\"teal\",\"yellow\"]}]},\"default\":[\"red\",\"amber\",\"blue\",\"blueGray\",\"brown\",\"cyan\",\"deepOrange\",\"deepPurple\",\"green\",\"grey\",\"indigo\",\"lightBlue\",\"lightGreen\",\"lime\",\"orange\",\"pink\",\"purple\",\"teal\",\"yellow\"]}},\"additionalProperties\":false}");
const row1 = {
xooox: (components, colors) => "<path d=\"M1 0H0v1h1V0ZM5 0H4v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 0H0v1h2V0ZM5 0H3v1h2V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 0h1v1H0V0ZM4 0h1v1H4V0ZM3 0H2v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 0h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 0h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 0H1v1h1V0ZM4 0H3v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 0h1v1H2z\"/>")
var $44c27694b0d7a583$exports = {};
$parcel$export($44c27694b0d7a583$exports, "row1", function () { return $6093528e00bb5599$export$182befbf36a4d37d; });
$parcel$export($44c27694b0d7a583$exports, "row2", function () { return $8c3b315f788b4996$export$319e2490fcca642b; });
$parcel$export($44c27694b0d7a583$exports, "row3", function () { return $3b14f5f3784a7eec$export$c25effc8ac5ca265; });
$parcel$export($44c27694b0d7a583$exports, "row4", function () { return $3f92d5f8642dfd21$export$6c54081303ef3121; });
$parcel$export($44c27694b0d7a583$exports, "row5", function () { return $bc0d7007158c585c$export$42eb7c997f53cdf; });
const $6093528e00bb5599$export$182befbf36a4d37d = {
xooox: (components, colors)=>`<path d="M1 0H0v1h1V0ZM5 0H4v1h1V0Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 0H0v1h2V0ZM5 0H3v1h2V0Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 0h1v1H0V0ZM4 0h1v1H4V0ZM3 0H2v1h1V0Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 0h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 0h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 0H1v1h1V0ZM4 0H3v1h1V0Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 0h1v1H2z"/>`
};
const row2 = {
xooox: (components, colors) => "<path d=\"M1 1H0v1h1V1ZM5 1H4v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 1H0v1h2V1ZM5 1H3v1h2V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 1h1v1H0V1ZM4 1h1v1H4V1ZM3 1H2v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 1h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 1h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 1H1v1h1V1ZM4 1H3v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 1h1v1H2z\"/>")
const $8c3b315f788b4996$export$319e2490fcca642b = {
xooox: (components, colors)=>`<path d="M1 1H0v1h1V1ZM5 1H4v1h1V1Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 1H0v1h2V1ZM5 1H3v1h2V1Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 1h1v1H0V1ZM4 1h1v1H4V1ZM3 1H2v1h1V1Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 1h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 1h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 1H1v1h1V1ZM4 1H3v1h1V1Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 1h1v1H2z"/>`
};
const row3 = {
xooox: (components, colors) => "<path d=\"M1 2H0v1h1V2ZM5 2H4v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 2H0v1h2V2ZM5 2H3v1h2V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 2h1v1H0V2ZM4 2h1v1H4V2ZM3 2H2v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 2h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 2h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 2H1v1h1V2ZM4 2H3v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 2h1v1H2z\"/>")
const $3b14f5f3784a7eec$export$c25effc8ac5ca265 = {
xooox: (components, colors)=>`<path d="M1 2H0v1h1V2ZM5 2H4v1h1V2Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 2H0v1h2V2ZM5 2H3v1h2V2Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 2h1v1H0V2ZM4 2h1v1H4V2ZM3 2H2v1h1V2Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 2h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 2h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 2H1v1h1V2ZM4 2H3v1h1V2Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 2h1v1H2z"/>`
};
const row4 = {
xooox: (components, colors) => "<path d=\"M1 3H0v1h1V3ZM5 3H4v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 3H0v1h2V3ZM5 3H3v1h2V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 3h1v1H0V3ZM4 3h1v1H4V3ZM3 3H2v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 3h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 3h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 3H1v1h1V3ZM4 3H3v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 3h1v1H2z\"/>")
const $3f92d5f8642dfd21$export$6c54081303ef3121 = {
xooox: (components, colors)=>`<path d="M1 3H0v1h1V3ZM5 3H4v1h1V3Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 3H0v1h2V3ZM5 3H3v1h2V3Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 3h1v1H0V3ZM4 3h1v1H4V3ZM3 3H2v1h1V3Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 3h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 3h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 3H1v1h1V3ZM4 3H3v1h1V3Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 3h1v1H2z"/>`
};
const row5 = {
xooox: (components, colors) => "<path d=\"M1 4H0v1h1V4ZM5 4H4v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 4H0v1h2V4ZM5 4H3v1h2V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 4h1v1H0V4ZM4 4h1v1H4V4ZM3 4H2v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 4h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 4h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 4H1v1h1V4ZM4 4H3v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 4h1v1H2z\"/>")
const $bc0d7007158c585c$export$42eb7c997f53cdf = {
xooox: (components, colors)=>`<path d="M1 4H0v1h1V4ZM5 4H4v1h1V4Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 4H0v1h2V4ZM5 4H3v1h2V4Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 4h1v1H0V4ZM4 4h1v1H4V4ZM3 4H2v1h1V4Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 4h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 4h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 4H1v1h1V4ZM4 4H3v1h1V4Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 4h1v1H2z"/>`
};
var components = /*#__PURE__*/Object.freeze({
__proto__: null,
row1: row1,
row2: row2,
row3: row3,
row4: row4,
row5: row5
});
function pickComponent(_ref) {
let {
prng,
group,
values = []
} = _ref;
const componentCollection = components;
const key = prng.pick(values);
if (componentCollection[group][key]) {
return {
name: key,
value: componentCollection[group][key]
function $54aab1e1c7f6471a$export$5bc6178a9a86ed74({ prng: prng , group: group , values: values = [] }) {
const componentCollection = $44c27694b0d7a583$exports;
const key = prng.pick(values);
if (componentCollection[group][key]) return {
name: key,
value: componentCollection[group][key]
};
} else {
return undefined;
}
else return undefined;
}
function getComponents(_ref) {
let {
prng,
options
} = _ref;
const row1Component = pickComponent({
prng,
group: 'row1',
values: options.row1
});
const row2Component = pickComponent({
prng,
group: 'row2',
values: options.row2
});
const row3Component = pickComponent({
prng,
group: 'row3',
values: options.row3
});
const row4Component = pickComponent({
prng,
group: 'row4',
values: options.row4
});
const row5Component = pickComponent({
prng,
group: 'row5',
values: options.row5
});
return {
row1: prng.bool(options.row1Probability) ? row1Component : undefined,
row2: prng.bool(options.row2Probability) ? row2Component : undefined,
row3: prng.bool(options.row3Probability) ? row3Component : undefined,
row4: prng.bool(options.row4Probability) ? row4Component : undefined,
row5: prng.bool(options.row5Probability) ? row5Component : undefined
};
function $dbdc3ac067660577$export$4e811121b221213b({ prng: prng , options: options }) {
const row1Component = $54aab1e1c7f6471a$export$5bc6178a9a86ed74({
prng: prng,
group: 'row1',
values: options.row1
});
const row2Component = $54aab1e1c7f6471a$export$5bc6178a9a86ed74({
prng: prng,
group: 'row2',
values: options.row2
});
const row3Component = $54aab1e1c7f6471a$export$5bc6178a9a86ed74({
prng: prng,
group: 'row3',
values: options.row3
});
const row4Component = $54aab1e1c7f6471a$export$5bc6178a9a86ed74({
prng: prng,
group: 'row4',
values: options.row4
});
const row5Component = $54aab1e1c7f6471a$export$5bc6178a9a86ed74({
prng: prng,
group: 'row5',
values: options.row5
});
return {
row1: row1Component,
row2: row2Component,
row3: row3Component,
row4: row4Component,
row5: row5Component
};
}
const row = {
red: 'rgba(229, 57, 53, 1)',
amber: 'rgba(255, 179, 0, 1)',
blue: 'rgba(30, 136, 229, 1)',
blueGray: 'rgba(84, 110, 122, 1)',
brown: 'rgba(109, 76, 65, 1)',
cyan: 'rgba(0, 172, 193, 1)',
deepOrange: 'rgba(244, 81, 30, 1)',
deepPurple: 'rgba(94, 53, 177, 1)',
green: 'rgba(67, 160, 71, 1)',
grey: 'rgba(117, 117, 117, 1)',
indigo: 'rgba(57, 73, 171, 1)',
lightBlue: 'rgba(3, 155, 229, 1)',
lightGreen: 'rgba(124, 179, 66, 1)',
lime: 'rgba(192, 202, 51, 1)',
orange: 'rgba(251, 140, 0, 1)',
pink: 'rgba(216, 27, 96, 1)',
purple: 'rgba(142, 36, 170, 1)',
teal: 'rgba(0, 137, 123, 1)',
yellow: 'rgba(253, 216, 53, 1)'
var $a883267a4c8e812f$exports = {};
$parcel$export($a883267a4c8e812f$exports, "row", function () { return $507c16af52a2eaa2$export$120ff0929b202a6d; });
const $507c16af52a2eaa2$export$120ff0929b202a6d = {
red: 'rgba(229, 57, 53, 1)',
amber: 'rgba(255, 179, 0, 1)',
blue: 'rgba(30, 136, 229, 1)',
blueGray: 'rgba(84, 110, 122, 1)',
brown: 'rgba(109, 76, 65, 1)',
cyan: 'rgba(0, 172, 193, 1)',
deepOrange: 'rgba(244, 81, 30, 1)',
deepPurple: 'rgba(94, 53, 177, 1)',
green: 'rgba(67, 160, 71, 1)',
grey: 'rgba(117, 117, 117, 1)',
indigo: 'rgba(57, 73, 171, 1)',
lightBlue: 'rgba(3, 155, 229, 1)',
lightGreen: 'rgba(124, 179, 66, 1)',
lime: 'rgba(192, 202, 51, 1)',
orange: 'rgba(251, 140, 0, 1)',
pink: 'rgba(216, 27, 96, 1)',
purple: 'rgba(142, 36, 170, 1)',
teal: 'rgba(0, 137, 123, 1)',
yellow: 'rgba(253, 216, 53, 1)'
};
var colors = /*#__PURE__*/Object.freeze({
__proto__: null,
row: row
});
function pickColor(_ref) {
var _colorCollection$grou;
let {
prng,
group,
values = []
} = _ref;
const colorCollection = colors;
if (values.length === 0) {
values.push('transparent');
}
function $4631a7206a901ec1$export$c6d89e41e42fa994({ prng: prng , group: group , values: values = [] }) {
const colorCollection = $a883267a4c8e812f$exports;
if (values.length === 0) values.push('transparent');
const key = prng.pick(values);
var _key;
return {
name: key,
value: (_key = colorCollection[group][key]) !== null && _key !== void 0 ? _key : key
};
}
const key = prng.pick(values);
return {
name: key,
value: (_colorCollection$grou = colorCollection[group][key]) !== null && _colorCollection$grou !== void 0 ? _colorCollection$grou : key
};
function $46b8e5ca8d401339$export$6cee60e8aa85e528({ prng: prng , options: options }) {
return {
row: $4631a7206a901ec1$export$c6d89e41e42fa994({
prng: prng,
group: 'row',
values: options.rowColor
})
};
}
function getColors(_ref) {
let {
prng,
options
} = _ref;
return {
row: pickColor({
prng,
group: 'row',
values: options.rowColor
})
};
function $60cc3eb114a1bbaa$export$19269755e7fb6f76({ prng: prng , options: options , preview: preview }) {
// Write your modifications here
}
const dimensions = {
row1: {
width: 5,
height: 5
},
row2: {
width: 5,
height: 5
},
row3: {
width: 5,
height: 5
},
row4: {
width: 5,
height: 5
},
row5: {
width: 5,
height: 5
}
};
const style = {
meta: {
title: 'Identicon',
creator: 'Florian Körner',
license: {
name: 'CC0 1.0',
url: 'https://creativecommons.org/publicdomain/zero/1.0/'
}
},
schema: schema$1,
create: _ref => {
var _components$row1$valu, _components$row, _components$row2$valu, _components$row2, _components$row3$valu, _components$row3, _components$row4$valu, _components$row4, _components$row5$valu, _components$row5;
function $5f3254affc99bff2$export$2538c3cd8a13189f({ prng: prng , options: options , components: components , colors: colors , preview: preview }) {
// Write your modifications here
}
let {
prng,
options
} = _ref;
const components = getComponents({
prng,
options
});
const colors = getColors({
prng,
options
});
return {
attributes: {
viewBox: '0 0 5 5',
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: "".concat((_components$row1$valu = (_components$row = components.row1) === null || _components$row === void 0 ? void 0 : _components$row.value(components, colors)) !== null && _components$row1$valu !== void 0 ? _components$row1$valu : '').concat((_components$row2$valu = (_components$row2 = components.row2) === null || _components$row2 === void 0 ? void 0 : _components$row2.value(components, colors)) !== null && _components$row2$valu !== void 0 ? _components$row2$valu : '').concat((_components$row3$valu = (_components$row3 = components.row3) === null || _components$row3 === void 0 ? void 0 : _components$row3.value(components, colors)) !== null && _components$row3$valu !== void 0 ? _components$row3$valu : '').concat((_components$row4$valu = (_components$row4 = components.row4) === null || _components$row4 === void 0 ? void 0 : _components$row4.value(components, colors)) !== null && _components$row4$valu !== void 0 ? _components$row4$valu : '').concat((_components$row5$valu = (_components$row5 = components.row5) === null || _components$row5 === void 0 ? void 0 : _components$row5.value(components, colors)) !== null && _components$row5$valu !== void 0 ? _components$row5$valu : '')
};
},
preview: _ref2 => {
let {
prng,
options,
property
} = _ref2;
const componentGroup = property.toString();
const colorGroup = property.toString().replace(/Color$/, '');
const components = getComponents({
prng,
options
});
const colors = getColors({
prng,
options
});
if (componentGroup in components) {
var _components$component, _components$component2;
const {
width,
height
} = dimensions[componentGroup];
return {
attributes: {
viewBox: "0 0 ".concat(width, " ").concat(height),
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: (_components$component = (_components$component2 = components[componentGroup]) === null || _components$component2 === void 0 ? void 0 : _components$component2.value(components, colors)) !== null && _components$component !== void 0 ? _components$component : ''
};
const $abbf84bc71d3b682$export$62ad7b0c781000e9 = {
row1: {
width: 5,
height: 5
},
row2: {
width: 5,
height: 5
},
row3: {
width: 5,
height: 5
},
row4: {
width: 5,
height: 5
},
row5: {
width: 5,
height: 5
}
};
if (colorGroup in colors) {
return {
attributes: {
viewBox: "0 0 1 1",
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: "<rect width=\"1\" height=\"1\" fill=\"".concat(colors[colorGroup].value, "\" />")
};
const $f68ec7f1346a8ffa$export$1d567c320f4763bc = {
meta: {
title: 'Identicon',
creator: 'Florian Körner',
license: {
name: 'CC0 1.0',
url: 'https://creativecommons.org/publicdomain/zero/1.0/'
}
},
schema: (/*@__PURE__*/$parcel$interopDefault($79c0419e9ba9baaf$exports)),
create: ({ prng: prng , options: options })=>{
var ref, ref1, ref2, ref3, ref4;
$60cc3eb114a1bbaa$export$19269755e7fb6f76({
prng: prng,
options: options,
preview: false
});
const components = $dbdc3ac067660577$export$4e811121b221213b({
prng: prng,
options: options
});
const colors = $46b8e5ca8d401339$export$6cee60e8aa85e528({
prng: prng,
options: options
});
$5f3254affc99bff2$export$2538c3cd8a13189f({
prng: prng,
options: options,
components: components,
colors: colors,
preview: false
});
var ref5, ref6, ref7, ref8, ref9;
return {
attributes: {
viewBox: '0 0 5 5',
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: `${(ref5 = (ref = components.row1) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref5 !== void 0 ? ref5 : ''}${(ref6 = (ref1 = components.row2) === null || ref1 === void 0 ? void 0 : ref1.value(components, colors)) !== null && ref6 !== void 0 ? ref6 : ''}${(ref7 = (ref2 = components.row3) === null || ref2 === void 0 ? void 0 : ref2.value(components, colors)) !== null && ref7 !== void 0 ? ref7 : ''}${(ref8 = (ref3 = components.row4) === null || ref3 === void 0 ? void 0 : ref3.value(components, colors)) !== null && ref8 !== void 0 ? ref8 : ''}${(ref9 = (ref4 = components.row5) === null || ref4 === void 0 ? void 0 : ref4.value(components, colors)) !== null && ref9 !== void 0 ? ref9 : ''}`
};
},
preview: ({ prng: prng , options: options , property: property })=>{
const componentGroup = property.toString();
const colorGroup = property.toString().replace(/Color$/, '');
$60cc3eb114a1bbaa$export$19269755e7fb6f76({
prng: prng,
options: options,
preview: true
});
const components = $dbdc3ac067660577$export$4e811121b221213b({
prng: prng,
options: options
});
const colors = $46b8e5ca8d401339$export$6cee60e8aa85e528({
prng: prng,
options: options
});
$5f3254affc99bff2$export$2538c3cd8a13189f({
prng: prng,
options: options,
components: components,
colors: colors,
preview: true
});
if (componentGroup in components) {
var ref;
const { width: width , height: height } = $abbf84bc71d3b682$export$62ad7b0c781000e9[componentGroup];
var ref10;
return {
attributes: {
viewBox: `0 0 ${width} ${height}`,
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: (ref10 = (ref = components[componentGroup]) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref10 !== void 0 ? ref10 : ''
};
}
if (colorGroup in colors) return {
attributes: {
viewBox: `0 0 1 1`,
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: `<rect width="1" height="1" fill="${colors[colorGroup].value}" />`
};
return undefined;
}
return undefined;
}
};
/*!
* Identicon (@dicebear/identicon)
*
* Code licensed under MIT License.
* Copyright (c) 2021 Florian Körner
*
* Design "Identicon" by Florian Körner licensed under CC0 1.0.
* License: https://creativecommons.org/publicdomain/zero/1.0/
*/
let {
create,
preview,
meta,
schema
} = style;
export { create, meta, preview, schema };
const { create: $3a99f90e86714bf7$export$185802fd694ee1f5 , preview: $3a99f90e86714bf7$export$48c2d0f2f545ac27 , meta: $3a99f90e86714bf7$export$6990040ee07315 , schema: $3a99f90e86714bf7$export$4902baddc787debb } = $f68ec7f1346a8ffa$export$1d567c320f4763bc;
export {$3a99f90e86714bf7$export$185802fd694ee1f5 as create, $3a99f90e86714bf7$export$48c2d0f2f545ac27 as preview, $3a99f90e86714bf7$export$6990040ee07315 as meta, $3a99f90e86714bf7$export$4902baddc787debb as schema};
//# sourceMappingURL=index.es.js.map

@@ -1,527 +0,336 @@

'use strict';
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
Object.defineProperty(exports, '__esModule', { value: true });
$parcel$export(module.exports, "create", function () { return $f73a7abf2f66bf3e$export$185802fd694ee1f5; });
$parcel$export(module.exports, "preview", function () { return $f73a7abf2f66bf3e$export$48c2d0f2f545ac27; });
$parcel$export(module.exports, "meta", function () { return $f73a7abf2f66bf3e$export$6990040ee07315; });
$parcel$export(module.exports, "schema", function () { return $f73a7abf2f66bf3e$export$4902baddc787debb; });
var $1c9c838a0d0594c1$exports = {};
$1c9c838a0d0594c1$exports = JSON.parse("{\"title\":\"Options\",\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"properties\":{\"row1\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row2\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row3\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row4\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"row5\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"default\":[\"xooox\",\"xxoxx\",\"xoxox\",\"oxxxo\",\"xxxxx\",\"oxoxo\",\"ooxoo\"]},\"rowColor\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"string\",\"pattern\":\"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"},{\"type\":\"string\",\"enum\":[\"red\",\"amber\",\"blue\",\"blueGray\",\"brown\",\"cyan\",\"deepOrange\",\"deepPurple\",\"green\",\"grey\",\"indigo\",\"lightBlue\",\"lightGreen\",\"lime\",\"orange\",\"pink\",\"purple\",\"teal\",\"yellow\"]}]},\"default\":[\"red\",\"amber\",\"blue\",\"blueGray\",\"brown\",\"cyan\",\"deepOrange\",\"deepPurple\",\"green\",\"grey\",\"indigo\",\"lightBlue\",\"lightGreen\",\"lime\",\"orange\",\"pink\",\"purple\",\"teal\",\"yellow\"]}},\"additionalProperties\":false}");
var title = "Options";
var $schema = "http://json-schema.org/draft-07/schema#";
var properties = {
row1: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row1Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row2: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row2Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row3: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row3Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row4: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row4Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
row5: {
type: "array",
items: {
type: "string",
"enum": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
"default": [
"xooox",
"xxoxx",
"xoxox",
"oxxxo",
"xxxxx",
"oxoxo",
"ooxoo"
]
},
row5Probability: {
type: "integer",
minimum: 0,
maximum: 100,
"default": 88
},
rowColor: {
type: "array",
items: {
anyOf: [
{
type: "string",
pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
},
{
type: "string",
"enum": [
"red",
"amber",
"blue",
"blueGray",
"brown",
"cyan",
"deepOrange",
"deepPurple",
"green",
"grey",
"indigo",
"lightBlue",
"lightGreen",
"lime",
"orange",
"pink",
"purple",
"teal",
"yellow"
]
}
]
},
"default": [
"red",
"amber",
"blue",
"blueGray",
"brown",
"cyan",
"deepOrange",
"deepPurple",
"green",
"grey",
"indigo",
"lightBlue",
"lightGreen",
"lime",
"orange",
"pink",
"purple",
"teal",
"yellow"
]
}
};
var additionalProperties = false;
var schema$1 = {
title: title,
$schema: $schema,
properties: properties,
additionalProperties: additionalProperties
};
const row1 = {
xooox: (components, colors) => "<path d=\"M1 0H0v1h1V0ZM5 0H4v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 0H0v1h2V0ZM5 0H3v1h2V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 0h1v1H0V0ZM4 0h1v1H4V0ZM3 0H2v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 0h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 0h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 0H1v1h1V0ZM4 0H3v1h1V0Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 0h1v1H2z\"/>")
var $42d0933bf2dee194$exports = {};
$parcel$export($42d0933bf2dee194$exports, "row1", function () { return $17ca637edd5c8959$export$182befbf36a4d37d; });
$parcel$export($42d0933bf2dee194$exports, "row2", function () { return $6703394896dc9272$export$319e2490fcca642b; });
$parcel$export($42d0933bf2dee194$exports, "row3", function () { return $a3265595db34785a$export$c25effc8ac5ca265; });
$parcel$export($42d0933bf2dee194$exports, "row4", function () { return $bb8a78cc352ce33d$export$6c54081303ef3121; });
$parcel$export($42d0933bf2dee194$exports, "row5", function () { return $d0e7931ae538bdb2$export$42eb7c997f53cdf; });
const $17ca637edd5c8959$export$182befbf36a4d37d = {
xooox: (components, colors)=>`<path d="M1 0H0v1h1V0ZM5 0H4v1h1V0Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 0H0v1h2V0ZM5 0H3v1h2V0Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 0h1v1H0V0ZM4 0h1v1H4V0ZM3 0H2v1h1V0Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 0h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 0h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 0H1v1h1V0ZM4 0H3v1h1V0Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 0h1v1H2z"/>`
};
const row2 = {
xooox: (components, colors) => "<path d=\"M1 1H0v1h1V1ZM5 1H4v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 1H0v1h2V1ZM5 1H3v1h2V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 1h1v1H0V1ZM4 1h1v1H4V1ZM3 1H2v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 1h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 1h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 1H1v1h1V1ZM4 1H3v1h1V1Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 1h1v1H2z\"/>")
const $6703394896dc9272$export$319e2490fcca642b = {
xooox: (components, colors)=>`<path d="M1 1H0v1h1V1ZM5 1H4v1h1V1Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 1H0v1h2V1ZM5 1H3v1h2V1Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 1h1v1H0V1ZM4 1h1v1H4V1ZM3 1H2v1h1V1Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 1h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 1h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 1H1v1h1V1ZM4 1H3v1h1V1Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 1h1v1H2z"/>`
};
const row3 = {
xooox: (components, colors) => "<path d=\"M1 2H0v1h1V2ZM5 2H4v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 2H0v1h2V2ZM5 2H3v1h2V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 2h1v1H0V2ZM4 2h1v1H4V2ZM3 2H2v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 2h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 2h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 2H1v1h1V2ZM4 2H3v1h1V2Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 2h1v1H2z\"/>")
const $a3265595db34785a$export$c25effc8ac5ca265 = {
xooox: (components, colors)=>`<path d="M1 2H0v1h1V2ZM5 2H4v1h1V2Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 2H0v1h2V2ZM5 2H3v1h2V2Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 2h1v1H0V2ZM4 2h1v1H4V2ZM3 2H2v1h1V2Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 2h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 2h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 2H1v1h1V2ZM4 2H3v1h1V2Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 2h1v1H2z"/>`
};
const row4 = {
xooox: (components, colors) => "<path d=\"M1 3H0v1h1V3ZM5 3H4v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 3H0v1h2V3ZM5 3H3v1h2V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 3h1v1H0V3ZM4 3h1v1H4V3ZM3 3H2v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 3h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 3h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 3H1v1h1V3ZM4 3H3v1h1V3Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 3h1v1H2z\"/>")
const $bb8a78cc352ce33d$export$6c54081303ef3121 = {
xooox: (components, colors)=>`<path d="M1 3H0v1h1V3ZM5 3H4v1h1V3Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 3H0v1h2V3ZM5 3H3v1h2V3Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 3h1v1H0V3ZM4 3h1v1H4V3ZM3 3H2v1h1V3Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 3h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 3h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 3H1v1h1V3ZM4 3H3v1h1V3Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 3h1v1H2z"/>`
};
const row5 = {
xooox: (components, colors) => "<path d=\"M1 4H0v1h1V4ZM5 4H4v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
xxoxx: (components, colors) => "<path d=\"M2 4H0v1h2V4ZM5 4H3v1h2V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
xoxox: (components, colors) => "<path d=\"M0 4h1v1H0V4ZM4 4h1v1H4V4ZM3 4H2v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
oxxxo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M1 4h3v1H1z\"/>"),
xxxxx: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M0 4h5v1H0z\"/>"),
oxoxo: (components, colors) => "<path d=\"M2 4H1v1h1V4ZM4 4H3v1h1V4Z\" fill=\"".concat(colors.row.value, "\"/>"),
ooxoo: (components, colors) => "<path fill=\"".concat(colors.row.value, "\" d=\"M2 4h1v1H2z\"/>")
const $d0e7931ae538bdb2$export$42eb7c997f53cdf = {
xooox: (components, colors)=>`<path d="M1 4H0v1h1V4ZM5 4H4v1h1V4Z" fill="${colors.row.value}"/>`
,
xxoxx: (components, colors)=>`<path d="M2 4H0v1h2V4ZM5 4H3v1h2V4Z" fill="${colors.row.value}"/>`
,
xoxox: (components, colors)=>`<path d="M0 4h1v1H0V4ZM4 4h1v1H4V4ZM3 4H2v1h1V4Z" fill="${colors.row.value}"/>`
,
oxxxo: (components, colors)=>`<path fill="${colors.row.value}" d="M1 4h3v1H1z"/>`
,
xxxxx: (components, colors)=>`<path fill="${colors.row.value}" d="M0 4h5v1H0z"/>`
,
oxoxo: (components, colors)=>`<path d="M2 4H1v1h1V4ZM4 4H3v1h1V4Z" fill="${colors.row.value}"/>`
,
ooxoo: (components, colors)=>`<path fill="${colors.row.value}" d="M2 4h1v1H2z"/>`
};
var components = /*#__PURE__*/Object.freeze({
__proto__: null,
row1: row1,
row2: row2,
row3: row3,
row4: row4,
row5: row5
});
function pickComponent(_ref) {
let {
prng,
group,
values = []
} = _ref;
const componentCollection = components;
const key = prng.pick(values);
if (componentCollection[group][key]) {
return {
name: key,
value: componentCollection[group][key]
function $716d6de2fdf3248d$export$5bc6178a9a86ed74({ prng: prng , group: group , values: values = [] }) {
const componentCollection = $42d0933bf2dee194$exports;
const key = prng.pick(values);
if (componentCollection[group][key]) return {
name: key,
value: componentCollection[group][key]
};
} else {
return undefined;
}
else return undefined;
}
function getComponents(_ref) {
let {
prng,
options
} = _ref;
const row1Component = pickComponent({
prng,
group: 'row1',
values: options.row1
});
const row2Component = pickComponent({
prng,
group: 'row2',
values: options.row2
});
const row3Component = pickComponent({
prng,
group: 'row3',
values: options.row3
});
const row4Component = pickComponent({
prng,
group: 'row4',
values: options.row4
});
const row5Component = pickComponent({
prng,
group: 'row5',
values: options.row5
});
return {
row1: prng.bool(options.row1Probability) ? row1Component : undefined,
row2: prng.bool(options.row2Probability) ? row2Component : undefined,
row3: prng.bool(options.row3Probability) ? row3Component : undefined,
row4: prng.bool(options.row4Probability) ? row4Component : undefined,
row5: prng.bool(options.row5Probability) ? row5Component : undefined
};
function $59751ac1f9aa66b3$export$4e811121b221213b({ prng: prng , options: options }) {
const row1Component = $716d6de2fdf3248d$export$5bc6178a9a86ed74({
prng: prng,
group: 'row1',
values: options.row1
});
const row2Component = $716d6de2fdf3248d$export$5bc6178a9a86ed74({
prng: prng,
group: 'row2',
values: options.row2
});
const row3Component = $716d6de2fdf3248d$export$5bc6178a9a86ed74({
prng: prng,
group: 'row3',
values: options.row3
});
const row4Component = $716d6de2fdf3248d$export$5bc6178a9a86ed74({
prng: prng,
group: 'row4',
values: options.row4
});
const row5Component = $716d6de2fdf3248d$export$5bc6178a9a86ed74({
prng: prng,
group: 'row5',
values: options.row5
});
return {
row1: row1Component,
row2: row2Component,
row3: row3Component,
row4: row4Component,
row5: row5Component
};
}
const row = {
red: 'rgba(229, 57, 53, 1)',
amber: 'rgba(255, 179, 0, 1)',
blue: 'rgba(30, 136, 229, 1)',
blueGray: 'rgba(84, 110, 122, 1)',
brown: 'rgba(109, 76, 65, 1)',
cyan: 'rgba(0, 172, 193, 1)',
deepOrange: 'rgba(244, 81, 30, 1)',
deepPurple: 'rgba(94, 53, 177, 1)',
green: 'rgba(67, 160, 71, 1)',
grey: 'rgba(117, 117, 117, 1)',
indigo: 'rgba(57, 73, 171, 1)',
lightBlue: 'rgba(3, 155, 229, 1)',
lightGreen: 'rgba(124, 179, 66, 1)',
lime: 'rgba(192, 202, 51, 1)',
orange: 'rgba(251, 140, 0, 1)',
pink: 'rgba(216, 27, 96, 1)',
purple: 'rgba(142, 36, 170, 1)',
teal: 'rgba(0, 137, 123, 1)',
yellow: 'rgba(253, 216, 53, 1)'
var $23a202be91c2e028$exports = {};
$parcel$export($23a202be91c2e028$exports, "row", function () { return $aa55541ba6d87d25$export$120ff0929b202a6d; });
const $aa55541ba6d87d25$export$120ff0929b202a6d = {
red: 'rgba(229, 57, 53, 1)',
amber: 'rgba(255, 179, 0, 1)',
blue: 'rgba(30, 136, 229, 1)',
blueGray: 'rgba(84, 110, 122, 1)',
brown: 'rgba(109, 76, 65, 1)',
cyan: 'rgba(0, 172, 193, 1)',
deepOrange: 'rgba(244, 81, 30, 1)',
deepPurple: 'rgba(94, 53, 177, 1)',
green: 'rgba(67, 160, 71, 1)',
grey: 'rgba(117, 117, 117, 1)',
indigo: 'rgba(57, 73, 171, 1)',
lightBlue: 'rgba(3, 155, 229, 1)',
lightGreen: 'rgba(124, 179, 66, 1)',
lime: 'rgba(192, 202, 51, 1)',
orange: 'rgba(251, 140, 0, 1)',
pink: 'rgba(216, 27, 96, 1)',
purple: 'rgba(142, 36, 170, 1)',
teal: 'rgba(0, 137, 123, 1)',
yellow: 'rgba(253, 216, 53, 1)'
};
var colors = /*#__PURE__*/Object.freeze({
__proto__: null,
row: row
});
function pickColor(_ref) {
var _colorCollection$grou;
let {
prng,
group,
values = []
} = _ref;
const colorCollection = colors;
if (values.length === 0) {
values.push('transparent');
}
function $a6f75ce193740a7e$export$c6d89e41e42fa994({ prng: prng , group: group , values: values = [] }) {
const colorCollection = $23a202be91c2e028$exports;
if (values.length === 0) values.push('transparent');
const key = prng.pick(values);
var _key;
return {
name: key,
value: (_key = colorCollection[group][key]) !== null && _key !== void 0 ? _key : key
};
}
const key = prng.pick(values);
return {
name: key,
value: (_colorCollection$grou = colorCollection[group][key]) !== null && _colorCollection$grou !== void 0 ? _colorCollection$grou : key
};
function $682d7af617804703$export$6cee60e8aa85e528({ prng: prng , options: options }) {
return {
row: $a6f75ce193740a7e$export$c6d89e41e42fa994({
prng: prng,
group: 'row',
values: options.rowColor
})
};
}
function getColors(_ref) {
let {
prng,
options
} = _ref;
return {
row: pickColor({
prng,
group: 'row',
values: options.rowColor
})
};
function $7246b374a5b104b0$export$19269755e7fb6f76({ prng: prng , options: options , preview: preview }) {
// Write your modifications here
}
const dimensions = {
row1: {
width: 5,
height: 5
},
row2: {
width: 5,
height: 5
},
row3: {
width: 5,
height: 5
},
row4: {
width: 5,
height: 5
},
row5: {
width: 5,
height: 5
}
};
const style = {
meta: {
title: 'Identicon',
creator: 'Florian Körner',
license: {
name: 'CC0 1.0',
url: 'https://creativecommons.org/publicdomain/zero/1.0/'
}
},
schema: schema$1,
create: _ref => {
var _components$row1$valu, _components$row, _components$row2$valu, _components$row2, _components$row3$valu, _components$row3, _components$row4$valu, _components$row4, _components$row5$valu, _components$row5;
function $b6e6367da03692b0$export$2538c3cd8a13189f({ prng: prng , options: options , components: components , colors: colors , preview: preview }) {
// Write your modifications here
}
let {
prng,
options
} = _ref;
const components = getComponents({
prng,
options
});
const colors = getColors({
prng,
options
});
return {
attributes: {
viewBox: '0 0 5 5',
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: "".concat((_components$row1$valu = (_components$row = components.row1) === null || _components$row === void 0 ? void 0 : _components$row.value(components, colors)) !== null && _components$row1$valu !== void 0 ? _components$row1$valu : '').concat((_components$row2$valu = (_components$row2 = components.row2) === null || _components$row2 === void 0 ? void 0 : _components$row2.value(components, colors)) !== null && _components$row2$valu !== void 0 ? _components$row2$valu : '').concat((_components$row3$valu = (_components$row3 = components.row3) === null || _components$row3 === void 0 ? void 0 : _components$row3.value(components, colors)) !== null && _components$row3$valu !== void 0 ? _components$row3$valu : '').concat((_components$row4$valu = (_components$row4 = components.row4) === null || _components$row4 === void 0 ? void 0 : _components$row4.value(components, colors)) !== null && _components$row4$valu !== void 0 ? _components$row4$valu : '').concat((_components$row5$valu = (_components$row5 = components.row5) === null || _components$row5 === void 0 ? void 0 : _components$row5.value(components, colors)) !== null && _components$row5$valu !== void 0 ? _components$row5$valu : '')
};
},
preview: _ref2 => {
let {
prng,
options,
property
} = _ref2;
const componentGroup = property.toString();
const colorGroup = property.toString().replace(/Color$/, '');
const components = getComponents({
prng,
options
});
const colors = getColors({
prng,
options
});
if (componentGroup in components) {
var _components$component, _components$component2;
const {
width,
height
} = dimensions[componentGroup];
return {
attributes: {
viewBox: "0 0 ".concat(width, " ").concat(height),
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: (_components$component = (_components$component2 = components[componentGroup]) === null || _components$component2 === void 0 ? void 0 : _components$component2.value(components, colors)) !== null && _components$component !== void 0 ? _components$component : ''
};
const $134652c1e8e3019a$export$62ad7b0c781000e9 = {
row1: {
width: 5,
height: 5
},
row2: {
width: 5,
height: 5
},
row3: {
width: 5,
height: 5
},
row4: {
width: 5,
height: 5
},
row5: {
width: 5,
height: 5
}
};
if (colorGroup in colors) {
return {
attributes: {
viewBox: "0 0 1 1",
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: "<rect width=\"1\" height=\"1\" fill=\"".concat(colors[colorGroup].value, "\" />")
};
const $8a36b11f65c4a1c9$export$1d567c320f4763bc = {
meta: {
title: 'Identicon',
creator: 'Florian Körner',
license: {
name: 'CC0 1.0',
url: 'https://creativecommons.org/publicdomain/zero/1.0/'
}
},
schema: (/*@__PURE__*/$parcel$interopDefault($1c9c838a0d0594c1$exports)),
create: ({ prng: prng , options: options })=>{
var ref, ref1, ref2, ref3, ref4;
$7246b374a5b104b0$export$19269755e7fb6f76({
prng: prng,
options: options,
preview: false
});
const components = $59751ac1f9aa66b3$export$4e811121b221213b({
prng: prng,
options: options
});
const colors = $682d7af617804703$export$6cee60e8aa85e528({
prng: prng,
options: options
});
$b6e6367da03692b0$export$2538c3cd8a13189f({
prng: prng,
options: options,
components: components,
colors: colors,
preview: false
});
var ref5, ref6, ref7, ref8, ref9;
return {
attributes: {
viewBox: '0 0 5 5',
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: `${(ref5 = (ref = components.row1) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref5 !== void 0 ? ref5 : ''}${(ref6 = (ref1 = components.row2) === null || ref1 === void 0 ? void 0 : ref1.value(components, colors)) !== null && ref6 !== void 0 ? ref6 : ''}${(ref7 = (ref2 = components.row3) === null || ref2 === void 0 ? void 0 : ref2.value(components, colors)) !== null && ref7 !== void 0 ? ref7 : ''}${(ref8 = (ref3 = components.row4) === null || ref3 === void 0 ? void 0 : ref3.value(components, colors)) !== null && ref8 !== void 0 ? ref8 : ''}${(ref9 = (ref4 = components.row5) === null || ref4 === void 0 ? void 0 : ref4.value(components, colors)) !== null && ref9 !== void 0 ? ref9 : ''}`
};
},
preview: ({ prng: prng , options: options , property: property })=>{
const componentGroup = property.toString();
const colorGroup = property.toString().replace(/Color$/, '');
$7246b374a5b104b0$export$19269755e7fb6f76({
prng: prng,
options: options,
preview: true
});
const components = $59751ac1f9aa66b3$export$4e811121b221213b({
prng: prng,
options: options
});
const colors = $682d7af617804703$export$6cee60e8aa85e528({
prng: prng,
options: options
});
$b6e6367da03692b0$export$2538c3cd8a13189f({
prng: prng,
options: options,
components: components,
colors: colors,
preview: true
});
if (componentGroup in components) {
var ref;
const { width: width , height: height } = $134652c1e8e3019a$export$62ad7b0c781000e9[componentGroup];
var ref10;
return {
attributes: {
viewBox: `0 0 ${width} ${height}`,
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: (ref10 = (ref = components[componentGroup]) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref10 !== void 0 ? ref10 : ''
};
}
if (colorGroup in colors) return {
attributes: {
viewBox: `0 0 1 1`,
fill: 'none',
'shape-rendering': 'crispEdges'
},
body: `<rect width="1" height="1" fill="${colors[colorGroup].value}" />`
};
return undefined;
}
return undefined;
}
};
/*!
* Identicon (@dicebear/identicon)
*
* Code licensed under MIT License.
* Copyright (c) 2021 Florian Körner
*
* Design "Identicon" by Florian Körner licensed under CC0 1.0.
* License: https://creativecommons.org/publicdomain/zero/1.0/
*/
let {
create,
preview,
meta,
schema
} = style;
exports.create = create;
exports.meta = meta;
exports.preview = preview;
exports.schema = schema;
const { create: $f73a7abf2f66bf3e$export$185802fd694ee1f5 , preview: $f73a7abf2f66bf3e$export$48c2d0f2f545ac27 , meta: $f73a7abf2f66bf3e$export$6990040ee07315 , schema: $f73a7abf2f66bf3e$export$4902baddc787debb } = $8a36b11f65c4a1c9$export$1d567c320f4763bc;
//# sourceMappingURL=index.js.map
{
"name": "@dicebear/identicon",
"version": "5.0.0-alpha.6",
"version": "5.0.0-alpha.7",
"description": "Avatar style for DiceBear",

@@ -16,6 +16,6 @@ "keywords": [

"license": "MIT",
"browserslist": ">.25%, not IE > 0, not dead",
"source": "src/index.ts",
"main": "dist/index.js",
"module": "dist/index.es.js",
"browser": "dist/index.umd.js",
"types": "dist/index.d.ts",

@@ -31,18 +31,23 @@ "files": [

"prebuild": "shx rm -rf dist",
"build": "dicebear-project build DiceBear.Identicon"
"build": "npm-run-all build:*",
"build:schema": "json2ts src/schema.json src/options.ts",
"build:parcel": "parcel build"
},
"devDependencies": {
"@dicebear/core": "^5.0.0-alpha.6",
"@dicebear/core": "^5.0.0-alpha.7",
"@parcel/packager-ts": "^2.0.1",
"@parcel/transformer-typescript-types": "^2.0.1",
"@tsconfig/recommended": "^1.0.0",
"@types/jest": "^26.0.22",
"@types/node": "^10.11.6",
"dicebear-project": "^5.0.0-alpha.6",
"jest": "^26.6.3",
"json-schema-to-typescript": "^10.1.5",
"npm-run-all": "^4.1.5",
"parcel": "^2.0.1",
"shx": "^0.3.3",
"ts-jest": "^26.5.4",
"typescript": "^4.2.3",
"utility-types": "^3.10.0"
"typescript": "^4.5.2"
},
"peerDependencies": {
"@dicebear/core": "^5.0.0-alpha.5"
"@dicebear/core": "^5.0.0-alpha.6"
},

@@ -52,3 +57,3 @@ "publishConfig": {

},
"gitHead": "d6c8c12102c3aa2071e6795972574ccd4a40b8b7"
"gitHead": "39873c5556400a5cba342abce15a376470613d19"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc