@ic-pay/icpay-widget 1.1.10 → 1.1.12

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.
@@ -0,0 +1,2 @@
1
+ var h=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=(g,b,d,c)=>{for(var a=c>1?void 0:c?i(b,d):b,e=g.length-1,f;e>=0;e--)(f=g[e])&&(a=(c?f(b,d,a):f(a))||a);return c&&a&&h(b,d,a),a};export{j as a};
2
+ //# sourceMappingURL=chunk-LTEQ7OUJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as ThemeConfig, C as CommonConfig } from './amount-input-D02zIJ9C.js';
2
- export { g as AmountInputConfig, A as ArticlePaywallConfig, e as CoffeeShopConfig, b as CryptoOption, D as DonationThermometerConfig, m as ICPayAmountInput, i as ICPayArticlePaywall, j as ICPayCoffeeShop, k as ICPayDonationThermometer, l as ICPayPayButton, I as ICPayPremiumContent, h as ICPayTipJar, O as OnrampConfig, f as PayButtonConfig, P as PlugNPlayConfig, c as PremiumContentConfig, a as ProgressBarConfig, d as TipJarConfig } from './amount-input-D02zIJ9C.js';
1
+ import { T as ThemeConfig, C as CommonConfig } from './amount-input-BuRsVrmL.js';
2
+ export { g as AmountInputConfig, A as ArticlePaywallConfig, e as CoffeeShopConfig, b as CryptoOption, D as DonationThermometerConfig, m as ICPayAmountInput, i as ICPayArticlePaywall, j as ICPayCoffeeShop, k as ICPayDonationThermometer, l as ICPayPayButton, I as ICPayPremiumContent, h as ICPayTipJar, O as OnrampConfig, f as PayButtonConfig, P as PlugNPlayConfig, c as PremiumContentConfig, a as ProgressBarConfig, d as TipJarConfig } from './amount-input-BuRsVrmL.js';
3
3
  import * as lit from 'lit';
4
4
  import { TemplateResult } from 'lit';
5
5
  import { Icpay, PriceCalculationResult } from '@ic-pay/icpay-sdk';
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 p,f as t,g as n,h as m,i as y,j as i,k as c}from"./chunk-TTV63ZJ6.js";export{c as ICPayAmountInput,n as ICPayArticlePaywall,m as ICPayCoffeeShop,y as ICPayDonationThermometer,i as ICPayPayButton,p as ICPayPremiumContent,t as ICPayTipJar,a as applyThemeVars,o as baseStyles,e as createSdk,r as renderTransakOnrampModal};
1
+ import{a as o,b as a,c as e,d as r,e as p,f as t,g as n,h as m,i as y,j as i,k as c}from"./chunk-2DMFM5CQ.js";import"./chunk-LTEQ7OUJ.js";export{c as ICPayAmountInput,n as ICPayArticlePaywall,m as ICPayCoffeeShop,y as ICPayDonationThermometer,i as ICPayPayButton,p as ICPayPremiumContent,t as ICPayTipJar,a as applyThemeVars,o as baseStyles,e as createSdk,r as renderTransakOnrampModal};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-LTEQ7OUJ.js";function i(n){if(n&&typeof n=="string"&&n.trim())return n.trim();try{return typeof window<"u"?window.location.origin:void 0}catch{return}}export{i as resolveDerivationOrigin};
2
+ //# sourceMappingURL=origin-44ZEXSX4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/origin.ts"],"sourcesContent":["// Utility to resolve derivationOrigin with sane defaults\n// - If user provided derivationOrigin, return it\n// - Else, return window.location.origin as-is (must match a canister-mapped origin for II)\nexport function resolveDerivationOrigin(userValue?: string): string | undefined {\n if (userValue && typeof userValue === 'string' && userValue.trim()) {\n return userValue.trim();\n }\n try { return typeof window !== 'undefined' ? window.location.origin : undefined; } catch { return undefined; }\n}\n\n\n"],"mappings":"4BAGO,SAASA,EAAwBC,EAAwC,CAC9E,GAAIA,GAAa,OAAOA,GAAc,UAAYA,EAAU,KAAK,EAC/D,OAAOA,EAAU,KAAK,EAExB,GAAI,CAAE,OAAO,OAAO,OAAW,IAAc,OAAO,SAAS,OAAS,MAAW,MAAQ,CAAE,MAAkB,CAC/G","names":["resolveDerivationOrigin","userValue"]}
@@ -1,4 +1,4 @@
1
- import '../amount-input-D02zIJ9C.js';
1
+ import '../amount-input-BuRsVrmL.js';
2
2
  import 'lit';
