@dicebear/bottts 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/face.js +6 -6
- package/lib/components/sides.js +7 -7
- package/lib/components/top.js +8 -8
- package/lib/index.js +0 -4
- package/lib/schema.js +1 -1
- package/lib/{hooks/onPreCreate.js → utils/convertColor.d.ts} +1 -3
- package/lib/{hooks/onPostCreate.js → utils/convertColor.js} +5 -2
- package/lib/utils/getColors.js +2 -1
- package/package.json +3 -3
- package/lib/hooks/onPostCreate.d.ts +0 -16
- package/lib/hooks/onPreCreate.d.ts +0 -14
package/lib/components/face.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const face = {
|
|
9
|
-
'round01': (components, colors) => { var _a, _b; return `<mask id="faceRound01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M66 0c58.35 0 64 40.69 64 78 0 33.31-25.47 42-64 42-37.46 0-66-8.69-66-42C0 40.69 7.65 0 66 0Z" fill="#fff"/></mask><g mask="url(#faceRound01-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${escape.xml(
|
|
10
|
-
'round02': (components, colors) => { var _a, _b; return `<mask id="faceRound02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 31v-1c.18-.48.4-1.5 1-3 .83-3.06 2.78-6.56 6-10C16.7 6.6 35.17 0 65 0s48.3 6.6 58 17c3.22 3.44 5.17 6.94 6 10 .6 1.5.82 2.52 1 3v40c0-.1-.03.5 0 1a53.93 53.93 0 0 1-1 6c-1.19 6-3.4 11.91-7 17-9.72 16.34-27.74 26-57 26s-47.28-9.66-57-26C4.4 88.91 2.2 83 1 77a53.95 53.95 0 0 1-1-6c.03-.45 0-1.32 0-1V31Z" fill="#fff"/></mask><g mask="url(#faceRound02-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${escape.xml(
|
|
11
|
-
'square01': (components, colors) => { var _a, _b; return `<mask id="faceSquare01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><rect width="130" height="120" rx="18" fill="#fff"/></mask><g mask="url(#faceSquare01-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(
|
|
12
|
-
'square02': (components, colors) => { var _a, _b; return `<mask id="faceSquare02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path d="M0 12A12 12 0 0 1 12 0h106a12 12 0 0 1 12 12v70a38 38 0 0 1-38 38H38A38 38 0 0 1 0 82V12Z" fill="#fff"/></mask><g mask="url(#faceSquare02-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(
|
|
13
|
-
'square03': (components, colors) => { var _a, _b; return `<mask id="faceSquare03-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 18A18 18 0 0 1 18 0h94a18 18 0 0 1 18 18v27.15a40 40 0 0 1-2.28 13.31L110.24 108a18 18 0 0 1-16.98 12H36.74a18 18 0 0 1-16.98-12L2.28 58.45A40 40 0 0 1 0 45.15V18Z" fill="#fff"/></mask><g mask="url(#faceSquare03-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(
|
|
14
|
-
'square04': (components, colors) => { var _a, _b; return `<mask id="faceSquare04-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 102V68.85a40 40 0 0 1 2.28-13.31L19.76 12A18 18 0 0 1 36.74 0h56.52a18 18 0 0 1 16.98 12l17.48 43.54A40 40 0 0 1 130 68.85V102a18 18 0 0 1-18 18H18a18 18 0 0 1-18-18Z" fill="#fff"/></mask><g mask="url(#faceSquare04-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(
|
|
9
|
+
'round01': (components, colors) => { var _a, _b; return `<mask id="faceRound01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M66 0c58.35 0 64 40.69 64 78 0 33.31-25.47 42-64 42-37.46 0-66-8.69-66-42C0 40.69 7.65 0 66 0Z" fill="#fff"/></mask><g mask="url(#faceRound01-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
10
|
+
'round02': (components, colors) => { var _a, _b; return `<mask id="faceRound02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 31v-1c.18-.48.4-1.5 1-3 .83-3.06 2.78-6.56 6-10C16.7 6.6 35.17 0 65 0s48.3 6.6 58 17c3.22 3.44 5.17 6.94 6 10 .6 1.5.82 2.52 1 3v40c0-.1-.03.5 0 1a53.93 53.93 0 0 1-1 6c-1.19 6-3.4 11.91-7 17-9.72 16.34-27.74 26-57 26s-47.28-9.66-57-26C4.4 88.91 2.2 83 1 77a53.95 53.95 0 0 1-1-6c.03-.45 0-1.32 0-1V31Z" fill="#fff"/></mask><g mask="url(#faceRound02-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
11
|
+
'square01': (components, colors) => { var _a, _b; return `<mask id="faceSquare01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><rect width="130" height="120" rx="18" fill="#fff"/></mask><g mask="url(#faceSquare01-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
12
|
+
'square02': (components, colors) => { var _a, _b; return `<mask id="faceSquare02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path d="M0 12A12 12 0 0 1 12 0h106a12 12 0 0 1 12 12v70a38 38 0 0 1-38 38H38A38 38 0 0 1 0 82V12Z" fill="#fff"/></mask><g mask="url(#faceSquare02-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
13
|
+
'square03': (components, colors) => { var _a, _b; return `<mask id="faceSquare03-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 18A18 18 0 0 1 18 0h94a18 18 0 0 1 18 18v27.15a40 40 0 0 1-2.28 13.31L110.24 108a18 18 0 0 1-16.98 12H36.74a18 18 0 0 1-16.98-12L2.28 58.45A40 40 0 0 1 0 45.15V18Z" fill="#fff"/></mask><g mask="url(#faceSquare03-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
14
|
+
'square04': (components, colors) => { var _a, _b; return `<mask id="faceSquare04-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 102V68.85a40 40 0 0 1 2.28-13.31L19.76 12A18 18 0 0 1 36.74 0h56.52a18 18 0 0 1 16.98 12l17.48 43.54A40 40 0 0 1 130 68.85V102a18 18 0 0 1-18 18H18a18 18 0 0 1-18-18Z" fill="#fff"/></mask><g mask="url(#faceSquare04-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${escape.xml(`${colors.base}`)}"/><g transform="translate(-1 -1)">${(_b = (_a = components.texture) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g></g>`; },
|
|
15
15
|
};
|
package/lib/components/sides.js
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const sides = {
|
|
9
|
-
'antenna01': (components, colors) => `<mask id="sidesAntenna01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="6" y="11" width="156" height="51"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 11h-2v20h1.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74C6 34.04 6 35.16 6 37.4v1.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44H18v10.6c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V20.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C50.96 14 49.84 14 47.6 14H24.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74c-.44.86-.44 1.98-.44 4.22V31h-5V11Zm113 23.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44h23.2c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v11.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44h-23.2c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74c-.44-.86-.44-1.98-.44-4.22V34.4Z" fill="#0076DE"/></mask><g mask="url(#sidesAntenna01-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
10
|
-
'antenna02': (components, colors) => `<mask id="sidesAntenna02-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="9" width="160" height="51"><path d="M160 9h2v19h1.6c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v19.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44h-23.2c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74c-.44-.86-.44-1.98-.44-4.22V34.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44H160V9ZM10 34.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44h23.2c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v19.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44H16.4c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74C10 56.96 10 55.84 10 53.6V34.4Z" fill="#0076DE"/></mask><g mask="url(#sidesAntenna02-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
11
|
-
'cables01': (components, colors) => `<path d="M38 12c-2.95 11.7-19.9 6.67-23.37 18-3.46 11.35 8.03 20 17.53 20" stroke="#2A3544" stroke-width="6" opacity=".9"/><path d="M150 55c8.4 3.49 20.1-7.6 16-16.5-4.1-8.9-16-6.7-16-19.3" stroke="#2A3544" stroke-width="4" opacity=".9"/><mask id="sidesCables01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="21" y="6" width="138" height="58"><path d="M138 6a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h19a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-19ZM21 37c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H23a2 2 0 0 1-2-2V37ZM136 44c0-1.1.9-2 2-2h19a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2h-19a2 2 0 0 1-2-2V44Z" fill="#273951"/></mask><g mask="url(#sidesCables01-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
12
|
-
'cables02': (components, colors) => `<g opacity=".9" stroke="#2A3544"><ellipse cx="32.5" cy="23" rx="16.5" ry="18" stroke-width="6"/><path d="M29.51 36.76c-7.4 4.29-17 1.55-21.42-6.1" stroke-width="4"/><ellipse cx="28.5" cy="52.5" rx="16.5" ry="14.5" stroke-width="4"/></g><g opacity=".9" stroke="#2A3544"><path d="M168.6 60.42c-4.27-7.41-13.95-9.84-21.6-5.42" stroke-width="4"/><ellipse cx="148.5" cy="22.5" rx="16.5" ry="15.5" stroke-width="6"/></g><mask id="sidesCables02-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="21" y="0" width="138" height="72"><path d="M145 0a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2h-12ZM23 27a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V29a2 2 0 0 0-2-2H23ZM24 60a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2H24ZM143 44c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2V44Z" fill="#273951"/></mask><g mask="url(#sidesCables02-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
13
|
-
'round': (components, colors) => `<mask id="sidesRound-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="12" y="16" width="156" height="45"><path d="M30 61c-9.94 0-18-10.07-18-22.5S20.06 16 30 16s18 10.07 18 22.5S39.94 61 30 61ZM150 61c9.94 0 18-10.07 18-22.5S159.94 16 150 16s-18 10.07-18 22.5S140.06 61 150 61Z" fill="#E1E6E8"/></mask><g mask="url(#sidesRound-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
14
|
-
'square': (components, colors) => `<mask id="sidesSquare-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="14" y="16" width="152" height="44"><path d="M14.98 20.91C14 22.84 14 25.36 14 30.4v15.2c0 5.04 0 7.56.98 9.49a9 9 0 0 0 3.93 3.93c1.93.98 4.45.98 9.49.98h7.2c5.04 0 7.56 0 9.49-.98a9 9 0 0 0 3.93-3.93c.98-1.93.98-4.45.98-9.5V30.4c0-5.04 0-7.56-.98-9.49A9 9 0 0 0 45.09 17c-1.93-.98-4.45-.98-9.5-.98h-7.2c-5.04 0-7.56 0-9.49.98A9 9 0 0 0 15 20.91ZM130.98 20.91c-.98 1.93-.98 4.45-.98 9.49v15.2c0 5.04 0 7.56.98 9.49a9 9 0 0 0 3.93 3.93c1.93.98 4.45.98 9.5.98h7.19c5.04 0 7.56 0 9.49-.98a9 9 0 0 0 3.93-3.93c.98-1.93.98-4.45.98-9.5V30.4c0-5.04 0-7.56-.98-9.49a9 9 0 0 0-3.93-3.92c-1.93-.98-4.45-.98-9.5-.98h-7.19c-5.04 0-7.56 0-9.49.98a9 9 0 0 0-3.93 3.93Z" fill="#0076DE"/></mask><g mask="url(#sidesSquare-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
15
|
-
'squareAssymetric': (components, colors) => `<mask id="sidesSquareAssymetric-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="8" width="165" height="60"><path d="M134.44 10.18c-.44.86-.44 1.98-.44 4.22v47.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V53c1.35-.02 2.16-.1 2.82-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V29.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74c-.66-.34-1.47-.42-2.82-.43V14.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C166.96 8 165.84 8 163.6 8h-23.2c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74ZM20.44 17.18c-.44.86-.44 1.98-.44 4.22V31h-3.6c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74c-.44.86-.44 1.98-.44 4.22v17.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V21.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C42.96 15 41.84 15 39.6 15H26.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74Z" fill="#0076DE"/></mask><g mask="url(#sidesSquareAssymetric-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(
|
|
9
|
+
'antenna01': (components, colors) => `<mask id="sidesAntenna01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="6" y="11" width="156" height="51"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 11h-2v20h1.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74C6 34.04 6 35.16 6 37.4v1.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44H18v10.6c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V20.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C50.96 14 49.84 14 47.6 14H24.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74c-.44.86-.44 1.98-.44 4.22V31h-5V11Zm113 23.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44h23.2c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v11.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44h-23.2c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74c-.44-.86-.44-1.98-.44-4.22V34.4Z" fill="#0076DE"/></mask><g mask="url(#sidesAntenna01-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path fill="#fff" fill-opacity=".3" d="M0 0h180v76H0z"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M11 11h2v20h-2z"/><circle cx="12" cy="8" r="4" fill="#FFEA8F"/><circle cx="13" cy="7" r="2" fill="#fff"/>`,
|
|
10
|
+
'antenna02': (components, colors) => `<mask id="sidesAntenna02-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="9" width="160" height="51"><path d="M160 9h2v19h1.6c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v19.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44h-23.2c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74c-.44-.86-.44-1.98-.44-4.22V34.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44H160V9ZM10 34.4c0-2.24 0-3.36.44-4.22a4 4 0 0 1 1.74-1.74c.86-.44 1.98-.44 4.22-.44h23.2c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22v19.2c0 2.24 0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.86.44-1.98.44-4.22.44H16.4c-2.24 0-3.36 0-4.22-.44a4 4 0 0 1-1.74-1.74C10 56.96 10 55.84 10 53.6V34.4Z" fill="#0076DE"/></mask><g mask="url(#sidesAntenna02-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M160 8h2v20h-2z"/><circle cx="161" cy="5" r="4" fill="#E1E6E8"/><circle cx="162" cy="4" r="2" fill="#fff"/>`,
|
|
11
|
+
'cables01': (components, colors) => `<path d="M38 12c-2.95 11.7-19.9 6.67-23.37 18-3.46 11.35 8.03 20 17.53 20" stroke="#2A3544" stroke-width="6" opacity=".9"/><path d="M150 55c8.4 3.49 20.1-7.6 16-16.5-4.1-8.9-16-6.7-16-19.3" stroke="#2A3544" stroke-width="4" opacity=".9"/><mask id="sidesCables01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="21" y="6" width="138" height="58"><path d="M138 6a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h19a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-19ZM21 37c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H23a2 2 0 0 1-2-2V37ZM136 44c0-1.1.9-2 2-2h19a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2h-19a2 2 0 0 1-2-2V44Z" fill="#273951"/></mask><g mask="url(#sidesCables01-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,
|
|
12
|
+
'cables02': (components, colors) => `<g opacity=".9" stroke="#2A3544"><ellipse cx="32.5" cy="23" rx="16.5" ry="18" stroke-width="6"/><path d="M29.51 36.76c-7.4 4.29-17 1.55-21.42-6.1" stroke-width="4"/><ellipse cx="28.5" cy="52.5" rx="16.5" ry="14.5" stroke-width="4"/></g><g opacity=".9" stroke="#2A3544"><path d="M168.6 60.42c-4.27-7.41-13.95-9.84-21.6-5.42" stroke-width="4"/><ellipse cx="148.5" cy="22.5" rx="16.5" ry="15.5" stroke-width="6"/></g><mask id="sidesCables02-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="21" y="0" width="138" height="72"><path d="M145 0a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2h-12ZM23 27a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V29a2 2 0 0 0-2-2H23ZM24 60a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2H24ZM143 44c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2V44Z" fill="#273951"/></mask><g mask="url(#sidesCables02-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,
|
|
13
|
+
'round': (components, colors) => `<mask id="sidesRound-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="12" y="16" width="156" height="45"><path d="M30 61c-9.94 0-18-10.07-18-22.5S20.06 16 30 16s18 10.07 18 22.5S39.94 61 30 61ZM150 61c9.94 0 18-10.07 18-22.5S159.94 16 150 16s-18 10.07-18 22.5S140.06 61 150 61Z" fill="#E1E6E8"/></mask><g mask="url(#sidesRound-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".2" d="M20 0h140v76H20z"/></g>`,
|
|
14
|
+
'square': (components, colors) => `<mask id="sidesSquare-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="14" y="16" width="152" height="44"><path d="M14.98 20.91C14 22.84 14 25.36 14 30.4v15.2c0 5.04 0 7.56.98 9.49a9 9 0 0 0 3.93 3.93c1.93.98 4.45.98 9.49.98h7.2c5.04 0 7.56 0 9.49-.98a9 9 0 0 0 3.93-3.93c.98-1.93.98-4.45.98-9.5V30.4c0-5.04 0-7.56-.98-9.49A9 9 0 0 0 45.09 17c-1.93-.98-4.45-.98-9.5-.98h-7.2c-5.04 0-7.56 0-9.49.98A9 9 0 0 0 15 20.91ZM130.98 20.91c-.98 1.93-.98 4.45-.98 9.49v15.2c0 5.04 0 7.56.98 9.49a9 9 0 0 0 3.93 3.93c1.93.98 4.45.98 9.5.98h7.19c5.04 0 7.56 0 9.49-.98a9 9 0 0 0 3.93-3.93c.98-1.93.98-4.45.98-9.5V30.4c0-5.04 0-7.56-.98-9.49a9 9 0 0 0-3.93-3.92c-1.93-.98-4.45-.98-9.5-.98h-7.19c-5.04 0-7.56 0-9.49.98a9 9 0 0 0-3.93 3.93Z" fill="#0076DE"/></mask><g mask="url(#sidesSquare-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g>`,
|
|
15
|
+
'squareAssymetric': (components, colors) => `<mask id="sidesSquareAssymetric-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="8" width="165" height="60"><path d="M134.44 10.18c-.44.86-.44 1.98-.44 4.22v47.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V53c1.35-.02 2.16-.1 2.82-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V29.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74c-.66-.34-1.47-.42-2.82-.43V14.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C166.96 8 165.84 8 163.6 8h-23.2c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74ZM20.44 17.18c-.44.86-.44 1.98-.44 4.22V31h-3.6c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74c-.44.86-.44 1.98-.44 4.22v17.2c0 2.24 0 3.36.44 4.22a4 4 0 0 0 1.74 1.74c.86.44 1.98.44 4.22.44h23.2c2.24 0 3.36 0 4.22-.44a4 4 0 0 0 1.74-1.74c.44-.86.44-1.98.44-4.22V21.4c0-2.24 0-3.36-.44-4.22a4 4 0 0 0-1.74-1.74C42.96 15 41.84 15 39.6 15H26.4c-2.24 0-3.36 0-4.22.44a4 4 0 0 0-1.74 1.74Z" fill="#0076DE"/></mask><g mask="url(#sidesSquareAssymetric-a)"><path d="M0 0h180v76H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 47h180v29H0z"/><circle cx="161" cy="20" r="5" fill="#fff" fill-opacity=".6"/><circle cx="161" cy="36" r="5" fill="#fff" fill-opacity=".6"/></g>`,
|
|
16
16
|
};
|
package/lib/components/top.js
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const top = {
|
|
9
|
-
'antenna': (components, colors) => `<mask id="topAntenna-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="38" y="5" width="24" height="47"><path d="M52 5h-4v31h-8a2 2 0 0 0-2 2v14h24V38a2 2 0 0 0-2-2h-8V5Z" fill="#E1E6E8"/></mask><g mask="url(#topAntenna-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
10
|
-
'antennaCrooked': (components, colors) => `<mask id="topAntennaCrooked-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="38" y="12" width="24" height="40"><path d="m53.57 39 1.97-4.61-6.19-10.68 2.9-10.63-2.9-.79-3.22 11.84 6.05 10.43-2.1 4.44H38v13h24V39h-8.43Z" fill="#E6E6E6"/></mask><g mask="url(#topAntennaCrooked-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
11
|
-
'bulb01': (components, colors) => `<mask id="topBulb01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="22" y="0" width="56" height="52"><path d="M48 0a16 16 0 0 0-16 16v16a8 8 0 0 0 8 8H23a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h54a1 1 0 0 0 1-1V41a1 1 0 0 0-1-1H60a8 8 0 0 0 8-8V16A16 16 0 0 0 52 0h-4Z" fill="#59C4FF"/></mask><g mask="url(#topBulb01-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
12
|
-
'glowingBulb01': (components, colors) => `<g filter="url(#topGlowingBulb01-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 24A16 16 0 0 1 48 8h4a16 16 0 0 1 16 16v8a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-8Z" fill="#fff" fill-opacity=".3"/></g><path d="M49 11.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 29-9-9L38 22.83l10 10V40h4v-7.03l10.14-10.14L59.31 20l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/><rect x="22" y="40" width="56" height="12" rx="1" fill="#48494B"/><mask id="topGlowingBulb01-b" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="22" y="40" width="56" height="12"><rect x="22" y="40" width="56" height="12" rx="1" fill="#fff"/></mask><defs><filter id="topGlowingBulb01-a" x="24" y="0" width="52" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="
|
|
13
|
-
'glowingBulb02': (components, colors) => `<g filter="url(#topGlowingBulb02-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M30 33a20 20 0 1 1 40 0v11H30V33Z" fill="#fff" fill-opacity=".3"/></g><ellipse cx="50" cy="30" rx="4" ry="6" fill="#fff" fill-opacity=".6"/><path d="M50 15.5c4.93 0 9.37 2.13 12.44 5.52m2.43 3.5c.7 1.3 1.21 2.73 1.53 4.23" stroke="#fff" stroke-width="2" stroke-linecap="round"/><rect x="20" y="36" width="60" height="16" rx="1" fill="#48494B"/><mask id="topGlowingBulb02-b" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="20" y="36" width="60" height="16"><rect x="20" y="36" width="60" height="16" rx="1" fill="#fff"/></mask><defs><filter id="topGlowingBulb02-a" x="22" y="5" width="56" height="47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="
|
|
14
|
-
'horns': (components, colors) => `<mask id="topHorns-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="8" y="12" width="84" height="40"><path d="M71.21 40c7.64-6.7 13.42-19.31 12.8-26-.14-1.45 2-1.7 3 0 4.42 7.51 2.72 22.07 2.15 26H92v12H66V40h5.21ZM16.52 13.74c0 7.53 4.97 19.7 12.74 26.26H34v12H8V40h3.23c-.6-3.56-2.7-18.4 2.2-25.9.9-1.38 3.1-1.42 3.1-.36Z" fill="#E1E6E8"/></mask><g mask="url(#topHorns-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
15
|
-
'lights': (components, colors) => `<mask id="topLights-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="22" width="80" height="30"><path d="M23 22a5 5 0 0 0-5 5v13h-6a2 2 0 0 0-2 2v10h80V42a2 2 0 0 0-2-2h-6V27a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v13h-8V27a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v13h-8V27a5 5 0 0 0-5-5h-6Z" fill="#E1E6E8"/></mask><g mask="url(#topLights-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
16
|
-
'pyramid': (components, colors) => `<mask id="topPyramid-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="64" height="44"><path fill-rule="evenodd" clip-rule="evenodd" d="m50 8 32 44H18L50 8Z" fill="#fff"/></mask><g mask="url(#topPyramid-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(
|
|
9
|
+
'antenna': (components, colors) => `<mask id="topAntenna-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="38" y="5" width="24" height="47"><path d="M52 5h-4v31h-8a2 2 0 0 0-2 2v14h24V38a2 2 0 0 0-2-2h-8V5Z" fill="#E1E6E8"/></mask><g mask="url(#topAntenna-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 3h100v52H0V3Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 36h24v16H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,
|
|
10
|
+
'antennaCrooked': (components, colors) => `<mask id="topAntennaCrooked-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="38" y="12" width="24" height="40"><path d="m53.57 39 1.97-4.61-6.19-10.68 2.9-10.63-2.9-.79-3.22 11.84 6.05 10.43-2.1 4.44H38v13h24V39h-8.43Z" fill="#E6E6E6"/></mask><g mask="url(#topAntennaCrooked-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 6h100v52H0V6Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 39h24v13H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,
|
|
11
|
+
'bulb01': (components, colors) => `<mask id="topBulb01-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="22" y="0" width="56" height="52"><path d="M48 0a16 16 0 0 0-16 16v16a8 8 0 0 0 8 8H23a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h54a1 1 0 0 0 1-1V41a1 1 0 0 0-1-1H60a8 8 0 0 0 8-8V16A16 16 0 0 0 52 0h-4Z" fill="#59C4FF"/></mask><g mask="url(#topBulb01-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".4" d="M20-3h60v43H20z"/><path d="M49 3.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 26-9-9L38 19.83l10 10V40h4V29.97l10.14-10.14L59.31 17l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/></g>`,
|
|
12
|
+
'glowingBulb01': (components, colors) => `<g filter="url(#topGlowingBulb01-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 24A16 16 0 0 1 48 8h4a16 16 0 0 1 16 16v8a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-8Z" fill="#fff" fill-opacity=".3"/></g><path d="M49 11.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 29-9-9L38 22.83l10 10V40h4v-7.03l10.14-10.14L59.31 20l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/><rect x="22" y="40" width="56" height="12" rx="1" fill="#48494B"/><mask id="topGlowingBulb01-b" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="22" y="40" width="56" height="12"><rect x="22" y="40" width="56" height="12" rx="1" fill="#fff"/></mask><defs><filter id="topGlowingBulb01-a" x="24" y="0" width="52" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_502_827"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_502_827" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_502_827"/></filter></defs>`,
|
|
13
|
+
'glowingBulb02': (components, colors) => `<g filter="url(#topGlowingBulb02-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M30 33a20 20 0 1 1 40 0v11H30V33Z" fill="#fff" fill-opacity=".3"/></g><ellipse cx="50" cy="30" rx="4" ry="6" fill="#fff" fill-opacity=".6"/><path d="M50 15.5c4.93 0 9.37 2.13 12.44 5.52m2.43 3.5c.7 1.3 1.21 2.73 1.53 4.23" stroke="#fff" stroke-width="2" stroke-linecap="round"/><rect x="20" y="36" width="60" height="16" rx="1" fill="#48494B"/><mask id="topGlowingBulb02-b" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="20" y="36" width="60" height="16"><rect x="20" y="36" width="60" height="16" rx="1" fill="#fff"/></mask><defs><filter id="topGlowingBulb02-a" x="22" y="5" width="56" height="47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_502_840"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_502_840" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_502_840"/></filter></defs>`,
|
|
14
|
+
'horns': (components, colors) => `<mask id="topHorns-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="8" y="12" width="84" height="40"><path d="M71.21 40c7.64-6.7 13.42-19.31 12.8-26-.14-1.45 2-1.7 3 0 4.42 7.51 2.72 22.07 2.15 26H92v12H66V40h5.21ZM16.52 13.74c0 7.53 4.97 19.7 12.74 26.26H34v12H8V40h3.23c-.6-3.56-2.7-18.4 2.2-25.9.9-1.38 3.1-1.42 3.1-.36Z" fill="#E1E6E8"/></mask><g mask="url(#topHorns-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".4" d="M0 40h100v12H0z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.46 13h16.1v27H20.83c-7.45-7.85-5.36-27-5.36-27ZM84.82 13h7.75v27H81.82c5.75-7.8 3-27 3-27Z" fill="#fff" fill-opacity=".4"/></g>`,
|
|
15
|
+
'lights': (components, colors) => `<mask id="topLights-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="22" width="80" height="30"><path d="M23 22a5 5 0 0 0-5 5v13h-6a2 2 0 0 0-2 2v10h80V42a2 2 0 0 0-2-2h-6V27a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v13h-8V27a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v13h-8V27a5 5 0 0 0-5-5h-6Z" fill="#E1E6E8"/></mask><g mask="url(#topLights-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".6" d="M0 0h100v40H0z"/><rect x="24" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="48" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="72" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/></g>`,
|
|
16
|
+
'pyramid': (components, colors) => `<mask id="topPyramid-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="64" height="44"><path fill-rule="evenodd" clip-rule="evenodd" d="m50 8 32 44H18L50 8Z" fill="#fff"/></mask><g mask="url(#topPyramid-a)"><path d="M0 0h100v52H0V0Z" fill="${escape.xml(`${colors.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".8" d="M50 4h30v48H50z"/></g>`,
|
|
17
17
|
'radar': (components, colors) => `<mask id="topRadar-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="37" y="0" width="36" height="53"><path d="M43.8 28.4A20 20 0 0 1 43.8.1l13.43 13.45 6.46-6.46a4 4 0 1 1 1.41 1.4l-6.45 6.46L72.08 28.4a20 20 0 0 1-20.14 4.94V52.1h-4V31.58a20.02 20.02 0 0 1-4.14-3.18Z" fill="#E1E6E8"/></mask><g mask="url(#topRadar-a)"><path d="M0 0h100v52H0V0Z" fill="#90A4AE"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill-rule="evenodd" clip-rule="evenodd" d="M43.8.11A20 20 0 1 0 72.08 28.4" fill="#fff" fill-opacity=".2"/><circle cx="67.13" cy="7.41" r="5.66" transform="rotate(45 67.13 7.4)" fill="#fff" fill-opacity=".8"/></g>`,
|
|
18
18
|
};
|
package/lib/index.js
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { getComponents } from './utils/getComponents.js';
|
|
8
8
|
import { getColors } from './utils/getColors.js';
|
|
9
|
-
import { onPreCreate } from './hooks/onPreCreate.js';
|
|
10
|
-
import { onPostCreate } from './hooks/onPostCreate.js';
|
|
11
9
|
export const meta = {
|
|
12
10
|
title: 'Bottts',
|
|
13
11
|
creator: 'Pablo Stanley',
|
|
@@ -20,10 +18,8 @@ export const meta = {
|
|
|
20
18
|
};
|
|
21
19
|
export const create = ({ prng, options }) => {
|
|
22
20
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
23
|
-
onPreCreate({ prng, options });
|
|
24
21
|
const components = getComponents({ prng, options });
|
|
25
22
|
const colors = getColors({ prng, options });
|
|
26
|
-
onPostCreate({ prng, options, components, colors });
|
|
27
23
|
return {
|
|
28
24
|
attributes: {
|
|
29
25
|
viewBox: '0 0 180 180',
|
package/lib/schema.js
CHANGED
|
@@ -4,6 +4,4 @@
|
|
|
4
4
|
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
5
|
* File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
8
|
-
// Write your modifications here
|
|
9
|
-
}
|
|
7
|
+
export declare function convertColor(color: string): string;
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
5
|
* File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
8
|
-
|
|
7
|
+
export function convertColor(color) {
|
|
8
|
+
if ('transparent' === color) {
|
|
9
|
+
return color;
|
|
10
|
+
}
|
|
11
|
+
return `#${color}`;
|
|
9
12
|
}
|
package/lib/utils/getColors.js
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
5
|
* File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u
|
|
6
6
|
*/
|
|
7
|
+
import { convertColor } from './convertColor.js';
|
|
7
8
|
export function getColors({ prng, options }) {
|
|
8
9
|
var _a, _b;
|
|
9
10
|
return {
|
|
10
|
-
'base': (_b = prng.pick((_a = options.baseColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent',
|
|
11
|
+
'base': convertColor((_b = prng.pick((_a = options.baseColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent'),
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/bottts",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test": "uvu tests"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@dicebear/core": "^5.0.
|
|
32
|
+
"@dicebear/core": "^5.0.3",
|
|
33
33
|
"@tsconfig/recommended": "^1.0.1",
|
|
34
34
|
"del-cli": "^4.0.1",
|
|
35
35
|
"typescript": "^4.6.3",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "14f86eb4ad8c481902d505c838c26420370d232c"
|
|
48
48
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
-
*
|
|
4
|
-
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
-
* File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u
|
|
6
|
-
*/
|
|
7
|
-
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
|
-
import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
|
|
9
|
-
type Props = {
|
|
10
|
-
prng: Prng;
|
|
11
|
-
options: StyleOptions<Options>;
|
|
12
|
-
components: ComponentPickCollection;
|
|
13
|
-
colors: ColorPickCollection;
|
|
14
|
-
};
|
|
15
|
-
export declare function onPostCreate({ prng, options, components, colors }: Props): void;
|
|
16
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
-
*
|
|
4
|
-
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
-
* File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u
|
|
6
|
-
*/
|
|
7
|
-
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
|
-
import { Options } from "../types.js";
|
|
9
|
-
type Props = {
|
|
10
|
-
prng: Prng;
|
|
11
|
-
options: StyleOptions<Options>;
|
|
12
|
-
};
|
|
13
|
-
export declare function onPreCreate({ prng, options }: Props): void;
|
|
14
|
-
export {};
|