@moneykit/connect 0.3.21 → 0.3.23

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.js CHANGED
@@ -1 +1 @@
1
- import m from"query-string";var y={name:"@moneykit/connect",description:"MoneyKit Connect launcher for web.",version:"0.3.20",author:"MoneyKit",repository:{type:"git",url:"https://github.com/moneykit/connect-js.git"},types:"./types/index.d.ts",license:"MIT"};var p="https://connect.moneykit.com";function T(i,e){let t=document.createElement("iframe");t.id="moneykit-connect-frame",t.src=i,t.style.position=e?"absolute":"fixed",t.style.top="0",t.style.left="0",t.style.width=e?"100%":"100vw",t.style.height=e?"100%":"100svh",t.style.zIndex="999999";let o=e?document.getElementById(e):document.body;if(!o)throw new Error(`MoneyKit could not find container element with ID "${e}".`);return o.appendChild(t),t.addEventListener("load",function(){t.focus()}),t}function h(i){i.remove()}var g="moneykit.linkSessionToken",d=class{constructor(e={}){p=e.__connectSDKUIHost??p,this.options={...e}}link(e,t,o,r){this.startLink(e,t,o,r)}relink(e,t,o,r){this.startRelink(e,t,o,r)}continue(e,t,o,r){if(window.opener){window.opener.postMessage({moneykit:!0,type:"link.resume",eventData:{redirectURL:e}},p);return}this.continueLink(e,t,o,r)}__linkDirect(e,t,o,r){this.startLink(e,t,o,r,{viewMode:"direct"})}__relinkDirect(e,t,o,r){this.startRelink(e,t,o,r,{viewMode:"direct"})}__continueDirect(e,t,o,r){this.continueLink(e,t,o,r,{viewMode:"direct"})}startLink(e,t,o,r,l){let a={...this.linkParametersFromOptions(),linkSessionToken:e,origin:window.location.origin,...l},s=m.stringifyUrl({url:`${p}/start`,query:a});localStorage.setItem(g,e),this.launch(s,t,o,r)}startRelink(e,t,o,r,l){let a={...this.linkParametersFromOptions(),linkSessionToken:e,origin:window.location.origin,...l},s=m.stringifyUrl({url:`${p}/relink`,query:a});localStorage.setItem(g,e),this.launch(s,t,o,r)}continueLink(e,t,o,r,l){let a=localStorage.getItem(g);a||console.warn("Unable to get MoneyKit link session token from local storage.");let s={...this.linkParametersFromOptions(),linkSessionToken:a,redirectURL:e,origin:window.location.origin,...l},n=m.stringifyUrl({url:`${p}/continue`,query:s});this.launch(n,t,o,r)}linkParametersFromOptions(){let e=this.options.__applicationName??null,t=this.options.device??null,o=this.options.stepTimers??!1;return{applicationName:e,device:t,stepTimers:o,launcherVersion:y.version}}launch(e,t,o,r){let l=T(e,this.options.containerID),a=new AbortController,s=b(l,a,t,o,r,this.options.__onDemoEvent,this.options.theme,this.options.colorScheme);window.addEventListener("message",s,{signal:a.signal})}};function b(i,e,t,o,r,l,a,s){return n=>{if(n.origin!=p||!("moneykit"in n.data||"__moneykitDemo"in n.data)){console.warn("MoneyKit Connect received a message from an unexpected origin",n.origin);return}let c=n.data;switch(c.type){case"connect.started":s&&n.source?.postMessage({moneykit:!0,type:"connect.set_color_scheme",data:{colorScheme:s}},{targetOrigin:p}),a&&n.source?.postMessage({moneykit:!0,type:"connect.set_theme",data:{theme:a}},{targetOrigin:p});break;case"link.complete":t&&c.data.exchangeableToken&&t(c.data.exchangeableToken,c.data.institution),h(i),e.abort();break;case"relink.complete":t&&t(c.data.institution),h(i),e.abort();break;case"link.exit":h(i),o&&o(c.data.error),e.abort();break;case"link.close_oauth":window.close();break;case"link.event":r&&r(c.data);break;case"demo.link.event":l&&l(c.data);break}}}var u=d;var x=(n=>(n[n.largeTitle=0]="largeTitle",n[n.title1=1]="title1",n[n.title2=2]="title2",n[n.title3=3]="title3",n[n.body=4]="body",n[n.smallBody=5]="smallBody",n[n.button=6]="button",n[n.input=7]="input",n))(x||{}),v=(i,e)=>{switch(e){case 0:return i.typography.largeTitle;case 1:return i.typography.title1;case 2:return i.typography.title2;case 3:return i.typography.title3;case 5:return i.typography.smallBody;case 6:return i.typography.button;case 7:return i.typography.input;default:return i.typography.body}};var M={colors:{accent:"#0077ff",primaryBackground:{light:"#fff",dark:"#212124"},secondaryBackground:{light:"#f2f2f5",dark:"#212124"},primaryContent:{light:"#fff",dark:"#343438"},secondaryContent:{light:"#f5f5f5",dark:"#343438"},primaryForeground:{light:"#111",dark:"#fff"},secondaryForeground:{light:"rgba(67, 67, 76, 0.6)",dark:"rgba(235, 235, 245, 0.6)"},tertiaryForeground:{light:"rgba(67, 67, 76, 0.3)",dark:"rgba(235, 234, 244, 0.3)"},primaryFill:{light:"rgba(120, 120, 128, 0.2)",dark:"rgba(120, 120, 128, 0.36)"},secondaryFill:{light:"rgba(120, 120, 128, 0.16)",dark:"rgba(120, 120, 128, 0.32)"},tertiaryFill:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},success:{light:"#00ca32",dark:"#35DE5F"},warning:{light:"#ff9500",dark:"#FF9400"},error:{light:"#dd2424",dark:"#FA4242"},separator:{light:"rgba(60, 60, 67, 0.06)",dark:"rgba(84, 84, 88, 0.4)"},selection:{light:"rgba(120, 120, 128, 0.28)",dark:"rgba(120, 120, 128, 0.48)"}},typography:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif",largeTitle:{size:"34px",lineHeight:"41px",letterSpacing:"-0.01em",weight:700},title1:{size:"28px",lineHeight:"34px",letterSpacing:"0",weight:700},title2:{size:"22px",lineHeight:"28px",letterSpacing:"0",weight:700},title3:{size:"20px",lineHeight:"24px",letterSpacing:"0",weight:700},body:{size:"17px",lineHeight:"24px",letterSpacing:"-0.01em",weight:500},smallBody:{size:"11px",lineHeight:"16px",letterSpacing:"-0.0225em",weight:400},button:{size:"18px",lineHeight:"24px",letterSpacing:"-1%",weight:700},input:{size:"18px",lineHeight:"24px",letterSpacing:"0",weight:500}},images:{close:"/images/close.svg",search:"/images/search.svg",spinner:"/images/spinner.png"},spacing:{contentHorizontalInset:"28px",buttonHorizontalInset:"28px"},components:{navigationBar:{height:"64px"},contentView:{borderRadius:"12px",boxShadow:{light:"none",dark:"inset 0 0 0 1px rgba(228, 227, 243, 0.04)"},border:null,separatorStyle:"all_except_last"},button:{height:"44px",borderRadius:"12px",inheritInstitutionColor:!0,continueTitle:"Continue",doneTitle:"Done"},searchInput:{backgroundColor:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},height:"48px",borderRadius:"12px",border:null,alignment:"center",focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},textField:{backgroundColor:null,height:"52px",borderRadius:"0px",boxShadow:null,focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},progressSpinner:{strokeWidth:8,diameter:56,lineCap:"round"},icon:{strokeWidth:8,lineCap:"round"},separator:{height:"1px"}},screens:{finder:{title:"Connect Your Bank",subtitle:null,searchPlaceholder:"Search Banks",institutionCellBoxShadow:null,institutionCellBorderRadius:"12px",institutionCellBorder:{light:"1px solid rgba(60, 60, 67, 0.1)",dark:"1px solid rgba(84, 84, 88, 0.4)"},institutionCellSpacing:"16px",institutionCellBackgroundColor:{light:"#fff",dark:"#212124"}}},modal:{borderRadius:"20px",boxShadow:{light:"0px 2px 4px rgba(0, 0, 0, 0.1), 0 40px 80px rgba(0,0,0,.15)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"},overlayBackgroundColor:{light:"rgba(0, 0, 0, 0.4)",dark:"rgba(0, 0, 0, 0.75)"},overlayBackdropFilter:null},popover:{borderRadius:"24px",boxShadow:{light:"0px 0px 80px rgba(0, 0, 0, 0.16)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"}}};var I=u;export{x as ThemeTypographyTextStyle,I as default,M as moneyui,v as themeTypographyStyleForTextStyle};
1
+ var N=Object.defineProperty;var v=(e,r)=>{for(var t in r)N(e,t,{get:r[t],enumerable:!0})};var T={};v(T,{exclude:()=>W,extract:()=>k,parse:()=>x,parseUrl:()=>R,pick:()=>O,stringify:()=>_,stringifyUrl:()=>K});var B="%[a-f0-9]{2}",F=new RegExp("("+B+")|([^%]+?)","gi"),w=new RegExp("("+B+")+","gi");function u(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;let t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],u(t),u(n))}function H(e){try{return decodeURIComponent(e)}catch{let r=e.match(F)||[];for(let t=1;t<r.length;t++)e=u(r,t).join(""),r=e.match(F)||[];return e}}function z(e){let r={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},t=w.exec(e);for(;t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{let o=H(t[0]);o!==t[0]&&(r[t[0]]=o)}t=w.exec(e)}r["%C2"]="\uFFFD";let n=Object.keys(r);for(let o of n)e=e.replace(new RegExp(o,"g"),r[o]);return e}function y(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return z(e)}}function h(e,r){if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||r==="")return[];let t=e.indexOf(r);return t===-1?[]:[e.slice(0,t),e.slice(t+r.length)]}function I(e,r){let t={};if(Array.isArray(r))for(let n of r){let o=Object.getOwnPropertyDescriptor(e,n);o?.enumerable&&Object.defineProperty(t,n,o)}else for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(o.enumerable){let a=e[n];r(n,a,e)&&Object.defineProperty(t,n,o)}}return t}var j=e=>e==null,P=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),f=Symbol("encodeFragmentIdentifier");function $(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{let o=t.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[",o,"]"].join("")]:[...t,[c(r,e),"[",c(o,e),"]=",c(n,e)].join("")]};case"bracket":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[]"].join("")]:[...t,[c(r,e),"[]=",c(n,e)].join("")];case"colon-list-separator":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),":list="].join("")]:[...t,[c(r,e),":list=",c(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let r=e.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,o)=>o===void 0||e.skipNull&&o===null||e.skipEmptyString&&o===""?n:(o=o===null?"":o,n.length===0?[[c(t,e),r,c(o,e)].join("")]:[[n,c(o,e)].join(e.arrayFormatSeparator)])}default:return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,c(r,e)]:[...t,[c(r,e),"=",c(n,e)].join("")]}}function V(e){let r;switch(e.arrayFormat){case"index":return(t,n,o)=>{if(r=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!r){o[t]=n;return}o[t]===void 0&&(o[t]={}),o[t][r[1]]=n};case"bracket":return(t,n,o)=>{if(r=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!r){o[t]=n;return}if(o[t]===void 0){o[t]=[n];return}o[t]=[...o[t],n]};case"colon-list-separator":return(t,n,o)=>{if(r=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!r){o[t]=n;return}if(o[t]===void 0){o[t]=[n];return}o[t]=[...o[t],n]};case"comma":case"separator":return(t,n,o)=>{let a=typeof n=="string"&&n.includes(e.arrayFormatSeparator),i=typeof n=="string"&&!a&&m(n,e).includes(e.arrayFormatSeparator);n=i?m(n,e):n;let l=a||i?n.split(e.arrayFormatSeparator).map(s=>m(s,e)):n===null?n:m(n,e);o[t]=l};case"bracket-separator":return(t,n,o)=>{let a=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!a){o[t]=n&&m(n,e);return}let i=n===null?[]:n.split(e.arrayFormatSeparator).map(l=>m(l,e));if(o[t]===void 0){o[t]=i;return}o[t]=[...o[t],...i]};default:return(t,n,o)=>{if(o[t]===void 0){o[t]=n;return}o[t]=[...[o[t]].flat(),n]}}}function E(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,r){return r.encode?r.strict?P(e):encodeURIComponent(e):e}function m(e,r){return r.decode?y(e):e}function D(e){return Array.isArray(e)?e.sort():typeof e=="object"?D(Object.keys(e)).sort((r,t)=>Number(r)-Number(t)).map(r=>e[r]):e}function L(e){let r=e.indexOf("#");return r!==-1&&(e=e.slice(0,r)),e}function q(e){let r="",t=e.indexOf("#");return t!==-1&&(r=e.slice(t)),r}function M(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):r.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function k(e){e=L(e);let r=e.indexOf("?");return r===-1?"":e.slice(r+1)}function x(e,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...r},E(r.arrayFormatSeparator);let t=V(r),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let o of e.split("&")){if(o==="")continue;let a=r.decode?o.replace(/\+/g," "):o,[i,l]=h(a,"=");i===void 0&&(i=a),l=l===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?l:m(l,r),t(m(i,r),l,n)}for(let[o,a]of Object.entries(n))if(typeof a=="object"&&a!==null)for(let[i,l]of Object.entries(a))a[i]=M(l,r);else n[o]=M(a,r);return r.sort===!1?n:(r.sort===!0?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((o,a)=>{let i=n[a];return i&&typeof i=="object"&&!Array.isArray(i)?o[a]=D(i):o[a]=i,o},Object.create(null))}function _(e,r){if(!e)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},E(r.arrayFormatSeparator);let t=i=>r.skipNull&&j(e[i])||r.skipEmptyString&&e[i]==="",n=$(r),o={};for(let[i,l]of Object.entries(e))t(i)||(o[i]=l);let a=Object.keys(o);return r.sort!==!1&&a.sort(r.sort),a.map(i=>{let l=e[i];return l===void 0?"":l===null?c(i,r):Array.isArray(l)?l.length===0&&r.arrayFormat==="bracket-separator"?c(i,r)+"[]":l.reduce(n(i),[]).join("&"):c(i,r)+"="+c(l,r)}).filter(i=>i.length>0).join("&")}function R(e,r){r={decode:!0,...r};let[t,n]=h(e,"#");return t===void 0&&(t=e),{url:t?.split("?")?.[0]??"",query:x(k(e),r),...r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:m(n,r)}:{}}}function K(e,r){r={encode:!0,strict:!0,[f]:!0,...r};let t=L(e.url).split("?")[0]||"",n=k(e.url),o={...x(n,{sort:!1}),...e.query},a=_(o,r);a&&(a=`?${a}`);let i=q(e.url);if(e.fragmentIdentifier){let l=new URL(t);l.hash=e.fragmentIdentifier,i=r[f]?l.hash:`#${e.fragmentIdentifier}`}return`${t}${a}${i}`}function O(e,r,t){t={parseFragmentIdentifier:!0,[f]:!1,...t};let{url:n,query:o,fragmentIdentifier:a}=R(e,t);return K({url:n,query:I(o,r),fragmentIdentifier:a},t)}function W(e,r,t){let n=Array.isArray(r)?o=>!r.includes(o):(o,a)=>!r(o,a);return O(e,n,t)}var g=T;var U={name:"@moneykit/connect",description:"MoneyKit Connect launcher for web.",version:"0.3.20",author:"MoneyKit",repository:{type:"git",url:"https://github.com/moneykit/connect-js.git"},types:"./types/index.d.ts",license:"MIT"};var p="https://connect.moneykit.com";function G(e,r){let t=document.createElement("iframe");t.id="moneykit-connect-frame",t.src=e,t.style.position=r?"absolute":"fixed",t.style.top="0",t.style.left="0",t.style.width=r?"100%":"100vw",t.style.height=r?"100%":"100svh",t.style.zIndex="999999",t.style.border="none";let n=r?document.getElementById(r):document.body;if(!n)throw new Error(`MoneyKit could not find container element with ID "${r}".`);return n.appendChild(t),t.addEventListener("load",function(){t.focus()}),t}function b(e){e.remove()}var C="moneykit.linkSessionToken",S=class{constructor(r={}){p=r.__connectSDKUIHost??p,this.options={...r}}link(r,t,n,o){this.startLink(r,t,n,o)}relink(r,t,n,o){this.startRelink(r,t,n,o)}continue(r,t,n,o){if(window.opener){window.opener.postMessage({moneykit:!0,type:"link.resume",eventData:{redirectURL:r}},p);return}this.continueLink(r,t,n,o)}__linkDirect(r,t,n,o){this.startLink(r,t,n,o,{viewMode:"direct"})}__relinkDirect(r,t,n,o){this.startRelink(r,t,n,o,{viewMode:"direct"})}__continueDirect(r,t,n,o){this.continueLink(r,t,n,o,{viewMode:"direct"})}startLink(r,t,n,o,a){let i={...this.linkParametersFromOptions(),linkSessionToken:r,origin:window.location.origin,...a},l=g.stringifyUrl({url:`${p}/start`,query:i});localStorage.setItem(C,r),this.launch(l,t,n,o)}startRelink(r,t,n,o,a){let i={...this.linkParametersFromOptions(),linkSessionToken:r,origin:window.location.origin,...a},l=g.stringifyUrl({url:`${p}/relink`,query:i});localStorage.setItem(C,r),this.launch(l,t,n,o)}continueLink(r,t,n,o,a){let i=localStorage.getItem(C);i||console.warn("Unable to get MoneyKit link session token from local storage.");let l={...this.linkParametersFromOptions(),linkSessionToken:i,redirectURL:r,origin:window.location.origin,...a},s=g.stringifyUrl({url:`${p}/continue`,query:l});this.launch(s,t,n,o)}linkParametersFromOptions(){let r=this.options.__applicationName??null,t=this.options.device??null,n=this.options.stepTimers??!1;return{applicationName:r,device:t,stepTimers:n,launcherVersion:U.version}}launch(r,t,n,o){let a=G(r,this.options.containerID),i=new AbortController,l=J(a,i,t,n,o,this.options.__onDemoEvent,this.options.theme,this.options.colorScheme);window.addEventListener("message",l,{signal:i.signal})}};function J(e,r,t,n,o,a,i,l){return s=>{if(s.origin!=p||!("moneykit"in s.data||"__moneykitDemo"in s.data)){console.warn("MoneyKit Connect received a message from an unexpected origin",s.origin);return}let d=s.data;switch(d.type){case"connect.started":l&&s.source?.postMessage({moneykit:!0,type:"connect.set_color_scheme",data:{colorScheme:l}},{targetOrigin:p}),i&&s.source?.postMessage({moneykit:!0,type:"connect.set_theme",data:{theme:i}},{targetOrigin:p});break;case"link.complete":t&&d.data.exchangeableToken&&t(d.data.exchangeableToken,d.data.institution),b(e),r.abort();break;case"relink.complete":t&&t(d.data.institution),b(e),r.abort();break;case"link.exit":b(e),n&&n(d.data.error),r.abort();break;case"link.close_oauth":window.close();break;case"link.event":o&&o(d.data);break;case"demo.link.event":a&&a(d.data);break}}}var A=S;var X=(s=>(s[s.largeTitle=0]="largeTitle",s[s.title1=1]="title1",s[s.title2=2]="title2",s[s.title3=3]="title3",s[s.body=4]="body",s[s.smallBody=5]="smallBody",s[s.button=6]="button",s[s.input=7]="input",s))(X||{}),me=(e,r)=>{switch(r){case 0:return e.typography.largeTitle;case 1:return e.typography.title1;case 2:return e.typography.title2;case 3:return e.typography.title3;case 5:return e.typography.smallBody;case 6:return e.typography.button;case 7:return e.typography.input;default:return e.typography.body}};var de={colors:{accent:"#0077ff",primaryBackground:{light:"#fff",dark:"#212124"},secondaryBackground:{light:"#f2f2f5",dark:"#212124"},primaryContent:{light:"#fff",dark:"#343438"},secondaryContent:{light:"#f5f5f5",dark:"#343438"},primaryForeground:{light:"#111",dark:"#fff"},secondaryForeground:{light:"rgba(67, 67, 76, 0.6)",dark:"rgba(235, 235, 245, 0.6)"},tertiaryForeground:{light:"rgba(67, 67, 76, 0.3)",dark:"rgba(235, 234, 244, 0.3)"},primaryFill:{light:"rgba(120, 120, 128, 0.2)",dark:"rgba(120, 120, 128, 0.36)"},secondaryFill:{light:"rgba(120, 120, 128, 0.16)",dark:"rgba(120, 120, 128, 0.32)"},tertiaryFill:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},success:{light:"#00ca32",dark:"#35DE5F"},warning:{light:"#ff9500",dark:"#FF9400"},error:{light:"#dd2424",dark:"#FA4242"},separator:{light:"rgba(60, 60, 67, 0.06)",dark:"rgba(84, 84, 88, 0.4)"},selection:{light:"rgba(120, 120, 128, 0.28)",dark:"rgba(120, 120, 128, 0.48)"}},typography:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif",largeTitle:{size:"34px",lineHeight:"41px",letterSpacing:"-0.01em",weight:700},title1:{size:"28px",lineHeight:"34px",letterSpacing:"0",weight:700},title2:{size:"22px",lineHeight:"28px",letterSpacing:"0",weight:700},title3:{size:"20px",lineHeight:"24px",letterSpacing:"0",weight:700},body:{size:"17px",lineHeight:"24px",letterSpacing:"-0.01em",weight:500},smallBody:{size:"11px",lineHeight:"16px",letterSpacing:"-0.0225em",weight:400},button:{size:"18px",lineHeight:"24px",letterSpacing:"-1%",weight:700},input:{size:"18px",lineHeight:"24px",letterSpacing:"0",weight:500}},images:{close:"/images/close.svg",search:"/images/search.svg",spinner:"/images/spinner.png"},spacing:{contentHorizontalInset:"28px",buttonHorizontalInset:"28px"},components:{navigationBar:{height:"64px"},contentView:{borderRadius:"12px",boxShadow:{light:"none",dark:"inset 0 0 0 1px rgba(228, 227, 243, 0.04)"},border:null,separatorStyle:"all_except_last"},button:{height:"44px",borderRadius:"12px",inheritInstitutionColor:!0,continueTitle:"Continue",doneTitle:"Done"},searchInput:{backgroundColor:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},height:"48px",borderRadius:"12px",border:null,alignment:"center",focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},textField:{backgroundColor:null,height:"52px",borderRadius:"0px",boxShadow:null,focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},progressSpinner:{strokeWidth:8,diameter:56,lineCap:"round"},icon:{strokeWidth:8,lineCap:"round"},separator:{height:"1px"}},screens:{finder:{title:"Connect Your Bank",subtitle:null,searchPlaceholder:"Search Banks",institutionCellBoxShadow:null,institutionCellBorderRadius:"12px",institutionCellBorder:{light:"1px solid rgba(60, 60, 67, 0.1)",dark:"1px solid rgba(84, 84, 88, 0.4)"},institutionCellSpacing:"16px",institutionCellBackgroundColor:{light:"#fff",dark:"#212124"}}},modal:{borderRadius:"20px",boxShadow:{light:"0px 2px 4px rgba(0, 0, 0, 0.1), 0 40px 80px rgba(0,0,0,.15)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"},overlayBackgroundColor:{light:"rgba(0, 0, 0, 0.4)",dark:"rgba(0, 0, 0, 0.75)"},overlayBackdropFilter:null},popover:{borderRadius:"24px",boxShadow:{light:"0px 0px 80px rgba(0, 0, 0, 0.16)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"}}};var ue=A;export{X as ThemeTypographyTextStyle,ue as default,de as moneyui,me as themeTypographyStyleForTextStyle};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moneykit/connect",
3
3
  "description": "MoneyKit Connect launcher for web.",
