@ic-pay/icpay-widget 1.1.48 → 1.1.52
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/dist/chunk-DYAAEJP3.js +2 -0
- package/dist/chunk-DYAAEJP3.js.map +1 -0
- package/dist/{chunk-DDCE2AR4.js → chunk-ROE27JNI.js} +58 -54
- package/dist/chunk-ROE27JNI.js.map +1 -0
- package/dist/index.d.ts +59 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/wallet-select-F6BSMPEE.js +2 -0
- package/dist/wallet-select-F6BSMPEE.js.map +1 -0
- package/package.json +10 -3
- package/dist/chunk-DDCE2AR4.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -63,4 +63,62 @@ type TransakOnrampOptions = {
|
|
|
63
63
|
*/
|
|
64
64
|
declare function renderTransakOnrampModal(opts: TransakOnrampOptions): TemplateResult | null;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
type WalletSelectConfig = {
|
|
67
|
+
icHost?: string;
|
|
68
|
+
derivationOrigin?: string;
|
|
69
|
+
adapters?: Partial<Record<string, {
|
|
70
|
+
adapter?: any;
|
|
71
|
+
config?: any;
|
|
72
|
+
enabled?: boolean;
|
|
73
|
+
label?: string;
|
|
74
|
+
icon?: string;
|
|
75
|
+
}>>;
|
|
76
|
+
};
|
|
77
|
+
type GetActorOptions = {
|
|
78
|
+
canisterId: string;
|
|
79
|
+
idl: any;
|
|
80
|
+
requiresSigning?: boolean;
|
|
81
|
+
anon?: boolean;
|
|
82
|
+
};
|
|
83
|
+
type WalletAccount = {
|
|
84
|
+
owner?: string | null;
|
|
85
|
+
principal?: string | null;
|
|
86
|
+
connected?: boolean;
|
|
87
|
+
};
|
|
88
|
+
type AdapterInterface = {
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
icon?: string | null;
|
|
92
|
+
isInstalled(): Promise<boolean>;
|
|
93
|
+
isConnected(): Promise<boolean>;
|
|
94
|
+
connect(): Promise<WalletAccount>;
|
|
95
|
+
disconnect(): Promise<void>;
|
|
96
|
+
getPrincipal(): Promise<string | null>;
|
|
97
|
+
getActor<T>(options: GetActorOptions): any;
|
|
98
|
+
};
|
|
99
|
+
type AdapterConfig = {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
icon?: string | null;
|
|
103
|
+
enabled?: boolean;
|
|
104
|
+
adapter: new (args: {
|
|
105
|
+
config: WalletSelectConfig;
|
|
106
|
+
}) => AdapterInterface;
|
|
107
|
+
};
|
|
108
|
+
declare class WalletSelect {
|
|
109
|
+
private _config;
|
|
110
|
+
private _adapters;
|
|
111
|
+
private _activeAdapter;
|
|
112
|
+
private _account;
|
|
113
|
+
constructor(config?: WalletSelectConfig);
|
|
114
|
+
get config(): WalletSelectConfig;
|
|
115
|
+
get account(): WalletAccount | null;
|
|
116
|
+
getEnabledWallets(): any[];
|
|
117
|
+
private resolveIcon;
|
|
118
|
+
connect(walletId?: string): Promise<WalletAccount>;
|
|
119
|
+
disconnect(): Promise<void>;
|
|
120
|
+
getActor<T>(options: GetActorOptions): any;
|
|
121
|
+
}
|
|
122
|
+
declare const createWalletSelect: (config?: WalletSelectConfig) => WalletSelect;
|
|
123
|
+
|
|
124
|
+
export { type AdapterConfig, type AdapterInterface, CommonConfig, type GetActorOptions, ThemeConfig, type WalletAccount, WalletSelect, type WalletSelectConfig, type WidgetSdk, applyThemeVars, baseStyles, createSdk, createWalletSelect, renderTransakOnrampModal };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as a,c as e,d as r,e as
|
|
1
|
+
import{a as o,b as a,c as e,d as r,e as n,f as m,g as y,h as i,i as c,j as f,k as x}from"./chunk-ROE27JNI.js";import{a as p,b as t}from"./chunk-DYAAEJP3.js";import"./chunk-LTEQ7OUJ.js";export{x as ICPayAmountInput,y as ICPayArticlePaywall,i as ICPayCoffeeShop,c as ICPayDonationThermometer,f as ICPayPayButton,n as ICPayPremiumContent,m as ICPayTipJar,p as WalletSelect,a as applyThemeVars,o as baseStyles,e as createSdk,t as createWalletSelect,r as renderTransakOnrampModal};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-ROE27JNI.js";import"../chunk-LTEQ7OUJ.js";import I,{forwardRef as M,useEffect as d,useRef as b}from"react";function n(m,i){let f=M((o,t)=>{let s=b(null);d(()=>{let e=s.current;if(!e)return;let{children:p,className:r,style:y,id:c,role:l,tabIndex:u,title:a,ref:h,...C}=o;for(let[S,T]of Object.entries(C))try{e[S]=T}catch{}},[o]),d(()=>{let e=s.current;if(!e||!i?.eventMap)return;let p=[];for(let[r,y]of Object.entries(i.eventMap)){let c=o[r];if(typeof c=="function"){let l=u=>{let a=u;a&&"detail"in a?c(a.detail):c(u)};e.addEventListener(y,l),p.push(()=>e.removeEventListener(y,l))}}return()=>{p.forEach(r=>r())}},[o,i?.eventMap]);let g=e=>{s.current=e,typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e)},{children:E,...v}=o;return I.createElement(m,{ref:g,...v},E)});return f.displayName=`ICPay(${m})`,f}var R=n("icpay-pay-button",{eventMap:{onSuccess:"icpay-pay",onError:"icpay-error"}}),A=n("icpay-amount-input",{eventMap:{onSuccess:"icpay-amount-pay",onError:"icpay-error"}}),H=n("icpay-premium-content",{eventMap:{onSuccess:"icpay-unlock",onError:"icpay-error"}}),w=n("icpay-tip-jar",{eventMap:{onSuccess:"icpay-tip",onError:"icpay-error"}}),k=n("icpay-article-paywall",{eventMap:{onSuccess:"icpay-unlock",onError:"icpay-error"}}),j=n("icpay-coffee-shop",{eventMap:{onSuccess:"icpay-coffee",onError:"icpay-error"}}),B=n("icpay-donation-thermometer",{eventMap:{onSuccess:"icpay-donation",onError:"icpay-error"}}),N=n("icpay-progress-bar");export{A as IcpayAmountInput,k as IcpayArticlePaywall,j as IcpayCoffeeShop,B as IcpayDonationThermometer,R as IcpayPayButton,H as IcpayPremiumContent,N as IcpayProgressBar,w as IcpayTipJar};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-pay/icpay-widget",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.52",
|
|
4
4
|
"description": "ICPay embeddable payment widgets as framework-agnostic Web Components",
|
|
5
5
|
"homepage": "https://github.com/icpay/icpay-widget#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -36,8 +36,15 @@
|
|
|
36
36
|
"prepare": "pnpm build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
39
|
+
"@dfinity/agent": "^3.4.1",
|
|
40
|
+
"@dfinity/auth-client": "^3.4.1",
|
|
41
|
+
"@dfinity/candid": "^3.4.1",
|
|
42
|
+
"@dfinity/identity": "^3.4.1",
|
|
43
|
+
"@dfinity/principal": "^3.4.1",
|
|
44
|
+
"@ic-pay/icpay-sdk": "^1.3.95",
|
|
45
|
+
"@slide-computer/signer": "^4.0.0",
|
|
46
|
+
"@slide-computer/signer-agent": "^4.0.0",
|
|
47
|
+
"@slide-computer/signer-web": "^4.0.0",
|
|
41
48
|
"lit": "^3.3.1"
|
|
42
49
|
},
|
|
43
50
|
"devDependencies": {
|