@cowprotocol/widget-react 0.9.3 → 0.10.1-RC.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/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './lib/CowSwapWidget';
|
|
2
|
-
export * from '
|
|
2
|
+
export * from '@cowprotocol/widget-lib';
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var V=Object.defineProperty;var F=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>(F(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),f=require("react");class M{constructor(){E(this,"subscriptions",{})}on(t){const{event:n,handler:r}=t;this.subscriptions[n]||(this.subscriptions[n]=[]),this.subscriptions[n].push(r)}off(t){const{event:n,handler:r}=t;this.subscriptions[n]&&(this.subscriptions[n]=this.subscriptions[n].filter(s=>s!==r))}emit(t,n){this.subscriptions[t]&&this.subscriptions[t].forEach(r=>r(n))}}const L="cowSwapWidget";function g(e,t,n){const s={key:L,method:t,...typeof n=="object"?n:{}};e.postMessage(s,"*")}function m(e,t,n){const r=s=>{!k(s.data)||s.data.key!==L||s.data.method!==t||n(s.data)};return e.addEventListener("message",r),r}function k(e){return typeof e=="object"&&e!==null&&"key"in e&&"method"in e&&typeof e.key=="string"&&typeof e.method=="string"}function D(e,t,n){e.removeEventListener("message",n)}function y(e,t){e.removeEventListener("message",t)}var w=(e=>(e.ACTIVATE="ACTIVATE",e.UPDATE_HEIGHT="UPDATE_HEIGHT",e.SET_FULL_HEIGHT="SET_FULL_HEIGHT",e.EMIT_COW_EVENT="EMIT_COW_EVENT",e.PROVIDER_RPC_REQUEST="PROVIDER_RPC_REQUEST",e.INTERCEPT_WINDOW_OPEN="INTERCEPT_WINDOW_OPEN",e))(w||{}),T=(e=>(e.UPDATE_PARAMS="UPDATE_PARAMS",e.UPDATE_APP_DATA="UPDATE_APP_DATA",e.PROVIDER_RPC_RESPONSE="PROVIDER_RPC_RESPONSE",e.PROVIDER_ON_EVENT="PROVIDER_ON_EVENT",e))(T||{}),P=(e=>(e.SWAP="swap",e.LIMIT="limit",e.ADVANCED="advanced",e))(P||{});const G=["primary","background","paper","text","danger","warning","alert","info","success"];class x{constructor(t,n=[]){E(this,"eventEmitter",new M);E(this,"listeners",[]);E(this,"widgetListener");this.contentWindow=t,this.updateListeners(n),this.widgetListener=m(this.contentWindow,w.EMIT_COW_EVENT,r=>this.eventEmitter.emit(r.event,r.payload))}stopListeningIframe(){y(this.contentWindow,this.widgetListener)}updateListeners(t){for(const n of this.listeners)this.eventEmitter.off(n);this.listeners=t||[];for(const n of this.listeners)this.eventEmitter.on(n)}}const j=["connect","disconnect","close","chainChanged","accountsChanged"];class ${constructor(t){E(this,"ethereumProvider",null);E(this,"requestWaitingForConnection",{});E(this,"processRpcCallFromWindow",({rpcRequest:t})=>{if(!this.ethereumProvider){t.id&&(this.requestWaitingForConnection[t.id]=t);return}this.processRpcRequest(t)});this.iframeWidow=t}disconnect(){this.ethereumProvider=null,D(window,w.PROVIDER_RPC_REQUEST,this.processRpcCallFromWindow)}onConnect(t){this.ethereumProvider?this.disconnect():m(window,w.PROVIDER_RPC_REQUEST,this.processRpcCallFromWindow),this.ethereumProvider=t,this.processPendingRequests(),j.forEach(n=>{t.on(n,r=>this.onProviderEvent(n,r))})}processPendingRequests(){Object.keys(this.requestWaitingForConnection).forEach(t=>{this.processRpcRequest(this.requestWaitingForConnection[t])}),this.requestWaitingForConnection={}}processRpcRequest(t){const{id:n,jsonrpc:r,method:s}=t;if(!this.ethereumProvider||!n)return;(s==="enable"?this.ethereumProvider.enable():this.ethereumProvider.request({...t,id:n})).then(d=>this.forwardRpcResponseToIframe({rpcResponse:{jsonrpc:r,id:n,result:d}})).catch(d=>this.forwardRpcResponseToIframe({rpcResponse:{jsonrpc:r,id:n,error:d}}))}onProviderEvent(t,n){g(this.iframeWidow,T.PROVIDER_ON_EVENT,{event:t,params:n})}forwardRpcResponseToIframe(t){g(this.iframeWidow,T.PROVIDER_RPC_RESPONSE,t)}}class Q{constructor(t,n){E(this,"forwardSdkMessage");this.appWindow=t,this.iframeWidow=n,this.forwardSdkMessage=r=>{q(r.data)&&r.origin!==window.location.origin&&(B(r.data)?this.appWindow.parent.postMessage(r.data,"*"):J(r.data)&&this.iframeWidow.postMessage(r.data,"*"))},this.startListening()}startListening(){this.appWindow.addEventListener("message",this.forwardSdkMessage)}stopListening(){this.appWindow.removeEventListener("message",this.forwardSdkMessage)}}function q(e){return typeof e=="object"&&e!==null&&"id"in e&&typeof e.id=="string"}function B(e){return"method"in e&&typeof e.method=="string"&&"params"in e&&"env"in e&&typeof e.env=="object"&&e.env!==null&&"sdkVersion"in e.env}function J(e){return"success"in e&&typeof e.success=="boolean"&&"version"in e&&typeof e.version=="string"}function b(e){return!!(e&&typeof e=="object")}const I="_";function z(e){const t=typeof e.baseUrl=="string"?e.baseUrl:"https://swap.cow.fi",n=N(e);return t+"/#"+n+"?"+U(e)}function N(e){const{chainId:t=1,sell:n,buy:r,tradeType:s=P.SWAP}=e,c=[(n==null?void 0:n.asset)||I,(r==null?void 0:r.asset)||I].map(encodeURIComponent).join("/");return`/${t}/widget/${s}/${c}`}function U(e){const t=new URLSearchParams;return Y(K(t,e),e)}function K(e,t){const{sell:n,buy:r}=t;return n!=null&&n.amount&&e.append("sellAmount",n.amount),r!=null&&r.amount&&e.append("buyAmount",r.amount),e}function Y(e,t){const n=t.theme;return n?(b(n)?(e.append("palette",encodeURIComponent(JSON.stringify(n))),e.append("theme",n.baseTheme)):(e.append("palette","null"),e.append("theme",n)),e):(e.append("palette","null"),e)}const H="640px",X="450px",Z=20;function _(e,t){const{params:n,provider:r,listeners:s}=t;let c=r,d=n;const o=ee(n);e.innerHTML="",e.appendChild(o);const{contentWindow:p}=o;if(!p)throw console.error("Iframe does not contain a window",o),new Error("Iframe does not contain a window!");const h=[];h.push(te(p,n.appCode)),h.push(...re(o,n.height)),h.push(ne());const u=new x(window,s);let l=A(p,null,c);o.addEventListener("load",()=>O(p,d,c));const a=new Q(window,p);return{updateParams:i=>{d=i,O(p,d,c)},updateListeners:i=>u.updateListeners(i),updateProvider:i=>{c=i,l=A(p,l,i)},destroy:()=>{l.disconnect(),u.stopListeningIframe(),h.forEach(i=>window.removeEventListener("message",i)),a.stopListening(),e.removeChild(o)}}}function A(e,t,n){t&&t.disconnect();const r=t||new $(e);return n&&r.onConnect(n),r}function ee(e){const{width:t=X,height:n=H}=e,r=document.createElement("iframe");return r.src=z(e),r.width=t,r.height=n,r.style.border="0",r.allow="clipboard-read; clipboard-write",r}function O(e,t,n){const r=!!n,s=N(t),c=U(t).toString(),{theme:d,...o}=t;g(e,T.UPDATE_PARAMS,{urlParams:{pathname:s,search:c},appParams:o,hasProvider:r})}function te(e,t){return m(window,w.ACTIVATE,()=>{g(e,T.UPDATE_APP_DATA,{metaData:t?{appCode:t}:void 0})})}function ne(){return m(window,w.INTERCEPT_WINDOW_OPEN,({href:e,rel:t,target:n})=>{const r=e.toString();if(!r.startsWith("http")&&r.match(/^[a-zA-Z0-9]+:\/\//)){window.open(r,n,t);return}})}function re(e,t=H){return[m(window,w.UPDATE_HEIGHT,n=>{e.style.height=n.height?`${n.height+Z}px`:t}),m(window,w.SET_FULL_HEIGHT,({isUpToSmall:n})=>{e.style.height=n?t:`${document.body.offsetHeight}px`})]}const se=Object.values(P);function ie(e,t,n){if(v(e)){const r=e[n];return C(r)?r[t]:r}if(C(e)){const r=e[t];return v(r)?r[n]:r}return e}function v(e){return typeof e!="object"?!1:Object.keys(e).every(t=>se.includes(t))}const oe=/^\d+$/;function C(e){return typeof e!="object"?!1:Object.keys(e).every(t=>typeof t=="number"||oe.test(t))}function ae(e){const{params:t,provider:n,listeners:r}=e,[s,c]=f.useState(null),d=f.useRef(null),o=f.useRef(n),p=f.useRef(r),h=f.useRef(null),u=f.useRef(null),l=f.useCallback((a,i)=>{try{console.log(`[WIDGET] ${a}`),i()}catch(W){const S=`Error ${a.toLowerCase()}`;console.error(`[WIDGET] ${S}`,W),c({message:S,error:W})}},[c]);return f.useEffect(()=>()=>{d.current=null,o.current=void 0,p.current=void 0;const a=u.current;a&&(l("💥 Destroy widget",()=>a.destroy()),u.current=null)},[]),f.useEffect(()=>{if(!h.current||JSON.stringify(d.current)===JSON.stringify(t))return;const a=h.current,i=u.current;d.current=t,i===null?l("Creating a new widget",()=>{u.current=_(a,{params:t,provider:o.current,listeners:r}),p.current=r}):l("Updating the widget",()=>i.updateParams(t))},[t]),f.useEffect(()=>{if(!u.current||o.current===n)return;o.current=n;const a=h.current;a&&l("Updating the provider",()=>{var i;(i=u.current)==null||i.destroy(),u.current=_(a,{params:t,provider:o.current,listeners:r})})},[n]),f.useEffect(()=>{if(!u.current||p.current===r)return;const a=u.current;l("Updating the listeners",()=>a.updateListeners(r))},[r]),s?R.jsxs("div",{style:{color:"#ff3a3a"},children:[s.message,s.error.message&&R.jsx("pre",{style:{whiteSpace:"pre-wrap",fontSize:"0.75em"},children:s.error.message})]}):R.jsx("div",{ref:h,style:{width:"100%"}})}exports.CowSwapWidget=ae;exports.TradeType=P;exports.WIDGET_PALETTE_COLORS=G;exports.WidgetMethodsEmit=w;exports.WidgetMethodsListen=T;exports.createCowSwapWidget=_;exports.isCowSwapWidgetPalette=b;exports.isPerNetworkConfig=C;exports.isPerTradeTypeConfig=v;exports.listenToMessageFromWindow=m;exports.postMessageToWindow=g;exports.resolveFlexibleConfig=ie;exports.stopListeningToMessageFromWindow=D;exports.stopListeningWindowListener=y;
|
|
1
|
+
"use strict";var V=Object.defineProperty;var F=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>(F(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),f=require("react");class M{constructor(){E(this,"subscriptions",{})}on(t){const{event:n,handler:r}=t;return this.subscriptions[n]||(this.subscriptions[n]=[]),this.subscriptions[n].push(r),t}off(t){const{event:n,handler:r}=t;return this.subscriptions[n]&&(this.subscriptions[n]=this.subscriptions[n].filter(s=>s!==r)),t}emit(t,n){this.subscriptions[t]&&this.subscriptions[t].forEach(r=>r(n))}}const L="cowSwapWidget";function g(e,t,n){const s={key:L,method:t,...typeof n=="object"?n:{}};e.postMessage(s,"*")}function m(e,t,n){const r=s=>{!k(s.data)||s.data.key!==L||s.data.method!==t||n(s.data)};return e.addEventListener("message",r),r}function k(e){return typeof e=="object"&&e!==null&&"key"in e&&"method"in e&&typeof e.key=="string"&&typeof e.method=="string"}function D(e,t,n){e.removeEventListener("message",n)}function y(e,t){e.removeEventListener("message",t)}var w=(e=>(e.ACTIVATE="ACTIVATE",e.UPDATE_HEIGHT="UPDATE_HEIGHT",e.SET_FULL_HEIGHT="SET_FULL_HEIGHT",e.EMIT_COW_EVENT="EMIT_COW_EVENT",e.PROVIDER_RPC_REQUEST="PROVIDER_RPC_REQUEST",e.INTERCEPT_WINDOW_OPEN="INTERCEPT_WINDOW_OPEN",e))(w||{}),T=(e=>(e.UPDATE_PARAMS="UPDATE_PARAMS",e.UPDATE_APP_DATA="UPDATE_APP_DATA",e.PROVIDER_RPC_RESPONSE="PROVIDER_RPC_RESPONSE",e.PROVIDER_ON_EVENT="PROVIDER_ON_EVENT",e))(T||{}),P=(e=>(e.SWAP="swap",e.LIMIT="limit",e.ADVANCED="advanced",e))(P||{});const G=["primary","background","paper","text","danger","warning","alert","info","success"];class x{constructor(t,n=[]){E(this,"eventEmitter",new M);E(this,"listeners",[]);E(this,"widgetListener");this.contentWindow=t,this.updateListeners(n),this.widgetListener=m(this.contentWindow,w.EMIT_COW_EVENT,r=>this.eventEmitter.emit(r.event,r.payload))}stopListeningIframe(){y(this.contentWindow,this.widgetListener)}updateListeners(t){for(const n of this.listeners)this.eventEmitter.off(n);this.listeners=t||[];for(const n of this.listeners)this.eventEmitter.on(n)}}const j=["connect","disconnect","close","chainChanged","accountsChanged"];class ${constructor(t){E(this,"ethereumProvider",null);E(this,"requestWaitingForConnection",{});E(this,"processRpcCallFromWindow",({rpcRequest:t})=>{if(!this.ethereumProvider){t.id&&(this.requestWaitingForConnection[t.id]=t);return}this.processRpcRequest(t)});this.iframeWidow=t}disconnect(){this.ethereumProvider=null,D(window,w.PROVIDER_RPC_REQUEST,this.processRpcCallFromWindow)}onConnect(t){this.ethereumProvider?this.disconnect():m(window,w.PROVIDER_RPC_REQUEST,this.processRpcCallFromWindow),this.ethereumProvider=t,this.processPendingRequests(),j.forEach(n=>{t.on(n,r=>this.onProviderEvent(n,r))})}processPendingRequests(){Object.keys(this.requestWaitingForConnection).forEach(t=>{this.processRpcRequest(this.requestWaitingForConnection[t])}),this.requestWaitingForConnection={}}processRpcRequest(t){const{id:n,jsonrpc:r,method:s}=t;if(!this.ethereumProvider||!n)return;(s==="enable"?this.ethereumProvider.enable():this.ethereumProvider.request({...t,id:n})).then(d=>this.forwardRpcResponseToIframe({rpcResponse:{jsonrpc:r,id:n,result:d}})).catch(d=>this.forwardRpcResponseToIframe({rpcResponse:{jsonrpc:r,id:n,error:d}}))}onProviderEvent(t,n){g(this.iframeWidow,T.PROVIDER_ON_EVENT,{event:t,params:n})}forwardRpcResponseToIframe(t){g(this.iframeWidow,T.PROVIDER_RPC_RESPONSE,t)}}class Q{constructor(t,n){E(this,"forwardSdkMessage");this.appWindow=t,this.iframeWidow=n,this.forwardSdkMessage=r=>{q(r.data)&&r.origin!==window.location.origin&&(B(r.data)?this.appWindow.parent.postMessage(r.data,"*"):J(r.data)&&this.iframeWidow.postMessage(r.data,"*"))},this.startListening()}startListening(){this.appWindow.addEventListener("message",this.forwardSdkMessage)}stopListening(){this.appWindow.removeEventListener("message",this.forwardSdkMessage)}}function q(e){return typeof e=="object"&&e!==null&&"id"in e&&typeof e.id=="string"}function B(e){return"method"in e&&typeof e.method=="string"&&"params"in e&&"env"in e&&typeof e.env=="object"&&e.env!==null&&"sdkVersion"in e.env}function J(e){return"success"in e&&typeof e.success=="boolean"&&"version"in e&&typeof e.version=="string"}function b(e){return!!(e&&typeof e=="object")}const I="_";function z(e){const t=typeof e.baseUrl=="string"?e.baseUrl:"https://swap.cow.fi",n=N(e);return t+"/#"+n+"?"+U(e)}function N(e){const{chainId:t=1,sell:n,buy:r,tradeType:s=P.SWAP}=e,c=[(n==null?void 0:n.asset)||I,(r==null?void 0:r.asset)||I].map(encodeURIComponent).join("/");return`/${t}/widget/${s}/${c}`}function U(e){const t=new URLSearchParams;return Y(K(t,e),e)}function K(e,t){const{sell:n,buy:r}=t;return n!=null&&n.amount&&e.append("sellAmount",n.amount),r!=null&&r.amount&&e.append("buyAmount",r.amount),e}function Y(e,t){const n=t.theme;return n?(b(n)?(e.append("palette",encodeURIComponent(JSON.stringify(n))),e.append("theme",n.baseTheme)):(e.append("palette","null"),e.append("theme",n)),e):(e.append("palette","null"),e)}const H="640px",X="450px",Z=20;function _(e,t){const{params:n,provider:r,listeners:s}=t;let c=r,d=n;const o=ee(n);e.innerHTML="",e.appendChild(o);const{contentWindow:p}=o;if(!p)throw console.error("Iframe does not contain a window",o),new Error("Iframe does not contain a window!");const h=[];h.push(te(p,n.appCode)),h.push(...re(o,n.height)),h.push(ne());const u=new x(window,s);let l=A(p,null,c);o.addEventListener("load",()=>O(p,d,c));const a=new Q(window,p);return{updateParams:i=>{d=i,O(p,d,c)},updateListeners:i=>u.updateListeners(i),updateProvider:i=>{c=i,l=A(p,l,i)},destroy:()=>{l.disconnect(),u.stopListeningIframe(),h.forEach(i=>window.removeEventListener("message",i)),a.stopListening(),e.removeChild(o)}}}function A(e,t,n){t&&t.disconnect();const r=t||new $(e);return n&&r.onConnect(n),r}function ee(e){const{width:t=X,height:n=H}=e,r=document.createElement("iframe");return r.src=z(e),r.width=t,r.height=n,r.style.border="0",r.allow="clipboard-read; clipboard-write",r}function O(e,t,n){const r=!!n,s=N(t),c=U(t).toString(),{theme:d,...o}=t;g(e,T.UPDATE_PARAMS,{urlParams:{pathname:s,search:c},appParams:o,hasProvider:r})}function te(e,t){return m(window,w.ACTIVATE,()=>{g(e,T.UPDATE_APP_DATA,{metaData:t?{appCode:t}:void 0})})}function ne(){return m(window,w.INTERCEPT_WINDOW_OPEN,({href:e,rel:t,target:n})=>{const r=e.toString();if(!r.startsWith("http")&&r.match(/^[a-zA-Z0-9]+:\/\//)){window.open(r,n,t);return}})}function re(e,t=H){return[m(window,w.UPDATE_HEIGHT,n=>{e.style.height=n.height?`${n.height+Z}px`:t}),m(window,w.SET_FULL_HEIGHT,({isUpToSmall:n})=>{e.style.height=n?t:`${document.body.offsetHeight}px`})]}const se=Object.values(P);function ie(e,t,n){if(v(e)){const r=e[n];return C(r)?r[t]:r}if(C(e)){const r=e[t];return v(r)?r[n]:r}return e}function v(e){return typeof e!="object"?!1:Object.keys(e).every(t=>se.includes(t))}const oe=/^\d+$/;function C(e){return typeof e!="object"?!1:Object.keys(e).every(t=>typeof t=="number"||oe.test(t))}function ae(e){const{params:t,provider:n,listeners:r}=e,[s,c]=f.useState(null),d=f.useRef(null),o=f.useRef(n),p=f.useRef(r),h=f.useRef(null),u=f.useRef(null),l=f.useCallback((a,i)=>{try{console.log(`[WIDGET] ${a}`),i()}catch(W){const S=`Error ${a.toLowerCase()}`;console.error(`[WIDGET] ${S}`,W),c({message:S,error:W})}},[c]);return f.useEffect(()=>()=>{d.current=null,o.current=void 0,p.current=void 0;const a=u.current;a&&(l("💥 Destroy widget",()=>a.destroy()),u.current=null)},[]),f.useEffect(()=>{if(!h.current||JSON.stringify(d.current)===JSON.stringify(t))return;const a=h.current,i=u.current;d.current=t,i===null?l("Creating a new widget",()=>{u.current=_(a,{params:t,provider:o.current,listeners:r}),p.current=r}):l("Updating the widget",()=>i.updateParams(t))},[t]),f.useEffect(()=>{if(!u.current||o.current===n)return;o.current=n;const a=h.current;a&&l("Updating the provider",()=>{var i;(i=u.current)==null||i.destroy(),u.current=_(a,{params:t,provider:o.current,listeners:r})})},[n]),f.useEffect(()=>{if(!u.current||p.current===r)return;const a=u.current;l("Updating the listeners",()=>a.updateListeners(r))},[r]),s?R.jsxs("div",{style:{color:"#ff3a3a"},children:[s.message,s.error.message&&R.jsx("pre",{style:{whiteSpace:"pre-wrap",fontSize:"0.75em"},children:s.error.message})]}):R.jsx("div",{ref:h,style:{width:"100%"}})}exports.CowSwapWidget=ae;exports.TradeType=P;exports.WIDGET_PALETTE_COLORS=G;exports.WidgetMethodsEmit=w;exports.WidgetMethodsListen=T;exports.createCowSwapWidget=_;exports.isCowSwapWidgetPalette=b;exports.isPerNetworkConfig=C;exports.isPerTradeTypeConfig=v;exports.listenToMessageFromWindow=m;exports.postMessageToWindow=g;exports.resolveFlexibleConfig=ie;exports.stopListeningToMessageFromWindow=D;exports.stopListeningWindowListener=y;
|
package/index.mjs
CHANGED
|
@@ -9,11 +9,11 @@ class M {
|
|
|
9
9
|
}
|
|
10
10
|
on(t) {
|
|
11
11
|
const { event: n, handler: r } = t;
|
|
12
|
-
this.subscriptions[n] || (this.subscriptions[n] = []), this.subscriptions[n].push(r);
|
|
12
|
+
return this.subscriptions[n] || (this.subscriptions[n] = []), this.subscriptions[n].push(r), t;
|
|
13
13
|
}
|
|
14
14
|
off(t) {
|
|
15
15
|
const { event: n, handler: r } = t;
|
|
16
|
-
this.subscriptions[n] && (this.subscriptions[n] = this.subscriptions[n].filter((s) => s !== r));
|
|
16
|
+
return this.subscriptions[n] && (this.subscriptions[n] = this.subscriptions[n].filter((s) => s !== r)), t;
|
|
17
17
|
}
|
|
18
18
|
emit(t, n) {
|
|
19
19
|
this.subscriptions[t] && this.subscriptions[t].forEach((r) => r(n));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cowprotocol/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1-RC.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "CoW Swap Widget Library. Allows you to easily embed a CoW Swap widget on your React application.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"react"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@cowprotocol/widget-lib": "^0.
|
|
25
|
+
"@cowprotocol/widget-lib": "^0.14.0"
|
|
26
26
|
}
|
|
27
|
-
}
|
|
27
|
+
}
|