{"_id":"@brexhq/brex-js","_rev":"15-b5fe28fc14c94180f9ed2e31be44308a","name":"@brexhq/brex-js","dist-tags":{"latest":"4.2.0"},"versions":{"2.2.1":{"name":"@brexhq/brex-js","version":"2.2.1","author":{},"license":"ISC","_id":"@brexhq/brex-js@2.2.1","maintainers":[{"name":"fforres","email":"felipe.torressepulveda@gmail.com"}],"dist":{"shasum":"e0789468222d5d68b6abab4a1cc04de4150e90db","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-2.2.1.tgz","fileCount":8,"integrity":"sha512-yTftewatxWRTpH2ryuPLLG7f7zv8RnoYY+xsmFSV7n1QhcEb9vMcMMz0C7C8enrl1yMpeZ6DY5OIQwcLCaWPug==","signatures":[{"sig":"MEYCIQCXRWf/uPeKK/XitktEvLF5Dh/Kg+swBUHErkT9uSK5PwIhAJmHXLSp+85BVmJ7JgL5sxsrHKIBT3TaMNAoLSID2/lg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13066},"main":"dist/index.js","scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"fforres","email":"felipe.torressepulveda@gmail.com"},"deprecated":"This version is no longer supported. Please upgrade to the latest version.","repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_2.2.1_1744914997080_0.9078830735285737","host":"s3://npm-registry-packages-npm-production"}},"3.0.2":{"name":"@brexhq/brex-js","version":"3.0.2","author":{},"license":"ISC","_id":"@brexhq/brex-js@3.0.2","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"42e71714b4dc1ee31e27008d41debf56ef769cf8","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-3.0.2.tgz","fileCount":8,"integrity":"sha512-GGQMI+Xo957iifZGnY3PqKa0wle+zHrbkgS9Wwkk+nFVaymYzhM4L+Bhhi9fCtZFWj7gSLZn8hJqwf1GsMZ21A==","signatures":[{"sig":"MEUCIQCqFRE4jQIrY9x7D66wsYn9AbpmwUH1zZB9NA0rSTIs2gIgDtHRMRJxRbD4W1SRjn6JWJuLRN/+N5ZTo4AUafs8dQM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14969},"main":"dist/index.js","scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_3.0.2_1748970646076_0.4598281657210257","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@brexhq/brex-js","version":"3.2.0","author":{},"license":"ISC","_id":"@brexhq/brex-js@3.2.0","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"c01ae39df6f5e93f5e2199f7a036bc9856111340","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-3.2.0.tgz","fileCount":8,"integrity":"sha512-k936jrfDxqLmPM134DAa6NNzgUMN7nyccsvVGKCh1G1pRI78p26U8yuAO/31obdl9mtoDFEswg75pzmcplvxpg==","signatures":[{"sig":"MEQCIHp5bBmah8hBbBFlUL8xd4s7qkiJUA02YRHoxbVdbunwAiAvNO4rCOwQqp8PXpncWK09xTWhLuY4aZ87SNWtpKCTVw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16761},"main":"dist/index.js","scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"resolutions":{"qs":"6.14.2","tmp":"0.2.4","js-yaml":"4.1.1","minimatch":"10.2.3","on-headers":"1.1.0","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_3.2.0_1773069572552_0.7195676582728356","host":"s3://npm-registry-packages-npm-production"}},"3.2.1":{"name":"@brexhq/brex-js","version":"3.2.1","author":{},"license":"ISC","_id":"@brexhq/brex-js@3.2.1","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"0e2c5a64bc0e14136d1a54d21eadec3b8a4d450d","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-3.2.1.tgz","fileCount":8,"integrity":"sha512-tKtYmN+Y2guKkXC6GBx6ev49GVUBqusWrt+LwAgQkpXBf6BE/NJL36QuT/DATEPNLE8LyjGQh7OfhnMipDVpKA==","signatures":[{"sig":"MEUCIQCNEsh6CkaB8TKlNC7/w4Y1PQcKKRbugijJlpTzxRzjZwIgYTFM6QqnXlk+q9JiWX93QvP0h8QR+xPmK+Gx/GIJo9Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16749},"main":"dist/index.js","scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"resolutions":{"qs":"6.14.2","tmp":"0.2.4","minimatch":"10.2.3","on-headers":"1.1.0","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_3.2.1_1773093755357_0.8353188998634051","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@brexhq/brex-js","version":"4.0.0","author":{},"license":"ISC","_id":"@brexhq/brex-js@4.0.0","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"5df1373b495ada0f876271ed1b3786d56a638ca1","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-4.0.0.tgz","fileCount":8,"integrity":"sha512-wRimToI86VEWopopzekeQcrvtKNko5kXQ7KoZEO8lMZB24Uvx0sjdLcPXIe+Cm+Z2+EvyF3IuBhYT5nfPN00kQ==","signatures":[{"sig":"MEUCIGWJKjxzXO+ct6mWYRCb4dKISFokZeNokG8P3dqNrOqwAiEAzy2LHelUqoPMdKZK9y1usPq3VyeoF+WUUjg6D9ysStY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27371},"main":"dist/index.js","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"resolutions":{"qs":"6.14.2","tmp":"0.2.4","minimatch":"10.2.3","on-headers":"1.1.0","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_4.0.0_1774294102494_0.29334165157843795","host":"s3://npm-registry-packages-npm-production"}},"4.1.0":{"name":"@brexhq/brex-js","version":"4.1.0","author":{},"license":"ISC","_id":"@brexhq/brex-js@4.1.0","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"09cd86c80cf1281bda3b71437ef97a78e6ed0b8a","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-4.1.0.tgz","fileCount":8,"integrity":"sha512-t+h9Kn9rhwQfctoevpFmt/Wu1u8EvJSHN79CnqlsFYBjfQqsQda554Jgn9dxii1bI45awjq4KSF5cxhpMWvabw==","signatures":[{"sig":"MEYCIQCBs/lKtY2ZzHX3Rgl6c1gmlCV+i8mmzlmiDB3NCq+2JQIhALe3/mMMIZg4dePdic3GOYXiXDOqYa1eX2g2i9hH3ffZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42630},"main":"dist/index.js","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"resolutions":{"qs":"6.15.2","tmp":"0.2.7","uuid":"11.1.1","minimatch":"10.2.3","picomatch":"2.3.2","on-headers":"1.1.0","shell-quote":"1.8.4","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.26.0","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_4.1.0_1781290752005_0.6553455176835405","host":"s3://npm-registry-packages-npm-production"}},"4.1.1":{"name":"@brexhq/brex-js","version":"4.1.1","author":{},"license":"ISC","_id":"@brexhq/brex-js@4.1.1","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"dist":{"shasum":"6abaa5edbb273268bfb8be8e9aa84ff20008a29f","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-4.1.1.tgz","fileCount":8,"integrity":"sha512-kwtOhcYIkRZUQVjc/ic/QmwPU7i71dBmUvnKBw2F77K2O2aZ1hQOxlG5ZiNzK2id036eV83vvtwPaJGIux5IGw==","signatures":[{"sig":"MEYCIQC/F+xP8Rs2pToIeCRIZXG1Rs3qAwtyDOOUxDfB+ExhHQIhAJgWt/mCsv9xVS8GaldxdIzud9QdFZ8mDRRWhpdJWFE5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43641},"main":"dist/index.js","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","format":"biome format .","build:dev":"BUILD_ENV=development webpack --mode development","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build"},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"repository":{"url":"git@github.com:brexhq/brex-js.git","type":"git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","directories":{},"resolutions":{"qs":"6.15.2","ws":"8.21.0","tmp":"0.2.7","uuid":"11.1.1","form-data":"4.0.6","minimatch":"10.2.3","picomatch":"2.3.2","on-headers":"1.1.0","shell-quote":"1.8.4","launch-editor":"2.14.1","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jsdom":"^26.0.0","react":"^19.0.0","webpack":"^5.97.1","react-dom":"^19.0.0","ts-loader":"^9.5.2","prop-types":"^15.8.1","typescript":"^5.7.3","@babel/core":"^7.29.6","@types/jest":"^29.5.14","@types/uuid":"^10.0.0","webpack-cli":"^6.0.1","@manypkg/cli":"^0.23.0","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","babel-loader":"^9.2.1","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@types/react-dom":"^19.0.3","@babel/preset-env":"^7.26.0","webpack-dev-server":"^5.2.0","@babel/preset-react":"^7.26.3","jest-environment-jsdom":"^29.7.0","@babel/preset-typescript":"^7.26.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/brex-js_4.1.1_1781651384943_0.5966106124982788","host":"s3://npm-registry-packages-npm-production"}},"4.2.0":{"name":"@brexhq/brex-js","version":"4.2.0","description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","main":"dist/index.js","type":"module","repository":{"type":"git","url":"git@github.com:brexhq/brex-js.git"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"BUILD_ENV=production webpack --mode production && yarn clean:build","build:dev":"BUILD_ENV=development webpack --mode development","build:staging":"BUILD_ENV=staging webpack --mode production && yarn clean:build","clean:build":"find dist -mindepth 1 ! -name 'index.js' ! -name 'index.d.ts' ! -name 'types.d.ts' -delete","format":"biome format ."},"author":{},"license":"ISC","peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"devDependencies":{"@babel/core":"^7.29.6","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.26.0","@biomejs/biome":"^1.9.4","@changesets/cli":"^2.27.1","@manypkg/cli":"^0.23.0","@types/jest":"^29.5.14","@types/jsdom":"^21.1.7","@types/react":"^19.0.7","@types/react-dom":"^19.0.3","@types/uuid":"^10.0.0","babel-loader":"^9.2.1","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^26.0.0","prop-types":"^15.8.1","react":"^19.0.0","react-dom":"^19.0.0","ts-loader":"^9.5.2","typescript":"^5.7.3","webpack":"^5.97.1","webpack-cli":"^6.0.1","webpack-dev-server":"^5.2.0"},"resolutions":{"minimatch":"10.2.3","on-headers":"1.1.0","qs":"6.15.2","@tootallnate/once":"3.0.1","serialize-javascript":"7.0.5","tmp":"0.2.7","picomatch":"2.3.2","uuid":"11.1.1","shell-quote":"1.8.4","form-data":"4.0.6","ws":"8.21.0","launch-editor":"2.14.1"},"_id":"@brexhq/brex-js@4.2.0","dist":{"shasum":"c40506e6081b4e00a9d607e9a024d207d5643a59","integrity":"sha512-Fv5HSWzlnmk6zSUTbD36pKQNoKAMSS8zeHTIQzUA3Hqdlt0vB937IeCFp0Y4+AscPi04XthIrbJWABrCNFLNVg==","tarball":"https://registry.npmjs.org/@brexhq/brex-js/-/brex-js-4.2.0.tgz","fileCount":8,"unpackedSize":51771,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCPpJxSlmGm6Ox5DfDptatlRWe7HOLR/8d43u5vw0K24QIhANiGzcOgiG4un/PNM2kFJqkmYQUsRCkV+U1tSboSnB3f"}]},"_npmUser":{"name":"brex-npm","email":"npm-packages@brex.com"},"directories":{},"maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/brex-js_4.2.0_1785438823515_0.1850745103509579"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-17T18:03:14.221Z","modified":"2026-07-30T19:13:43.849Z","2.1.4":"2025-04-17T18:03:14.486Z","2.2.0":"2025-04-17T18:25:38.977Z","2.2.1":"2025-04-17T18:36:37.304Z","3.0.2":"2025-06-03T17:10:46.258Z","3.2.0":"2026-03-09T15:19:32.695Z","3.2.1":"2026-03-09T22:02:35.537Z","4.0.0":"2026-03-23T19:28:22.643Z","4.1.0":"2026-06-12T18:59:12.174Z","4.1.1":"2026-06-16T23:09:45.092Z","4.2.0":"2026-07-30T19:13:43.685Z"},"author":{},"license":"ISC","repository":{"type":"git","url":"git@github.com:brexhq/brex-js.git"},"description":"A JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.","maintainers":[{"name":"brex-npm","email":"npm-packages@brex.com"}],"readme":"# @brexhq/brex-js\n\nA JavaScript SDK for integrating Brex issuing card elements into web applications. This library provides secure, iframe-based components for displaying sensitive card information.\n\n## Quick Start\n\n```javascript\nimport Brex from '@brexhq/brex-js';\n\n// Initialize Brex\nconst brex = Brex();\nconst elements = brex.elements();\n\n// Create a card number display element\nconst cardNumber = elements.create('issuingCardNumberDisplay', {\n  issuingCard: 'your_issuing_card_id',\n  ephemeralKeySecret: 'your_ephemeral_key'\n});\n\n// Mount it to a container\ncardNumber.mount('#card-number-container');\n\n// Listen for events\ncardNumber.on('complete', () => {\n  console.log('Card number is ready');\n});\n```\n\n## Available Elements\n\nThe library provides several elements for displaying card information:\n\n- `issuingCardNumberDisplay`: Displays the card number\n- `issuingCardCvcDisplay`: Displays the CVC/security code\n- `issuingCardExpiryDisplay`: Displays the expiration date\n- `issuingCardPinDisplay`: Displays the PIN\n- `issuingCardCopyButton`: Creates a button to copy card details\n\n## Styling Elements\n\nYou can customize the appearance of elements using supported style properties:\n\n```javascript\nconst element = elements.create('issuingCardNumberDisplay', {\n  issuingCard: 'your_issuing_card_id',\n  ephemeralKeySecret: 'your_ephemeral_key',\n  style: {\n    fontSize: '16px',\n    fontFamily: 'Arial, sans-serif',\n    color: '#333333',\n    fontWeight: 'normal',\n    letterSpacing: 'normal',\n    lineHeight: '1.5',\n    padding: '10px'\n  }\n});\n\n// Update styles later\nelement.update({\n  fontSize: '18px',\n  color: '#000000'\n});\n```\n\n## Copy Button\n\nThe copy button element allows users to copy card details:\n\n```javascript\nconst copyButton = elements.create('issuingCardCopyButton', {\n  issuingCard: 'your_issuing_card_id',\n  ephemeralKeySecret: 'your_ephemeral_key',\n  toCopy: 'number' // 'number', 'cvc', 'expiry', or 'pin'\n});\n\ncopyButton.mount('#copy-button-container');\ncopyButton.on('copied', () => {\n  console.log('Card number copied');\n});\n```\n\n## Event Handling\n\nAll elements support the following events:\n\n- `complete`: Fired when the element is fully loaded\n- `loading`: Fired when the element is loading\n- `error`: Fired when an error occurs\n- `copied`: Fired when content is copied (for copy buttons)\n\n```javascript\nelement.on('complete', () => {\n  console.log('Element is ready');\n});\n\nelement.on('error', () => {\n  console.log('Something went wrong');\n});\n```\n\n## Preloading the requester iframe (optional)\n\nBehind the scenes, `Brex(...).elements()` mounts a hidden \"requester\" iframe the\nfirst time `create()` is called. The iframe needs to download and parse its\nown bundle before it can fetch sensitive details, which can add ~1-2 seconds\nto the time the user waits for the card PAN to appear on first view.\n\nIf your UI knows ahead of time that a card view is imminent (for example, a\nuser has just navigated to a wallet/cards route), you can call `prewarm()`\nto mount the requester iframe early so its bootstrap happens off the user's\ncritical path:\n\n```javascript\nimport Brex from '@brexhq/brex-js';\n\nconst elements = Brex().elements();\n\n// Some time before the user actually opens a card. Idempotent and cheap.\nelements.prewarm();\n\n// Later — when the user opens the card. The requester is already\n// mounted, so this skips the iframe-boot step and goes straight to\n// fetching card details.\nconst cardNumber = elements.create('issuingCardNumberDisplay', {\n  issuingCard: 'your_issuing_card_id',\n  ephemeralKeySecret: 'your_ephemeral_key',\n});\ncardNumber.mount('#card-number-container');\n```\n\nNotes:\n\n- **Idempotent**: calling `prewarm()` multiple times only mounts one iframe.\n  Safe to call from per-component effects without coordination.\n- **No card data is sent**: `prewarm()` takes no arguments and transmits no\n  `issuingCard`, `ephemeralKeySecret`, or any other user/card identifier.\n  Only `create()` does that.\n- **Client-side only**: appends an iframe to `document.body`; calling during\n  SSR will throw.\n- **No-op after `create()`**: if the requester is already mounted, subsequent\n  `prewarm()` calls do nothing and emit no events.\n\nWhen using instrumentation (see below), prewarming emits a single\n`requesterPrewarmed` event so you can measure how long the iframe takes to\nbecome ready in real-user sessions.\n\n## Instrumentation (optional)\n\nBrex can emit lifecycle events covering the requester iframe handshake, the\nvisible element iframes, and the postMessage round-trips between them. Use\nthis to measure SDK timings and forward them to your RUM/telemetry pipeline.\n\n```javascript\nimport Brex from '@brexhq/brex-js';\n\nconst brex = Brex({\n  environment: 'production',\n  // Called for every lifecycle event. Keep it cheap.\n  onEvent: (event) => {\n    // event = { type, timestamp, key?, elementType?, issuingCard?, metadata? }\n    datadogRum.addAction('brex_js_event', event);\n  },\n  // Optional: also mirror events to console.debug. Default false.\n  debug: process.env.NODE_ENV !== 'production',\n});\n```\n\nEmitted event types include:\n\n- Requester iframe: `requesterPrewarmed` (only when `prewarm()` is called), `requesterCreated`, `requesterReady`, `requesterPortTransferred`, `requestCardDetailsSent`, `cardDetailsReceived`, `cardDetailsForwarded`\n- Visible element iframe: `elementCreated`, `elementReady`, `elementPortTransferred`, `elementMounted`, `elementUnmounted`, `elementDestroyed`\n- Errors: `elementError`\n\nEach event carries a `timestamp`, and where applicable the iframe `key`,\n`elementType`, and the consumer-supplied `issuingCard` for correlation.\n\nThe `timestamp` is `performance.timeOrigin + performance.now()` (a high-res\nabsolute timestamp on the same epoch as `Date.now()`). The SDK uses iframes\nunder the hood — each iframe has its own `performance.timeOrigin`, so plain\n`performance.now()` values would not be comparable between the parent window\nand the iframes. Adding `timeOrigin` produces values you can subtract across\nrealms. Within the same realm, subtracting two timestamps yields the same\nresult as `performance.now()` arithmetic (the origin cancels). See\n[MDN: Synchronizing time between contexts](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin#synchronizing_time_between_contexts).\n\n**The ephemeral key secret and card details are never included in any event\npayload.**\n\nIf neither `onEvent` nor `debug` is supplied, the SDK uses a no-op emitter\nand incurs no runtime cost.\n\n## Complete Example\n\nHere's a complete example showing how to display all card information:\n\n```javascript\nimport Brex from '@brexhq/brex-js';\n\nconst brex = Brex();\nconst elements = brex.elements();\n\n// Common configuration\nconst config = {\n  issuingCard: 'your_issuing_card_id',\n  ephemeralKeySecret: 'your_ephemeral_key',\n  style: {\n    fontSize: '16px',\n    fontFamily: 'Arial, sans-serif',\n    color: '#333333'\n  }\n};\n\n// Create elements\nconst cardNumber = elements.create('issuingCardNumberDisplay', config);\nconst cardCvc = elements.create('issuingCardCvcDisplay', config);\nconst cardExpiry = elements.create('issuingCardExpiryDisplay', config);\nconst cardPin = elements.create('issuingCardPinDisplay', config);\n\n// Mount elements\ncardNumber.mount('#card-number-container');\ncardCvc.mount('#card-cvc-container');\ncardExpiry.mount('#card-expiry-container');\ncardPin.mount('#card-pin-container');\n\n// Add copy buttons\nconst copyNumber = elements.create('issuingCardCopyButton', {\n  ...config,\n  toCopy: 'number'\n});\ncopyNumber.mount('#copy-number-button');\n\n// Event handling\ncardNumber.on('complete', () => console.log('Card number ready'));\ncopyNumber.on('copied', () => console.log('Card number copied'));\n```\n\nRequired HTML:\n```html\n<div id=\"card-number-container\"></div>\n<div id=\"copy-number-button\">Copy</div>\n<div id=\"card-cvc-container\"></div>\n<div id=\"card-expiry-container\"></div>\n<div id=\"card-pin-container\"></div>\n```\n","readmeFilename":"README.md"}