4
- "version": "0.3.21",
4
+ "version": "0.3.23",
5
5
  "author": "MoneyKit",
6
6
  "repository": {
7
7
  "type": "git",
@@ -9,9 +9,6 @@
9
9
  },
10
10
  "types": "./types/index.d.ts",
11
11
  "license": "MIT",
12
- "dependencies": {
13
- "query-string": "^8.1.0"
14
- },
15
12
  "module": "./index.js",
16
13
  "type": "module",
17
14
  "main": "./index.js"
@@ -86,6 +86,7 @@ export type ThemeImages = {
86
86
  mfaSms?: ThemeImageUrl;
87
87
  mfaEmail?: ThemeImageUrl;
88
88
  mfaPhone?: ThemeImageUrl;
89
+ errorSmall?: ThemeImageUrl;
89
90
  };
90
91
  export declare enum ThemeTypographyTextStyle {
91
92
  largeTitle = 0,
@@ -120,6 +121,7 @@ export type ThemeComponents = {
120
121
  separator: ThemeComponentsSeparator;
121
122
  checkbox?: ThemeComponentsCheckbox;
122
123
  radio?: ThemeComponentsRadio;
124
+ connectedIcon?: ThemeComponentsConnectedIcon;
123
125
  };
124
126
  export type ThemeComponentsNavigationBar = {
125
127
  height: string;
@@ -183,6 +185,9 @@ export type ThemeComponentsRadio = {
183
185
  offColor?: ThemeDynamicColor;
184
186
  onColor?: ThemeDynamicColor;
185
187
  };
188
+ export type ThemeComponentsConnectedIcon = {
189
+ color?: ThemeDynamicColor;
190
+ };
186
191
  export type ThemeScreens = {
187
192
  finder: ThemeScreensFinder;
188
193
  };