@dicebear/core 10.6.1 → 10.7.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/Renderer.js
CHANGED
|
@@ -308,7 +308,7 @@ _Renderer_style = new WeakMap(), _Renderer_resolver = new WeakMap(), _Renderer_d
|
|
|
308
308
|
case 'initial': {
|
|
309
309
|
// charAt(0) would return a lone surrogate (ill-formed XML) for
|
|
310
310
|
// supplementary-plane initials; take the full first code point
|
|
311
|
-
// instead, like the
|
|
311
|
+
// instead, like the other ports.
|
|
312
312
|
const first = __classPrivateFieldGet(this, _Renderer_instances, "m", _Renderer_initials).call(this).codePointAt(0);
|
|
313
313
|
return first !== undefined ? String.fromCodePoint(first) : '';
|
|
314
314
|
}
|
package/lib/Utils/Number.d.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Formats a number for SVG output, rounded to at most 5 decimal places.
|
|
3
3
|
*
|
|
4
4
|
* Rounding to a fixed precision keeps the output bounded and identical across
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* precision for any realistic canvas.
|
|
5
|
+
* every port: every value becomes a multiple of 1e-5 in the SVG coordinate
|
|
6
|
+
* range, which has no exponential form, so the result is built from integer
|
|
7
|
+
* arithmetic (no locale- or language-specific float stringifying). Five
|
|
8
|
+
* decimals is far below sub-pixel precision for any realistic canvas.
|
|
10
9
|
*/
|
|
11
10
|
export declare class Number {
|
|
12
11
|
static format(value: number): string;
|
package/lib/Utils/Number.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Formats a number for SVG output, rounded to at most 5 decimal places.
|
|
3
3
|
*
|
|
4
4
|
* Rounding to a fixed precision keeps the output bounded and identical across
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* precision for any realistic canvas.
|
|
5
|
+
* every port: every value becomes a multiple of 1e-5 in the SVG coordinate
|
|
6
|
+
* range, which has no exponential form, so the result is built from integer
|
|
7
|
+
* arithmetic (no locale- or language-specific float stringifying). Five
|
|
8
|
+
* decimals is far below sub-pixel precision for any realistic canvas.
|
|
10
9
|
*/
|
|
11
10
|
export class Number {
|
|
12
11
|
static format(value) {
|
|
@@ -37,12 +37,12 @@ const validate = (function () {
|
|
|
37
37
|
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
|
|
38
38
|
});
|
|
39
39
|
const pointerPart = (s) => (/~\//.test(s) ? `${s}`.replace(/~/g, '~0').replace(/\//g, '~1') : s);
|
|
40
|
-
const pattern1 = new RegExp("[uU][rR][lL]\\
|
|
41
|
-
const pattern2 = new RegExp("[eE][xX][pP][rR][eE][sS][sS][iI][oO][nN]\\
|
|
42
|
-
const pattern3 = new RegExp("[bB][eE][hH][aA][vV][iI][oO][rR]\\
|
|
40
|
+
const pattern1 = new RegExp("[uU][rR][lL][ \\t\\n\\f\\r]*\\([ \\t\\n\\f\\r]*[^#) \\t\\n\\f\\r]", "u");
|
|
41
|
+
const pattern2 = new RegExp("[eE][xX][pP][rR][eE][sS][sS][iI][oO][nN][ \\t\\n\\f\\r]*\\(", "u");
|
|
42
|
+
const pattern3 = new RegExp("[bB][eE][hH][aA][vV][iI][oO][rR][ \\t\\n\\f\\r]*:", "u");
|
|
43
43
|
const pattern4 = new RegExp("-[mM][oO][zZ]-[bB][iI][nN][dD][iI][nN][gG]", "u");
|
|
44
|
-
const pattern5 = new RegExp("[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\
|
|
45
|
-
const pattern6 = new RegExp("[vV][bB][sS][cC][rR][iI][pP][tT]\\
|
|
44
|
+
const pattern5 = new RegExp("[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT][ \\t\\n\\f\\r]*:", "u");
|
|
45
|
+
const pattern6 = new RegExp("[vV][bB][sS][cC][rR][iI][pP][tT][ \\t\\n\\f\\r]*:", "u");
|
|
46
46
|
const pattern7 = new RegExp("\\\\", "u");
|
|
47
47
|
const ref4 = function validate(data) {
|
|
48
48
|
validate.errors = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "Unique avatars from dozens of styles — deterministic, customizable, vector-based.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"avatar",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"test": "node --test"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@dicebear/schema": "^1.
|
|
42
|
+
"@dicebear/schema": "^1.5.1",
|
|
43
43
|
"@exodus/schemasafe": "^1.3.0",
|
|
44
44
|
"@tsconfig/recommended": "^1.0.13",
|
|
45
45
|
"del-cli": "^7.0.0",
|