@getalby/bitcoin-connect-react
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.2
import React from 'react'; | ||
import '@getalby/bitcoin-connect'; | ||
import { ComponentProps } from '../types/ComponentProps'; | ||
import { SendPaymentResponse } from '@webbtc/webln-types'; | ||
type SendPaymentProps = ComponentProps & { | ||
invoice: string; | ||
onPaid?: (response: SendPaymentResponse) => void; | ||
}; | ||
export declare const SendPayment: React.FC<SendPaymentProps>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import n from"react";import{onConnected as e,onConnecting as o,onDisconnected as t,onModalOpened as c,onModalClosed as r}from"@getalby/bitcoin-connect";export{closeModal,disconnect,init,isConnected,launchModal,onConnected,onConnecting,onDisconnected,onModalClosed,onModalOpened,requestProvider}from"@getalby/bitcoin-connect";function i(i){n.useEffect(()=>{if(i.onConnected){const n=e(i.onConnected);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onConnecting){const n=o(i.onConnecting);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onDisconnected){const n=t(i.onDisconnected);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onModalOpened){const n=c(i.onModalOpened);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onModalClosed){const n=r(i.onModalClosed);return()=>{n()}}return()=>{}},[])}const d=e=>(i(e),/*#__PURE__*/n.createElement("bc-button",null)),l=e=>(i(e),/*#__PURE__*/n.createElement("bc-connect-flow",null)),s=e=>(i(e),/*#__PURE__*/n.createElement("bc-send-payment-flow",{invoice:e.invoice}));export{d as Button,l as Connect,s as SendPayment}; | ||
import n from"react";import{onConnected as e,onConnecting as o,onDisconnected as t,onModalOpened as c,onModalClosed as r}from"@getalby/bitcoin-connect";export{closeModal,disconnect,init,isConnected,launchModal,onConnected,onConnecting,onDisconnected,onModalClosed,onModalOpened,requestProvider}from"@getalby/bitcoin-connect";function i(i){n.useEffect(()=>{if(i.onConnected){const n=e(i.onConnected);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onConnecting){const n=o(i.onConnecting);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onDisconnected){const n=t(i.onDisconnected);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onModalOpened){const n=c(i.onModalOpened);return()=>{n()}}return()=>{}},[]),n.useEffect(()=>{if(i.onModalClosed){const n=r(i.onModalClosed);return()=>{n()}}return()=>{}},[])}const d=e=>(i(e),/*#__PURE__*/n.createElement("bc-button",null)),s=e=>(i(e),/*#__PURE__*/n.createElement("bc-connect-flow",null)),l=e=>(i(e),n.useEffect(()=>{const n=e.onPaid;if(n){const e=e=>{n(e.detail)};return window.addEventListener("bc:onpaid",e),()=>{window.removeEventListener("bc:onpaid",e)}}return()=>{}},[]),/*#__PURE__*/n.createElement("bc-send-payment-flow",{invoice:e.invoice}));export{d as Button,s as Connect,l as SendPayment}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import n from"react";import{onConnected as e,onConnecting as o,onDisconnected as t,onModalOpened as c,onModalClosed as r}from"@getalby/bitcoin-connect";export{closeModal,disconnect,init,isConnected,launchModal,onConnected,onConnecting,onDisconnected,onModalClosed,onModalOpened,requestProvider}from"@getalby/bitcoin-connect";function i(i){n.useEffect(function(){if(i.onConnected){var n=e(i.onConnected);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(i.onConnecting){var n=o(i.onConnecting);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(i.onDisconnected){var n=t(i.onDisconnected);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(i.onModalOpened){var n=c(i.onModalOpened);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(i.onModalClosed){var n=r(i.onModalClosed);return function(){n()}}return function(){}},[])}var u=function(e){return i(e),/*#__PURE__*/n.createElement("bc-button",null)},f=function(e){return i(e),/*#__PURE__*/n.createElement("bc-connect-flow",null)},d=function(e){return i(e),/*#__PURE__*/n.createElement("bc-send-payment-flow",{invoice:e.invoice})};export{u as Button,f as Connect,d as SendPayment}; | ||
import n from"react";import{onConnected as e,onConnecting as o,onDisconnected as t,onModalOpened as c,onModalClosed as i}from"@getalby/bitcoin-connect";export{closeModal,disconnect,init,isConnected,launchModal,onConnected,onConnecting,onDisconnected,onModalClosed,onModalOpened,requestProvider}from"@getalby/bitcoin-connect";function r(r){n.useEffect(function(){if(r.onConnected){var n=e(r.onConnected);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(r.onConnecting){var n=o(r.onConnecting);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(r.onDisconnected){var n=t(r.onDisconnected);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(r.onModalOpened){var n=c(r.onModalOpened);return function(){n()}}return function(){}},[]),n.useEffect(function(){if(r.onModalClosed){var n=i(r.onModalClosed);return function(){n()}}return function(){}},[])}var u=function(e){return r(e),/*#__PURE__*/n.createElement("bc-button",null)},f=function(e){return r(e),/*#__PURE__*/n.createElement("bc-connect-flow",null)},d=function(e){return r(e),n.useEffect(function(){var n=e.onPaid;if(n){var o=function(e){n(e.detail)};return window.addEventListener("bc:onpaid",o),function(){window.removeEventListener("bc:onpaid",o)}}return function(){}},[]),/*#__PURE__*/n.createElement("bc-send-payment-flow",{invoice:e.invoice})};export{u as Button,f as Connect,d as SendPayment}; | ||
//# sourceMappingURL=index.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@getalby/bitcoin-connect")):"function"==typeof define&&define.amd?define(["exports","react","@getalby/bitcoin-connect"],n):n((e||self).bitcoinConnectReact={},e.React,e.bitcoinConnect)}(this,function(e,n,t){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/o(n);function r(e){c.default.useEffect(function(){if(e.onConnected){var n=t.onConnected(e.onConnected);return function(){n()}}return function(){}},[]),c.default.useEffect(function(){if(e.onConnecting){var n=t.onConnecting(e.onConnecting);return function(){n()}}return function(){}},[]),c.default.useEffect(function(){if(e.onDisconnected){var n=t.onDisconnected(e.onDisconnected);return function(){n()}}return function(){}},[]),c.default.useEffect(function(){if(e.onModalOpened){var n=t.onModalOpened(e.onModalOpened);return function(){n()}}return function(){}},[]),c.default.useEffect(function(){if(e.onModalClosed){var n=t.onModalClosed(e.onModalClosed);return function(){n()}}return function(){}},[])}Object.defineProperty(e,"closeModal",{enumerable:!0,get:function(){return t.closeModal}}),Object.defineProperty(e,"disconnect",{enumerable:!0,get:function(){return t.disconnect}}),Object.defineProperty(e,"init",{enumerable:!0,get:function(){return t.init}}),Object.defineProperty(e,"isConnected",{enumerable:!0,get:function(){return t.isConnected}}),Object.defineProperty(e,"launchModal",{enumerable:!0,get:function(){return t.launchModal}}),Object.defineProperty(e,"onConnected",{enumerable:!0,get:function(){return t.onConnected}}),Object.defineProperty(e,"onConnecting",{enumerable:!0,get:function(){return t.onConnecting}}),Object.defineProperty(e,"onDisconnected",{enumerable:!0,get:function(){return t.onDisconnected}}),Object.defineProperty(e,"onModalClosed",{enumerable:!0,get:function(){return t.onModalClosed}}),Object.defineProperty(e,"onModalOpened",{enumerable:!0,get:function(){return t.onModalOpened}}),Object.defineProperty(e,"requestProvider",{enumerable:!0,get:function(){return t.requestProvider}}),e.Button=function(e){return r(e),/*#__PURE__*/c.default.createElement("bc-button",null)},e.Connect=function(e){return r(e),/*#__PURE__*/c.default.createElement("bc-connect-flow",null)},e.SendPayment=function(e){return r(e),/*#__PURE__*/c.default.createElement("bc-send-payment-flow",{invoice:e.invoice})}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@getalby/bitcoin-connect")):"function"==typeof define&&define.amd?define(["exports","react","@getalby/bitcoin-connect"],n):n((e||self).bitcoinConnectReact={},e.React,e.bitcoinConnect)}(this,function(e,n,t){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=/*#__PURE__*/o(n);function c(e){r.default.useEffect(function(){if(e.onConnected){var n=t.onConnected(e.onConnected);return function(){n()}}return function(){}},[]),r.default.useEffect(function(){if(e.onConnecting){var n=t.onConnecting(e.onConnecting);return function(){n()}}return function(){}},[]),r.default.useEffect(function(){if(e.onDisconnected){var n=t.onDisconnected(e.onDisconnected);return function(){n()}}return function(){}},[]),r.default.useEffect(function(){if(e.onModalOpened){var n=t.onModalOpened(e.onModalOpened);return function(){n()}}return function(){}},[]),r.default.useEffect(function(){if(e.onModalClosed){var n=t.onModalClosed(e.onModalClosed);return function(){n()}}return function(){}},[])}Object.defineProperty(e,"closeModal",{enumerable:!0,get:function(){return t.closeModal}}),Object.defineProperty(e,"disconnect",{enumerable:!0,get:function(){return t.disconnect}}),Object.defineProperty(e,"init",{enumerable:!0,get:function(){return t.init}}),Object.defineProperty(e,"isConnected",{enumerable:!0,get:function(){return t.isConnected}}),Object.defineProperty(e,"launchModal",{enumerable:!0,get:function(){return t.launchModal}}),Object.defineProperty(e,"onConnected",{enumerable:!0,get:function(){return t.onConnected}}),Object.defineProperty(e,"onConnecting",{enumerable:!0,get:function(){return t.onConnecting}}),Object.defineProperty(e,"onDisconnected",{enumerable:!0,get:function(){return t.onDisconnected}}),Object.defineProperty(e,"onModalClosed",{enumerable:!0,get:function(){return t.onModalClosed}}),Object.defineProperty(e,"onModalOpened",{enumerable:!0,get:function(){return t.onModalOpened}}),Object.defineProperty(e,"requestProvider",{enumerable:!0,get:function(){return t.requestProvider}}),e.Button=function(e){return c(e),/*#__PURE__*/r.default.createElement("bc-button",null)},e.Connect=function(e){return c(e),/*#__PURE__*/r.default.createElement("bc-connect-flow",null)},e.SendPayment=function(e){return c(e),r.default.useEffect(function(){var n=e.onPaid;if(n){var t=function(e){n(e.detail)};return window.addEventListener("bc:onpaid",t),function(){window.removeEventListener("bc:onpaid",t)}}return function(){}},[]),/*#__PURE__*/r.default.createElement("bc-send-payment-flow",{invoice:e.invoice})}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@getalby/bitcoin-connect-react", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.2", | ||
"type": "module", | ||
@@ -24,3 +24,3 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@getalby/bitcoin-connect": "^3.0.0-beta.1" | ||
"@getalby/bitcoin-connect": "^3.0.0-beta.2" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29642
80