@dicebear/rings 7.0.0-rc.3 → 7.0.0
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/ring.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF/%40dicebear%2Frings
|
|
6
6
|
*/
|
|
7
7
|
export const ring = {
|
|
8
|
-
'container': (components, colors) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; return `${(_b = (_a = components.ringOne) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = components.ringTwo) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}${(_f = (_e = components.ringThree) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}${(_h = (_g = components.ringFour) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}${(_k = (_j = components.ringFive) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}<g transform="matrix(1 0 0 -1 0 100)">${(_m = (_l = components.ringOne) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_p = (_o = components.ringTwo) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_r = (_q = components.ringThree) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_t = (_s = components.ringFour) === null || _s === void 0 ? void 0 : _s.value(components, colors)) !== null && _t !== void 0 ? _t : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_v = (_u = components.ringFive) === null || _u === void 0 ? void 0 : _u.value(components, colors)) !== null && _v !== void 0 ? _v : ''}</g
|
|
8
|
+
'container': (components, colors) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; return `${(_b = (_a = components.ringOne) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = components.ringTwo) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}${(_f = (_e = components.ringThree) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}${(_h = (_g = components.ringFour) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}${(_k = (_j = components.ringFive) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}<g transform="matrix(1 0 0 -1 0 100)">${(_m = (_l = components.ringOne) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_p = (_o = components.ringTwo) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_r = (_q = components.ringThree) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_t = (_s = components.ringFour) === null || _s === void 0 ? void 0 : _s.value(components, colors)) !== null && _t !== void 0 ? _t : ''}</g><g transform="matrix(1 0 0 -1 0 100)">${(_v = (_u = components.ringFive) === null || _u === void 0 ? void 0 : _u.value(components, colors)) !== null && _v !== void 0 ? _v : ''}</g><circle cx="50" cy="50" r="45" stroke="#fff" stroke-opacity=".25" stroke-width="10" style="mix-blend-mode:lighten"/><circle cx="50" cy="50" r="25" stroke="#fff" stroke-opacity=".25" stroke-width="10" style="mix-blend-mode:lighten"/><circle cx="50" cy="50" r="10" fill="#fff" fill-opacity=".25" style="mix-blend-mode:lighten"/>`; },
|
|
9
9
|
};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const ringFour = {
|
|
9
|
-
'eighth': (components, colors) => `<path d="M40
|
|
10
|
-
'quarter': (components, colors) => `<path d="M50 30c-11.046 0-20 8.954-20
|
|
11
|
-
'half': (components, colors) => `<path d="M70 50c0-11.046-8.954-20-20-20s-20 8.954-20
|
|
12
|
-
'full': (components, colors) => `<circle cx="50" cy="50" r="
|
|
9
|
+
'eighth': (components, colors) => `<path d="M40 50a9.97 9.97 0 0 1 2.929-7.071l-7.071-7.071A19.937 19.937 0 0 0 30 50h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
10
|
+
'quarter': (components, colors) => `<path d="M50 30c-11.046 0-20 8.954-20 20h10c0-5.523 4.477-10 10-10V30Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
11
|
+
'half': (components, colors) => `<path d="M70 50c0-11.046-8.954-20-20-20s-20 8.954-20 20h10c0-5.523 4.477-10 10-10s10 4.477 10 10h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
12
|
+
'full': (components, colors) => `<circle cx="50" cy="50" r="15" stroke="${escape.xml(`${colors.ring}`)}" stroke-width="10"/>`,
|
|
13
13
|
};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const ringOne = {
|
|
9
|
-
'half': (components, colors) => `<path d="
|
|
10
|
-
'quarter': (components, colors) => `<path d="M50
|
|
11
|
-
'eighth': (components, colors) => `<path d="
|
|
12
|
-
'full': (components, colors) => `<circle cx="50" cy="50" r="
|
|
9
|
+
'half': (components, colors) => `<path d="M90 50h10c0-27.614-22.386-50-50-50S0 22.386 0 50h10c0-22.091 17.909-40 40-40s40 17.909 40 40Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
10
|
+
'quarter': (components, colors) => `<path d="M50 10V0C22.386 0 0 22.386 0 50h10c0-22.091 17.909-40 40-40Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
11
|
+
'eighth': (components, colors) => `<path d="M21.716 21.716C14.477 28.954 10 38.954 10 50H0c0-13.807 5.596-26.307 14.645-35.355l7.07 7.07Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
12
|
+
'full': (components, colors) => `<circle cx="50" cy="50" r="45" stroke="${escape.xml(`${colors.ring}`)}" stroke-width="10"/>`,
|
|
13
13
|
};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const ringThree = {
|
|
9
|
-
'eighth': (components, colors) => `<path d="M30
|
|
10
|
-
'quarter': (components, colors) => `<path d="M50 20c-16.569 0-30 13.431-30
|
|
11
|
-
'half': (components, colors) => `<path d="M80 50c0-16.569-13.431-30-30-30-16.569 0-30 13.431-30
|
|
12
|
-
'full': (components, colors) => `<circle cx="50" cy="50" r="
|
|
9
|
+
'eighth': (components, colors) => `<path d="M30 50a19.937 19.937 0 0 1 5.858-14.142l-7.071-7.071C23.357 34.216 20 41.716 20 50h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
10
|
+
'quarter': (components, colors) => `<path d="M50 20c-16.569 0-30 13.431-30 30h10c0-11.046 8.954-20 20-20V20Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
11
|
+
'half': (components, colors) => `<path d="M80 50c0-16.569-13.431-30-30-30-16.569 0-30 13.431-30 30h10c0-11.046 8.954-20 20-20s20 8.954 20 20h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
12
|
+
'full': (components, colors) => `<circle cx="50" cy="50" r="25" stroke="${escape.xml(`${colors.ring}`)}" stroke-width="10"/>`,
|
|
13
13
|
};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const ringTwo = {
|
|
9
|
-
'eighth': (components, colors) => `<path d="M20
|
|
10
|
-
'quarter': (components, colors) => `<path d="M50 10c-22.091 0-40 17.909-40
|
|
11
|
-
'half': (components, colors) => `<path d="M90 50c0-22.091-17.909-40-40-40S10 27.909 10
|
|
12
|
-
'full': (components, colors) => `<circle cx="50" cy="50" r="
|
|
9
|
+
'eighth': (components, colors) => `<path d="M20 50c0-8.284 3.358-15.784 8.787-21.213l-7.071-7.071C14.477 28.954 10 38.954 10 50h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
10
|
+
'quarter': (components, colors) => `<path d="M50 10c-22.091 0-40 17.909-40 40h10c0-16.569 13.431-30 30-30V10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
11
|
+
'half': (components, colors) => `<path d="M90 50c0-22.091-17.909-40-40-40S10 27.909 10 50h10c0-16.569 13.431-30 30-30 16.569 0 30 13.431 30 30h10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
|
|
12
|
+
'full': (components, colors) => `<circle cx="50" cy="50" r="35" stroke="${escape.xml(`${colors.ring}`)}" stroke-width="10"/>`,
|
|
13
13
|
};
|
package/lib/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export const create = ({ prng, options }) => {
|
|
|
24
24
|
attributes: {
|
|
25
25
|
viewBox: '0 0 100 100',
|
|
26
26
|
fill: 'none',
|
|
27
|
-
'shape-rendering': '
|
|
27
|
+
'shape-rendering': 'crispEdges'
|
|
28
28
|
},
|
|
29
29
|
body: `${(_b = (_a = components.ring) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}`,
|
|
30
30
|
extra: () => ({
|
package/lib/schema.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/rings",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"test": "uvu tests"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@dicebear/core": "7.0.0
|
|
32
|
+
"@dicebear/core": "7.0.0",
|
|
33
33
|
"@tsconfig/recommended": "^1.0.2",
|
|
34
34
|
"del-cli": "^5.0.0",
|
|
35
35
|
"typescript": "^5.1.6",
|
|
36
36
|
"uvu": "^0.5.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@dicebear/core": "^7.0.0
|
|
39
|
+
"@dicebear/core": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=16.0.0"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "4e1f6af84fa8417a1b09e1d6f9fb209d8e4c2e42"
|
|
48
48
|
}
|