@pollar/react 0.12.1-rc.17 → 0.12.1-rc.18

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.mts CHANGED
@@ -1217,6 +1217,15 @@ interface RampWidgetTemplateProps {
1217
1217
  onAssetChange: (key: string) => void;
1218
1218
  onAmountChange: (value: string) => void;
1219
1219
  onFindRoute: () => void;
1220
+ /** The amount screen is quoting what was typed. */
1221
+ quoting?: boolean;
1222
+ /** `BEST_ROUTE`, or the key of the route the user picked in the details. */
1223
+ routeChoice?: string;
1224
+ /** The route Continue takes: the picked one, else the best. */
1225
+ chosenQuote?: RampQuote | null;
1226
+ onRouteChoice?: (choice: string) => void;
1227
+ /** Takes the chosen route, or opens every route when none could be quoted. */
1228
+ onContinue?: () => void;
1220
1229
  onSelectQuote: (quote: RampQuote) => void;
1221
1230
  /** Opens the verification step a dropped route waits on. */
1222
1231
  onVerifyRoute?: (requirement: RampQuoteRequirement) => void;
@@ -1270,7 +1279,7 @@ interface RampWidgetTemplateProps {
1270
1279
  /** A leg's signature waiting for the user's yes, answered in the status view. */
1271
1280
  confirmation?: PendingConfirmation | null | undefined;
1272
1281
  }
1273
- 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, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
1282
+ 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, quoting, routeChoice, chosenQuote, onRouteChoice, onContinue, 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, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
1274
1283
 
1275
1284
  interface TransactionModalTemplateProps {
1276
1285
  theme: string;
@@ -1435,6 +1444,14 @@ interface WalletBalanceModalTemplateProps {
1435
1444
  }
1436
1445
  declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, assetMetadata, chains, selectedChain, network, onSelectChain, onRefresh, onClose, language: languageProp, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
1437
1446
 
1447
+ /** Adding or removing an asset from this modal, and where that trustline change stands. */
1448
+ interface AssetOutcome {
1449
+ code: string;
1450
+ removing: boolean;
1451
+ state: 'busy' | 'done' | 'failed';
1452
+ /** Why it failed, ready to show. */
1453
+ note?: string;
1454
+ }
1438
1455
  interface EnabledAssetsModalTemplateProps {
1439
1456
  theme: string;
1440
1457
  accentColor: string;
@@ -1449,7 +1466,8 @@ interface EnabledAssetsModalTemplateProps {
1449
1466
  onSelectChain: (chain: WalletChain) => void;
1450
1467
  /** Key (`code+issuer`) of the asset whose trustline action is in flight. */
1451
1468
  busyKey: string | null;
1452
- actionError: string | null;
1469
+ outcome: AssetOutcome | null;
1470
+ confirmation?: PendingConfirmation | null | undefined;
1453
1471
  onRefresh: () => void;
1454
1472
  onClose: () => void;
1455
1473
  onToggleTrustline: (record: EnabledAssetRecord) => void;
@@ -1457,14 +1475,15 @@ interface EnabledAssetsModalTemplateProps {
1457
1475
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1458
1476
  language?: PollarLanguage | undefined;
1459
1477
  }
1460
- declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
+ declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, outcome, confirmation, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1461
1479
  interface CustomTrustlineModalTemplateProps {
1462
1480
  theme: string;
1463
1481
  accentColor: string;
1464
1482
  /** Per-app modal chrome overrides (background, card + button radius). */
1465
1483
  styleOverrides?: ModalStyleOverrides;
1466
1484
  busy: boolean;
1467
- actionError: string | null;
1485
+ outcome: AssetOutcome | null;
1486
+ confirmation?: PendingConfirmation | null | undefined;
1468
1487
  onBack: () => void;
1469
1488
  onClose: () => void;
1470
1489
  onSubmit: (input: {
package/dist/index.d.ts CHANGED
@@ -1217,6 +1217,15 @@ interface RampWidgetTemplateProps {
1217
1217
  onAssetChange: (key: string) => void;
1218
1218
  onAmountChange: (value: string) => void;
1219
1219
  onFindRoute: () => void;
1220
+ /** The amount screen is quoting what was typed. */
1221
+ quoting?: boolean;
1222
+ /** `BEST_ROUTE`, or the key of the route the user picked in the details. */
1223
+ routeChoice?: string;
1224
+ /** The route Continue takes: the picked one, else the best. */
1225
+ chosenQuote?: RampQuote | null;
1226
+ onRouteChoice?: (choice: string) => void;
1227
+ /** Takes the chosen route, or opens every route when none could be quoted. */
1228
+ onContinue?: () => void;
1220
1229
  onSelectQuote: (quote: RampQuote) => void;
1221
1230
  /** Opens the verification step a dropped route waits on. */
1222
1231
  onVerifyRoute?: (requirement: RampQuoteRequirement) => void;
@@ -1270,7 +1279,7 @@ interface RampWidgetTemplateProps {
1270
1279
  /** A leg's signature waiting for the user's yes, answered in the status view. */
1271
1280
  confirmation?: PendingConfirmation | null | undefined;
1272
1281
  }
1273
- 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, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
1282
+ 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, quoting, routeChoice, chosenQuote, onRouteChoice, onContinue, 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, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
1274
1283
 
1275
1284
  interface TransactionModalTemplateProps {
1276
1285
  theme: string;
@@ -1435,6 +1444,14 @@ interface WalletBalanceModalTemplateProps {
1435
1444
  }
1436
1445
  declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, assetMetadata, chains, selectedChain, network, onSelectChain, onRefresh, onClose, language: languageProp, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
1437
1446
 
1447
+ /** Adding or removing an asset from this modal, and where that trustline change stands. */
1448
+ interface AssetOutcome {
1449
+ code: string;
1450
+ removing: boolean;
1451
+ state: 'busy' | 'done' | 'failed';
1452
+ /** Why it failed, ready to show. */
1453
+ note?: string;
1454
+ }
1438
1455
  interface EnabledAssetsModalTemplateProps {
1439
1456
  theme: string;
1440
1457
  accentColor: string;
@@ -1449,7 +1466,8 @@ interface EnabledAssetsModalTemplateProps {
1449
1466
  onSelectChain: (chain: WalletChain) => void;
1450
1467
  /** Key (`code+issuer`) of the asset whose trustline action is in flight. */
1451
1468
  busyKey: string | null;
1452
- actionError: string | null;
1469
+ outcome: AssetOutcome | null;
1470
+ confirmation?: PendingConfirmation | null | undefined;
1453
1471
  onRefresh: () => void;
1454
1472
  onClose: () => void;
1455
1473
  onToggleTrustline: (record: EnabledAssetRecord) => void;
@@ -1457,14 +1475,15 @@ interface EnabledAssetsModalTemplateProps {
1457
1475
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1458
1476
  language?: PollarLanguage | undefined;
1459
1477
  }
1460
- declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
+ declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, outcome, confirmation, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1461
1479
  interface CustomTrustlineModalTemplateProps {
1462
1480
  theme: string;
1463
1481
  accentColor: string;
1464
1482
  /** Per-app modal chrome overrides (background, card + button radius). */
1465
1483
  styleOverrides?: ModalStyleOverrides;
1466
1484
  busy: boolean;
1467
- actionError: string | null;
1485
+ outcome: AssetOutcome | null;
1486
+ confirmation?: PendingConfirmation | null | undefined;
1468
1487
  onBack: () => void;
1469
1488
  onClose: () => void;
1470
1489
  onSubmit: (input: {