@dodoex/widgets 3.14.0 → 3.14.1-react.10
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/LICENSE +674 -674
- package/README.md +70 -70
- package/dist/{34acf2e58b457195.svg → 28442382d977858a.svg} +9 -9
- package/dist/{219f8611c6c9e6e2.svg → 8de9a184d4ef0a11.svg} +6 -6
- package/dist/assets/bundle-BBymdwHN.css +65 -0
- package/dist/{44df077bd19df476.svg → b3f16b2626f03378.svg} +10 -10
- package/dist/{5c5d298f247819e1.svg → ed726d76d93d4899.svg} +10 -10
- package/dist/{helper-C8uhoyg4.cjs → helper-C0hvFYzE.cjs} +1 -1
- package/dist/{helper-Be3CWTCE.js → helper-CShlN-Na.js} +1 -1
- package/dist/index-BckgU9HL.js +12 -0
- package/dist/index-CDlkk2Qn.cjs +14 -0
- package/dist/index-CG8JD2hZ.js +78 -0
- package/dist/index-CPj5WDJ_.cjs +12 -0
- package/dist/index-ClfL8fzr.js +14 -0
- package/dist/index-Dm9u7v6e.cjs +78 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +5 -3
- package/dist/types/hooks/useTokenState.d.ts +5 -3
- package/dist/types/locales/en-US.d.ts +1 -0
- package/dist/types/providers/i18n.d.ts +1 -1
- package/package.json +162 -162
- package/dist/assets/bundle-DSSoJu9z.css +0 -297
- package/dist/index-BGCyS0SM.cjs +0 -40
- package/dist/index-Cuk9X7Dh.cjs +0 -12
- package/dist/index-DvUw-lQF.js +0 -78
- package/dist/index-FHV08HYK.js +0 -12
- package/dist/index-GeVhabPO.cjs +0 -78
- package/dist/index-asOS-7Ot.js +0 -40
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";var e=require("bignumber.js"),t=require("lodash"),i=require("react"),o=require("react-icons/bi"),r=require("@emotion/styled"),n=require("@emotion/react"),l=require("react-konva"),s=require("./helper-C0hvFYzE.cjs"),a=require("./index-CDlkk2Qn.cjs"),u=require("react/jsx-runtime"),d=require("@dodoex/api");require("@lingui/core"),require("@dodoex/components"),require("@dodoex/dodo-contract-request"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/defineProperty"),require("@lingui/react"),require("identicon.js"),require("zustand"),require("zustand/middleware"),require("@web3-react/core"),require("@web3-react/eip1193"),require("@web3-react/walletconnect-v2"),require("@web3-react/metamask"),require("@web3-react/types"),require("@tanstack/react-query"),require("@ethersproject/bignumber"),require("react-dom"),require("react-window"),require("dayjs"),require("dayjs/plugin/duration"),require("dayjs/plugin/localizedFormat"),require("dayjs/plugin/utc"),require("react-transition-group"),require("react-is"),require("@dodoex/contract-request"),require("axios"),require("recharts"),require("react-dom/client"),require("jsbi"),require("tiny-invariant"),require("@uniswap/sdk-core"),require("@uniswap/v2-sdk"),require("react-infinite-scroller"),require("d3"),require("rmc-date-picker"),require("rmc-date-picker/assets/index.css"),require("react-datetime/css/react-datetime.css");const c=r.input`
|
|
2
|
+
margin: 4px 10px 4px 6px;
|
|
3
|
+
border-radius: 10px;
|
|
4
|
+
border: 1px solid #373739;
|
|
5
|
+
padding: 4px 9px;
|
|
6
|
+
background-color: #1a1a1b;
|
|
7
|
+
color: #ffffff;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
line-height: 20px;
|
|
11
|
+
outline: none;
|
|
12
|
+
width: 96px;
|
|
13
|
+
&:focus {
|
|
14
|
+
border-color: #fff;
|
|
15
|
+
|
|
16
|
+
${({error:e})=>e&&n.css`
|
|
17
|
+
border-color: red;
|
|
18
|
+
`}
|
|
19
|
+
}
|
|
20
|
+
`;const p="rgba(38, 39, 41, 0.3)";function m({width:o,height:r,midPrice:n,pmmModel:d,params:c,baseTokenSymbol:m,quoteTokenSymbol:g,baseMinAndZoomMultiples:h,colorMap:b,setBaseMinAndZoomMultiples:M}){const f=t.merge({grid:"#2A2A2D",midPriceLine:"#313335",leftBg:[0,p,1,"#31645d"],leftLine:"#55f6db",leftColor:"",rightBg:[0,p,1,"#67303d"],rightLine:"#ff4f73",rightColor:"",tooltipBg:"#121212",tooltipColor:void 0},b),x=o,P=r-18,v=x/7,{buyBaseVert:y,sellBaseVert:L}=s.computeBaseVert({midPrice:n,q:c.q,q0:c.q0,pmmModel:d}),q=y.div(P),B=L.div(P),z=i.useRef(null),j=i.useRef(null),{current:w}=z,T=i.useRef(0),k=i.useRef(),{horizontalGridLines:C,verticalGridLines:S}=function({chartHeight:e,chartWidth:t,horizontalLineCount:o,verticalLineCount:r}){return i.useMemo(()=>{const i=[],n=e/(o+1),l=[],s=t/r;for(let e=0;e<o;e++){const o=n*(e+1);i.push([0,o,t,o])}for(let t=0;t<r;t++){const i=s*t+s/2;l.push([i,0,i,e])}return{horizontalGridLines:i,verticalGridLines:l}},[e,t,o,r])}({chartHeight:P,chartWidth:x,horizontalLineCount:9,verticalLineCount:7}),{horizontalLabelTickPoints:A,horizontalLabelTextPoints:X}=function({chartHeight:e,chartWidth:t,xAxisPoints:o,oneXPx:r,baseMinAndZoomMultiples:n}){return i.useMemo(()=>{const i=s.computeXPortion(t,n.zoomMultiples),l=[],u=[];for(let t=0;t<o;t++){l.push([t*r+r/2,e,t*r+r/2,e+4]);const o=i.multipliedBy(t).multipliedBy(r).plus(i.multipliedBy(r/2)).toNumber(),s=n.baseMin.multipliedBy(10**o),d=t*r,c=e+2+4,p=a.formatShortNumber(s);u.push({x:d,y:c,text:p})}return{horizontalLabelTickPoints:l,horizontalLabelTextPoints:u}},[n.baseMin,n.zoomMultiples,e,t,r,o])}({chartHeight:P,chartWidth:x,xAxisPoints:7,oneXPx:v,baseMinAndZoomMultiples:h}),{quoteLinePoints:N,quoteLineAreaPoints:Z,quoteLineAreaLinearGradientEndPointY:W,baseLinePoints:F,baseLineAreaPoints:E,baseLineAreaLinearGradientEndPointY:G,midPriceLinePoints:H}=function({chartHeight:t,chartWidth:o,midPrice:r,xPoints:n,pmmModel:l,baseMinAndZoomMultiples:a,buyYPortion:u,sellYPortion:d}){return i.useMemo(()=>{const i=[],c=[],p=[],{baseMin:m,zoomMultiples:g}=a,h=s.computeXPortion(o,g),b=2*g,M=new e(b).div(n);let f=new e(Math.log(r.div(m).toNumber())/Math.log(10));f=e.minimum(b,f),f=e.maximum(0,f);for(let o=new e(0);o.lte(f);){const e=m.multipliedBy(10**o.toNumber()),r=s.evalPoint({val:e,model:l});if(!r.vert.isNaN()){const e=o.div(h).toNumber(),n=t-r.vert.div(u).toNumber();i.push(e,n)}o=o.plus(M)}for(let e=f;e.lte(b);){const i=m.multipliedBy(10**e.toNumber()),o=s.evalPoint({val:i,model:l});if(!o.vert.isNaN()){const i=e.div(h).toNumber(),r=t-o.vert.div(d).toNumber();c.push(i,r)}e=e.plus(M)}const x=f.div(h).toNumber(),[,P]=i,v=l.k.eq(0);v&&i.push(x,P||t),i.push(x,t),p.push(x,t,x,0);const y=s.evalPoint({val:m.multipliedBy(10**b),model:l});let L=t;const q=new e(b).div(h).toNumber();return y.vert.isNaN()||(L=t-y.vert.div(d).toNumber()),v&&c.length>=2&&(c.unshift(x,L),c.unshift(x,t)),c.push(q,L),f.lte(0)&&c.unshift(0,t),{quoteLinePoints:i,quoteLineAreaPoints:[0,t,0,P,...i],quoteLineAreaLinearGradientEndPointY:P,baseLinePoints:c,baseLineAreaPoints:[...c,q,t],baseLineAreaLinearGradientEndPointY:L,midPriceLinePoints:p}},[a,o,n,r,l,t,u,d])}({chartHeight:P,chartWidth:x,midPrice:n,xPoints:50,pmmModel:d,baseMinAndZoomMultiples:h,buyYPortion:q,sellYPortion:B}),D=e=>{var t;const i=e.target;if(i&&w){const e=null===(t=i.getStage())||void 0===t?void 0:t.getPointerPosition();if(e){const{x:t}=e;if(t>x)return void w.hide();s.updateTooltip({x:t,tooltip:w,buyBaseVert:y,sellBaseVert:L,chartWidth:x,chartHeight:P,midPrice:n,pmmModel:d,baseTokenSymbol:m,quoteTokenSymbol:g,baseMinAndZoomMultiples:h,t:s.chartT,isHover:!0,color:f.tooltipColor,leftColor:f.leftLine,rightColor:f.rightLine})}}},R=i.useMemo(()=>t.throttle(e=>{const{target:t}=e,i=t.getStage();if(i){i.container().style.cursor="grabbing";const e=null==i?void 0:i.getPointerPosition();if(e){const t=e.x-T.current;T.current=e.x,k.current=e.x,M(e=>void 0===e.baseMin?e:{baseMin:s.computeBaseMinByDistance({dragDistance:t,prevBaseMin:e.baseMin,chartWidth:x,zoomMultiples:e.zoomMultiples}),zoomMultiples:e.zoomMultiples,targetMarginPriceX:0})}}},100),[x,M]),Y=i.useMemo(()=>t.throttle(e=>{e.cancelBubble=!0,e.evt.preventDefault();const t=e.evt.deltaY<0;M(e=>{const i=s.computeZoomMultiplesWhenZoom({zoomIn:t,prevZoomMultiples:e.zoomMultiples});return{baseMin:s.computeBaseAfterZoom({midPrice:n,zoomMultiples:i}),zoomMultiples:i,targetMarginPriceX:e.targetMarginPriceX}})},100),[n,M]);return i.useEffect(()=>{h.targetMarginPriceX>0&&null!==w?s.updateTooltip({x:h.targetMarginPriceX,tooltip:w,buyBaseVert:y,sellBaseVert:L,chartWidth:x,chartHeight:P,midPrice:n,pmmModel:d,baseTokenSymbol:m,quoteTokenSymbol:g,baseMinAndZoomMultiples:h,t:s.chartT,color:f.tooltipColor,leftColor:f.leftLine,rightColor:f.rightLine}):void 0!==k.current&&null!==w&&s.updateTooltip({x:k.current,tooltip:w,buyBaseVert:y,sellBaseVert:L,chartWidth:x,chartHeight:P,midPrice:n,pmmModel:d,baseTokenSymbol:m,quoteTokenSymbol:g,baseMinAndZoomMultiples:h,t:s.chartT,isHover:!0,color:f.tooltipColor,leftColor:f.leftLine,rightColor:f.rightLine})},[h,m,y,P,x,f.leftLine,f.rightLine,f.tooltipColor,n,d,g,L,w]),u.jsxs(l.Stage,{ref:j,width:o,offsetY:-s.chartOffsetYBCToolTip,height:r+s.chartOffsetYBCToolTip,draggable:!0,dragBoundFunc:function(){return{x:this.absolutePosition().x,y:this.absolutePosition().y}},onMouseMove:D,onMouseOver:D,onMouseOut:()=>{w&&w.hide()},onDragStart:function(e){const{target:t}=e,i=t.getStage();if(i){const e=i.getPointerPosition();e&&(T.current=e.x)}},onDragMove:R,onDragEnd:e=>{const{target:t}=e,i=t.getStage();i&&(i.container().style.cursor="pointer")},onWheel:Y,children:[u.jsxs(l.Layer,{children:[u.jsx(l.Rect,{x:0,y:0,width:o,height:P,stroke:f.grid,strokeWidth:1}),C.map((e,t)=>u.jsx(l.Line,{points:e,stroke:f.grid,strokeWidth:1,lineCap:"round",lineJoin:"round",listening:!1},t)),S.map((e,t)=>u.jsx(l.Line,{points:e,stroke:f.grid,strokeWidth:1,lineCap:"round",lineJoin:"round",listening:!1},t)),A.map((e,t)=>u.jsx(l.Line,{points:e,stroke:"#9d9d9d",strokeWidth:1,lineCap:"round",lineJoin:"round",listening:!1},t)),X.map((e,t)=>u.jsx(l.Text,{x:e.x,y:e.y,text:e.text,fontFamily:"Manrope",fontSize:12,fill:"#9d9d9d",width:v,padding:0,align:"center",verticalAlign:"bottom",listening:!1},t)),u.jsx(l.Line,{points:Z,closed:!0,listening:!1,lineCap:"round",lineJoin:"round",fillLinearGradientStartPoint:{x:0,y:P},fillLinearGradientEndPoint:{x:0,y:W},fillLinearGradientColorStops:f.leftBg}),u.jsx(l.Line,{points:N,stroke:f.leftLine,strokeWidth:2,lineCap:"round",lineJoin:"round",listening:!1}),u.jsx(l.Line,{points:E,closed:!0,listening:!1,lineCap:"round",lineJoin:"round",fillLinearGradientStartPoint:{x:x,y:P},fillLinearGradientEndPoint:{x:x,y:G},fillLinearGradientColorStops:f.rightBg}),u.jsx(l.Line,{points:F,stroke:f.rightLine,strokeWidth:2,lineCap:"round",lineJoin:"round",listening:!1}),u.jsx(l.Line,{points:H,stroke:f.midPriceLine,strokeWidth:2,lineCap:"round",lineJoin:"round",listening:!1})]}),u.jsxs(l.Layer,{ref:z,visible:!1,listening:!1,children:[u.jsx(l.Line,{points:[],stroke:"#ff4f73",strokeWidth:1,lineCap:"round",lineJoin:"round",dash:[4,6],id:"toolTipVertLine"}),u.jsx(l.Line,{points:[],stroke:"ff4f73",strokeWidth:1,lineCap:"round",lineJoin:"round",dash:[4,6],id:"toolTipHoriLine"}),u.jsx(l.Circle,{x:0,y:0,radius:5,fill:"#FF5072",stroke:"rgba(255, 80, 114, 0.3)",strokeWidth:12,id:"joinCircle"}),u.jsxs(l.Label,{x:0,y:0,id:"priceTextLabel",children:[u.jsx(l.Tag,{fill:f.tooltipBg,id:"priceTextLabel-tag"}),u.jsx(l.Text,{text:"",fontSize:12,fontFamily:"Manrope",padding:4,fill:"#FF5072",id:"priceTextLabel-text"})]}),u.jsxs(l.Label,{x:0,y:0,id:"slippageTextLabel",children:[u.jsx(l.Tag,{fill:f.tooltipBg,id:"slippageTextLabel-tag"}),u.jsx(l.Text,{text:"",fontSize:12,fontFamily:"Manrope",padding:4,fill:"#FF5072",id:"slippageTextLabel-text"})]}),u.jsxs(l.Label,{x:0,y:0,id:"toolTip",children:[u.jsx(l.Tag,{fill:f.tooltipBg,pointerDirection:"down",pointerWidth:15,pointerHeight:8,cornerRadius:8,lineJoin:"round",id:"toolTip-tag"}),u.jsx(l.Text,{text:"-",fontSize:12,lineHeight:17/12,padding:s.labelPadding,fontFamily:"Manrope",fill:"#FFFFFF",id:"toolTip-text"})]})]})]})}const g=r.button`
|
|
21
|
+
margin: 0;
|
|
22
|
+
border: none;
|
|
23
|
+
padding: 0;
|
|
24
|
+
background: none;
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
outline: none;
|
|
28
|
+
}
|
|
29
|
+
&:active {
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
`,h=r.div`
|
|
33
|
+
height: 100%;
|
|
34
|
+
`,b=r.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
`,M=r.div`
|
|
38
|
+
border: 1px solid ${({borderColor:e})=>e||"#2a2a2d"};
|
|
39
|
+
flex: 1 0 50%;
|
|
40
|
+
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
line-height: 17px;
|
|
47
|
+
color: #606066;
|
|
48
|
+
|
|
49
|
+
& + & {
|
|
50
|
+
border-left: none;
|
|
51
|
+
}
|
|
52
|
+
`,f=r.span`
|
|
53
|
+
color: #85858d;
|
|
54
|
+
`,x=r.div`
|
|
55
|
+
margin-top: 20px;
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
margin-bottom: 9px;
|
|
59
|
+
`,P=r(g)`
|
|
60
|
+
border-radius: 13px;
|
|
61
|
+
background-color: #373739;
|
|
62
|
+
width: 24px;
|
|
63
|
+
height: 24px;
|
|
64
|
+
font-size: 18px;
|
|
65
|
+
color: #85858d;
|
|
66
|
+
line-height: 0;
|
|
67
|
+
& + & {
|
|
68
|
+
margin-left: 10px;
|
|
69
|
+
}
|
|
70
|
+
&:first-child,
|
|
71
|
+
&:last-child {
|
|
72
|
+
font-size: 20px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
color: #fff;
|
|
77
|
+
}
|
|
78
|
+
`;function v({params:t,target:i,isBuy:o=!0}){const r=new e(t.b),n=new e(t.q);let l=new e(t.b0);const s=new e(t.q0),a=new e(t.i),u=new e(t.k),{R:c}=t;1===c&&l.eq(r)&&(l=d.solveQuadraticFunctionForTarget(r,n.minus(s),new e(1).div(a),u));const p=o?r.plus(i):r.minus(i);if(p.lt(l)||r.eq(l)){let t=l.multipliedBy(l).div(p).div(p);return t=new e(1).minus(u).plus(u.multipliedBy(t)),a.multipliedBy(t)}const m=new d.PMMModel;m.RStatus=c,m.B=r,m.B0=l,m.Q=n,m.Q0=s,m.i=a,m.k=u,m.mtFeeRate=new e(0),m.lpFeeRate=new e(0);let g=new e(0);g=o?m.querySellBase(i):m.queryBuyBase(i);const h=o?n.minus(g):n.plus(g);let b=s.multipliedBy(s).div(h).div(h);return b=new e(1).minus(u).plus(u.multipliedBy(b)),a.div(b)}exports.default=({chartId:r,width:n=834,height:l=460,baseTokenSymbol:d,quoteTokenSymbol:p,pmmModel:g,pmmParams:y,midPrice:L=new e(0),colorMap:q,notShowAmountInput:B})=>{(({id:e})=>{i.useEffect(()=>{function t(e){e.preventDefault()}let i=!1;try{const e={get passive(){return i=!0,!1}};window.addEventListener("test",()=>{},e),window.removeEventListener("test",()=>{})}catch(e){i=!1}const o=document.getElementById(e),r=!!i&&{passive:!1};return null==o||o.addEventListener("wheel",t,r),()=>{null==o||o.removeEventListener("wheel",t)}},[e])})({id:r});const[z,j]=i.useState(""),[w,T]=i.useState(""),[k,C]=i.useState("-"),[S,A]=i.useState("-"),[X,N]=i.useState({baseMin:new e(0),zoomMultiples:s.baseZoomMultiples,targetMarginPriceX:0});i.useEffect(()=>{void 0!==L&&N(e=>({baseMin:s.computeBaseAfterZoom({midPrice:L,zoomMultiples:e.zoomMultiples}),zoomMultiples:e.zoomMultiples,targetMarginPriceX:e.targetMarginPriceX}))},[L]);const Z=i.useMemo(()=>t.debounce(({type:t,amount:i})=>{""===i&&L&&(N({baseMin:s.computeBaseAfterZoom({midPrice:L,zoomMultiples:s.baseZoomMultiples}),zoomMultiples:s.baseZoomMultiples,targetMarginPriceX:0}),"buy"===t?C("-"):A("-"));const o=new e(i);if(!o.lte(0)&&!o.isNaN()&&(null==y?void 0:y.b)&&!o.gte(y.b)&&L)if("buy"===t){const e=v({params:y,target:o});N(i=>{const o=s.beforePriceImpactEffect({currentBaseMinAndZoomMultiples:i,targetPrice:e,midPrice:L,width:n});if(o.isSkip)return{baseMin:i.baseMin,zoomMultiples:i.zoomMultiples,targetMarginPriceX:o.targetX};if(o.targetX>0)return{baseMin:o.baseMin,zoomMultiples:o.zoomMultiples,targetMarginPriceX:o.targetX};const r=s.computeTargetXByTargetPrice({midPrice:L,width:n,type:t,targetPrice:e}),l=r.zoomMultiples.dp(6).toNumber();return{baseMin:s.computeBaseAfterZoom({midPrice:L,zoomMultiples:l}),zoomMultiples:l,targetMarginPriceX:r.targetX}}),C(`${a.formatPercentageNumber({input:e.minus(L).div(L)})}`)}else{const e=function({params:e,target:t}){return v({params:e,target:t,isBuy:!1})}({params:y,target:o});N(i=>{const o=s.beforePriceImpactEffect({currentBaseMinAndZoomMultiples:i,targetPrice:e,midPrice:L,width:n});if(o.isSkip)return{baseMin:i.baseMin,zoomMultiples:i.zoomMultiples,targetMarginPriceX:o.targetX};if(o.targetX>0)return{baseMin:o.baseMin,zoomMultiples:o.zoomMultiples,targetMarginPriceX:o.targetX};const r=s.computeTargetXByTargetPrice({midPrice:L,width:n,type:t,targetPrice:e}),l=r.zoomMultiples.dp(6).toNumber();return{baseMin:s.computeBaseAfterZoom({midPrice:L,zoomMultiples:l}),zoomMultiples:l,targetMarginPriceX:r.targetX}}),A(`+${a.formatPercentageNumber({input:e.minus(L).div(L)})}`)}},300),[y,L,n]);i.useEffect(()=>{void 0!==z&&Z({type:"buy",amount:z})},[Z,z]),i.useEffect(()=>{void 0!==w&&Z({type:"sell",amount:w})},[Z,w]);const W=e=>{let t=0;t=e?-.1*n:.1*n,N(e=>void 0===e.baseMin?e:{baseMin:s.computeBaseMinByDistance({dragDistance:t,prevBaseMin:e.baseMin,chartWidth:n,zoomMultiples:e.zoomMultiples}),zoomMultiples:e.zoomMultiples,targetMarginPriceX:e.targetMarginPriceX})},F=e=>{N(t=>{const i=s.computeZoomMultiplesWhenZoom({zoomIn:null!=e&&e,prevZoomMultiples:t.zoomMultiples});return{baseMin:s.computeBaseAfterZoom({midPrice:L,zoomMultiples:i}),zoomMultiples:i,targetMarginPriceX:t.targetMarginPriceX}})},E=i.useMemo(()=>{if(""===z)return!1;const t=new e(z);return!(!t.lte(0)&&!t.isNaN()&&(null==y?void 0:y.b)&&!t.gte(y.b))},[z,y]),G=i.useMemo(()=>{if(""===w)return!1;const t=new e(w);return!(!t.lte(0)&&!t.isNaN()&&(null==y?void 0:y.b)&&!t.gte(y.b))},[w,y]);return u.jsxs(h,{id:r,children:[B?"":u.jsxs(b,{children:[u.jsxs(M,{borderColor:q&&q.grid,children:[s.chartT("pool.chart.buy-amount",{symbol:d}),u.jsx(c,{value:z,error:E,onChange:e=>{const t=a.fixedInputStringToFormattedNumber(e.target.value,2);null!==t&&j(t)}}),u.jsx(f,{children:s.chartT("pool.chart.price-impact",{amount:k})})]}),u.jsxs(M,{borderColor:q&&q.grid,children:[s.chartT("pool.chart.sell-amount",{symbol:d}),u.jsx(c,{value:w,error:G,onChange:e=>{const t=a.fixedInputStringToFormattedNumber(e.target.value,2);null!==t&&T(t)}}),u.jsx(f,{children:s.chartT("pool.chart.price-impact",{amount:S})})]})]}),void 0!==y&&void 0!==L&&void 0!==g&&void 0!==X.baseMin&&void 0!==L&&u.jsx(m,{width:n,height:l,params:y,midPrice:L,pmmModel:g,baseTokenSymbol:d,quoteTokenSymbol:p,baseMinAndZoomMultiples:X,colorMap:q,setBaseMinAndZoomMultiples:N}),u.jsxs(x,{className:"operate-btn-wrapper",children:[u.jsx(P,{onClick:()=>W(!0),children:u.jsx(o.BiChevronLeft,{})}),u.jsx(P,{onClick:()=>F(!1),children:u.jsx(o.BiMinus,{})}),u.jsx(P,{onClick:()=>F(!0),children:u.jsx(o.BiPlus,{})}),u.jsx(P,{onClick:()=>W(!1),children:u.jsx(o.BiChevronRight,{})})]})]})};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-CDlkk2Qn.cjs");require("react-dom/client"),require("react/jsx-runtime"),require("bignumber.js"),require("lodash"),require("@dodoex/components"),require("@dodoex/api"),require("@dodoex/dodo-contract-request"),require("react"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/defineProperty"),require("@lingui/core"),require("@lingui/react"),require("identicon.js"),require("zustand"),require("zustand/middleware"),require("@web3-react/core"),require("@web3-react/eip1193"),require("@web3-react/walletconnect-v2"),require("@web3-react/metamask"),require("@web3-react/types"),require("@tanstack/react-query"),require("@ethersproject/bignumber"),require("react-dom"),require("react-window"),require("dayjs"),require("dayjs/plugin/duration"),require("dayjs/plugin/localizedFormat"),require("dayjs/plugin/utc"),require("react-transition-group"),require("react-is"),require("@dodoex/contract-request"),require("axios"),require("recharts"),require("jsbi"),require("tiny-invariant"),require("@uniswap/sdk-core"),require("@uniswap/v2-sdk"),require("react-infinite-scroller"),require("d3"),require("rmc-date-picker"),require("rmc-date-picker/assets/index.css"),require("react-datetime/css/react-datetime.css"),exports.AMMV2Create=e.AMMV2Create,exports.AMMV3PositionManage=e.AMMV3PositionManage,exports.AMMV3PositionsView=e.AMMV3PositionsView,exports.AddLiquidityV3=e.AddLiquidityV3,exports.EmptyList=e.EmptyList,exports.FailedList=e.FailedList,exports.InitSwapWidget=e.InitSwapWidget,exports.Message=e.Message,Object.defineProperty(exports,"MetadataFlag",{enumerable:!0,get:function(){return e.MetadataFlag}}),exports.MiningCreate=e.MiningCreate,exports.MiningDetail=e.MiningDetail,exports.MiningList=e.MiningList,Object.defineProperty(exports,"PageType",{enumerable:!0,get:function(){return e.PageType}}),exports.Pool=e.Pool,exports.PoolCreate=e.PoolCreate,exports.PoolDetail=e.PoolDetail,exports.PoolList=e.PoolList,exports.PoolModify=e.PoolModify,exports.PoolOperate=e.PoolOperate,exports.PoolOperateDialog=e.PoolOperateDialog,exports.PoolWidget=e.PoolWidget,exports.Swap=e.Swap,exports.SwapOrderHistory=e.SwapOrderHistory,exports.SwapWidget=e.SwapWidget,exports.TokenCard=e.TokenCard,exports.TokenLogo=e.TokenLogo,exports.TokenPairStatusButton=e.TokenPairStatusButton,exports.TokenStatusButton=e.TokenStatusButton,exports.UnstyleWidget=e.UnstyleWidget,exports.WIDGET_CLASS_NAME=e.WIDGET_CLASS_NAME,exports.WIDGET_MODULE_CLASS_NAME=e.WIDGET_MODULE_CLASS_NAME,exports.Widget=e.Widget,exports.chainListMap=e.chainListMap,exports.formatPercentageNumber=e.formatPercentageNumber,exports.formatReadableNumber=e.formatReadableNumber,exports.formatShortNumber=e.formatShortNumber,exports.formatTokenAmountNumber=e.formatTokenAmountNumber,exports.getEtherscanPage=e.getEtherscanPage,exports.rpcServerMap=e.rpcServerMap,exports.scanUrlDomainMap=e.scanUrlDomainMap,exports.useMessageState=e.useMessageState,exports.usePoolBalanceInfo=e.usePoolBalanceInfo,exports.useRouterStore=e.useRouterStore,exports.useTokenStatus=e.useTokenStatus,exports.useTradeSwapOrderList=e.useTradeSwapOrderList;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AMMV2Create,
|
|
1
|
+
export{A as AMMV2Create,D as AMMV3PositionManage,C as AMMV3PositionsView,B as AddLiquidityV3,K as EmptyList,J as FailedList,I as InitSwapWidget,g as Message,M as MetadataFlag,z as MiningCreate,y as MiningDetail,x as MiningList,c as PageType,m as Pool,o as PoolCreate,q as PoolDetail,n as PoolList,p as PoolModify,v as PoolOperate,t as PoolOperateDialog,P as PoolWidget,j as Swap,k as SwapOrderHistory,S as SwapWidget,G as TokenCard,H as TokenLogo,F as TokenPairStatusButton,T as TokenStatusButton,U as UnstyleWidget,W as WIDGET_CLASS_NAME,h as WIDGET_MODULE_CLASS_NAME,e as Widget,d as chainListMap,a as formatPercentageNumber,N as formatReadableNumber,f as formatShortNumber,O as formatTokenAmountNumber,L as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,w as usePoolBalanceInfo,u as useRouterStore,E as useTokenStatus,l as useTradeSwapOrderList}from"./index-ClfL8fzr.js";import"react-dom/client";import"react/jsx-runtime";import"bignumber.js";import"lodash";import"@dodoex/components";import"@dodoex/api";import"@dodoex/dodo-contract-request";import"react";import"@babel/runtime/helpers/interopRequireDefault";import"@babel/runtime/helpers/defineProperty";import"@lingui/core";import"@lingui/react";import"identicon.js";import"zustand";import"zustand/middleware";import"@web3-react/core";import"@web3-react/eip1193";import"@web3-react/walletconnect-v2";import"@web3-react/metamask";import"@web3-react/types";import"@tanstack/react-query";import"@ethersproject/bignumber";import"react-dom";import"react-window";import"dayjs";import"dayjs/plugin/duration";import"dayjs/plugin/localizedFormat";import"dayjs/plugin/utc";import"react-transition-group";import"react-is";import"@dodoex/contract-request";import"axios";import"recharts";import"jsbi";import"tiny-invariant";import"@uniswap/sdk-core";import"@uniswap/v2-sdk";import"react-infinite-scroller";import"d3";import"rmc-date-picker";import"rmc-date-picker/assets/index.css";import"react-datetime/css/react-datetime.css";
|
|
@@ -23,15 +23,17 @@ interface SwapSettingState {
|
|
|
23
23
|
expertMode: boolean;
|
|
24
24
|
disableIndirectRouting: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare const useSwapSettingStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SwapSettingState>, "persist"> & {
|
|
26
|
+
export declare const useSwapSettingStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SwapSettingState>, "setState" | "persist"> & {
|
|
27
|
+
setState(partial: SwapSettingState | Partial<SwapSettingState> | ((state: SwapSettingState) => SwapSettingState | Partial<SwapSettingState>), replace?: false | undefined): unknown;
|
|
28
|
+
setState(state: SwapSettingState | ((state: SwapSettingState) => SwapSettingState), replace: true): unknown;
|
|
27
29
|
persist: {
|
|
28
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState>>) => void;
|
|
30
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState, unknown>>) => void;
|
|
29
31
|
clearStorage: () => void;
|
|
30
32
|
rehydrate: () => Promise<void> | void;
|
|
31
33
|
hasHydrated: () => boolean;
|
|
32
34
|
onHydrate: (fn: (state: SwapSettingState) => void) => () => void;
|
|
33
35
|
onFinishHydration: (fn: (state: SwapSettingState) => void) => () => void;
|
|
34
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState>>;
|
|
36
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState, unknown>>;
|
|
35
37
|
};
|
|
36
38
|
}>;
|
|
37
39
|
export {};
|
|
@@ -12,15 +12,17 @@ interface TokenState {
|
|
|
12
12
|
popularTokenList: TokenList;
|
|
13
13
|
customTokenList: TokenList;
|
|
14
14
|
}
|
|
15
|
-
export declare const useTokenState: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<TokenState>, "persist"> & {
|
|
15
|
+
export declare const useTokenState: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<TokenState>, "setState" | "persist"> & {
|
|
16
|
+
setState(partial: TokenState | Partial<TokenState> | ((state: TokenState) => TokenState | Partial<TokenState>), replace?: false | undefined): unknown;
|
|
17
|
+
setState(state: TokenState | ((state: TokenState) => TokenState), replace: true): unknown;
|
|
16
18
|
persist: {
|
|
17
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState>>) => void;
|
|
19
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState, unknown>>) => void;
|
|
18
20
|
clearStorage: () => void;
|
|
19
21
|
rehydrate: () => Promise<void> | void;
|
|
20
22
|
hasHydrated: () => boolean;
|
|
21
23
|
onHydrate: (fn: (state: TokenState) => void) => () => void;
|
|
22
24
|
onFinishHydration: (fn: (state: TokenState) => void) => () => void;
|
|
23
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState>>;
|
|
25
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState, unknown>>;
|
|
24
26
|
};
|
|
25
27
|
}>;
|
|
26
28
|
export declare function getAllTokenList(state?: TokenState): TokenInfo[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let messages: any;
|
package/package.json
CHANGED
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.14.
|
|
4
|
-
"description": "DODO Widgets",
|
|
5
|
-
"source": "src/index.tsx",
|
|
6
|
-
"types": "dist/types/index.d.ts",
|
|
7
|
-
"main": "dist/index.cjs",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"license": "GPL-3.0-or-later",
|
|
10
|
-
"homepage": "https://github.com/DODOEX/widgets#readme",
|
|
11
|
-
"repository": "https://github.com/DODOEX/widgets",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"prepare": "yarn compile:i18n",
|
|
17
|
-
"extract:i18n": "lingui extract --clean",
|
|
18
|
-
"compile:i18n": "yarn extract:i18n && lingui compile",
|
|
19
|
-
"sync:i18n": "export $(cat .env | xargs) && env lingui extract --overwrite && lingui compile",
|
|
20
|
-
"watch": "yarn run rollup -c --watch",
|
|
21
|
-
"build": "yarn compile:i18n && rollup --config",
|
|
22
|
-
"prerelease": "yarn run build",
|
|
23
|
-
"release": "semantic-release",
|
|
24
|
-
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
25
|
-
"release.npm-publish": "npm publish --access public",
|
|
26
|
-
"release.npm-publish-beta": "npm publish --tag beta",
|
|
27
|
-
"test": "jest src",
|
|
28
|
-
"test:e2e": "jest e2e"
|
|
29
|
-
},
|
|
30
|
-
"author": "",
|
|
31
|
-
"publishConfig": {
|
|
32
|
-
"access": "public",
|
|
33
|
-
"registry": "https://registry.npmjs.org"
|
|
34
|
-
},
|
|
35
|
-
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./dist/types/index.d.ts",
|
|
38
|
-
"import": "./dist/index.js",
|
|
39
|
-
"require": "./dist/index.cjs"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"keywords": [
|
|
43
|
-
"dodo",
|
|
44
|
-
"widgets",
|
|
45
|
-
"interfaces"
|
|
46
|
-
],
|
|
47
|
-
"browserslist": {
|
|
48
|
-
"production": [
|
|
49
|
-
">0.2%",
|
|
50
|
-
"not dead",
|
|
51
|
-
"not op_mini all"
|
|
52
|
-
],
|
|
53
|
-
"development": [
|
|
54
|
-
"last 1 chrome version",
|
|
55
|
-
"last 1 firefox version",
|
|
56
|
-
"last 1 safari version"
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.5.
|
|
62
|
-
"@dodoex/components": "^3.2.
|
|
63
|
-
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "^1.32.0",
|
|
65
|
-
"@dodoex/icons": "^2.1.0",
|
|
66
|
-
"@emotion/react": "^11.10.0",
|
|
67
|
-
"@emotion/styled": "^11.10.0",
|
|
68
|
-
"@ethersproject/bignumber": "^5.6.2",
|
|
69
|
-
"@ethersproject/contracts": "^5.7.0",
|
|
70
|
-
"@lingui/core": "^5.7.0",
|
|
71
|
-
"@lingui/macro": "^5.7.0",
|
|
72
|
-
"@lingui/react": "^5.7.0",
|
|
73
|
-
"@reduxjs/toolkit": "^1.6.1",
|
|
74
|
-
"@semantic-release/changelog": "^6.0.1",
|
|
75
|
-
"@semantic-release/git": "^10.0.1",
|
|
76
|
-
"@tanstack/react-query": "^5.18.1",
|
|
77
|
-
"@uniswap/sdk-core": "^5.9.0",
|
|
78
|
-
"@uniswap/v2-sdk": "^4.6.2",
|
|
79
|
-
"@web3-react/core": "8.2.0",
|
|
80
|
-
"@web3-react/eip1193": "8.2.0",
|
|
81
|
-
"@web3-react/metamask": "8.2.1",
|
|
82
|
-
"@web3-react/types": "8.2.0",
|
|
83
|
-
"@web3-react/walletconnect-v2": "8.3.6",
|
|
84
|
-
"axios": "^0.27.2",
|
|
85
|
-
"bignumber.js": "^9.0.2",
|
|
86
|
-
"d3": "7.6.1",
|
|
87
|
-
"dayjs": "^1.11.11",
|
|
88
|
-
"identicon.js": "^2.3.3",
|
|
89
|
-
"jsbi": "^3.1.4",
|
|
90
|
-
"konva": "^9.3.15",
|
|
91
|
-
"lodash": "^4.17.21",
|
|
92
|
-
"make-plural": "^7.0.0",
|
|
93
|
-
"moment": "^2.29.4",
|
|
94
|
-
"react-datetime": "^3.3.0",
|
|
95
|
-
"react-icons": "^5.0.1",
|
|
96
|
-
"react-infinite-scroller": "^1.2.6",
|
|
97
|
-
"react-konva": "^19.0.0",
|
|
98
|
-
"react-transition-group": "^4.4.5",
|
|
99
|
-
"react-window": "^1.8.11",
|
|
100
|
-
"recharts": "^2.15.0",
|
|
101
|
-
"rmc-date-picker": "^6.0.10",
|
|
102
|
-
"tiny-invariant": "^1.1.0",
|
|
103
|
-
"zustand": "^
|
|
104
|
-
},
|
|
105
|
-
"peerDependencies": {
|
|
106
|
-
"@babel/runtime": ">=7.17.0",
|
|
107
|
-
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
108
|
-
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
109
|
-
},
|
|
110
|
-
"peerDependenciesMeta": {
|
|
111
|
-
"react-infinite-scroller": {
|
|
112
|
-
"optional": true
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"devDependencies": {
|
|
116
|
-
"@babel/preset-env": "^7.16.11",
|
|
117
|
-
"@babel/preset-react": "^7.18.6",
|
|
118
|
-
"@babel/preset-typescript": "^7.16.7",
|
|
119
|
-
"@lingui/cli": "^5.7.0",
|
|
120
|
-
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
|
|
121
|
-
"@nomiclabs/hardhat-ethers": "^2.1.1",
|
|
122
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
123
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
124
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
125
|
-
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
126
|
-
"@rollup/plugin-replace": "^5.0.7",
|
|
127
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
128
|
-
"@rollup/plugin-typescript": "^12.1.1",
|
|
129
|
-
"@rollup/plugin-url": "^8.0.2",
|
|
130
|
-
"@svgr/rollup": "^6.2.1",
|
|
131
|
-
"@testing-library/jest-dom": "^6.5.0",
|
|
132
|
-
"@testing-library/react": "^16.0.1",
|
|
133
|
-
"@testing-library/react-hooks": "^8.0.1",
|
|
134
|
-
"@types/d3": "7.4.3",
|
|
135
|
-
"@types/identicon.js": "^2.3.1",
|
|
136
|
-
"@types/jest": "^29.0.3",
|
|
137
|
-
"@types/lodash": "^4.14.184",
|
|
138
|
-
"@types/react-infinite-scroller": "^1.2.5",
|
|
139
|
-
"@types/react-transition-group": "^4.4.11",
|
|
140
|
-
"@types/react-window": "^1.8.5",
|
|
141
|
-
"babel-plugin-macros": "^3.1.0",
|
|
142
|
-
"babel-runtime": "^6.26.0",
|
|
143
|
-
"dotenv": "^16.0.2",
|
|
144
|
-
"ethers": "^5.7.1",
|
|
145
|
-
"gettext-parser": "^8.0.0",
|
|
146
|
-
"hardhat": "^2.22.13",
|
|
147
|
-
"identity-obj-proxy": "^3.0.0",
|
|
148
|
-
"jest": "^29.0.3",
|
|
149
|
-
"jest-environment-hardhat": "^1.1.9",
|
|
150
|
-
"jest-environment-jsdom": "^29.0.3",
|
|
151
|
-
"np": "^7.6.1",
|
|
152
|
-
"rollup": "^4.18.0",
|
|
153
|
-
"rollup-plugin-clear": "^2.0.7",
|
|
154
|
-
"rollup-plugin-import-css": "^3.5.5",
|
|
155
|
-
"svg-jest": "^1.0.1",
|
|
156
|
-
"ts-jest": "^29.0.1",
|
|
157
|
-
"typescript": "^5.6.3"
|
|
158
|
-
},
|
|
159
|
-
"optionalDependencies": {
|
|
160
|
-
"pino-pretty": "^13.1.3"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dodoex/widgets",
|
|
3
|
+
"version": "3.14.1-react.10",
|
|
4
|
+
"description": "DODO Widgets",
|
|
5
|
+
"source": "src/index.tsx",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"main": "dist/index.cjs",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"license": "GPL-3.0-or-later",
|
|
10
|
+
"homepage": "https://github.com/DODOEX/widgets#readme",
|
|
11
|
+
"repository": "https://github.com/DODOEX/widgets",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"prepare": "yarn compile:i18n",
|
|
17
|
+
"extract:i18n": "lingui extract --clean",
|
|
18
|
+
"compile:i18n": "yarn extract:i18n && lingui compile",
|
|
19
|
+
"sync:i18n": "export $(cat .env | xargs) && env lingui extract --overwrite && lingui compile",
|
|
20
|
+
"watch": "yarn run rollup -c --watch",
|
|
21
|
+
"build": "yarn compile:i18n && rollup --config",
|
|
22
|
+
"prerelease": "yarn run build",
|
|
23
|
+
"release": "semantic-release",
|
|
24
|
+
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
25
|
+
"release.npm-publish": "npm publish --access public",
|
|
26
|
+
"release.npm-publish-beta": "yarn run prerelease && npm publish --tag beta",
|
|
27
|
+
"test": "jest src",
|
|
28
|
+
"test:e2e": "jest e2e"
|
|
29
|
+
},
|
|
30
|
+
"author": "",
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"registry": "https://registry.npmjs.org"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/types/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js",
|
|
39
|
+
"require": "./dist/index.cjs"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"dodo",
|
|
44
|
+
"widgets",
|
|
45
|
+
"interfaces"
|
|
46
|
+
],
|
|
47
|
+
"browserslist": {
|
|
48
|
+
"production": [
|
|
49
|
+
">0.2%",
|
|
50
|
+
"not dead",
|
|
51
|
+
"not op_mini all"
|
|
52
|
+
],
|
|
53
|
+
"development": [
|
|
54
|
+
"last 1 chrome version",
|
|
55
|
+
"last 1 firefox version",
|
|
56
|
+
"last 1 safari version"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@babel/runtime": "^7.17.0",
|
|
61
|
+
"@dodoex/api": "3.5.1-react.01",
|
|
62
|
+
"@dodoex/components": "^3.2.1-react.01",
|
|
63
|
+
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
+
"@dodoex/dodo-contract-request": "^1.32.0",
|
|
65
|
+
"@dodoex/icons": "^2.1.0",
|
|
66
|
+
"@emotion/react": "^11.10.0",
|
|
67
|
+
"@emotion/styled": "^11.10.0",
|
|
68
|
+
"@ethersproject/bignumber": "^5.6.2",
|
|
69
|
+
"@ethersproject/contracts": "^5.7.0",
|
|
70
|
+
"@lingui/core": "^5.7.0",
|
|
71
|
+
"@lingui/macro": "^5.7.0",
|
|
72
|
+
"@lingui/react": "^5.7.0",
|
|
73
|
+
"@reduxjs/toolkit": "^1.6.1",
|
|
74
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
75
|
+
"@semantic-release/git": "^10.0.1",
|
|
76
|
+
"@tanstack/react-query": "^5.18.1",
|
|
77
|
+
"@uniswap/sdk-core": "^5.9.0",
|
|
78
|
+
"@uniswap/v2-sdk": "^4.6.2",
|
|
79
|
+
"@web3-react/core": "8.2.0",
|
|
80
|
+
"@web3-react/eip1193": "8.2.0",
|
|
81
|
+
"@web3-react/metamask": "8.2.1",
|
|
82
|
+
"@web3-react/types": "8.2.0",
|
|
83
|
+
"@web3-react/walletconnect-v2": "8.3.6",
|
|
84
|
+
"axios": "^0.27.2",
|
|
85
|
+
"bignumber.js": "^9.0.2",
|
|
86
|
+
"d3": "7.6.1",
|
|
87
|
+
"dayjs": "^1.11.11",
|
|
88
|
+
"identicon.js": "^2.3.3",
|
|
89
|
+
"jsbi": "^3.1.4",
|
|
90
|
+
"konva": "^9.3.15",
|
|
91
|
+
"lodash": "^4.17.21",
|
|
92
|
+
"make-plural": "^7.0.0",
|
|
93
|
+
"moment": "^2.29.4",
|
|
94
|
+
"react-datetime": "^3.3.0",
|
|
95
|
+
"react-icons": "^5.0.1",
|
|
96
|
+
"react-infinite-scroller": "^1.2.6",
|
|
97
|
+
"react-konva": "^19.0.0",
|
|
98
|
+
"react-transition-group": "^4.4.5",
|
|
99
|
+
"react-window": "^1.8.11",
|
|
100
|
+
"recharts": "^2.15.0",
|
|
101
|
+
"rmc-date-picker": "^6.0.10",
|
|
102
|
+
"tiny-invariant": "^1.1.0",
|
|
103
|
+
"zustand": "^5.0.0"
|
|
104
|
+
},
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"@babel/runtime": ">=7.17.0",
|
|
107
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
108
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
109
|
+
},
|
|
110
|
+
"peerDependenciesMeta": {
|
|
111
|
+
"react-infinite-scroller": {
|
|
112
|
+
"optional": true
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"devDependencies": {
|
|
116
|
+
"@babel/preset-env": "^7.16.11",
|
|
117
|
+
"@babel/preset-react": "^7.18.6",
|
|
118
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
119
|
+
"@lingui/cli": "^5.7.0",
|
|
120
|
+
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
|
|
121
|
+
"@nomiclabs/hardhat-ethers": "^2.1.1",
|
|
122
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
123
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
124
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
125
|
+
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
126
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
127
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
128
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
129
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
130
|
+
"@svgr/rollup": "^6.2.1",
|
|
131
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
132
|
+
"@testing-library/react": "^16.0.1",
|
|
133
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
134
|
+
"@types/d3": "7.4.3",
|
|
135
|
+
"@types/identicon.js": "^2.3.1",
|
|
136
|
+
"@types/jest": "^29.0.3",
|
|
137
|
+
"@types/lodash": "^4.14.184",
|
|
138
|
+
"@types/react-infinite-scroller": "^1.2.5",
|
|
139
|
+
"@types/react-transition-group": "^4.4.11",
|
|
140
|
+
"@types/react-window": "^1.8.5",
|
|
141
|
+
"babel-plugin-macros": "^3.1.0",
|
|
142
|
+
"babel-runtime": "^6.26.0",
|
|
143
|
+
"dotenv": "^16.0.2",
|
|
144
|
+
"ethers": "^5.7.1",
|
|
145
|
+
"gettext-parser": "^8.0.0",
|
|
146
|
+
"hardhat": "^2.22.13",
|
|
147
|
+
"identity-obj-proxy": "^3.0.0",
|
|
148
|
+
"jest": "^29.0.3",
|
|
149
|
+
"jest-environment-hardhat": "^1.1.9",
|
|
150
|
+
"jest-environment-jsdom": "^29.0.3",
|
|
151
|
+
"np": "^7.6.1",
|
|
152
|
+
"rollup": "^4.18.0",
|
|
153
|
+
"rollup-plugin-clear": "^2.0.7",
|
|
154
|
+
"rollup-plugin-import-css": "^3.5.5",
|
|
155
|
+
"svg-jest": "^1.0.1",
|
|
156
|
+
"ts-jest": "^29.0.1",
|
|
157
|
+
"typescript": "^5.6.3"
|
|
158
|
+
},
|
|
159
|
+
"optionalDependencies": {
|
|
160
|
+
"pino-pretty": "^13.1.3"
|
|
161
|
+
}
|
|
162
|
+
}
|