3
3
 
4
4
  type IcpaySuccess = {
@@ -1,2 +1,2 @@
1
- import"../chunk-TTV63ZJ6.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};
1
+ import"../chunk-2DMFM5CQ.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
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/createWrapper.tsx","../../src/react/widgets.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef } from 'react';\n\ntype AnyProps = Record<string, unknown> & { children?: React.ReactNode };\n\n// Generic React wrapper for ICPay custom elements.\n// - Assigns all non-React props as properties on the underlying element\n// - Leaves events to be handled via config callbacks (recommended)\nexport function createWebComponent<TElement extends HTMLElement, TProps extends AnyProps>(\n tagName: string,\n options?: { eventMap?: Record<string, string> }\n) {\n const Component = forwardRef<TElement, TProps>((props, ref) => {\n const innerRef = useRef<TElement | null>(null);\n\n useEffect(() => {\n const el = innerRef.current as any;\n if (!el) return;\n\n // Assign props as element properties (exclude standard React DOM props)\n const {\n children,\n className,\n style,\n id,\n role,\n tabIndex,\n title,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: _ignoredRef,\n ...rest\n } = props as any;\n\n for (const [key, value] of Object.entries(rest)) {\n try {\n (el as any)[key] = value;\n } catch {\n // no-op if property assignment fails\n }\n }\n }, [props]);\n\n // Wire custom-element events from props via eventMap\n useEffect(() => {\n const el = innerRef.current as unknown as HTMLElement | null;\n if (!el || !options?.eventMap) return;\n const cleanup: Array<() => void> = [];\n for (const [propName, eventName] of Object.entries(options.eventMap)) {\n const handler = (props as any)[propName];\n if (typeof handler === 'function') {\n const listener = (e: Event) => {\n const ce = e as CustomEvent;\n if (ce && 'detail' in ce) handler(ce.detail);\n else handler(e);\n };\n el.addEventListener(eventName, listener as EventListener);\n cleanup.push(() => el.removeEventListener(eventName, listener as EventListener));\n }\n }\n return () => { cleanup.forEach(fn => fn()); };\n }, [props, options?.eventMap]);\n\n // Merge forwarded ref\n const setRef = (node: TElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref && typeof ref === 'object') {\n (ref as React.MutableRefObject<TElement | null>).current = node;\n }\n };\n\n const { children, ...rest } = props as any;\n return React.createElement(tagName, { ref: setRef, ...rest }, children);\n });\n\n Component.displayName = `ICPay(${tagName})`;\n return Component;\n}\n\n\n","import { createWebComponent } from './createWrapper';\nimport type {\n PayButtonConfig,\n AmountInputConfig,\n PremiumContentConfig,\n TipJarConfig,\n ArticlePaywallConfig,\n CoffeeShopConfig,\n DonationThermometerConfig,\n ThemeConfig\n} from '../types';\n\n// Public success detail types\nexport type IcpaySuccess = { amount?: number; tx: unknown };\nexport type IcpayCoffeeSuccess = { item: { name: string; priceUsd: number }; tx: unknown };\n\n// Public React components\nexport const IcpayPayButton = createWebComponent<HTMLElement, { config?: PayButtonConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-pay-button', { eventMap: { onSuccess: 'icpay-pay', onError: 'icpay-error' } });\nexport const IcpayAmountInput = createWebComponent<HTMLElement, { config?: AmountInputConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-amount-input', { eventMap: { onSuccess: 'icpay-amount-pay', onError: 'icpay-error' } });\nexport const IcpayPremiumContent = createWebComponent<HTMLElement, { config?: PremiumContentConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-premium-content', { eventMap: { onSuccess: 'icpay-unlock', onError: 'icpay-error' } });\nexport const IcpayTipJar = createWebComponent<HTMLElement, { config?: TipJarConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-tip-jar', { eventMap: { onSuccess: 'icpay-tip', onError: 'icpay-error' } });\nexport const IcpayArticlePaywall = createWebComponent<HTMLElement, { config?: ArticlePaywallConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-article-paywall', { eventMap: { onSuccess: 'icpay-unlock', onError: 'icpay-error' } });\nexport const IcpayCoffeeShop = createWebComponent<HTMLElement, { config?: CoffeeShopConfig; onSuccess?: (detail: IcpayCoffeeSuccess) => void; onError?: (detail: any) => void }>('icpay-coffee-shop', { eventMap: { onSuccess: 'icpay-coffee', onError: 'icpay-error' } });\nexport const IcpayDonationThermometer = createWebComponent<HTMLElement, { config?: DonationThermometerConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-donation-thermometer', { eventMap: { onSuccess: 'icpay-donation', onError: 'icpay-error' } });\nexport const IcpayProgressBar = createWebComponent<HTMLElement, {\n open?: boolean;\n steps?: Array<{ key: string; label: string; tooltip: string; status: string }>;\n amount?: number;\n currency?: string;\n ledgerSymbol?: string;\n debug?: boolean;\n theme?: ThemeConfig;\n}>('icpay-progress-bar');\n\n// Internal helpers (not exported): wallet selector is not a standalone element.\n\n\n"],"mappings":"6BAAA,OAAOA,GAAS,cAAAC,EAAY,aAAAC,EAAW,UAAAC,MAAc,QAO9C,SAASC,EACdC,EACAC,EACA,CACA,IAAMC,EAAYN,EAA6B,CAACO,EAAOC,IAAQ,CAC7D,IAAMC,EAAWP,EAAwB,IAAI,EAE7CD,EAAU,IAAM,CACd,IAAMS,EAAKD,EAAS,QACpB,GAAI,CAACC,EAAI,OAGT,GAAM,CACJ,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,GAAAC,EACA,KAAAC,EACA,SAAAC,EACA,MAAAC,EAEA,IAAKC,EACL,GAAGC,CACL,EAAIZ,EAEJ,OAAW,CAACa,EAAKC,CAAK,IAAK,OAAO,QAAQF,CAAI,EAC5C,GAAI,CACDT,EAAWU,CAAG,EAAIC,CACrB,MAAQ,CAER,CAEJ,EAAG,CAACd,CAAK,CAAC,EAGVN,EAAU,IAAM,CACd,IAAMS,EAAKD,EAAS,QACpB,GAAI,CAACC,GAAM,CAACL,GAAS,SAAU,OAC/B,IAAMiB,EAA6B,CAAC,EACpC,OAAW,CAACC,EAAUC,CAAS,IAAK,OAAO,QAAQnB,EAAQ,QAAQ,EAAG,CACpE,IAAMoB,EAAWlB,EAAcgB,CAAQ,EACvC,GAAI,OAAOE,GAAY,WAAY,CACjC,IAAMC,EAAYC,GAAa,CAC7B,IAAMC,EAAKD,EACPC,GAAM,WAAYA,EAAIH,EAAQG,EAAG,MAAM,EACtCH,EAAQE,CAAC,CAChB,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forwardRef","useEffect","useRef","createWebComponent","tagName","options","Component","props","ref","innerRef","el","children","className","style","id","role","tabIndex","title","_ignoredRef","rest","key","value","cleanup","propName","eventName","handler","listener","e","ce","fn","setRef","node","IcpayPayButton","createWebComponent","IcpayAmountInput","IcpayPremiumContent","IcpayTipJar","IcpayArticlePaywall","IcpayCoffeeShop","IcpayDonationThermometer","IcpayProgressBar"]}
1
+ {"version":3,"sources":["../../src/react/createWrapper.tsx","../../src/react/widgets.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef } from 'react';\n\ntype AnyProps = Record<string, unknown> & { children?: React.ReactNode };\n\n// Generic React wrapper for ICPay custom elements.\n// - Assigns all non-React props as properties on the underlying element\n// - Leaves events to be handled via config callbacks (recommended)\nexport function createWebComponent<TElement extends HTMLElement, TProps extends AnyProps>(\n tagName: string,\n options?: { eventMap?: Record<string, string> }\n) {\n const Component = forwardRef<TElement, TProps>((props, ref) => {\n const innerRef = useRef<TElement | null>(null);\n\n useEffect(() => {\n const el = innerRef.current as any;\n if (!el) return;\n\n // Assign props as element properties (exclude standard React DOM props)\n const {\n children,\n className,\n style,\n id,\n role,\n tabIndex,\n title,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: _ignoredRef,\n ...rest\n } = props as any;\n\n for (const [key, value] of Object.entries(rest)) {\n try {\n (el as any)[key] = value;\n } catch {\n // no-op if property assignment fails\n }\n }\n }, [props]);\n\n // Wire custom-element events from props via eventMap\n useEffect(() => {\n const el = innerRef.current as unknown as HTMLElement | null;\n if (!el || !options?.eventMap) return;\n const cleanup: Array<() => void> = [];\n for (const [propName, eventName] of Object.entries(options.eventMap)) {\n const handler = (props as any)[propName];\n if (typeof handler === 'function') {\n const listener = (e: Event) => {\n const ce = e as CustomEvent;\n if (ce && 'detail' in ce) handler(ce.detail);\n else handler(e);\n };\n el.addEventListener(eventName, listener as EventListener);\n cleanup.push(() => el.removeEventListener(eventName, listener as EventListener));\n }\n }\n return () => { cleanup.forEach(fn => fn()); };\n }, [props, options?.eventMap]);\n\n // Merge forwarded ref\n const setRef = (node: TElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref && typeof ref === 'object') {\n (ref as React.MutableRefObject<TElement | null>).current = node;\n }\n };\n\n const { children, ...rest } = props as any;\n return React.createElement(tagName, { ref: setRef, ...rest }, children);\n });\n\n Component.displayName = `ICPay(${tagName})`;\n return Component;\n}\n\n\n","import { createWebComponent } from './createWrapper';\nimport type {\n PayButtonConfig,\n AmountInputConfig,\n PremiumContentConfig,\n TipJarConfig,\n ArticlePaywallConfig,\n CoffeeShopConfig,\n DonationThermometerConfig,\n ThemeConfig\n} from '../types';\n\n// Public success detail types\nexport type IcpaySuccess = { amount?: number; tx: unknown };\nexport type IcpayCoffeeSuccess = { item: { name: string; priceUsd: number }; tx: unknown };\n\n// Public React components\nexport const IcpayPayButton = createWebComponent<HTMLElement, { config?: PayButtonConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-pay-button', { eventMap: { onSuccess: 'icpay-pay', onError: 'icpay-error' } });\nexport const IcpayAmountInput = createWebComponent<HTMLElement, { config?: AmountInputConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-amount-input', { eventMap: { onSuccess: 'icpay-amount-pay', onError: 'icpay-error' } });\nexport const IcpayPremiumContent = createWebComponent<HTMLElement, { config?: PremiumContentConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-premium-content', { eventMap: { onSuccess: 'icpay-unlock', onError: 'icpay-error' } });\nexport const IcpayTipJar = createWebComponent<HTMLElement, { config?: TipJarConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-tip-jar', { eventMap: { onSuccess: 'icpay-tip', onError: 'icpay-error' } });\nexport const IcpayArticlePaywall = createWebComponent<HTMLElement, { config?: ArticlePaywallConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-article-paywall', { eventMap: { onSuccess: 'icpay-unlock', onError: 'icpay-error' } });\nexport const IcpayCoffeeShop = createWebComponent<HTMLElement, { config?: CoffeeShopConfig; onSuccess?: (detail: IcpayCoffeeSuccess) => void; onError?: (detail: any) => void }>('icpay-coffee-shop', { eventMap: { onSuccess: 'icpay-coffee', onError: 'icpay-error' } });\nexport const IcpayDonationThermometer = createWebComponent<HTMLElement, { config?: DonationThermometerConfig; onSuccess?: (detail: IcpaySuccess) => void; onError?: (detail: any) => void }>('icpay-donation-thermometer', { eventMap: { onSuccess: 'icpay-donation', onError: 'icpay-error' } });\nexport const IcpayProgressBar = createWebComponent<HTMLElement, {\n open?: boolean;\n steps?: Array<{ key: string; label: string; tooltip: string; status: string }>;\n amount?: number;\n currency?: string;\n ledgerSymbol?: string;\n debug?: boolean;\n theme?: ThemeConfig;\n}>('icpay-progress-bar');\n\n// Internal helpers (not exported): wallet selector is not a standalone element.\n\n\n"],"mappings":"0DAAA,OAAOA,GAAS,cAAAC,EAAY,aAAAC,EAAW,UAAAC,MAAc,QAO9C,SAASC,EACdC,EACAC,EACA,CACA,IAAMC,EAAYN,EAA6B,CAACO,EAAOC,IAAQ,CAC7D,IAAMC,EAAWP,EAAwB,IAAI,EAE7CD,EAAU,IAAM,CACd,IAAMS,EAAKD,EAAS,QACpB,GAAI,CAACC,EAAI,OAGT,GAAM,CACJ,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,GAAAC,EACA,KAAAC,EACA,SAAAC,EACA,MAAAC,EAEA,IAAKC,EACL,GAAGC,CACL,EAAIZ,EAEJ,OAAW,CAACa,EAAKC,CAAK,IAAK,OAAO,QAAQF,CAAI,EAC5C,GAAI,CACDT,EAAWU,CAAG,EAAIC,CACrB,MAAQ,CAER,CAEJ,EAAG,CAACd,CAAK,CAAC,EAGVN,EAAU,IAAM,CACd,IAAMS,EAAKD,EAAS,QACpB,GAAI,CAACC,GAAM,CAACL,GAAS,SAAU,OAC/B,IAAMiB,EAA6B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AE,SAAU,CAAE,UAAW,eAAgB,QAAS,aAAc,CAAE,CAAC,EAClQK,EAAkBL,EAAkJ,oBAAqB,CAAE,SAAU,CAAE,UAAW,eAAgB,QAAS,aAAc,CAAE,CAAC,EAC5PM,EAA2BN,EAAqJ,6BAA8B,CAAE,SAAU,CAAE,UAAW,iBAAkB,QAAS,aAAc,CAAE,CAAC,EACnRO,EAAmBP,EAQ7B,oBAAoB","names":["React","forwardRef","useEffect","useRef","createWebComponent","tagName","options","Component","props","ref","innerRef","el","children","className","style","id","role","tabIndex","title","_ignoredRef","rest","key","value","cleanup","propName","eventName","handler","listener","e","ce","fn","setRef","node","IcpayPayButton","createWebComponent","IcpayAmountInput","IcpayPremiumContent","IcpayTipJar","IcpayArticlePaywall","IcpayCoffeeShop","IcpayDonationThermometer","IcpayProgressBar"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-pay/icpay-widget",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
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": {