{"_id":"@prezly/react-promise-modal","_rev":"31-47bc32a7f6cc171f24ccf480acc64791","name":"@prezly/react-promise-modal","dist-tags":{"next":"2.0.0-alpha.1","latest":"2.0.1"},"versions":{"0.1.0":{"name":"@prezly/react-promise-modal","version":"0.1.0","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@0.1.0","maintainers":[{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},{"name":"kamilmielnik","email":"kamil.adam.mielnik@gmail.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"markogresak","email":"gresak.marko@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"8602aa618362fbba30742b92eb1d91b511212ee9","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-0.1.0.tgz","fileCount":16,"integrity":"sha512-pz47FMVvcqBRCps6UOl4AYpValxgQBOhifLXNwaVkzf8SUc0PLJQVCGMHd97RVVqxmUVnsnQyZFVdqKvicCb6Q==","signatures":[{"sig":"MEUCIQDnbMY8DgJ+GZRc3GzKAYyUnXMRSZCxZvQqILZcmYrmngIgIv8baCHW+w2Drp9ZQUSa/PI3ZcMgkaWoWDZJKvRH4x8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcitsKCRA9TVsSAnZWagAAegEQAJsg35njM3r9u5Z9VjIC\nJfRH8QrUXst8w22JwKFKli6InNs3AUMcqBW8GflTsPnuiAwUcOdBbHb5UdpB\nNKKXwu0Sf6CITfAHFQcijf/x9MxnehfgSDajPqEqaKbMZFYgedj5h9AvYk3t\nTh/avd4y7ZoW5/7HoCzvz95i1M4LlCNPyXgo6+tMKnqZlMZfftTmRGJ/3VSC\n4YGza3VoohsUW9TP76WNHuHGCORu8AHpBuL16tVrFEbRQVaXAAI6BCSyYFeK\n/9gyjXUp4opR14viRDSDnGNOmlYCfKEDQPRudRqxJlRySXR+E7ogaES74Bde\nR9SvhlPk/honyWIE5Q/TlHE5JSBi8y1NaP99MRBeo4szNCv7YcQWw/ydJuLC\nzeFg9+ONj4iPTFvHopcV4jL+xSI5igMRDXCYuCyfTbSWvn9JRo1/AT+vslYZ\nTscj8F/QTVPElBQvKscPRRfg4aNAshtImLk/sIIRMH8nflMAHNrpo/gmXy9K\nQdMB3X112iFyTtFivF+1zjZVpHDjJ/5y7Emn/Rta83m9G2znPehPewnwsL22\nsoi6aefKFSt9yqDj0rVRwQM7QK12g5CpxN87rRs0sG23co7jLnsfrFI9lVk8\nE6pMlwyppxMNOJbFCLb15TpnPfGfcsgo4gBmKp+Ty9xOwHVgoSfc+fVcsQZf\nSxU5\r\n=WndI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"./src/index.d.ts","gitHead":"cddf468d9e5de018572e148edfad69d2a910e929","scripts":{"dist":"babel src/index.js > dist/react-promise-modal.js","test":"echo \"Error: no test specified\" && exit 1","minify":"uglifyjs --mangle=reserved dist/react-promise-modal.js > dist/react-promise-modal.min.js"},"_npmUser":{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},"repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"6.8.0","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"8.10.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.8.4","react-dom":"^16.8.4","uglify-js":"^3.4.9","@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/preset-env":"^7.3.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_0.1.0_1552603914211_0.05196768597282375","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@prezly/react-promise-modal","version":"0.2.0","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@0.2.0","maintainers":[{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},{"name":"kamilmielnik","email":"kamil.adam.mielnik@gmail.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"markogresak","email":"gresak.marko@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"395d86b12edf491a37d5c6a95aa28a8e6d7be464","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-0.2.0.tgz","fileCount":9,"integrity":"sha512-nOcohAx7JynNR9bfOD3heDYBjW7/pmDreO4o0zNjgCiXK6JcxImXcEY6S/EV4mxQdCrTmUy4/FPVr7zpCGU3Zw==","signatures":[{"sig":"MEUCIFwTElnIKqmizcgbn/qtTbegVl762L4nuTAgqZWMzKlHAiEA3TMOyTJaswBi9GWIRRm9P5MRgiQgDrkW6Ch0hktiF80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcit7jCRA9TVsSAnZWagAATsUP/jr4XWyNNLHpaoCcrOwL\n7mMjRVbBvMrDIM8VJS//YChcvEm5O94vJeTgwXNTzvdzimB5zHqoP1Mm/bLR\nQM8BkMmdEnR/xPmrQMwcB5gyE/iaOklYzf7bbp9FSPu62Mos2LbkIlQpGvR5\nbhxpx2L93ALKN1oNd74op7GrM/sbBEtTJ8FVwg5X7/ZESVvBXjNjsezqoqO+\nR0/+u+h8PQdea+I4SiZToiN3QGh2aGEA19KqXBoEs+xT1zu9Ji30kPUwJm6b\nLpElzkJvQUwyUqN6a6udys9cYnzEetECT7ybjFI1rDVcY9gn88techiKtRdV\nfFk8IkOQyvzKypDmYnld++7mjotqyqdOt0CIs8zqa7PwEu70BX7x2wheQSri\nv9NRJYaTbi6XLmDtZ3y+0u7XDmMgM8o04ieGJ2TS46khW4ZoKP+wDAd4PRy8\nDUqrbPIPL36B1/oafVfo+7z24o5nVifjJOuK3N+dsFq2CsNobTDdfx7yp4H1\nhpsh5WlA4HxaS4D6VgMkYtRpyU7XL6AzDavccI6cUlDDswAnsbFAbBSR92nP\nFfIKIEq457oo+Fei29cS/my3zvNni9/JhtFy/nLD5aj3tWR+KHz0I1RlXYmr\nFigRWNWEyz138j/GcWfYJkNVGdQ1aLdg32YPPsUktZEepB/3B4AzimA/QvWN\nj6xm\r\n=HVYj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/react-promise-modal.js","types":"./src/index.d.ts","gitHead":"c5668de0f5a6dcdbe9178aea6e49e8d36ad178ce","scripts":{"dist":"babel src/index.js > dist/react-promise-modal.js","test":"echo \"Error: no test specified\" && exit 1","minify":"uglifyjs --mangle=reserved dist/react-promise-modal.js > dist/react-promise-modal.min.js"},"_npmUser":{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},"repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"6.8.0","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"8.10.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.8.4","react-dom":"^16.8.4","uglify-js":"^3.4.9","@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/preset-env":"^7.3.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_0.2.0_1552604898575_0.4790823710747303","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@prezly/react-promise-modal","version":"0.3.0","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@0.3.0","maintainers":[{"name":"mohammadxali","email":"mohammadali.shahbazi@gmail.com"},{"name":"francis-prezly","email":"francis@prezly.com"},{"name":"zourdyzou","email":"zhafarmuhammad12@gmail.com"},{"name":"oskar-prezly","email":"oskar@prezly.com"},{"name":"pestaa","email":"pestaa@pestaa.hu"},{"name":"aspirisen","email":"aspirisen@gmail.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"digitalbase","email":"gijs@prezly.com"},{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},{"name":"satoav","email":"sato.rc@yandex.ru"},{"name":"makanda","email":"marko.ognjenovicgm@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"9d30133e42ca6d52b5023a201a0fde8bdd6eafe5","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-0.3.0.tgz","fileCount":5,"integrity":"sha512-9RANZkdF6V4iwHpqsk6JCrgpSWFJgkmbgu4wN3gjYDBK4eqUN+SjnndnPCSMgaH2/Gz0NLA1pfwyNoyG5XArNQ==","signatures":[{"sig":"MEQCIGK82jglFoO0XZzyLpd/j8/5k32aO+rmMiqHjMqUQFUDAiAK7zC3ee2N5Wdjd4c0KGhFNnVMne9bcEQmntGtwoJNMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9720},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"50b1685f7f0d36d0c7d11c1018d05ec1aed1c6c5","scripts":{"test":"npm run test:ts && npm run test:types && npm run test:build","build":"npm run build:js && npm run build:types","clean":"rimraf package-lock.json pnpm-lock.yaml yarn.lock node_modules/ dist/","publish":"np","test:ts":"tsc --noEmit --lib es2018,dom ./test/typescript.test.ts","build:js":"babel src/index.ts -o dist/index.js","test:build":"node test/commonjs.test.js","test:types":"tsc --project ./tsconfig.test.json","build:types":"tsc --project ."},"_npmUser":{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},"repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"8.19.4","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"16.20.0","dependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^7.7.0","react":"^18.0.0","rimraf":"^5.0.1","react-dom":"^18.0.0","@babel/cli":"^7.21.5","typescript":"4.5","@babel/core":"^7.21.8","@babel/preset-env":"^7.21.5","@babel/preset-typescript":"^7.21.5","babel-plugin-transform-es2015-modules-simple-commonjs":"^0.3.0"},"peerDependencies":{"react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_0.3.0_1684798066720_0.2626652204382014","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@prezly/react-promise-modal","version":"0.3.1","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@0.3.1","maintainers":[{"name":"mohammadxali","email":"mohammadali.shahbazi@gmail.com"},{"name":"francis-prezly","email":"francis@prezly.com"},{"name":"pestaa","email":"pestaa@pestaa.hu"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"digitalbase","email":"gijs@prezly.com"},{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},{"name":"satoav","email":"sato.rc@yandex.ru"},{"name":"makanda","email":"marko.ognjenovicgm@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"e09a5ad22a3ff6b65cab226eec9ecb94b8e1e408","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-0.3.1.tgz","fileCount":5,"integrity":"sha512-u2CzMmeFe0lBqwk/U3dkXrhDGagil8J21i4fQjuPAU6cAIdEf7Qv7bo1LjV3vkoTKSh1iSBEdGbYD66Wk7I4Jg==","signatures":[{"sig":"MEUCIQC2FQnvaueuHnmKDOgNLmOhJDscv5Iu8Z9oL+jkAk7spAIganxxFtGa5jz06t7V3G5LEWQV8vW3RdRszJRXCyEl1Fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9647},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"3b66ac6b469e30f5e0b026ec365afe7c1837bd49","scripts":{"test":"npm run test:ts && npm run test:types && npm run test:build","build":"npm run build:js && npm run build:types","clean":"rimraf package-lock.json pnpm-lock.yaml yarn.lock node_modules/ dist/","publish":"np","test:ts":"tsc --noEmit --lib es2018,dom ./test/typescript.test.ts","build:js":"babel src/index.ts -o dist/index.js","test:build":"node test/commonjs.test.js","test:types":"tsc --project ./tsconfig.test.json","build:types":"tsc --project ."},"_npmUser":{"name":"e1npm","email":"ivan.voskoboinyk@gmail.com"},"repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"8.19.4","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"16.20.0","dependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^7.7.0","react":"^18.0.0","rimraf":"^5.0.1","react-dom":"^18.0.0","@babel/cli":"^7.21.5","typescript":"4.5","@babel/core":"^7.21.8","@babel/preset-env":"^7.21.5","@babel/preset-typescript":"^7.21.5","babel-plugin-transform-es2015-modules-simple-commonjs":"^0.3.0"},"peerDependencies":{"react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_0.3.1_1687773580005_0.9480162678453288","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@prezly/react-promise-modal","version":"2.0.0-alpha.1","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@2.0.0-alpha.1","maintainers":[{"name":"pestaa","email":"pestaa@pestaa.hu"},{"name":"e1npm","email":"ivan@voskoboinyk.com"},{"name":"makanda","email":"marko.ognjenovicgm@gmail.com"},{"name":"digitalbase","email":"gijs@prezly.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"mohammadxali","email":"mohammadali.shahbazi@gmail.com"},{"name":"francis-prezly","email":"francis@prezly.com"},{"name":"yuriyyakym","email":"yakym.yuriy@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"80f01bcba74714e4a077137540787532d006aa67","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-2.0.0-alpha.1.tgz","fileCount":17,"integrity":"sha512-2Wa754QFGraBGVy2TxH2BD5J3vujhNAxLtFMOA9XqzvMXGolF6Rym1vvL2Wh4xREeLa09NWL0O7eQ3TMgcNbRA==","signatures":[{"sig":"MEYCIQCHzKiN2GM3b+JQQuisg8IKNiFEe0SBcNczTcbYmy9dIgIhAL0y8jxECgSTMGEQpvf4wslEMCl6ywjsTEejdpG0SYW2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37697},"main":"dist/index.js","_from":"file:prezly-react-promise-modal-2.0.0-alpha.1.tgz","types":"dist/index.d.ts","scripts":{"test":"npm run test:ts && npm run test:types && npm run test:build","build":"npm run build:js && npm run build:types","clean":"rimraf package-lock.json pnpm-lock.yaml yarn.lock node_modules/ dist/","test:ts":"tsc --noEmit --lib es2018,dom --jsx react --skipLibCheck ./test/typescript.test.tsx","build:js":"babel src/* -x .ts,.tsx -d dist/","test:build":"node test/commonjs.test.js","test:types":"tsc --project ./tsconfig.test.json","build:types":"tsc --project ."},"_npmUser":{"name":"e1npm","email":"ivan@voskoboinyk.com"},"_resolved":"/tmp/c4c3cd12de4118ed806a13ffeaad04b1/prezly-react-promise-modal-2.0.0-alpha.1.tgz","_integrity":"sha512-2Wa754QFGraBGVy2TxH2BD5J3vujhNAxLtFMOA9XqzvMXGolF6Rym1vvL2Wh4xREeLa09NWL0O7eQ3TMgcNbRA==","repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"10.5.2","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"20.13.0","dependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.1.0","react":"^18.0.0","rimraf":"^6.0.1","prettier":"^3.4.2","react-dom":"^18.0.0","@babel/cli":"^7.26.4","typescript":"^5.7.2","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.26.0","babel-plugin-transform-es2015-modules-simple-commonjs":"^0.3.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_2.0.0-alpha.1_1735600282828_0.6334184994266916","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@prezly/react-promise-modal","version":"2.0.0","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@2.0.0","maintainers":[{"name":"pestaa","email":"pestaa@pestaa.hu"},{"name":"e1npm","email":"ivan@voskoboinyk.com"},{"name":"makanda","email":"marko.ognjenovicgm@gmail.com"},{"name":"digitalbase","email":"gijs@prezly.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"mohammadxali","email":"mohammadali.shahbazi@gmail.com"},{"name":"francis-prezly","email":"francis@prezly.com"},{"name":"yuriyyakym","email":"yakym.yuriy@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"d74a25cd4770f3098ec4c64272c15fc46c8e88af","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-2.0.0.tgz","fileCount":17,"integrity":"sha512-PsEQi+Blp4UN+wNgs1jcS3fzVnOsqE0pRj5jE9+HOv2udWNWfdLxo5U2BOg0gfTFjy3NSauPLfV+ay1u+JvVTQ==","signatures":[{"sig":"MEUCIAW8SMEOtEwcItRKw6+TXxcXU4WqGbxZCN6NDNrSXHW0AiEA+DdusUuQPrOeb6i4/vheTPCdVpeQkq0whE+4TfWRDO0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38031},"main":"dist/index.js","_from":"file:prezly-react-promise-modal-2.0.0.tgz","types":"dist/index.d.ts","scripts":{"test":"npm run test:ts && npm run test:types && npm run test:build","build":"npm run build:js && npm run build:types","clean":"rimraf package-lock.json pnpm-lock.yaml yarn.lock node_modules/ dist/","test:ts":"tsc --noEmit --lib es2018,dom --jsx react --skipLibCheck ./test/typescript.test.tsx","build:js":"babel src/* -x .ts,.tsx -d dist/","test:build":"node test/commonjs.test.js","test:types":"tsc --project ./tsconfig.test.json","build:types":"tsc --project ."},"_npmUser":{"name":"e1npm","email":"ivan@voskoboinyk.com"},"_resolved":"/tmp/9ca6b08b0fc31ef685bf49818e295f38/prezly-react-promise-modal-2.0.0.tgz","_integrity":"sha512-PsEQi+Blp4UN+wNgs1jcS3fzVnOsqE0pRj5jE9+HOv2udWNWfdLxo5U2BOg0gfTFjy3NSauPLfV+ay1u+JvVTQ==","repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"10.5.2","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"20.13.0","dependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.1.0","react":"^18.0.0","rimraf":"^6.0.1","prettier":"^3.4.2","react-dom":"^18.0.0","@babel/cli":"^7.26.4","typescript":"^5.7.2","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.26.0","babel-plugin-transform-es2015-modules-simple-commonjs":"^0.3.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_2.0.0_1735604043185_0.5752191712353445","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@prezly/react-promise-modal","version":"2.0.1","keywords":["react","modal","promise","async","await","confirmation"],"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","_id":"@prezly/react-promise-modal@2.0.1","maintainers":[{"name":"pestaa","email":"pestaa@pestaa.hu"},{"name":"e1npm","email":"ivan@voskoboinyk.com"},{"name":"makanda","email":"marko.ognjenovicgm@gmail.com"},{"name":"digitalbase","email":"gijs@prezly.com"},{"name":"kudlik","email":"kudlajzzz@gmail.com"},{"name":"mohammadxali","email":"mohammadali.shahbazi@gmail.com"},{"name":"francis-prezly","email":"francis@prezly.com"},{"name":"yuriyyakym","email":"yakym.yuriy@gmail.com"}],"homepage":"https://github.com/prezly/react-promise-modal#readme","bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"dist":{"shasum":"4bc69bd0e456ec4d60f347c00a3f3fc6937998c5","tarball":"https://registry.npmjs.org/@prezly/react-promise-modal/-/react-promise-modal-2.0.1.tgz","fileCount":17,"integrity":"sha512-U74rs6D9THPeQA1NF11tPG6ARpbF/QE7f6B75TnZ6nc82xrIZsAfXBk1kNllXKbwslvYIzaS0sYJZw+f7B0z7A==","signatures":[{"sig":"MEQCICl7MTuBQPSbudFll55+lNIlOe1n4imufRiShVKlky0LAiBIRVaN2oO2bAP6SGYbbqGY+6TT1ljD+5iW9FrH4DAOlw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39533},"main":"dist/index.js","_from":"file:prezly-react-promise-modal-2.0.1.tgz","types":"dist/index.d.ts","scripts":{"test":"npm run test:ts && npm run test:types && npm run test:build","build":"npm run build:js && npm run build:types","clean":"rimraf package-lock.json pnpm-lock.yaml yarn.lock node_modules/ dist/","test:ts":"tsc --noEmit --lib es2018,dom --jsx react --skipLibCheck ./test/typescript.test.tsx","build:js":"babel src/* -x .ts,.tsx -d dist/","test:build":"node test/commonjs.test.js","test:types":"tsc --project ./tsconfig.test.json","build:types":"tsc --project ."},"_npmUser":{"name":"e1npm","email":"ivan@voskoboinyk.com"},"_resolved":"/tmp/aaf2976d0a2168402340cb18d7e70bf1/prezly-react-promise-modal-2.0.1.tgz","_integrity":"sha512-U74rs6D9THPeQA1NF11tPG6ARpbF/QE7f6B75TnZ6nc82xrIZsAfXBk1kNllXKbwslvYIzaS0sYJZw+f7B0z7A==","repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"_npmVersion":"10.5.2","description":"The proper (and easy) way of doing modals in React. With Promises.","directories":{},"_nodeVersion":"20.13.0","dependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.1.0","react":"^18.0.0","rimraf":"^6.0.1","prettier":"^3.4.2","react-dom":"^18.0.0","@babel/cli":"^7.26.4","typescript":"^5.7.2","@babel/core":"^7.26.0","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.26.0","babel-plugin-transform-es2015-modules-simple-commonjs":"^0.3.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-modal_2.0.1_1735605343421_0.7362782057140442","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2019-03-14T22:51:54.029Z","modified":"2026-09-24T10:34:13.491Z","0.1.0":"2019-03-14T22:51:54.396Z","0.2.0":"2019-03-14T23:08:18.718Z","0.3.0":"2023-05-22T23:27:46.947Z","0.3.1":"2023-06-26T09:59:40.204Z","2.0.0-alpha.1":"2024-12-30T23:11:23.010Z","2.0.0":"2024-12-31T00:14:03.389Z","2.0.1":"2024-12-31T00:35:43.637Z"},"bugs":{"url":"https://github.com/prezly/react-promise-modal/issues"},"author":{"name":"Ivan Voskboinyk","email":"ivan@prezly.com"},"license":"MIT","homepage":"https://github.com/prezly/react-promise-modal#readme","keywords":["react","modal","promise","async","await","confirmation"],"repository":{"url":"git+https://github.com/prezly/react-promise-modal.git","type":"git"},"description":"The proper (and easy) way of doing modals in React. With Promises.","maintainers":[{"email":"gijs@prezly.com","name":"digitalbase"},{"email":"francis@prezly.com","name":"francis-prezly"},{"email":"camil@prezly.com","name":"prezlynpm"},{"email":"jesse@prezly.com","name":"jessewynants"},{"email":"patrycja@prezly.com","name":"patrycja_prezly"},{"email":"edvinas@prezly.com","name":"edvinas_prezly"}],"readme":"# React Promise Modal\n\n`usePromiseModal()` is a React hook that allows you to define a modal\nby providing a custom rendering function.\n\nAfter defining your modal you can invoke it imperatively and await the returned promise\nto resolve, to get the modal resolution result.\n\n## Usage\n\n1. Define your modal with `usePromiseModal()`\n2. Invoke it from your event handler using `invoke()`\n3. Wait for the modal to resolve with `await`\n\n```js\n// 1) Define your modal\nconst confirmation = usePromiseModal((props) => <MyModal {...props} />);\n\n// 2) Call it in your event handler\nasync function handleClick() {\n    // 3) Wait for the modal to resolve\n    if (await confirmation.invoke()) {\n        // TODO: Perform the operation.\n    }\n}\n```\n\n**Demo: https://codesandbox.io/p/sandbox/romantic-lovelace-4pmm3k**\n\n## API\n\n**The `usePromiseModal()` hook` returns the following values**:\n\n```tsx\nconst { invoke, modal, isDisplayed } = usePromiseModal(/* ... */);\n```\n\n- `invoke` — imperatively invoke the modal, optionally passing additional call-time arguments.\n  Returns a promise you can _await_ to get the modal resolution value, when it's available. \n  Or _undefined_ if the modal has been dismissed or cancelled.\n\n- `modal` — the rendered modal markup (`ReactElement | null`). You should always render this\n  value into your component subtree.\n\n- `isDisplayed` — a boolean flag indicating if there is currently a pending modal\n  for this definition.\n\n**The modal render function receives these properties**:\n\n```tsx\nusePromiseModal(({ show, onDismiss, onSubmit }) => (\n    <MyModal show={show} onDismiss={onDismiss} onSubmit={onSubmit} />\n));\n```\n\n\n- `show` — boolean to tell if the window is visible or not. \n   Used for in/out transitions. \n   Primarily intended to be used as *react-bootstrap* Modal `show` property.\n\n- `onDismiss` — should be invoked when the modal is dismissed.\n  Always resolves the promise to `undefined`.\n\n- `onSubmit` — should be invoked when the modal is submitted/confirmed. \n   Resolves to the value provided as an argument to it.\n   The resolve value cannot be `undefined`, because it is already reserved for dismissal.\n\nThe function returns a *Promise* that is resolved with the submitted value, \nor `undefined` if it has been dismissed.\n\n## Examples\n\n### Confirmation\n\nYou can easily implement a confirmation modal using `usePromiseModal()`:\n\n```jsx\nimport { usePromiseModal } from '@prezly/react-promise-modal';\n\nfunction MyApp() {\n    const confirmation = usePromiseModal(({ show, onSubmit, onDismiss }) => {\n        // Use any modal implementation you want\n        <MyConfirmationModal title=\"⚠️ Are you sure?\" show={show} onConfirm={() => onSubmit(true)} onDismiss={onDismiss} />\n    });\n    \n    async function handleDeleteAccount() {\n        if (await confirmation.invoke()) {\n            console.log('Conirmed');\n        } else {\n            console.log('Cancelled');\n        }\n    }\n    \n    return (\n        <div>\n           <button onClick={handleDeleteAccount}>Delete account</button>\n           {confirmation.modal}\n        </div>\n    )\n}\n```\n\n### Alert\n\nAlert is basically the same as confirmation, except there is no difference whether\nit is submitted or dismissed -- the modal has single action anyway. \nSo we only need `onDismiss`:\n\n```jsx\nimport { usePromiseModal } from '@prezly/react-promise-modal';\n\nfunction MyApp() {\n    const alert = usePromiseModal(({ show, onDismiss }) => {\n        // Use any modal implementation you want\n        <MyAlertModal title=\"✔ Account deleted!\" show={show} onDismiss={onDismiss} />\n    });\n\n    async function handleDeleteAccount() {\n        await api.deleteAccount();\n        await alert.invoke();\n    }\n\n    return (\n        <div>\n            <button onClick={handleDeleteAccount}>Delete account</button>\n            {alert.modal}\n        </div>\n    )\n}\n\n```\n\n### Prompt User Input\n\nFor data prompts all you need is to resolve the promise by submitting the value to `onSubmit`:\neither a scalar, or more complex shapes wrapped into an object:\n\n```tsx\nimport { usePromiseModal } from '@prezly/react-promise-modal';\n\nfunction MyApp() {\n    const prompt = usePromiseModal<string, { title: string }>(\n        (props) => <MyFilenamePromptModal {...props} />,\n    );\n\n    async function handleCreateFile() {\n        const filename = await prompt.invoke({ title: 'Please enter filename:' });\n        if (!filename) {\n            console.error('Filename is required');\n            return;\n        }\n        await api.createFile(filename);\n    }\n\n    return (\n        <div>\n            <button onClick={handleCreateFile}>Create new file</button>\n            {prompt.modal}\n        </div>\n    )\n}\n\ninterface Props {\n    title: string;\n    show: boolean;\n    onSubmit: (filename: string) => void;\n    onDismiss: () => void;\n}\n\nfunction MyFilenamePromptModal({ title, show, onSubmit, onDismiss }: Props) {\n    const [filename, setFilename] = useState(\"Untitled.txt\");\n\n    return (\n        // Use any modal implementation you want\n        <Modal>\n            <form onSubmit={() => onSubmit(filename)}>\n                <p>{title}</p>\n                <input autoFocus value={filename} onChange={(event) => setFilename(event.target.value)} />\n\n                <button variant=\"secondary\" onClick={onDismiss}>Cancel</button>\n                <button variant=\"primary\" type=\"submit\">Confirm</button>\n            </form>\n        </Modal>\n    );\n}\n```\n\n## Additional Invoke-time Arguments\n\nIn addition to the three standard properties your modal render callback will always receive when rendered,\nyou can pass extra call-time properties. Declare them with the second generic type parameter of `usePromiseModal()`,\nand then pass to the `invoke()` method:\n\n```tsx\nimport { usePromiseModal } from \"@prezly/react-promise-modal\";\n\nconst failureFeedback = usePromiseModal<undefined, { status: Status, failures: OperationFailure[] }>(\n    ({ status, failures, show, onSubmit, onDismiss }) => (\n        <FailureModal status={status} failures={failures} show={show} onSubmit={onSubmit} onDismiss={onDismiss} />\n    ),\n);\n\n// Invocation of the modal now requrires these additional properties:\nasync function handleFlakyOperation() {\n    const { status, failures } = await api.flakyOperation();\n    if (status !== 'success') {\n        await failureFeedback.invoke({ status, failures }); // Note: here we pass additional parameters call-time\n    }\n}\n```\n\n------------------\n\n# Credits\n\nBrought to you with :metal: by [Prezly](https://www.prezly.com/?utm_source=github&utm_campaign=react-promise-modal).\n","readmeFilename":"README.md"}