@crossmint/client-sdk-react-ui 0.1.5-alpha.2 → 0.1.5
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/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
- package/src/version.ts +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var it=Object.create;var S=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,ct=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var $=(t,s,o)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o,p=(t,s)=>{for(var o in s||(s={}))A.call(s,o)&&$(t,o,s[o]);if(N)for(var o of N(s))G.call(s,o)&&$(t,o,s[o]);return t};var P=(t,s)=>{var o={};for(var e in t)A.call(t,e)&&s.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&N)for(var e of N(t))s.indexOf(e)<0&&G.call(t,e)&&(o[e]=t[e]);return o};var lt=(t,s)=>{for(var o in s)S(t,o,{get:s[o],enumerable:!0})},q=(t,s,o,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of mt(s))!A.call(t,m)&&m!==o&&S(t,m,{get:()=>s[m],enumerable:!(e=at(s,m))||e.enumerable});return t};var D=(t,s,o)=>(o=t!=null?it(ct(t)):{},q(s||!t||!t.__esModule?S(o,"default",{value:t,enumerable:!0}):o,t)),ut=t=>q(S({},"__esModule",{value:!0}),t);var St={};lt(St,{CrossmintPayButton:()=>ft,CrossmintStatusButton:()=>dt});module.exports=ut(St);var i=D(require("react"),1),F=require("react"),n=require("@crossmint/client-sdk-base");var j=require("react-jss"),pt="#1e1e1e",W=t=>t==="light",w=t=>({buttonBgColor:W(t)?"white":pt,paragraphColor:W(t)?"black":"white"}),k=(0,j.createUseStyles)({"@global":{"@import":"url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')"},crossmintButton:{display:"flex","flex-direction":"row","align-items":"center",padding:"0.875rem 0.875rem","font-weight":"900",transition:"opacity ease-in-out 0.25s","border-radius":"0.5rem","font-family":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',outline:"none",border:"none","box-shadow":"0px 8px 15px rgba(0, 0, 0, 0.1)","justify-content":"center",background:({buttonBgColor:t})=>t,"&:hover:enabled":{opacity:"0.6",cursor:"pointer"}},crossmintImg:{width:"21px",height:"21px","margin-right":"0.875rem"},crossmintParagraph:{color:({paragraphColor:t})=>t,margin:"0"}});var M=typeof window<"u";var b="0.1.5-alpha.
|
|
1
|
+
var it=Object.create;var S=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,ct=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var $=(t,s,o)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o,p=(t,s)=>{for(var o in s||(s={}))A.call(s,o)&&$(t,o,s[o]);if(N)for(var o of N(s))G.call(s,o)&&$(t,o,s[o]);return t};var P=(t,s)=>{var o={};for(var e in t)A.call(t,e)&&s.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&N)for(var e of N(t))s.indexOf(e)<0&&G.call(t,e)&&(o[e]=t[e]);return o};var lt=(t,s)=>{for(var o in s)S(t,o,{get:s[o],enumerable:!0})},q=(t,s,o,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let m of mt(s))!A.call(t,m)&&m!==o&&S(t,m,{get:()=>s[m],enumerable:!(e=at(s,m))||e.enumerable});return t};var D=(t,s,o)=>(o=t!=null?it(ct(t)):{},q(s||!t||!t.__esModule?S(o,"default",{value:t,enumerable:!0}):o,t)),ut=t=>q(S({},"__esModule",{value:!0}),t);var St={};lt(St,{CrossmintPayButton:()=>ft,CrossmintStatusButton:()=>dt});module.exports=ut(St);var i=D(require("react"),1),F=require("react"),n=require("@crossmint/client-sdk-base");var j=require("react-jss"),pt="#1e1e1e",W=t=>t==="light",w=t=>({buttonBgColor:W(t)?"white":pt,paragraphColor:W(t)?"black":"white"}),k=(0,j.createUseStyles)({"@global":{"@import":"url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')"},crossmintButton:{display:"flex","flex-direction":"row","align-items":"center",padding:"0.875rem 0.875rem","font-weight":"900",transition:"opacity ease-in-out 0.25s","border-radius":"0.5rem","font-family":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',outline:"none",border:"none","box-shadow":"0px 8px 15px rgba(0, 0, 0, 0.1)","justify-content":"center",background:({buttonBgColor:t})=>t,"&:hover:enabled":{opacity:"0.6",cursor:"pointer"}},crossmintImg:{width:"21px",height:"21px","margin-right":"0.875rem"},crossmintParagraph:{color:({paragraphColor:t})=>t,margin:"0"}});var M=typeof window<"u";var b="0.1.5-alpha.2";var gt={type:n.mintingContractTypes.CANDY_MACHINE},ft=R=>{var x=R,{className:t,disabled:s,onClick:o,style:e,tabIndex:m,theme:v="dark",collectionTitle:g,collectionDescription:f,collectionPhoto:d,mintTo:E,emailTo:U,listingId:_,clientId:H,auctionId:y,hideMintOnInactiveClient:c=!1,showOverlay:O=!0,mintConfig:h=gt,whPassThroughArgs:B,environment:I}=x,T=P(x,["className","disabled","onClick","style","tabIndex","theme","collectionTitle","collectionDescription","collectionPhoto","mintTo","emailTo","listingId","clientId","auctionId","hideMintOnInactiveClient","showOverlay","mintConfig","whPassThroughArgs","environment"]);let[l,L]=(0,F.useState)(!1),[u,K]=(0,F.useState)(n.onboardingRequestStatusResponse.WAITING_SUBMISSION),{fetchClientIntegration:Y}=(0,n.crossmintStatusService)({libVersion:b,clientId:H,environment:I,auctionId:y,mintConfig:h,setStatus:K,clientName:n.clientNames.reactUi}),{connect:z}=(0,n.crossmintModalService)({clientId:H,showOverlay:O,setConnecting:L,libVersion:b,environment:I,clientName:n.clientNames.reactUi}),{checkProps:J,getButtonText:Q,shouldHideButton:X,handleClick:Z}=(0,n.crossmintPayButtonService)({onClick:o,connecting:l}),[tt,st,ot]=J({collectionTitle:g,collectionPhoto:d,collectionDescription:f});g=tt,f=st,d=ot,(0,i.useEffect)(()=>{c&&Y()},[u]);let et=rt=>Z(rt,()=>{z(h,g,f,d,E,U,_,B)}),V=k(w(v)),nt=(0,i.useMemo)(()=>i.default.createElement("p",{className:V.crossmintParagraph},Q(l)),[l]);return X({hideMintOnInactiveClient:c,status:u})?null:i.default.createElement(i.default.Fragment,null,M&&i.default.createElement("button",p({className:`${V.crossmintButton} ${t||""}`,disabled:s,onClick:et,style:p({},e),tabIndex:m},T),i.default.createElement("img",{className:V.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.png",alt:"Crossmint logo"}),nt))};var r=D(require("react"),1),a=require("@crossmint/client-sdk-base");var dt=H=>{var y=H,{className:t,disabled:s,onClick:o,style:e,tabIndex:m,theme:v="dark",clientId:g,auctionId:f,platformId:d,mintConfig:E,environment:U}=y,_=P(y,["className","disabled","onClick","style","tabIndex","theme","clientId","auctionId","platformId","mintConfig","environment"]);let[c,O]=(0,r.useState)(a.onboardingRequestStatusResponse.WAITING_SUBMISSION),{goToOnboarding:h,fetchClientIntegration:B}=(0,a.crossmintStatusService)({libVersion:b,clientId:g,environment:U,platformId:d,auctionId:f,mintConfig:E,setStatus:O,clientName:a.clientNames.reactUi}),{getButtonText:I,isButtonDisabled:T,handleClick:R}=(0,a.crossmintStatusButtonService)({onClick:o}),x=u=>R(u,c,h);(0,r.useEffect)(()=>{B();let u=setInterval(()=>{B()},60*1e3);return()=>clearInterval(u)},[]);let l=k(w(v)),L=(0,r.useMemo)(()=>r.default.createElement("p",{className:l.crossmintParagraph},I(c)),[c]);return r.default.createElement(r.default.Fragment,null,M&&r.default.createElement("button",p({className:`${l.crossmintButton} ${t||""}`,disabled:T(c),onClick:x,style:p({},e),tabIndex:m},_),r.default.createElement("img",{className:l.crossmintImg,src:`${a.baseUrls.prod}/assets/crossmint/logo.png`,alt:"Crossmint logo"}),L))};0&&(module.exports={CrossmintPayButton,CrossmintStatusButton});
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ot=Object.defineProperty;var B=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(t,o,s)=>o in t?ot(t,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[o]=s,a=(t,o)=>{for(var s in o||(o={}))A.call(o,s)&&V(t,s,o[s]);if(B)for(var s of B(o))F.call(o,s)&&V(t,s,o[s]);return t};var I=(t,o)=>{var s={};for(var e in t)A.call(t,e)&&o.indexOf(e)<0&&(s[e]=t[e]);if(t!=null&&B)for(var e of B(t))o.indexOf(e)<0&&F.call(t,e)&&(s[e]=t[e]);return s};import f,{useEffect as rt,useMemo as it}from"react";import{useState as $}from"react";import{crossmintModalService as at,crossmintPayButtonService as mt,crossmintStatusService as ct,clientNames as G,mintingContractTypes as lt,onboardingRequestStatusResponse as ut}from"@crossmint/client-sdk-base";import{createUseStyles as et}from"react-jss";var nt="#1e1e1e",R=t=>t==="light",x=t=>({buttonBgColor:R(t)?"white":nt,paragraphColor:R(t)?"black":"white"}),N=et({"@global":{"@import":"url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')"},crossmintButton:{display:"flex","flex-direction":"row","align-items":"center",padding:"0.875rem 0.875rem","font-weight":"900",transition:"opacity ease-in-out 0.25s","border-radius":"0.5rem","font-family":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',outline:"none",border:"none","box-shadow":"0px 8px 15px rgba(0, 0, 0, 0.1)","justify-content":"center",background:({buttonBgColor:t})=>t,"&:hover:enabled":{opacity:"0.6",cursor:"pointer"}},crossmintImg:{width:"21px",height:"21px","margin-right":"0.875rem"},crossmintParagraph:{color:({paragraphColor:t})=>t,margin:"0"}});var P=typeof window<"u";var g="0.1.5-alpha.
|
|
1
|
+
var ot=Object.defineProperty;var B=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(t,o,s)=>o in t?ot(t,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[o]=s,a=(t,o)=>{for(var s in o||(o={}))A.call(o,s)&&V(t,s,o[s]);if(B)for(var s of B(o))F.call(o,s)&&V(t,s,o[s]);return t};var I=(t,o)=>{var s={};for(var e in t)A.call(t,e)&&o.indexOf(e)<0&&(s[e]=t[e]);if(t!=null&&B)for(var e of B(t))o.indexOf(e)<0&&F.call(t,e)&&(s[e]=t[e]);return s};import f,{useEffect as rt,useMemo as it}from"react";import{useState as $}from"react";import{crossmintModalService as at,crossmintPayButtonService as mt,crossmintStatusService as ct,clientNames as G,mintingContractTypes as lt,onboardingRequestStatusResponse as ut}from"@crossmint/client-sdk-base";import{createUseStyles as et}from"react-jss";var nt="#1e1e1e",R=t=>t==="light",x=t=>({buttonBgColor:R(t)?"white":nt,paragraphColor:R(t)?"black":"white"}),N=et({"@global":{"@import":"url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')"},crossmintButton:{display:"flex","flex-direction":"row","align-items":"center",padding:"0.875rem 0.875rem","font-weight":"900",transition:"opacity ease-in-out 0.25s","border-radius":"0.5rem","font-family":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',outline:"none",border:"none","box-shadow":"0px 8px 15px rgba(0, 0, 0, 0.1)","justify-content":"center",background:({buttonBgColor:t})=>t,"&:hover:enabled":{opacity:"0.6",cursor:"pointer"}},crossmintImg:{width:"21px",height:"21px","margin-right":"0.875rem"},crossmintParagraph:{color:({paragraphColor:t})=>t,margin:"0"}});var P=typeof window<"u";var g="0.1.5-alpha.2";var pt={type:lt.CANDY_MACHINE},Ot=L=>{var h=L,{className:t,disabled:o,onClick:s,style:e,tabIndex:w,theme:k="dark",collectionTitle:m,collectionDescription:c,collectionPhoto:l,mintTo:M,emailTo:v,listingId:E,clientId:U,auctionId:S,hideMintOnInactiveClient:n=!1,showOverlay:_=!0,mintConfig:C=pt,whPassThroughArgs:b,environment:y}=h,H=I(h,["className","disabled","onClick","style","tabIndex","theme","collectionTitle","collectionDescription","collectionPhoto","mintTo","emailTo","listingId","clientId","auctionId","hideMintOnInactiveClient","showOverlay","mintConfig","whPassThroughArgs","environment"]);let[r,O]=$(!1),[i,q]=$(ut.WAITING_SUBMISSION),{fetchClientIntegration:D}=ct({libVersion:g,clientId:U,environment:y,auctionId:S,mintConfig:C,setStatus:q,clientName:G.reactUi}),{connect:W}=at({clientId:U,showOverlay:_,setConnecting:O,libVersion:g,environment:y,clientName:G.reactUi}),{checkProps:j,getButtonText:K,shouldHideButton:Y,handleClick:z}=mt({onClick:s,connecting:r}),[J,Q,X]=j({collectionTitle:m,collectionPhoto:l,collectionDescription:c});m=J,c=Q,l=X,rt(()=>{n&&D()},[i]);let Z=st=>z(st,()=>{W(C,m,c,l,M,v,E,b)}),T=N(x(k)),tt=it(()=>f.createElement("p",{className:T.crossmintParagraph},K(r)),[r]);return Y({hideMintOnInactiveClient:n,status:i})?null:f.createElement(f.Fragment,null,P&&f.createElement("button",a({className:`${T.crossmintButton} ${t||""}`,disabled:o,onClick:Z,style:a({},e),tabIndex:w},H),f.createElement("img",{className:T.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.png",alt:"Crossmint logo"}),tt))};import d,{useEffect as gt,useMemo as ft,useState as dt}from"react";import{baseUrls as St,clientNames as Ct,crossmintStatusButtonService as bt,crossmintStatusService as yt,onboardingRequestStatusResponse as ht}from"@crossmint/client-sdk-base";var Dt=U=>{var S=U,{className:t,disabled:o,onClick:s,style:e,tabIndex:w,theme:k="dark",clientId:m,auctionId:c,platformId:l,mintConfig:M,environment:v}=S,E=I(S,["className","disabled","onClick","style","tabIndex","theme","clientId","auctionId","platformId","mintConfig","environment"]);let[n,_]=dt(ht.WAITING_SUBMISSION),{goToOnboarding:C,fetchClientIntegration:b}=yt({libVersion:g,clientId:m,environment:v,platformId:l,auctionId:c,mintConfig:M,setStatus:_,clientName:Ct.reactUi}),{getButtonText:y,isButtonDisabled:H,handleClick:L}=bt({onClick:s}),h=i=>L(i,n,C);gt(()=>{b();let i=setInterval(()=>{b()},60*1e3);return()=>clearInterval(i)},[]);let r=N(x(k)),O=ft(()=>d.createElement("p",{className:r.crossmintParagraph},y(n)),[n]);return d.createElement(d.Fragment,null,P&&d.createElement("button",a({className:`${r.crossmintButton} ${t||""}`,disabled:H(n),onClick:h,style:a({},e),tabIndex:w},E),d.createElement("img",{className:r.crossmintImg,src:`${St.prod}/assets/crossmint/logo.png`,alt:"Crossmint logo"}),O))};export{Ot as CrossmintPayButton,Dt as CrossmintStatusButton};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/client-sdk-react-ui",
|
|
3
|
-
"version": "0.1.5
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"author": "Paella Labs Inc",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/CrossMint/crossmint-client-sdk",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test": "jest"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@crossmint/client-sdk-base": "^0.1.1
|
|
35
|
+
"@crossmint/client-sdk-base": "^0.1.1",
|
|
36
36
|
"react": "^17.0.2",
|
|
37
37
|
"react-dom": "^17.0.2",
|
|
38
38
|
"react-jss": "^10.9.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"ts-jest": "^27.1.3",
|
|
51
51
|
"ts-node-dev": "^1.1.8"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ee0b45f013bd9da791f6ad964c2816d42cc324c6"
|
|
54
54
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.1.5
|
|
1
|
+
export const LIB_VERSION = "0.1.5";
|