@pollar/react 0.12.1-rc.2 → 0.12.1-rc.5
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/README.md +172 -159
- package/dist/index.css +208 -150
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +19 -11
- package/dist/index.d.ts +19 -11
- package/dist/index.js +620 -210
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +620 -210
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -419,7 +419,7 @@ interface WalletButtonTemplateProps {
|
|
|
419
419
|
* Why the wallet cannot act on-chain yet (its account is being created, or
|
|
420
420
|
* that failed), or null when it can. Shown as a banner in the dropdown, since
|
|
421
421
|
* the address itself is valid and worth copying either way. Optional, so a
|
|
422
|
-
* custom template
|
|
422
|
+
* custom template that does not read it keeps compiling.
|
|
423
423
|
*/
|
|
424
424
|
notReadyReason?: string | null;
|
|
425
425
|
/**
|
|
@@ -434,7 +434,7 @@ interface WalletButtonTemplateProps {
|
|
|
434
434
|
* Signed in with no wallet yet (an app that creates wallets on demand, or
|
|
435
435
|
* none). The button then shows the account menu instead of Login, with Create
|
|
436
436
|
* wallet only when `onCreateWallet` is set. Optional, so a custom template
|
|
437
|
-
*
|
|
437
|
+
* that does not read it keeps compiling.
|
|
438
438
|
*/
|
|
439
439
|
signedIn?: boolean;
|
|
440
440
|
creatingWallet?: boolean;
|
|
@@ -917,6 +917,8 @@ interface RampWidgetTemplateProps {
|
|
|
917
917
|
retrying?: boolean;
|
|
918
918
|
/** Runs the user's held order again; absent, a held order only says what happened. */
|
|
919
919
|
onRetryOrder?: (() => void) | undefined;
|
|
920
|
+
/** Quotes the same amount again when the price changed before anything moved; absent, only a new operation is offered. */
|
|
921
|
+
onRequote?: (() => void) | undefined;
|
|
920
922
|
/** Opens the wallet's recovery setup, for an order held until the wallet has a way to be recovered. */
|
|
921
923
|
onSetUpRecovery?: (() => void) | undefined;
|
|
922
924
|
/** Whether the wallet still has no way to be recovered; null while its state is unread. */
|
|
@@ -941,7 +943,7 @@ interface RampWidgetTemplateProps {
|
|
|
941
943
|
onRefresh: () => void;
|
|
942
944
|
onClose: () => void;
|
|
943
945
|
}
|
|
944
|
-
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
946
|
+
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
945
947
|
|
|
946
948
|
interface TransactionModalTemplateProps {
|
|
947
949
|
theme: string;
|
|
@@ -965,19 +967,23 @@ declare function TransactionModalTemplate({ theme, accentColor, styleOverrides,
|
|
|
965
967
|
|
|
966
968
|
interface TxStatusViewProps {
|
|
967
969
|
transaction: TransactionState;
|
|
970
|
+
/** Whether the details (addresses, network, fee, raw transaction, hash) are unfolded. */
|
|
968
971
|
showXdr: boolean;
|
|
972
|
+
/** Unused: the hash copies from the details. */
|
|
969
973
|
copied: boolean;
|
|
970
974
|
explorerUrl: string | null;
|
|
971
975
|
walletType?: WalletId | null | undefined;
|
|
972
976
|
onSignAndSend: () => void;
|
|
977
|
+
/** Folds and unfolds the details. */
|
|
973
978
|
onToggleXdr: () => void;
|
|
979
|
+
/** Unused: the hash copies from the details. */
|
|
974
980
|
onCopyHash: () => void;
|
|
975
981
|
onRetry?: (() => void) | undefined;
|
|
976
982
|
onDone: () => void;
|
|
977
983
|
/** Language of the status text. Defaults to the user's device; the modals pass the resolved one. */
|
|
978
984
|
language?: PollarLanguage | undefined;
|
|
979
985
|
}
|
|
980
|
-
declare function TxStatusView({ transaction, showXdr,
|
|
986
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
981
987
|
|
|
982
988
|
interface TxHistoryModalTemplateProps {
|
|
983
989
|
theme: string;
|
|
@@ -1090,7 +1096,7 @@ interface SendModalTemplateProps {
|
|
|
1090
1096
|
* picker renders only with two or more, so a single-chain app shows none.
|
|
1091
1097
|
*/
|
|
1092
1098
|
chains?: WalletChain[];
|
|
1093
|
-
/** @deprecated
|
|
1099
|
+
/** @deprecated The sender address is not shown; kept so existing templates compile. */
|
|
1094
1100
|
walletAddress?: string;
|
|
1095
1101
|
/** Can a payment be built on {@link selectedChain}? Stellar and Solana only. */
|
|
1096
1102
|
canSendOnChain: boolean;
|
|
@@ -1101,8 +1107,8 @@ interface SendModalTemplateProps {
|
|
|
1101
1107
|
* Separate from {@link canSendOnChain}: that one is about the NETWORK not
|
|
1102
1108
|
* having a transfer path, this one about the user's own account. Collapsing
|
|
1103
1109
|
* them would tell someone waiting on a brand-new wallet that Stellar does not
|
|
1104
|
-
* support sending. Optional, so a custom template
|
|
1105
|
-
*
|
|
1110
|
+
* support sending. Optional, so a custom template that does not read it keeps
|
|
1111
|
+
* compiling.
|
|
1106
1112
|
*/
|
|
1107
1113
|
notReadyReason?: string | null;
|
|
1108
1114
|
onSelectChain?: (chain: WalletChain) => void;
|
|
@@ -1133,8 +1139,8 @@ interface SendModalTemplateProps {
|
|
|
1133
1139
|
onDestinationChange: (value: string) => void;
|
|
1134
1140
|
/**
|
|
1135
1141
|
* Optional Stellar memo. The field renders only on Stellar and only when
|
|
1136
|
-
* {@link onMemoChange} is passed, so a custom template
|
|
1137
|
-
*
|
|
1142
|
+
* {@link onMemoChange} is passed, so a custom template without a memo field
|
|
1143
|
+
* keeps compiling.
|
|
1138
1144
|
*/
|
|
1139
1145
|
memo?: string;
|
|
1140
1146
|
memoType?: SendMemoType;
|
|
@@ -1246,7 +1252,7 @@ interface ReceiveModalTemplateProps {
|
|
|
1246
1252
|
*
|
|
1247
1253
|
* The address itself is valid either way - what is missing is the account
|
|
1248
1254
|
* behind it, so a payment sent now is rejected by the network. Optional, so a
|
|
1249
|
-
* custom template
|
|
1255
|
+
* custom template that does not read it keeps compiling.
|
|
1250
1256
|
*/
|
|
1251
1257
|
notReadyReason?: string | null;
|
|
1252
1258
|
/**
|
|
@@ -1306,12 +1312,14 @@ interface CosignModalTemplateProps {
|
|
|
1306
1312
|
nextStep?: string | null;
|
|
1307
1313
|
/** Language of the modal's text; the device's when not given. */
|
|
1308
1314
|
language?: PollarLanguage | undefined;
|
|
1315
|
+
/** The app's network, shown next to the chain in the details. */
|
|
1316
|
+
network?: StellarNetwork | undefined;
|
|
1309
1317
|
onSelect: (request: CosignRequest) => void;
|
|
1310
1318
|
onApprove: (request: CosignRequest) => void;
|
|
1311
1319
|
onReject: (request: CosignRequest) => void;
|
|
1312
1320
|
onClose: () => void;
|
|
1313
1321
|
}
|
|
1314
|
-
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1322
|
+
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1315
1323
|
|
|
1316
1324
|
interface CustodyMigrationModalProps {
|
|
1317
1325
|
state: CustodyMigrationState;
|
package/dist/index.d.ts
CHANGED
|
@@ -419,7 +419,7 @@ interface WalletButtonTemplateProps {
|
|
|
419
419
|
* Why the wallet cannot act on-chain yet (its account is being created, or
|
|
420
420
|
* that failed), or null when it can. Shown as a banner in the dropdown, since
|
|
421
421
|
* the address itself is valid and worth copying either way. Optional, so a
|
|
422
|
-
* custom template
|
|
422
|
+
* custom template that does not read it keeps compiling.
|
|
423
423
|
*/
|
|
424
424
|
notReadyReason?: string | null;
|
|
425
425
|
/**
|
|
@@ -434,7 +434,7 @@ interface WalletButtonTemplateProps {
|
|
|
434
434
|
* Signed in with no wallet yet (an app that creates wallets on demand, or
|
|
435
435
|
* none). The button then shows the account menu instead of Login, with Create
|
|
436
436
|
* wallet only when `onCreateWallet` is set. Optional, so a custom template
|
|
437
|
-
*
|
|
437
|
+
* that does not read it keeps compiling.
|
|
438
438
|
*/
|
|
439
439
|
signedIn?: boolean;
|
|
440
440
|
creatingWallet?: boolean;
|
|
@@ -917,6 +917,8 @@ interface RampWidgetTemplateProps {
|
|
|
917
917
|
retrying?: boolean;
|
|
918
918
|
/** Runs the user's held order again; absent, a held order only says what happened. */
|
|
919
919
|
onRetryOrder?: (() => void) | undefined;
|
|
920
|
+
/** Quotes the same amount again when the price changed before anything moved; absent, only a new operation is offered. */
|
|
921
|
+
onRequote?: (() => void) | undefined;
|
|
920
922
|
/** Opens the wallet's recovery setup, for an order held until the wallet has a way to be recovered. */
|
|
921
923
|
onSetUpRecovery?: (() => void) | undefined;
|
|
922
924
|
/** Whether the wallet still has no way to be recovered; null while its state is unread. */
|
|
@@ -941,7 +943,7 @@ interface RampWidgetTemplateProps {
|
|
|
941
943
|
onRefresh: () => void;
|
|
942
944
|
onClose: () => void;
|
|
943
945
|
}
|
|
944
|
-
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
946
|
+
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
945
947
|
|
|
946
948
|
interface TransactionModalTemplateProps {
|
|
947
949
|
theme: string;
|
|
@@ -965,19 +967,23 @@ declare function TransactionModalTemplate({ theme, accentColor, styleOverrides,
|
|
|
965
967
|
|
|
966
968
|
interface TxStatusViewProps {
|
|
967
969
|
transaction: TransactionState;
|
|
970
|
+
/** Whether the details (addresses, network, fee, raw transaction, hash) are unfolded. */
|
|
968
971
|
showXdr: boolean;
|
|
972
|
+
/** Unused: the hash copies from the details. */
|
|
969
973
|
copied: boolean;
|
|
970
974
|
explorerUrl: string | null;
|
|
971
975
|
walletType?: WalletId | null | undefined;
|
|
972
976
|
onSignAndSend: () => void;
|
|
977
|
+
/** Folds and unfolds the details. */
|
|
973
978
|
onToggleXdr: () => void;
|
|
979
|
+
/** Unused: the hash copies from the details. */
|
|
974
980
|
onCopyHash: () => void;
|
|
975
981
|
onRetry?: (() => void) | undefined;
|
|
976
982
|
onDone: () => void;
|
|
977
983
|
/** Language of the status text. Defaults to the user's device; the modals pass the resolved one. */
|
|
978
984
|
language?: PollarLanguage | undefined;
|
|
979
985
|
}
|
|
980
|
-
declare function TxStatusView({ transaction, showXdr,
|
|
986
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
981
987
|
|
|
982
988
|
interface TxHistoryModalTemplateProps {
|
|
983
989
|
theme: string;
|
|
@@ -1090,7 +1096,7 @@ interface SendModalTemplateProps {
|
|
|
1090
1096
|
* picker renders only with two or more, so a single-chain app shows none.
|
|
1091
1097
|
*/
|
|
1092
1098
|
chains?: WalletChain[];
|
|
1093
|
-
/** @deprecated
|
|
1099
|
+
/** @deprecated The sender address is not shown; kept so existing templates compile. */
|
|
1094
1100
|
walletAddress?: string;
|
|
1095
1101
|
/** Can a payment be built on {@link selectedChain}? Stellar and Solana only. */
|
|
1096
1102
|
canSendOnChain: boolean;
|
|
@@ -1101,8 +1107,8 @@ interface SendModalTemplateProps {
|
|
|
1101
1107
|
* Separate from {@link canSendOnChain}: that one is about the NETWORK not
|
|
1102
1108
|
* having a transfer path, this one about the user's own account. Collapsing
|
|
1103
1109
|
* them would tell someone waiting on a brand-new wallet that Stellar does not
|
|
1104
|
-
* support sending. Optional, so a custom template
|
|
1105
|
-
*
|
|
1110
|
+
* support sending. Optional, so a custom template that does not read it keeps
|
|
1111
|
+
* compiling.
|
|
1106
1112
|
*/
|
|
1107
1113
|
notReadyReason?: string | null;
|
|
1108
1114
|
onSelectChain?: (chain: WalletChain) => void;
|
|
@@ -1133,8 +1139,8 @@ interface SendModalTemplateProps {
|
|
|
1133
1139
|
onDestinationChange: (value: string) => void;
|
|
1134
1140
|
/**
|
|
1135
1141
|
* Optional Stellar memo. The field renders only on Stellar and only when
|
|
1136
|
-
* {@link onMemoChange} is passed, so a custom template
|
|
1137
|
-
*
|
|
1142
|
+
* {@link onMemoChange} is passed, so a custom template without a memo field
|
|
1143
|
+
* keeps compiling.
|
|
1138
1144
|
*/
|
|
1139
1145
|
memo?: string;
|
|
1140
1146
|
memoType?: SendMemoType;
|
|
@@ -1246,7 +1252,7 @@ interface ReceiveModalTemplateProps {
|
|
|
1246
1252
|
*
|
|
1247
1253
|
* The address itself is valid either way - what is missing is the account
|
|
1248
1254
|
* behind it, so a payment sent now is rejected by the network. Optional, so a
|
|
1249
|
-
* custom template
|
|
1255
|
+
* custom template that does not read it keeps compiling.
|
|
1250
1256
|
*/
|
|
1251
1257
|
notReadyReason?: string | null;
|
|
1252
1258
|
/**
|
|
@@ -1306,12 +1312,14 @@ interface CosignModalTemplateProps {
|
|
|
1306
1312
|
nextStep?: string | null;
|
|
1307
1313
|
/** Language of the modal's text; the device's when not given. */
|
|
1308
1314
|
language?: PollarLanguage | undefined;
|
|
1315
|
+
/** The app's network, shown next to the chain in the details. */
|
|
1316
|
+
network?: StellarNetwork | undefined;
|
|
1309
1317
|
onSelect: (request: CosignRequest) => void;
|
|
1310
1318
|
onApprove: (request: CosignRequest) => void;
|
|
1311
1319
|
onReject: (request: CosignRequest) => void;
|
|
1312
1320
|
onClose: () => void;
|
|
1313
1321
|
}
|
|
1314
|
-
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1322
|
+
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1315
1323
|
|
|
1316
1324
|
interface CustodyMigrationModalProps {
|
|
1317
1325
|
state: CustodyMigrationState;
|