@ic-pay/icpay-widget 1.2.83 → 1.2.86
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/{amount-input-CxXtbYPB.d.ts → amount-input-3JvxFvnp.d.ts} +3 -2
- package/dist/{chunk-RA6KGDIL.js → chunk-5UZLVWIN.js} +147 -103
- package/dist/chunk-5UZLVWIN.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-RA6KGDIL.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ThemeConfig, C as CommonConfig } from './amount-input-
|
|
2
|
-
export { f as AmountInputConfig, A as ArticlePaywallConfig, d as CoffeeShopConfig, D as DonationThermometerConfig, l as ICPayAmountInput, h as ICPayArticlePaywall, i as ICPayCoffeeShop, j as ICPayDonationThermometer, k as ICPayPayButton, I as ICPayPremiumContent, g as ICPayTipJar, O as OnrampConfig, e as PayButtonConfig, P as PlugNPlayConfig, b as PremiumContentConfig, a as ProgressBarConfig, c as TipJarConfig } from './amount-input-
|
|
1
|
+
import { T as ThemeConfig, C as CommonConfig } from './amount-input-3JvxFvnp.js';
|
|
2
|
+
export { f as AmountInputConfig, A as ArticlePaywallConfig, d as CoffeeShopConfig, D as DonationThermometerConfig, l as ICPayAmountInput, h as ICPayArticlePaywall, i as ICPayCoffeeShop, j as ICPayDonationThermometer, k as ICPayPayButton, I as ICPayPremiumContent, g as ICPayTipJar, O as OnrampConfig, e as PayButtonConfig, P as PlugNPlayConfig, b as PremiumContentConfig, a as ProgressBarConfig, c as TipJarConfig } from './amount-input-3JvxFvnp.js';
|
|
3
3
|
import * as lit from 'lit';
|
|
4
4
|
import { TemplateResult } from 'lit';
|
|
5
5
|
import { Icpay, PriceCalculationResult } from '@ic-pay/icpay-sdk';
|
|
@@ -21,7 +21,8 @@ declare global {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
declare const baseStyles: lit.CSSResult;
|
|
24
|
-
declare function
|
|
24
|
+
declare function getThemeModeFromConfig(theme?: 'light' | 'dark' | ThemeConfig | null): 'light' | 'dark';
|
|
25
|
+
declare function applyThemeVars(host: HTMLElement, theme?: 'light' | 'dark' | ThemeConfig | null): void;
|
|
25
26
|
|
|
26
27
|
type WidgetSdk = {
|
|
27
28
|
client: InstanceType<typeof Icpay>;
|
|
@@ -43,6 +44,7 @@ type OnrampModalOptions = {
|
|
|
43
44
|
onClose: () => void;
|
|
44
45
|
onBack?: () => void;
|
|
45
46
|
title?: string;
|
|
47
|
+
theme?: 'light' | 'dark';
|
|
46
48
|
};
|
|
47
49
|
declare function renderOnrampModal(opts: OnrampModalOptions): TemplateResult | null;
|
|
48
50
|
|
|
@@ -108,4 +110,4 @@ declare class WalletSelect {
|
|
|
108
110
|
}
|
|
109
111
|
declare const createWalletSelect: (config?: WalletSelectConfig) => WalletSelect;
|
|
110
112
|
|
|
111
|
-
export { type AdapterConfig, type AdapterInterface, CommonConfig, type GetActorOptions, ThemeConfig, type WalletAccount, WalletSelect, type WalletSelectConfig, type WidgetSdk, applyThemeVars, baseStyles, createSdk, createWalletSelect, renderOnrampModal };
|
|
113
|
+
export { type AdapterConfig, type AdapterInterface, CommonConfig, type GetActorOptions, ThemeConfig, type WalletAccount, WalletSelect, type WalletSelectConfig, type WidgetSdk, applyThemeVars, baseStyles, createSdk, createWalletSelect, getThemeModeFromConfig, renderOnrampModal };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as e,c as a,d as
|
|
1
|
+
import{a as o,b as e,c as a,d as p,e as r,f as m,g as y,h as i,i as c,j as f,k as x,l}from"./chunk-5UZLVWIN.js";import{a as t,b as n}from"./chunk-WVNSOAVU.js";import"./chunk-LTEQ7OUJ.js";export{l as ICPayAmountInput,i as ICPayArticlePaywall,c as ICPayCoffeeShop,f as ICPayDonationThermometer,x as ICPayPayButton,m as ICPayPremiumContent,y as ICPayTipJar,t as WalletSelect,a as applyThemeVars,o as baseStyles,p as createSdk,n as createWalletSelect,e as getThemeModeFromConfig,r as renderOnrampModal};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.d.ts
CHANGED
package/dist/react/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-5UZLVWIN.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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-pay/icpay-widget",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.86",
|
|
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": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@dfinity/candid": "^3.4.3",
|
|
62
62
|
"@dfinity/identity": "^3.4.3",
|
|
63
63
|
"@dfinity/principal": "^3.4.3",
|
|
64
|
-
"@ic-pay/icpay-sdk": "^1.4.
|
|
64
|
+
"@ic-pay/icpay-sdk": "^1.4.73",
|
|
65
65
|
"@slide-computer/signer": "^4.1.0",
|
|
66
66
|
"@slide-computer/signer-agent": "^4.1.0",
|
|
67
67
|
"@slide-computer/signer-web": "^4.1.0",
|