@dicebear/rings 9.2.2 → 9.2.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.
@@ -5,5 +5,5 @@
5
5
  * File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF
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><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"/>`; },
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 ringFive = {
9
- 'eighth': (components, colors) => `<path d="m42.929 42.929 7.07 7.07H40a9.97 9.97 0 0 1 2.93-7.07Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
10
- 'quarter': (components, colors) => `<path d="M50 40v10H40c0-5.523 4.477-10 10-10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
11
- 'half': (components, colors) => `<path d="M60 50c0-5.523-4.477-10-10-10s-10 4.477-10 10h20Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
12
- 'full': (components, colors) => `<circle cx="50" cy="50" r="10" fill="${escape.xml(`${colors.ring}`)}"/>`,
9
+ eighth: (components, colors) => `<path d="m42.929 42.929 7.07 7.07H40a9.97 9.97 0 0 1 2.93-7.07Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
10
+ quarter: (components, colors) => `<path d="M50 40v10H40c0-5.523 4.477-10 10-10Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
11
+ half: (components, colors) => `<path d="M60 50c0-5.523-4.477-10-10-10s-10 4.477-10 10h20Z" fill="${escape.xml(`${colors.ring}`)}"/>`,
12
+ full: (components, colors) => `<circle cx="50" cy="50" r="10" fill="${escape.xml(`${colors.ring}`)}"/>`,
13
13
  };
@@ -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 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"/>`,
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="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"/>`,
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 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"/>`,
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 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"/>`,
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': 'crispEdges'
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
@@ -5,201 +5,140 @@
5
5
  * File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF
6
6
  */
7
7
  export const schema = {
8
- "$schema": "http://json-schema.org/draft-07/schema#",
9
- "properties": {
10
- "ring": {
11
- "type": "array",
12
- "items": {
13
- "type": "string",
14
- "enum": [
15
- "container"
16
- ]
8
+ $schema: 'http://json-schema.org/draft-07/schema#',
9
+ properties: {
10
+ ring: {
11
+ type: 'array',
12
+ items: {
13
+ type: 'string',
14
+ enum: ['container'],
17
15
  },
18
- "default": [
19
- "container"
20
- ]
16
+ default: ['container'],
21
17
  },
22
- "ringColor": {
23
- "type": "array",
24
- "items": {
25
- "type": "string",
26
- "pattern": "^(transparent|[a-fA-F0-9]{6})$"
18
+ ringColor: {
19
+ type: 'array',
20
+ items: {
21
+ type: 'string',
22
+ pattern: '^(transparent|[a-fA-F0-9]{6})$',
27
23
  },
28
- "default": [
29
- "ffd54f",
30
- "64b5f6",
31
- "4dd0e1",
32
- "ff8a65",
33
- "9575cd",
34
- "81c784",
35
- "7986cb",
36
- "4fc3f7",
37
- "aed581",
38
- "dce775",
39
- "ffb74d",
40
- "f06292",
41
- "ba68c8",
42
- "e57373",
43
- "4db6ac",
44
- "fff176"
45
- ]
24
+ default: [
25
+ 'ffd54f',
26
+ '64b5f6',
27
+ '4dd0e1',
28
+ 'ff8a65',
29
+ '9575cd',
30
+ '81c784',
31
+ '7986cb',
32
+ '4fc3f7',
33
+ 'aed581',
34
+ 'dce775',
35
+ 'ffb74d',
36
+ 'f06292',
37
+ 'ba68c8',
38
+ 'e57373',
39
+ '4db6ac',
40
+ 'fff176',
41
+ ],
46
42
  },
47
- "ringFive": {
48
- "type": "array",
49
- "items": {
50
- "type": "string",
51
- "enum": [
52
- "eighth",
53
- "quarter",
54
- "half",
55
- "full"
56
- ]
43
+ ringFive: {
44
+ type: 'array',
45
+ items: {
46
+ type: 'string',
47
+ enum: ['eighth', 'quarter', 'half', 'full'],
57
48
  },
58
- "default": [
59
- "full"
60
- ]
49
+ default: ['full'],
61
50
  },
62
- "ringFiveRotation": {
63
- "type": "array",
64
- "items": {
65
- "type": "integer",
66
- "minimum": -180,
67
- "maximum": 180
51
+ ringFiveRotation: {
52
+ type: 'array',
53
+ items: {
54
+ type: 'integer',
55
+ minimum: -180,
56
+ maximum: 180,
68
57
  },
69
- "maxItems": 2,
70
- "default": [
71
- -180,
72
- 180
73
- ]
58
+ maxItems: 2,
59
+ default: [-180, 180],
74
60
  },
75
- "ringFour": {
76
- "type": "array",
77
- "items": {
78
- "type": "string",
79
- "enum": [
80
- "eighth",
81
- "quarter",
82
- "half",
83
- "full"
84
- ]
61
+ ringFour: {
62
+ type: 'array',
63
+ items: {
64
+ type: 'string',
65
+ enum: ['eighth', 'quarter', 'half', 'full'],
85
66
  },
86
- "default": [
87
- "quarter",
88
- "half"
89
- ]
67
+ default: ['quarter', 'half'],
90
68
  },
91
- "ringFourRotation": {
92
- "type": "array",
93
- "items": {
94
- "type": "integer",
95
- "minimum": -180,
96
- "maximum": 180
69
+ ringFourRotation: {
70
+ type: 'array',
71
+ items: {
72
+ type: 'integer',
73
+ minimum: -180,
74
+ maximum: 180,
97
75
  },
98
- "maxItems": 2,
99
- "default": [
100
- -180,
101
- 180
102
- ]
76
+ maxItems: 2,
77
+ default: [-180, 180],
103
78
  },
104
- "ringOne": {
105
- "type": "array",
106
- "items": {
107
- "type": "string",
108
- "enum": [
109
- "half",
110
- "quarter",
111
- "eighth",
112
- "full"
113
- ]
79
+ ringOne: {
80
+ type: 'array',
81
+ items: {
82
+ type: 'string',
83
+ enum: ['half', 'quarter', 'eighth', 'full'],
114
84
  },
115
- "default": [
116
- "half",
117
- "quarter"
118
- ]
85
+ default: ['half', 'quarter'],
119
86
  },
120
- "ringOneRotation": {
121
- "type": "array",
122
- "items": {
123
- "type": "integer",
124
- "minimum": -180,
125
- "maximum": 180
87
+ ringOneRotation: {
88
+ type: 'array',
89
+ items: {
90
+ type: 'integer',
91
+ minimum: -180,
92
+ maximum: 180,
126
93
  },
127
- "maxItems": 2,
128
- "default": [
129
- -180,
130
- 180
131
- ]
94
+ maxItems: 2,
95
+ default: [-180, 180],
132
96
  },
133
- "ringRotation": {
134
- "type": "array",
135
- "items": {
136
- "type": "integer",
137
- "minimum": -180,
138
- "maximum": 180
97
+ ringRotation: {
98
+ type: 'array',
99
+ items: {
100
+ type: 'integer',
101
+ minimum: -180,
102
+ maximum: 180,
139
103
  },
140
- "maxItems": 2,
141
- "default": [
142
- -180,
143
- 180
144
- ]
104
+ maxItems: 2,
105
+ default: [-180, 180],
145
106
  },
146
- "ringThree": {
147
- "type": "array",
148
- "items": {
149
- "type": "string",
150
- "enum": [
151
- "eighth",
152
- "quarter",
153
- "half",
154
- "full"
155
- ]
107
+ ringThree: {
108
+ type: 'array',
109
+ items: {
110
+ type: 'string',
111
+ enum: ['eighth', 'quarter', 'half', 'full'],
156
112
  },
157
- "default": [
158
- "quarter",
159
- "half"
160
- ]
113
+ default: ['quarter', 'half'],
161
114
  },
162
- "ringThreeRotation": {
163
- "type": "array",
164
- "items": {
165
- "type": "integer",
166
- "minimum": -180,
167
- "maximum": 180
115
+ ringThreeRotation: {
116
+ type: 'array',
117
+ items: {
118
+ type: 'integer',
119
+ minimum: -180,
120
+ maximum: 180,
168
121
  },
169
- "maxItems": 2,
170
- "default": [
171
- -180,
172
- 180
173
- ]
122
+ maxItems: 2,
123
+ default: [-180, 180],
174
124
  },
175
- "ringTwo": {
176
- "type": "array",
177
- "items": {
178
- "type": "string",
179
- "enum": [
180
- "eighth",
181
- "quarter",
182
- "half",
183
- "full"
184
- ]
125
+ ringTwo: {
126
+ type: 'array',
127
+ items: {
128
+ type: 'string',
129
+ enum: ['eighth', 'quarter', 'half', 'full'],
185
130
  },
186
- "default": [
187
- "quarter",
188
- "half"
189
- ]
131
+ default: ['quarter', 'half'],
190
132
  },
191
- "ringTwoRotation": {
192
- "type": "array",
193
- "items": {
194
- "type": "integer",
195
- "minimum": -180,
196
- "maximum": 180
133
+ ringTwoRotation: {
134
+ type: 'array',
135
+ items: {
136
+ type: 'integer',
137
+ minimum: -180,
138
+ maximum: 180,
197
139
  },
198
- "maxItems": 2,
199
- "default": [
200
- -180,
201
- 180
202
- ]
203
- }
204
- }
140
+ maxItems: 2,
141
+ default: [-180, 180],
142
+ },
143
+ },
205
144
  };
package/lib/types.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF
6
6
  */
7
7
  export interface Options {
8
- ring?: ('container')[];
8
+ ring?: 'container'[];
9
9
  ringRotation?: number[];
10
10
  ringOne?: ('half' | 'quarter' | 'eighth' | 'full')[];
11
11
  ringOneRotation?: number[];
@@ -8,7 +8,6 @@ import { convertColor } from './convertColor.js';
8
8
  export function getColors({ prng, options }) {
9
9
  var _a;
10
10
  return {
11
- 'ring': convertColor(prng.pick((_a = options.ringColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
11
+ ring: convertColor(prng.pick((_a = options.ringColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
12
12
  };
13
13
  }
14
- ;
@@ -10,5 +10,5 @@ type Props = {
10
10
  prng: Prng;
11
11
  options: Options;
12
12
  };
13
- export declare function getComponents({ prng, options }: Props): ComponentPickCollection;
13
+ export declare function getComponents({ prng, options, }: Props): ComponentPickCollection;
14
14
  export {};
@@ -5,7 +5,7 @@
5
5
  * File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF
6
6
  */
7
7
  import { pickComponent } from './pickComponent.js';
8
- export function getComponents({ prng, options }) {
8
+ export function getComponents({ prng, options, }) {
9
9
  var _a, _b, _c, _d, _e, _f;
10
10
  const ringComponent = pickComponent({
11
11
  prng,
@@ -43,7 +43,9 @@ export function getComponents({ prng, options }) {
43
43
  values: options.ringThree,
44
44
  width: 100,
45
45
  height: 100,
46
- rotation: ((_d = options.ringThreeRotation) === null || _d === void 0 ? void 0 : _d.length) ? options.ringThreeRotation : [0],
46
+ rotation: ((_d = options.ringThreeRotation) === null || _d === void 0 ? void 0 : _d.length)
47
+ ? options.ringThreeRotation
48
+ : [0],
47
49
  offsetX: [0],
48
50
  offsetY: [0],
49
51
  });
@@ -68,12 +70,11 @@ export function getComponents({ prng, options }) {
68
70
  offsetY: [0],
69
71
  });
70
72
  return {
71
- 'ring': ringComponent,
72
- 'ringOne': ringOneComponent,
73
- 'ringTwo': ringTwoComponent,
74
- 'ringThree': ringThreeComponent,
75
- 'ringFour': ringFourComponent,
76
- 'ringFive': ringFiveComponent,
73
+ ring: ringComponent,
74
+ ringOne: ringOneComponent,
75
+ ringTwo: ringTwoComponent,
76
+ ringThree: ringThreeComponent,
77
+ ringFour: ringFourComponent,
78
+ ringFive: ringFiveComponent,
77
79
  };
78
80
  }
79
- ;
@@ -16,5 +16,5 @@ type Props = {
16
16
  offsetX: number[];
17
17
  offsetY: number[];
18
18
  };
19
- export declare function pickComponent({ prng, group, width, height, values, rotation, offsetX, offsetY }: Props): ComponentPick;
19
+ export declare function pickComponent({ prng, group, width, height, values, rotation, offsetX, offsetY, }: Props): ComponentPick;
20
20
  export {};
@@ -5,7 +5,7 @@
5
5
  * File: https://www.figma.com/file/sK2mrFhCZwQu1qw4WqOBEF
6
6
  */
7
7
  import * as components from '../components/index.js';
8
- export function pickComponent({ prng, group, width, height, values = [], rotation, offsetX, offsetY }) {
8
+ export function pickComponent({ prng, group, width, height, values = [], rotation, offsetX, offsetY, }) {
9
9
  const componentCollection = components;
10
10
  const key = prng.pick(values);
11
11
  const pickedRotation = prng.integer(Math.min(...rotation), Math.max(...rotation));
@@ -18,7 +18,7 @@ export function pickComponent({ prng, group, width, height, values = [], rotatio
18
18
  var _a, _b, _c;
19
19
  let result = componentCollection[group][key](components, colors);
20
20
  if (this.rotation || this.offsetX || this.offsetY) {
21
- result = `<g transform="translate(${((_a = this.offsetX) !== null && _a !== void 0 ? _a : 0)}, ${(_b = this.offsetY) !== null && _b !== void 0 ? _b : 0}) rotate(${(_c = this.rotation) !== null && _c !== void 0 ? _c : 0} ${width / 2} ${height / 2})">${result}</g>`;
21
+ result = `<g transform="translate(${(_a = this.offsetX) !== null && _a !== void 0 ? _a : 0}, ${(_b = this.offsetY) !== null && _b !== void 0 ? _b : 0}) rotate(${(_c = this.rotation) !== null && _c !== void 0 ? _c : 0} ${width / 2} ${height / 2})">${result}</g>`;
22
22
  }
23
23
  return result;
24
24
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/rings",
3
- "version": "9.2.2",
3
+ "version": "9.2.3",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -29,10 +29,10 @@
29
29
  "test": "uvu tests"
30
30
  },
31
31
  "devDependencies": {
32
- "@dicebear/core": "9.2.2",
33
- "@tsconfig/recommended": "^1.0.2",
34
- "del-cli": "^5.0.0",
35
- "typescript": "^5.1.6",
32
+ "@dicebear/core": "9.2.3",
33
+ "@tsconfig/recommended": "^1.0.10",
34
+ "del-cli": "^6.0.0",
35
+ "typescript": "^5.8.3",
36
36
  "uvu": "^0.5.6"
37
37
  },
38
38
  "peerDependencies": {
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "bf5b31d047f707f50299142660bc89ef020d9b24"
47
+ "gitHead": "8cfdc4d029c9de6a82fef4e27ed67b5e2cd14a30"
48
48
  }