@lidofinance/lido-ui 3.14.0 → 3.14.2
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.
|
@@ -11,14 +11,22 @@ const _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
const _react = require("react");
|
|
12
12
|
const _identiconStylesJs = require("./IdenticonStyles.js");
|
|
13
13
|
const _reactJazzicon = /*#__PURE__*/ _interopRequireDefault(require("react-jazzicon"));
|
|
14
|
-
|
|
14
|
+
// There is an error with importing jsNumberForAddress from 'react-jazzicon' as named export in ESM build
|
|
15
|
+
// Since the implementation is tiny, moving it here
|
|
16
|
+
const jsNumberForAddress = (address)=>{
|
|
17
|
+
const addr = address.slice(2, 10);
|
|
18
|
+
return parseInt(addr, 16) // seed
|
|
19
|
+
;
|
|
20
|
+
};
|
|
21
|
+
//@ts-expect-error Property default doesn't exist on type
|
|
22
|
+
const Jazzicon = _reactJazzicon.default.default || _reactJazzicon.default;
|
|
15
23
|
const Identicon = /*#__PURE__*/ (0, _react.forwardRef)((param, ref)=>{
|
|
16
24
|
let { diameter =24 , address , paperStyles , svgStyles , ...rest } = param;
|
|
17
25
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_identiconStylesJs.IdenticonStyle, {
|
|
18
26
|
...rest,
|
|
19
27
|
ref: ref,
|
|
20
|
-
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(
|
|
21
|
-
seed: (
|
|
28
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(Jazzicon, {
|
|
29
|
+
seed: jsNumberForAddress(address),
|
|
22
30
|
diameter: diameter,
|
|
23
31
|
paperStyles: paperStyles,
|
|
24
32
|
svgStyles: svgStyles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/identicon/Identicon.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport { IdenticonProps } from './types.js'\nimport { IdenticonStyle } from './IdenticonStyles.js'\nimport
|
|
1
|
+
{"version":3,"sources":["../../../packages/identicon/Identicon.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport { IdenticonProps } from './types.js'\nimport { IdenticonStyle } from './IdenticonStyles.js'\nimport _Jazzicon from 'react-jazzicon'\n\n// There is an error with importing jsNumberForAddress from 'react-jazzicon' as named export in ESM build\n// Since the implementation is tiny, moving it here\nconst jsNumberForAddress = (address: string): number => {\n const addr = address.slice(2, 10)\n return parseInt(addr, 16) // seed\n}\n\n//@ts-expect-error Property default doesn't exist on type\nconst Jazzicon = _Jazzicon.default || _Jazzicon\n\nexport const Identicon = forwardRef(\n (\n { diameter = 24, address, paperStyles, svgStyles, ...rest }: IdenticonProps,\n ref?: ForwardedRef<HTMLDivElement>,\n ) => {\n return (\n <IdenticonStyle {...rest} ref={ref}>\n <Jazzicon\n seed={jsNumberForAddress(address)}\n diameter={diameter}\n paperStyles={paperStyles}\n svgStyles={svgStyles}\n />\n </IdenticonStyle>\n )\n },\n)\nIdenticon.displayName = 'Identicon'\n"],"names":["Identicon","jsNumberForAddress","address","addr","slice","parseInt","Jazzicon","_Jazzicon","default","forwardRef","ref","diameter","paperStyles","svgStyles","rest","IdenticonStyle","seed","displayName"],"mappings":"AAAA;;;;+BAeaA,WAAS;;aAATA,SAAS;;;;uBAfmB,OAAO;mCAEjB,sBAAsB;oEAC/B,gBAAgB;AAEtC,yGAAyG;AACzG,mDAAmD;AACnD,MAAMC,kBAAkB,GAAG,CAACC,OAAe,GAAa;IACtD,MAAMC,IAAI,GAAGD,OAAO,CAACE,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;IACjC,OAAOC,QAAQ,CAACF,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO;KAAR;AAC3B,CAAC;AAED,yDAAyD;AACzD,MAAMG,QAAQ,GAAGC,cAAS,QAAA,CAACC,OAAO,IAAID,cAAS,QAAA;AAExC,MAAMP,SAAS,iBAAGS,IAAAA,MAAU,WAAA,EACjC,QAEEC,GAAkC,GAC/B;QAFH,EAAEC,QAAQ,EAAG,EAAE,CAAA,EAAET,OAAO,CAAA,EAAEU,WAAW,CAAA,EAAEC,SAAS,CAAA,EAAE,GAAGC,IAAI,EAAkB;IAG3E,qBACE,qBAACC,kBAAc,eAAA;QAAE,GAAGD,IAAI;QAAEJ,GAAG,EAAEA,GAAG;kBAChC,cAAA,qBAACJ,QAAQ;YACPU,IAAI,EAAEf,kBAAkB,CAACC,OAAO,CAAC;YACjCS,QAAQ,EAAEA,QAAQ;YAClBC,WAAW,EAAEA,WAAW;YACxBC,SAAS,EAAEA,SAAS;UACpB;MACa,CAClB;AACH,CAAC,CACF;AACDb,SAAS,CAACiB,WAAW,GAAG,WAAW"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { IdenticonStyle } from './IdenticonStyles.js';
|
|
4
|
-
import
|
|
5
|
-
// There is an error with importing jsNumberForAddress as named export in ESM build
|
|
6
|
-
|
|
4
|
+
import _Jazzicon from 'react-jazzicon';
|
|
5
|
+
// There is an error with importing jsNumberForAddress from 'react-jazzicon' as named export in ESM build
|
|
6
|
+
// Since the implementation is tiny, moving it here
|
|
7
|
+
const jsNumberForAddress = (address)=>{
|
|
8
|
+
const addr = address.slice(2, 10);
|
|
9
|
+
return parseInt(addr, 16) // seed
|
|
10
|
+
;
|
|
11
|
+
};
|
|
12
|
+
//@ts-expect-error Property default doesn't exist on type
|
|
13
|
+
const Jazzicon = _Jazzicon.default || _Jazzicon;
|
|
7
14
|
export const Identicon = /*#__PURE__*/ forwardRef((param, ref)=>{
|
|
8
15
|
let { diameter =24 , address , paperStyles , svgStyles , ...rest } = param;
|
|
9
16
|
return /*#__PURE__*/ _jsx(IdenticonStyle, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/identicon/Identicon.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport { IdenticonProps } from './types.js'\nimport { IdenticonStyle } from './IdenticonStyles.js'\nimport
|
|
1
|
+
{"version":3,"sources":["../../../packages/identicon/Identicon.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport { IdenticonProps } from './types.js'\nimport { IdenticonStyle } from './IdenticonStyles.js'\nimport _Jazzicon from 'react-jazzicon'\n\n// There is an error with importing jsNumberForAddress from 'react-jazzicon' as named export in ESM build\n// Since the implementation is tiny, moving it here\nconst jsNumberForAddress = (address: string): number => {\n const addr = address.slice(2, 10)\n return parseInt(addr, 16) // seed\n}\n\n//@ts-expect-error Property default doesn't exist on type\nconst Jazzicon = _Jazzicon.default || _Jazzicon\n\nexport const Identicon = forwardRef(\n (\n { diameter = 24, address, paperStyles, svgStyles, ...rest }: IdenticonProps,\n ref?: ForwardedRef<HTMLDivElement>,\n ) => {\n return (\n <IdenticonStyle {...rest} ref={ref}>\n <Jazzicon\n seed={jsNumberForAddress(address)}\n diameter={diameter}\n paperStyles={paperStyles}\n svgStyles={svgStyles}\n />\n </IdenticonStyle>\n )\n },\n)\nIdenticon.displayName = 'Identicon'\n"],"names":["forwardRef","IdenticonStyle","_Jazzicon","jsNumberForAddress","address","addr","slice","parseInt","Jazzicon","default","Identicon","ref","diameter","paperStyles","svgStyles","rest","seed","displayName"],"mappings":"AAAA;AAAA,SAAuBA,UAAU,QAAQ,OAAO,CAAA;AAEhD,SAASC,cAAc,QAAQ,sBAAsB,CAAA;AACrD,OAAOC,SAAS,MAAM,gBAAgB,CAAA;AAEtC,yGAAyG;AACzG,mDAAmD;AACnD,MAAMC,kBAAkB,GAAG,CAACC,OAAe,GAAa;IACtD,MAAMC,IAAI,GAAGD,OAAO,CAACE,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;IACjC,OAAOC,QAAQ,CAACF,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO;KAAR;AAC3B,CAAC;AAED,yDAAyD;AACzD,MAAMG,QAAQ,GAAGN,SAAS,CAACO,OAAO,IAAIP,SAAS;AAE/C,OAAO,MAAMQ,SAAS,iBAAGV,UAAU,CACjC,QAEEW,GAAkC,GAC/B;QAFH,EAAEC,QAAQ,EAAG,EAAE,CAAA,EAAER,OAAO,CAAA,EAAES,WAAW,CAAA,EAAEC,SAAS,CAAA,EAAE,GAAGC,IAAI,EAAkB;IAG3E,qBACE,KAACd,cAAc;QAAE,GAAGc,IAAI;QAAEJ,GAAG,EAAEA,GAAG;kBAChC,cAAA,KAACH,QAAQ;YACPQ,IAAI,EAAEb,kBAAkB,CAACC,OAAO,CAAC;YACjCQ,QAAQ,EAAEA,QAAQ;YAClBC,WAAW,EAAEA,WAAW;YACxBC,SAAS,EAAEA,SAAS;UACpB;MACa,CAClB;AACH,CAAC,CACF,CAAA;AACDJ,SAAS,CAACO,WAAW,GAAG,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Identicon.d.ts","sourceRoot":"","sources":["../../../packages/identicon/Identicon.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Identicon.d.ts","sourceRoot":"","sources":["../../../packages/identicon/Identicon.tsx"],"names":[],"mappings":";AAeA,eAAO,MAAM,SAAS;;;;;;;;iHAgBrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lidofinance/lido-ui",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.2",
|
|
4
4
|
"homepage": "https://github.com/lidofinance/ui",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/cjs/index.js",
|
|
13
13
|
"module": "dist/esm/index.js",
|
|
14
|
-
"type": "module",
|
|
15
14
|
"exports": {
|
|
16
15
|
".": {
|
|
17
16
|
"import": "./dist/esm/index.js",
|