@openreceive/react 0.2.3 → 0.2.4
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/index.d.ts +28 -2
- package/dist/index.js +229 -214
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CheckoutComponentProps, CheckoutState, QrEncoder, BrowserLoggerOption, CheckoutStatusRefresh, Status, CheckoutSnapshot, BrowserLogContext, CheckoutInvoiceSnapshot, ThemePreference, ResolvedTheme, ThemeModel, PaymentDataSource, CheckoutPhase, CheckoutStatusModel, UnixSeconds, BrowserLogger, TransactionDetailsSource } from '@openreceive/browser/headless';
|
|
2
|
+
import { CheckoutComponentProps, CheckoutState, QrEncoder, BrowserLoggerOption, CheckoutStatusRefresh, Status, CheckoutSnapshot, AssetUrlResolver, BrowserLogContext, CheckoutInvoiceSnapshot, ThemePreference, ResolvedTheme, ThemeModel, PaymentDataSource, CheckoutPhase, CheckoutStatusModel, UnixSeconds, BrowserLogger, TransactionDetailsSource } from '@openreceive/browser/headless';
|
|
3
3
|
export { TransactionDetailsSource, resolveTransactionDetailRows } from '@openreceive/browser/headless';
|
|
4
4
|
|
|
5
5
|
interface CheckoutData {
|
|
@@ -152,7 +152,16 @@ interface CheckoutProps extends CheckoutComponentProps, CheckoutEventHandlers, O
|
|
|
152
152
|
readonly refreshStatus?: CheckoutStatusRefresh;
|
|
153
153
|
readonly components?: CheckoutComponents;
|
|
154
154
|
readonly classNames?: CheckoutClassNames;
|
|
155
|
+
/**
|
|
156
|
+
* Render-prop or plain node rendered inside the checkout, above the payment
|
|
157
|
+
* panel. The slot for order context — a line-item summary, a thumbnail, a
|
|
158
|
+
* "you are buying" strip — which the shipped checkout otherwise never shows:
|
|
159
|
+
* it renders the amount, never the order. The function form receives the live
|
|
160
|
+
* `useCheckout` model.
|
|
161
|
+
*/
|
|
155
162
|
readonly children?: CheckoutChildren;
|
|
163
|
+
/** Passed through to the payment wizard. See {@link PaymentWizardProps.resolveAssetUrl}. */
|
|
164
|
+
readonly resolveAssetUrl?: AssetUrlResolver;
|
|
156
165
|
}
|
|
157
166
|
interface UseThemeOptions {
|
|
158
167
|
readonly defaultTheme?: ThemePreference;
|
|
@@ -212,6 +221,14 @@ interface PaymentWizardProps {
|
|
|
212
221
|
readonly qrEncoder?: QrEncoder;
|
|
213
222
|
/** Base URL of an external bolt11 decoder; omitted, no "Decode" link is rendered. */
|
|
214
223
|
readonly decodeLinkUrl?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Rewrite a packaged asset path (`assets/provider-icons/strike.png`,
|
|
226
|
+
* `assets/icons/btc.svg`) into a URL this host can serve. The packaged URLs
|
|
227
|
+
* only resolve under Vite/Rollup; every other bundler needs this, or the
|
|
228
|
+
* method icons, provider logos and pay tutorials come out as dead `file://`
|
|
229
|
+
* links. See docs/guides/provider-registry.md.
|
|
230
|
+
*/
|
|
231
|
+
readonly resolveAssetUrl?: AssetUrlResolver;
|
|
215
232
|
readonly onError?: (error: unknown) => void;
|
|
216
233
|
/**
|
|
217
234
|
* Called when the payer enters or leaves the focused swap flow (a pay-in coin is
|
|
@@ -266,7 +283,16 @@ declare function QRCode(props: QRCodeProps): React.ReactElement;
|
|
|
266
283
|
declare function CopyInvoiceButton(props: CopyInvoiceButtonProps): React.ReactElement;
|
|
267
284
|
declare function OpenWalletButton(props: OpenWalletButtonProps): React.ReactElement;
|
|
268
285
|
declare function PaymentState(props: PaymentStateProps): React.ReactElement;
|
|
269
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* Collapsible "everything the client knows about this payment" panel.
|
|
288
|
+
*
|
|
289
|
+
* @deprecated Superseded by `<TransactionDetails>`, which the shipped checkout
|
|
290
|
+
* now renders on settlement. This one has no copy button, no explorer link and
|
|
291
|
+
* no truncation contract, and its rows are a strict subset — so the payer's
|
|
292
|
+
* most keep-worthy screen had the least usable copy of the values it shows.
|
|
293
|
+
* Kept exported so an integrator who mounted it directly is not broken; new
|
|
294
|
+
* code should use `<TransactionDetails>`.
|
|
295
|
+
*/
|
|
270
296
|
declare function PaymentData(props: {
|
|
271
297
|
readonly source: PaymentDataSource;
|
|
272
298
|
readonly className?: string;
|