@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.60
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 +22 -6
- package/dist/KitProvider.d.ts +61 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/activity/driver/index.d.ts +3 -0
- package/dist/_internal/activity/driver/index.js +1 -0
- package/dist/_internal/deposit/driver/index.d.ts +2 -2
- package/dist/_internal/drivers/stridge/index.d.ts +4 -2
- package/dist/_internal/drivers/stridge/index.js +1 -1
- package/dist/_internal/drivers/stridge-mock/index.d.ts +2 -1
- package/dist/_internal/drivers/stridge-mock/index.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/activity/compound/index.d.ts +19 -0
- package/dist/activity/compound/index.js +1 -0
- package/dist/activity/dialog/index.d.ts +4 -0
- package/dist/activity/dialog/index.js +1 -0
- package/dist/activity/widgets/index.d.ts +5 -0
- package/dist/activity/widgets/index.js +1 -0
- package/dist/deposit/compound/index.d.ts +22 -15
- package/dist/deposit/compound/index.js +1 -1
- package/dist/deposit/dialog/index.d.ts +2 -1
- package/dist/deposit/widgets/index.d.ts +16 -0
- package/dist/deposit/widgets/index.js +1 -0
- package/dist/drivers/stridge/catalog.d.ts +54 -0
- package/dist/drivers/stridge/catalog.js +1 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
- package/dist/drivers/stridge/internal/pollOnce.js +1 -1
- package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
- package/dist/drivers/stridge/internal/retry.js +1 -0
- package/dist/drivers/stridge/internal/supportedChains.js +1 -0
- package/dist/drivers/stridge/types.d.ts +20 -14
- package/dist/drivers/stridge/types.js +1 -1
- package/dist/drivers/stridge/wagmiSigner.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -2
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +14 -12
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/events/bus/createBus.d.ts +26 -0
- package/dist/events/bus/createBus.js +1 -0
- package/dist/events/bus/flowIdRegistry.d.ts +17 -0
- package/dist/events/bus/flowIdRegistry.js +1 -0
- package/dist/events/bus/index.js +1 -0
- package/dist/events/bus/metadata.js +1 -0
- package/dist/events/context.js +1 -0
- package/dist/events/emit/index.js +1 -0
- package/dist/events/emit/mapFailure.js +1 -0
- package/dist/events/emit/useActivityEmissions.js +1 -0
- package/dist/events/emit/useDepositEmissions.js +1 -0
- package/dist/events/emit/useKitEmitter.js +1 -0
- package/dist/events/emit/useWithdrawEmissions.js +1 -0
- package/dist/events/hooks/index.d.ts +6 -0
- package/dist/events/hooks/index.js +1 -0
- package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
- package/dist/events/hooks/useCurrentFlowId.js +1 -0
- package/dist/events/hooks/useStableHandler.js +1 -0
- package/dist/events/hooks/useStridgeEvent.d.ts +9 -0
- package/dist/events/hooks/useStridgeEvent.js +1 -0
- package/dist/events/hooks/useStridgeEventBus.d.ts +34 -0
- package/dist/events/hooks/useStridgeEventBus.js +1 -0
- package/dist/events/hooks/useStridgeEvents.d.ts +7 -0
- package/dist/events/hooks/useStridgeEvents.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
- package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
- package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +1 -0
- package/dist/events/publish.js +1 -0
- package/dist/events/redact.d.ts +34 -0
- package/dist/events/redact.js +1 -0
- package/dist/events/types/activity.d.ts +53 -0
- package/dist/events/types/deposit.d.ts +235 -0
- package/dist/events/types/envelope.d.ts +145 -0
- package/dist/events/types/index.d.ts +32 -0
- package/dist/events/types/kit.d.ts +23 -0
- package/dist/events/types/withdraw.d.ts +150 -0
- package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
- package/dist/flows/activity/compound/ActivityFlow.js +1 -0
- package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/activity/compound/components/Boundary.js +1 -0
- package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
- package/dist/flows/activity/compound/components/Steps.js +1 -0
- package/dist/flows/activity/dialog/ActivityDialog.d.ts +55 -0
- package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
- package/dist/flows/activity/driver/context.d.ts +38 -0
- package/dist/flows/activity/driver/context.js +1 -0
- package/dist/flows/activity/driver/types.d.ts +58 -0
- package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
- package/dist/flows/activity/orchestrator/controller.js +1 -0
- package/dist/flows/activity/orchestrator/index.d.ts +4 -0
- package/dist/flows/activity/orchestrator/index.js +1 -0
- package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/activity/orchestrator/reducer.js +1 -0
- package/dist/flows/activity/orchestrator/types.d.ts +71 -0
- package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
- package/dist/flows/activity/orchestrator/useActivity.js +1 -0
- package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
- package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
- package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
- package/dist/flows/activity/widgets/ActivityList.js +1 -0
- package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
- package/dist/flows/deposit/bindings/DepositBindings.d.ts +87 -0
- package/dist/flows/deposit/bindings/DepositBindings.js +1 -0
- package/dist/flows/deposit/bindings/index.d.ts +1 -0
- package/dist/flows/deposit/bindings/index.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.d.ts +26 -79
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
- package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
- package/dist/flows/deposit/driver/payloads.d.ts +52 -5
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/types.d.ts +37 -4
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/index.d.ts +5 -0
- package/dist/flows/deposit/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +228 -7
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/shared/cash.d.ts +20 -0
- package/dist/flows/deposit/shared/cash.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.d.ts +40 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
- package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/activity/index.js +1 -0
- package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +24 -4
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
- package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.d.ts +71 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts +69 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts +18 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts +42 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts +63 -0
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.d.ts +54 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.d.ts +33 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/cashConfirmDimensions.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.d.ts +15 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.d.ts +22 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/BodyLabel.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.icons.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.keys.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.state.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts +21 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts +17 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/cardFormat.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/types.d.ts +66 -0
- package/dist/flows/deposit/widgets/cash-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/mocks.js +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +39 -4
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +58 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +6 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +11 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +7 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.d.ts +40 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +16 -9
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.d.ts +18 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.d.ts +43 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +2 -1
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +106 -4
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
- package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
- package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +6 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
- package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
- package/dist/flows/shared/transformers/index.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
- package/dist/flows/shared/transformers/testnets.js +1 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
- package/dist/flows/withdraw/bindings/index.d.ts +1 -0
- package/dist/flows/withdraw/bindings/index.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +44 -71
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/dto.d.ts +8 -7
- package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
- package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +77 -14
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +218 -35
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.d.ts +39 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
- package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
- package/dist/flows/withdraw/widgets/activity/index.js +1 -0
- package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
- package/dist/format/index.d.ts +2 -1
- package/dist/format/index.js +1 -1
- package/dist/i18n/index.d.ts +5 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +12 -0
- package/dist/i18n/locales/source-keys.js +0 -0
- package/dist/icons/index.d.ts +12 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +36 -11
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +27 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +24 -1
- package/dist/scope/index.d.ts +1 -1
- package/dist/shared/attribution/Attribution.js +1 -0
- package/dist/shared/attribution/Attribution.slots.js +1 -0
- package/dist/shared/attribution/Attribution.styles.js +1 -0
- package/dist/shared/attribution/index.js +1 -0
- package/dist/shared/chains/index.d.ts +48 -29
- package/dist/shared/chains/index.js +1 -1
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/cuer/Cuer.js +1 -1
- package/dist/shared/dialog/DialogShell.d.ts +21 -6
- package/dist/shared/dialog/DialogShell.js +1 -1
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/LoadingState.js +1 -0
- package/dist/shared/dialog/LoadingState.styles.js +1 -0
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/format/formatSmartRelative.d.ts +25 -0
- package/dist/shared/format/formatSmartRelative.js +1 -0
- package/dist/shared/format/formatUsd.js +1 -1
- package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
- package/dist/shared/i18n/KitI18nProvider.js +1 -1
- package/dist/shared/i18n/createKitI18n.d.ts +79 -16
- package/dist/shared/i18n/createKitI18n.js +1 -1
- package/dist/shared/i18n/useLingui.d.ts +11 -3
- package/dist/shared/icons/ActivityIcon.d.ts +12 -0
- package/dist/shared/icons/ActivityIcon.js +1 -0
- package/dist/shared/icons/AmexIcon.d.ts +14 -0
- package/dist/shared/icons/AmexIcon.js +1 -0
- package/dist/shared/icons/ApplePayIcon.d.ts +15 -0
- package/dist/shared/icons/ApplePayIcon.js +1 -0
- package/dist/shared/icons/BitcoinIcon.d.ts +17 -0
- package/dist/shared/icons/BitcoinIcon.js +1 -0
- package/dist/shared/icons/CardIcon.d.ts +16 -0
- package/dist/shared/icons/CardIcon.js +1 -0
- package/dist/shared/icons/CashIcon.d.ts +16 -0
- package/dist/shared/icons/CashIcon.js +1 -0
- package/dist/shared/icons/DiscoverIcon.d.ts +14 -0
- package/dist/shared/icons/DiscoverIcon.js +1 -0
- package/dist/shared/icons/GooglePayIcon.d.ts +15 -0
- package/dist/shared/icons/GooglePayIcon.js +1 -0
- package/dist/shared/icons/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/icons/MastercardIcon.d.ts +16 -0
- package/dist/shared/icons/MastercardIcon.js +1 -0
- package/dist/shared/icons/VisaIcon.d.ts +15 -0
- package/dist/shared/icons/VisaIcon.js +1 -0
- package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLink.js +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
- package/dist/shared/merchant-link/index.d.ts +1 -0
- package/dist/shared/merchant-link/index.js +1 -0
- package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
- package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
- package/dist/shared/orchestrator/createActivityReducers.js +1 -0
- package/dist/shared/orchestrator/index.d.ts +2 -0
- package/dist/shared/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
- package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
- package/dist/shared/orchestrator/toFailure.js +1 -1
- package/dist/shared/orchestrator/types.d.ts +8 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/presentation/index.js +1 -0
- package/dist/shared/presentation/types.d.ts +30 -0
- package/dist/shared/presentation/types.js +1 -0
- package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportConfigContext.d.ts +1 -0
- package/dist/shared/support/SupportConfigContext.js +1 -0
- package/dist/shared/support/SupportLink.d.ts +1 -0
- package/dist/shared/support/SupportLink.js +1 -0
- package/dist/shared/support/SupportSpinner.d.ts +1 -0
- package/dist/shared/support/SupportSpinner.js +1 -0
- package/dist/shared/support/index.d.ts +2 -0
- package/dist/shared/support/index.js +1 -0
- package/dist/shared/support/intercom-loader.d.ts +17 -0
- package/dist/shared/support/intercom-loader.js +1 -0
- package/dist/shared/support/types.d.ts +43 -0
- package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
- package/dist/shared/support/useIntercomMerchantContext.js +1 -0
- package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
- package/dist/shared/support/useMerchantContext.d.ts +1 -0
- package/dist/shared/support/useMerchantContext.js +1 -0
- package/dist/shared/support/useSupportTrigger.js +1 -0
- package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
- package/dist/shared/terms/TermsConfigContext.js +1 -0
- package/dist/shared/terms/TermsLink.d.ts +1 -0
- package/dist/shared/terms/TermsLink.js +1 -0
- package/dist/shared/terms/index.d.ts +1 -0
- package/dist/shared/terms/index.js +1 -0
- package/dist/shared/terms/types.d.ts +43 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
- package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
- package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +12 -9
- package/dist/shared/ui/Card/Card.js +1 -1
- package/dist/shared/ui/Card/Card.styles.js +1 -1
- package/dist/shared/ui/Details/Details.d.ts +9 -1
- package/dist/shared/ui/Details/Details.styles.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
- package/dist/shared/ui/Dialog/Dialog.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
- package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
- package/dist/shared/ui/Drawer/Drawer.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
- package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
- package/dist/shared/ui/Drawer/index.d.ts +2 -0
- package/dist/shared/ui/Drawer/index.js +1 -0
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
- package/dist/shared/ui/Steps/Steps.d.ts +52 -0
- package/dist/shared/ui/Steps/Steps.js +1 -0
- package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
- package/dist/shared/ui/Steps/Steps.slots.js +1 -0
- package/dist/shared/ui/Steps/Steps.styles.js +1 -0
- package/dist/shared/ui/Steps/index.d.ts +2 -0
- package/dist/shared/ui/Steps/index.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +79 -0
- package/dist/shared/ui/Tabs/Tabs.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.slots.d.ts +11 -0
- package/dist/shared/ui/Tabs/Tabs.slots.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.styles.js +1 -0
- package/dist/shared/ui/Tabs/index.d.ts +2 -0
- package/dist/shared/ui/Tabs/index.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
- package/dist/shared/ui/surfaceContext.d.ts +9 -0
- package/dist/shared/ui/surfaceContext.js +1 -0
- package/dist/shared/utils/assertNever.js +1 -0
- package/dist/shared/utils/logos/types.d.ts +1 -1
- package/dist/shared/utils/useDeepMemo.js +1 -0
- package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
- package/dist/shared/wallet/ConnectWalletContext.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.styles.js +1 -0
- package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/Activity.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.d.ts +82 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
- package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.d.ts +39 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.d.ts +26 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
- package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
- package/dist/shared/widgets/activity/compound/components/List.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Row.d.ts +51 -0
- package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
- package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
- package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/context.js +1 -0
- package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
- package/dist/shared/widgets/activity/compound/index.js +1 -0
- package/dist/shared/widgets/activity/index.js +1 -0
- package/dist/shared/widgets/activity/payloads.d.ts +108 -0
- package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
- package/dist/shared/widgets/activity/transformers/resolveDirection.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +10 -2
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +6 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Details.d.ts +34 -0
- package/dist/shared/widgets/amount-entry/compound/components/Details.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +2 -1
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
- package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/index.d.ts +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +63 -3
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +3 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +2 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/asset-picker/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +15 -1
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
- package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
- package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
- package/dist/storage/context.d.ts +9 -1
- package/dist/storage/context.js +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/stridge/StridgeProvider.d.ts +187 -35
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/depositOwner.js +1 -0
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +607 -12
- package/dist/types.d.ts +7 -5
- package/dist/ui/index.d.ts +9 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.d.ts +10 -0
- package/dist/version.js +1 -0
- package/dist/withdraw/compound/index.d.ts +11 -8
- package/dist/withdraw/compound/index.js +1 -1
- package/dist/withdraw/dialog/index.d.ts +4 -1
- package/dist/withdraw/widgets/index.d.ts +7 -0
- package/dist/withdraw/widgets/index.js +1 -0
- package/package.json +31 -7
- package/dist/_internal/deposit/widgets/index.d.ts +0 -11
- package/dist/_internal/deposit/widgets/index.js +0 -1
- package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
- package/dist/_internal/withdraw/widgets/index.js +0 -1
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
- package/dist/stridge/StridgeContext.d.ts +0 -29
- package/dist/stridge/StridgeContext.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TxRef } from "../../../shared/driver/types.js";
|
|
2
2
|
import { BalanceItemPayload } from "../driver/payloads.js";
|
|
3
3
|
import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
4
|
-
|
|
5
4
|
//#region src/flows/deposit/orchestrator/types.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Deposit method picked on the `Deposit` widget. `wallet` enters Path A
|
|
@@ -9,6 +8,80 @@ import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
|
9
8
|
* (transfer-crypto → process).
|
|
10
9
|
*/
|
|
11
10
|
type DepositMethod = "wallet" | "transfer";
|
|
11
|
+
/**
|
|
12
|
+
* Cash-rail method id. Mirrors the keys on `CashMethodsPayload` (`card` / `applePay` / `googlePay`)
|
|
13
|
+
* so the picker tile, the chosen-method chip, and the FSM ctx all share one vocabulary. Routed
|
|
14
|
+
* through its own `CASH_METHOD_SELECTED` reducer event (separate from `DEPOSIT_METHOD_SELECTED`)
|
|
15
|
+
* because the cash rail lands in a method-specific amount-entry surface today and per-method
|
|
16
|
+
* confirm forms tomorrow.
|
|
17
|
+
*/
|
|
18
|
+
type CashMethodId = "card" | "applePay" | "googlePay";
|
|
19
|
+
/**
|
|
20
|
+
* Host-supplied disable lever for a single payment method on the deposit-method picker. The host
|
|
21
|
+
* decides eligibility — the kit ships no per-host inference (embedded vs. external wallet,
|
|
22
|
+
* region, KYC tier, …). When `disabled` is true the tile stays in the picker (preserves
|
|
23
|
+
* discoverability), renders natively disabled, can't be selected, and shows `disabledHint` as
|
|
24
|
+
* the inline meta line below the title (also folded into the tile's accessible name so screen
|
|
25
|
+
* readers convey the reason).
|
|
26
|
+
*/
|
|
27
|
+
interface DepositMethodConfig {
|
|
28
|
+
/** When true, the method is rendered disabled and can't be selected. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Plain-text reason shown inline as the tile's meta line — replaces the address+balance
|
|
32
|
+
* reading on the wallet tile and the `"No limit · Instant"` reading on the transfer tile so
|
|
33
|
+
* the explanation is unmissable and the auto-derived signals (which can read misleadingly,
|
|
34
|
+
* e.g. an embedded wallet's $0.00) are suppressed. Also folded into the tile's accessible
|
|
35
|
+
* name so screen readers convey it alongside the title. Ignored when `disabled` is falsy.
|
|
36
|
+
*/
|
|
37
|
+
disabledHint?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Per-rail host configuration for the deposit picker. Distinct from
|
|
41
|
+
* {@link DepositMethodConfig} — a rail toggle removes the rail tab entirely
|
|
42
|
+
* from the `RailPicker` rather than disabling a single tile, so there is no
|
|
43
|
+
* `disabledHint` slot (there is no tile to surface the hint on). When only
|
|
44
|
+
* one rail remains after filtering, the orchestrated widget's default
|
|
45
|
+
* composition collapses the `RailPicker` chrome and renders the surviving
|
|
46
|
+
* rail's content directly at the body root.
|
|
47
|
+
*/
|
|
48
|
+
interface DepositRailConfig {
|
|
49
|
+
/**
|
|
50
|
+
* Opt-IN gate for the rail. The cash rail is hidden by default — hosts that want
|
|
51
|
+
* the `Use Cash` tab in their picker must set `enabled: true` and have a driver that
|
|
52
|
+
* surfaces the matching entity (e.g. `cashMethods`). Crypto-only integrators upgrade
|
|
53
|
+
* transparently because the default is `enabled !== true`. Set explicitly to `false`
|
|
54
|
+
* is equivalent to leaving it unset.
|
|
55
|
+
*/
|
|
56
|
+
enabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Legacy opt-OUT toggle. Kept for back-compatibility with the brief window where the
|
|
59
|
+
* rail shipped on by default and integrators had to set this to hide it. New code
|
|
60
|
+
* should prefer {@link DepositRailConfig.enabled}; setting `disabled: true` continues
|
|
61
|
+
* to hide the rail regardless of `enabled`.
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Per-method host configuration for the deposit picker. Omitting a method (or the whole object)
|
|
67
|
+
* keeps default behavior; supply `{ disabled: true, disabledHint: "…" }` to mark an option as
|
|
68
|
+
* unavailable for the current user. `cashRail` is a rail-level toggle — see
|
|
69
|
+
* {@link DepositRailConfig}.
|
|
70
|
+
*
|
|
71
|
+
* Cash-method keys (`card`, `applePay`, `googlePay`) are additive flat keys that mirror the
|
|
72
|
+
* crypto methods' shape so existing integrators upgrade without touching their config. A future
|
|
73
|
+
* version may restructure to nested-by-rail (`{ crypto: { wallet, transfer }, cash: { … } }`);
|
|
74
|
+
* that restructure is a breaking-change PR and is intentionally deferred until cash methods
|
|
75
|
+
* stabilize.
|
|
76
|
+
*/
|
|
77
|
+
interface DepositMethodsConfig {
|
|
78
|
+
wallet?: DepositMethodConfig;
|
|
79
|
+
transfer?: DepositMethodConfig;
|
|
80
|
+
card?: DepositMethodConfig;
|
|
81
|
+
applePay?: DepositMethodConfig;
|
|
82
|
+
googlePay?: DepositMethodConfig;
|
|
83
|
+
cashRail?: DepositRailConfig;
|
|
84
|
+
}
|
|
12
85
|
/**
|
|
13
86
|
* Confirm-deposit phase sub-union. Drives the confirm-deposit widget's hero / footer chrome.
|
|
14
87
|
* Phase data is pure navigation; the actual quote payload comes from the driver's `quote` entity.
|
|
@@ -28,6 +101,17 @@ type ConfirmDepositPhase = {
|
|
|
28
101
|
failure: FailureInfo;
|
|
29
102
|
recoverFrom: "quote" | "submission";
|
|
30
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Cash-confirm phase sub-union. Drives the per-method cash confirm widget's body slot — `loading`
|
|
106
|
+
* paints the skeleton placeholder, `ready` renders the filled card form / QR / pay button. Phase
|
|
107
|
+
* is pure navigation; the actual card data / QR payload / pay button content lives in the widget's
|
|
108
|
+
* mocks today and will surface through a future `cashConfirm` driver entity.
|
|
109
|
+
*/
|
|
110
|
+
type CashConfirmPhase = {
|
|
111
|
+
kind: "loading";
|
|
112
|
+
} | {
|
|
113
|
+
kind: "ready";
|
|
114
|
+
};
|
|
31
115
|
/**
|
|
32
116
|
* Where `ERROR_TRY_AGAIN` lands. Encoded once at error-entry time so retry is deterministic.
|
|
33
117
|
*/
|
|
@@ -47,6 +131,33 @@ type RetryTargetSpec = {
|
|
|
47
131
|
*/
|
|
48
132
|
kind: "fresh";
|
|
49
133
|
};
|
|
134
|
+
/**
|
|
135
|
+
* Where `BACK` lands when the user exits the activity surface. Encoded once at `OPEN_ACTIVITY`
|
|
136
|
+
* time so the back chevron can restore each pre-commit source state lossless — same precedent
|
|
137
|
+
* as {@link RetryTargetSpec}, just for the activity-exit path instead of the error-retry path.
|
|
138
|
+
*
|
|
139
|
+
* The discriminant `kind` mirrors the source-state name. The remaining fields carry exactly the
|
|
140
|
+
* ctx slots needed to rebuild that state (method, asset, inner backTarget). Direct-entry into
|
|
141
|
+
* the per-flow activity is no longer possible — that path migrated to the standalone
|
|
142
|
+
* `useActivity()` hook — so every reachable backTarget identifies a concrete source step.
|
|
143
|
+
*/
|
|
144
|
+
type ActivityBackTarget = {
|
|
145
|
+
kind: "deposit";
|
|
146
|
+
backTarget: "closed";
|
|
147
|
+
} | {
|
|
148
|
+
kind: "assetPicker";
|
|
149
|
+
method: "wallet";
|
|
150
|
+
backTarget: "closed" | "deposit";
|
|
151
|
+
} | {
|
|
152
|
+
kind: "amountEntry";
|
|
153
|
+
method: "wallet";
|
|
154
|
+
asset: BalanceItemPayload;
|
|
155
|
+
backTarget: "closed" | "assetPicker";
|
|
156
|
+
} | {
|
|
157
|
+
kind: "transferCrypto";
|
|
158
|
+
method: "transfer";
|
|
159
|
+
backTarget: "closed" | "deposit";
|
|
160
|
+
};
|
|
50
161
|
/**
|
|
51
162
|
* State machine state nodes. Per-state discriminated ctx narrows what is available — illegal
|
|
52
163
|
* states (e.g. `confirmDeposit` without an asset) are unrepresentable.
|
|
@@ -75,6 +186,28 @@ type DepositState = {
|
|
|
75
186
|
asset: BalanceItemPayload;
|
|
76
187
|
backTarget: "closed" | "assetPicker";
|
|
77
188
|
};
|
|
189
|
+
} | {
|
|
190
|
+
name: "cashAmountEntry";
|
|
191
|
+
ctx: {
|
|
192
|
+
method: "cash";
|
|
193
|
+
cashMethod: CashMethodId;
|
|
194
|
+
backTarget: "closed" | "deposit";
|
|
195
|
+
/**
|
|
196
|
+
* Optional initial amount, restored when the user backs out of `cashConfirm` so the
|
|
197
|
+
* fiat band keeps the value they entered before continuing. Absent on first entry
|
|
198
|
+
* (the widget falls back to the first preset).
|
|
199
|
+
*/
|
|
200
|
+
amount?: number;
|
|
201
|
+
};
|
|
202
|
+
} | {
|
|
203
|
+
name: "cashConfirm";
|
|
204
|
+
ctx: {
|
|
205
|
+
method: "cash";
|
|
206
|
+
cashMethod: CashMethodId;
|
|
207
|
+
amount: number;
|
|
208
|
+
phase: CashConfirmPhase;
|
|
209
|
+
backTarget: "cashAmountEntry";
|
|
210
|
+
};
|
|
78
211
|
} | {
|
|
79
212
|
name: "confirmDeposit";
|
|
80
213
|
ctx: {
|
|
@@ -115,6 +248,31 @@ type DepositState = {
|
|
|
115
248
|
failure?: FailureInfo; /** Source-chain tx hash when the error followed a successful broadcast. */
|
|
116
249
|
tx?: TxRef;
|
|
117
250
|
};
|
|
251
|
+
} | {
|
|
252
|
+
/**
|
|
253
|
+
* Activity list — reachable from any pre-commit state via the header icon.
|
|
254
|
+
* `backTarget` snapshots the source state at `OPEN_ACTIVITY` time so the back chevron
|
|
255
|
+
* can restore it lossless.
|
|
256
|
+
*/
|
|
257
|
+
name: "activityList";
|
|
258
|
+
ctx: {
|
|
259
|
+
backTarget: ActivityBackTarget;
|
|
260
|
+
};
|
|
261
|
+
} | {
|
|
262
|
+
/**
|
|
263
|
+
* Activity per-settlement detail — reached from `activityList` via
|
|
264
|
+
* `SELECT_SETTLEMENT`. Carries the selected row's id, the same `backTarget` so `BACK`
|
|
265
|
+
* collapses through `activityList` to the original source step, and a `viaList` flag
|
|
266
|
+
* that disambiguates "reached via the list" from "reached imperatively"; the latter
|
|
267
|
+
* skips the list interlude on `BACK`. For direct-entry into the activity surface,
|
|
268
|
+
* see {@link useActivity}.
|
|
269
|
+
*/
|
|
270
|
+
name: "activityDetail";
|
|
271
|
+
ctx: {
|
|
272
|
+
settlementId: string;
|
|
273
|
+
backTarget: ActivityBackTarget;
|
|
274
|
+
viaList: boolean;
|
|
275
|
+
};
|
|
118
276
|
};
|
|
119
277
|
type DepositStateName = DepositState["name"];
|
|
120
278
|
/**
|
|
@@ -142,6 +300,14 @@ type GatewayEvent = {
|
|
|
142
300
|
} | {
|
|
143
301
|
type: "DEPOSIT_METHOD_SELECTED";
|
|
144
302
|
method: DepositMethod;
|
|
303
|
+
} | {
|
|
304
|
+
type: "CASH_METHOD_SELECTED";
|
|
305
|
+
cashMethod: CashMethodId;
|
|
306
|
+
} | {
|
|
307
|
+
type: "CASH_AMOUNT_CONFIRMED";
|
|
308
|
+
amount: number;
|
|
309
|
+
} | {
|
|
310
|
+
type: "CASH_METHOD_READY";
|
|
145
311
|
} | {
|
|
146
312
|
type: "ASSET_CONFIRMED";
|
|
147
313
|
asset: BalanceItemPayload;
|
|
@@ -205,11 +371,30 @@ type GatewayEvent = {
|
|
|
205
371
|
*/
|
|
206
372
|
type: "RESUME_TO_ERROR";
|
|
207
373
|
tx?: TxRef;
|
|
374
|
+
} | {
|
|
375
|
+
/**
|
|
376
|
+
* User tapped the header activity icon. Legal from every pre-commit state
|
|
377
|
+
* (`deposit | assetPicker | amountEntry | transferCrypto`); ignored elsewhere. The
|
|
378
|
+
* reducer snapshots the source state into a {@link ActivityBackTarget} so the back
|
|
379
|
+
* chevron can restore it lossless.
|
|
380
|
+
*/
|
|
381
|
+
type: "OPEN_ACTIVITY";
|
|
382
|
+
} | {
|
|
383
|
+
/**
|
|
384
|
+
* User tapped a row in the activity list. Legal only from `activityList`; transitions
|
|
385
|
+
* to `activityDetail` carrying the selected `settlementId` and the same `backTarget`,
|
|
386
|
+
* so a later `BACK` from the list step restores the original source state.
|
|
387
|
+
*/
|
|
388
|
+
type: "SELECT_SETTLEMENT";
|
|
389
|
+
settlementId: string;
|
|
208
390
|
};
|
|
209
391
|
/**
|
|
210
392
|
* Public open-input variant accepted by `useDeposit().open()`. Hosts pass the small ID-based
|
|
211
|
-
* shape; the controller resolves
|
|
212
|
-
*
|
|
393
|
+
* shape; the controller resolves `assetId` against the driver's `balances` entity before
|
|
394
|
+
* dispatching. Lookup misses fall through to the asset picker — the host's click never silently
|
|
395
|
+
* no-ops.
|
|
396
|
+
*
|
|
397
|
+
* For direct-entry into the activity surface, see {@link useActivity}.
|
|
213
398
|
*/
|
|
214
399
|
type OpenInput = undefined | {
|
|
215
400
|
method: "wallet";
|
|
@@ -226,11 +411,14 @@ interface DepositController {
|
|
|
226
411
|
*
|
|
227
412
|
* - `open()` → `deposit` (method picker)
|
|
228
413
|
* - `open({ method: "wallet" })` → `assetPicker`
|
|
229
|
-
* - `open({ method: "wallet", assetId })` → `amountEntry`
|
|
414
|
+
* - `open({ method: "wallet", assetId })` → `amountEntry` when `assetId` resolves, otherwise
|
|
415
|
+
* falls through to `assetPicker`
|
|
230
416
|
* - `open({ method: "transfer" })` → `transferCrypto`
|
|
231
417
|
*
|
|
232
|
-
* Returns `false` when `
|
|
233
|
-
*
|
|
418
|
+
* Returns `false` only when the requested `method` is disabled via
|
|
419
|
+
* {@link DepositMethodsConfig}.
|
|
420
|
+
*
|
|
421
|
+
* For direct-entry into the activity surface, see {@link useActivity}.
|
|
234
422
|
*/
|
|
235
423
|
open(input?: OpenInput): boolean;
|
|
236
424
|
/** Close the deposit dialog. Idempotent. */
|
|
@@ -248,6 +436,25 @@ interface DepositController {
|
|
|
248
436
|
*/
|
|
249
437
|
interface DepositActions {
|
|
250
438
|
selectMethod(method: DepositMethod): void;
|
|
439
|
+
/**
|
|
440
|
+
* Promotes the FSM from `deposit` (method picker) into `cashAmountEntry` for the chosen cash
|
|
441
|
+
* method. Distinct from {@link selectMethod} because cash methods route to a method-specific
|
|
442
|
+
* surface today (and per-method confirm forms tomorrow), while {@link selectMethod} stays
|
|
443
|
+
* scoped to the crypto rail's two methods.
|
|
444
|
+
*/
|
|
445
|
+
selectCashMethod(cashMethod: CashMethodId): void;
|
|
446
|
+
/**
|
|
447
|
+
* Promotes the FSM from `cashAmountEntry` into `cashConfirm{loading}` carrying the entered
|
|
448
|
+
* fiat amount. The cash-confirm widget mounts in its loading state, schedules its own
|
|
449
|
+
* `cashMethodReady` dispatch after the mock load delay, and re-renders with the filled body.
|
|
450
|
+
*/
|
|
451
|
+
confirmCashAmount(amount: number): void;
|
|
452
|
+
/**
|
|
453
|
+
* Flips `cashConfirm{loading}` → `cashConfirm{ready}`. Dispatched by the cash-confirm widget
|
|
454
|
+
* itself once its mock loading timer elapses. Real card-form / Apple Pay / Google Pay
|
|
455
|
+
* lifecycles will replace this with bindings-driven signals.
|
|
456
|
+
*/
|
|
457
|
+
cashMethodReady(): void;
|
|
251
458
|
confirmAsset(asset: BalanceItemPayload): void;
|
|
252
459
|
confirmAmount(amount: number): void;
|
|
253
460
|
confirmDeposit(): void;
|
|
@@ -261,6 +468,20 @@ interface DepositActions {
|
|
|
261
468
|
resumeToSuccess(method: DepositMethod, tx: TxRef): void;
|
|
262
469
|
/** Banner-driven jump into the error widget. */
|
|
263
470
|
resumeToError(tx?: TxRef): void;
|
|
471
|
+
/**
|
|
472
|
+
* Header-icon entry into the activity surface. Legal only from the pre-quote states
|
|
473
|
+
* (`deposit | assetPicker | amountEntry | transferCrypto`); ignored from `confirmDeposit`
|
|
474
|
+
* onwards and from terminal states. Snapshots the current state into a
|
|
475
|
+
* {@link ActivityBackTarget} so `back()` can restore it lossless. No-ops with a dev-mode
|
|
476
|
+
* warning when no activity driver is mounted (host wired the action without
|
|
477
|
+
* `<KitProvider activity={…}>`).
|
|
478
|
+
*/
|
|
479
|
+
openActivity(): void;
|
|
480
|
+
/**
|
|
481
|
+
* Open the detail view for a settlement listed on the activity surface. Legal only from
|
|
482
|
+
* `activityList`; transitions the FSM to `activityDetail`.
|
|
483
|
+
*/
|
|
484
|
+
selectSettlement(settlementId: string): void;
|
|
264
485
|
}
|
|
265
486
|
//#endregion
|
|
266
|
-
export { ConfirmDepositPhase, DepositActions, DepositController, DepositMethod, DepositState, DepositStateName, GatewayEvent, OpenInput, ResolvedOpenInput, RetryTargetSpec };
|
|
487
|
+
export { CashConfirmPhase, CashMethodId, ConfirmDepositPhase, DepositActions, DepositController, DepositMethod, DepositMethodConfig, DepositMethodsConfig, DepositRailConfig, DepositState, DepositStateName, GatewayEvent, OpenInput, ResolvedOpenInput, RetryTargetSpec };
|
|
@@ -31,5 +31,49 @@ import { DepositController } from "./types.js";
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
declare function useDeposit(): DepositController;
|
|
34
|
+
/**
|
|
35
|
+
* Non-throwing variant of {@link useDeposit} — returns `null` when called outside a
|
|
36
|
+
* `<KitProvider deposit={…} />`. Lets hosts mount `<StridgeProvider />` conditionally
|
|
37
|
+
* (e.g. only after a wallet is connected) without descendants crashing the moment they render
|
|
38
|
+
* before the provider exists.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* const deposit = useOptionalDeposit();
|
|
43
|
+
* return (
|
|
44
|
+
* <button onClick={() => deposit?.open()} disabled={!deposit}>
|
|
45
|
+
* Deposit
|
|
46
|
+
* </button>
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function useOptionalDeposit(): DepositController | null;
|
|
51
|
+
/**
|
|
52
|
+
* Headless prefetch handle for the deposit driver. Returns a stable function that arms the
|
|
53
|
+
* driver — kicks off the deferred `gateway/start` + `supportedAssets` + initial `balance/onchain`
|
|
54
|
+
* bootstrap. Calling it before the user opens the dialog warms the cache so the subsequent
|
|
55
|
+
* `useDeposit().open()` lands on populated data without a perceptible loading window.
|
|
56
|
+
*
|
|
57
|
+
* The function is fire-and-forget: returns `void`. To observe bootstrap state, read
|
|
58
|
+
* `useDepositSnapshot().target.status` directly — the snapshot is the single source of truth.
|
|
59
|
+
*
|
|
60
|
+
* The most common use is hover-to-warm:
|
|
61
|
+
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* const deposit = useDeposit();
|
|
64
|
+
* const prefetchDeposit = usePrefetchDeposit();
|
|
65
|
+
* <button onMouseEnter={prefetchDeposit} onClick={() => deposit.open()}>Deposit</button>;
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* Headless balance widgets that need data on render call this in an effect:
|
|
69
|
+
*
|
|
70
|
+
* ```tsx
|
|
71
|
+
* const prefetchDeposit = usePrefetchDeposit();
|
|
72
|
+
* useEffect(() => { prefetchDeposit(); }, [prefetchDeposit]);
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* Idempotent — subsequent calls are no-ops while the driver is already armed.
|
|
76
|
+
*/
|
|
77
|
+
declare function usePrefetchDeposit(): () => void;
|
|
34
78
|
//#endregion
|
|
35
|
-
export { useDeposit };
|
|
79
|
+
export { useDeposit, useOptionalDeposit, usePrefetchDeposit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useDepositDriverInstance as e}from"../driver/context.js";import{useOptionalStableControllerContext as t,useStableControllerContext as n}from"./controller.js";import{useCallback as r}from"react";function i(){return n().controller}function a(){return t()?.controller??null}function o(){let t=e();return r(()=>{t.arm()},[t])}export{i as useDeposit,a as useOptionalDeposit,o as usePrefetchDeposit};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/flows/deposit/shared/cash.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock breakdown computed in-widget from the entered amount + chosen cash method. Returns the
|
|
4
|
+
* same shape the future `cashQuote` driver entity will surface, so the widget only swaps its
|
|
5
|
+
* source from this helper to `useDepositSnapshot().cashQuote` when the backend ships.
|
|
6
|
+
*/
|
|
7
|
+
interface CashAmountBreakdown {
|
|
8
|
+
/** USD amount the user is paying — surfaced on the Amount row and the hero band. */
|
|
9
|
+
amountUsd: number;
|
|
10
|
+
/** USDC the user receives after fees. Drives the Receive chip + hero sub-line. */
|
|
11
|
+
receiveAmount: number;
|
|
12
|
+
/** USDC quoted-per-USD rate. Drives the Crypto price row. */
|
|
13
|
+
rate: number;
|
|
14
|
+
/** Processing fee charged by the cash method (USD, deducted from amount). */
|
|
15
|
+
processingFeeUsd: number;
|
|
16
|
+
/** Network fee paid to settle on-chain (USD, deducted from amount). */
|
|
17
|
+
networkFeeUsd: number;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { CashAmountBreakdown };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={symbol:`USDC`,chainId:1,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`},t=[{value:200,label:`$200`},{value:500,label:`$500`},{value:1e3,label:`$1k`},{value:2e3,label:`$2k`}],n={card:.029,applePay:.025,googlePay:.025};function r(e,t){let r=e??0,i=+(r*n[t]).toFixed(2),a=.4;return{amountUsd:r,receiveAmount:Math.max(0,r-i-a)/1,rate:1,processingFeeUsd:i,networkFeeUsd:a}}export{t as MOCK_CASH_PRESETS,e as MOCK_RECEIVE_TOKEN,r as computeMockCashBreakdown};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/activity/DepositActivityDetail.d.ts
|
|
5
|
+
interface DepositActivityDetailOwnProps {
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom composition forwarded to the underlying `<ActivityDetail>`
|
|
8
|
+
* compound. Defaults to mounting all three per-kind parts; each gates internally on the
|
|
9
|
+
* resolved payload's `kind`.
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Orchestrated activity detail wrapper for the deposit dialog. Mounts the cross-flow
|
|
15
|
+
* `<ActivityDetail>` compound and exposes per-kind parts (`Processing`, `Succeeded`,
|
|
16
|
+
* `Failed`) as namespace members. Renders `null` while the FSM is not on `activityDetail`.
|
|
17
|
+
*/
|
|
18
|
+
declare function DepositActivityDetail({
|
|
19
|
+
children
|
|
20
|
+
}: DepositActivityDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
21
|
+
declare namespace DepositActivityDetail {
|
|
22
|
+
type Props = DepositActivityDetailOwnProps;
|
|
23
|
+
const Processing: ({
|
|
24
|
+
children
|
|
25
|
+
}: {
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
+
const Succeeded: ({
|
|
29
|
+
children
|
|
30
|
+
}: {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
33
|
+
const Failed: ({
|
|
34
|
+
children
|
|
35
|
+
}: {
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DepositActivityDetail };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{ActivitySourceProvider as e}from"../../../../shared/widgets/activity/compound/context.js";import{ActivityDetail as t}from"../../../../shared/widgets/activity/compound/ActivityDetail.js";import"../../../../shared/widgets/activity/compound/index.js";import{useDepositActivitySource as n}from"./useDepositActivitySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i}){let{sourceValue:a,step:o}=n();return o!==`activityDetail`||!a?null:r(e,{value:a,children:r(t,{children:i})})}(function(e){e.Processing=t.Processing,e.Succeeded=t.Succeeded,e.Failed=t.Failed})(i||={});export{i as DepositActivityDetail};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ActivityHeader, ActivityListHeader } from "../../../../shared/widgets/activity/compound/components/ActivityHeader.js";
|
|
2
|
+
import { ActivityEmpty } from "../../../../shared/widgets/activity/compound/components/Empty.js";
|
|
3
|
+
import { ActivityErrorView } from "../../../../shared/widgets/activity/compound/components/ErrorView.js";
|
|
4
|
+
import { ActivityList } from "../../../../shared/widgets/activity/compound/components/List.js";
|
|
5
|
+
import { ActivityRow } from "../../../../shared/widgets/activity/compound/components/Row.js";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/flows/deposit/widgets/activity/DepositActivityList.d.ts
|
|
10
|
+
interface DepositActivityListOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* Optional custom composition forwarded to the underlying `<Activity>` compound.
|
|
13
|
+
* Defaults to the compound's `<Header /> + <List />` shape.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrated activity list wrapper for the deposit dialog. Bridges the deposit
|
|
19
|
+
* flow's snapshot + actions + FSM state into the cross-flow `<Activity>` compound's
|
|
20
|
+
* source value. Renders `null` while the FSM is not on `activityList` — the dialog's step
|
|
21
|
+
* router only matches the active step, but the no-op guard keeps the component safe to mount
|
|
22
|
+
* in custom dialog compositions that skip the step router.
|
|
23
|
+
*/
|
|
24
|
+
declare function DepositActivityList({
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}: ComponentProps<"div"> & DepositActivityListOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
+
declare namespace DepositActivityList {
|
|
29
|
+
type Props = ComponentProps<"div"> & DepositActivityListOwnProps;
|
|
30
|
+
const Header: typeof ActivityHeader;
|
|
31
|
+
const ListHeader: typeof ActivityListHeader;
|
|
32
|
+
const List: typeof ActivityList;
|
|
33
|
+
const Row: typeof ActivityRow;
|
|
34
|
+
const Empty: typeof ActivityEmpty;
|
|
35
|
+
const ErrorView: typeof ActivityErrorView;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { DepositActivityList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{ActivitySourceProvider as e}from"../../../../shared/widgets/activity/compound/context.js";import{Activity as t}from"../../../../shared/widgets/activity/compound/Activity.js";import"../../../../shared/widgets/activity/compound/index.js";import{useDepositActivitySource as n}from"./useDepositActivitySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i,...a}){let{sourceValue:o,step:s}=n();return s!==`activityList`||!o?null:r(e,{value:o,children:r(t,{...a,children:i})})}(function(e){e.Header=t.Header,e.ListHeader=t.ListHeader,e.List=t.List,e.Row=t.Row,e.Empty=t.Empty,e.ErrorView=t.ErrorView})(i||={});export{i as DepositActivityList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./DepositActivityDetail.js";import"./DepositActivityList.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useOptionalActivityDriverInstance as e,useOptionalActivitySnapshot as t}from"../../../activity/driver/context.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as r}from"../../driver/context.js";import{useDepositActions as i,useDepositEffectiveState as a}from"../../orchestrator/controller.js";import{defaultBlockExplorers as o}from"../../../../shared/utils/explorers.js";import{useCallback as s,useMemo as c}from"react";function l(){let l=r(),u=i(),d=e(),f=t(),p=a(),{i18n:m}=n(),h=s(e=>{d?.refreshActivity(e)},[d]),g=p.name===`activityList`||p.name===`activityDetail`,_=p.name===`activityDetail`?p.ctx.settlementId:void 0,v=g;return{sourceValue:c(()=>{if(!g||!f)return null;let e=l.wallet,t=f.activity,n=e.status===`ready`||e.status===`stale`?e.payload.address.value:t.status===`ready`||t.status===`stale`?t.response.owner:`0x0000000000000000000000000000000000000000`,r=t.status===`ready`||t.status===`stale`?t.payload.brandName:void 0,i=l.brand,a=i.status===`ready`||i.status===`stale`?i.payload.name:void 0,s=r??a,c={i18n:m,sourceWallet:{name:`Wallet`,address:n},explorers:o(),...s?{brandName:s}:{}};return{entity:f.activity,refresh:h,selectSettlement:u.selectSettlement,...v?{back:u.back}:{},..._===void 0?{}:{settlementId:_},settlementContext:c}},[f,l,u,g,_,m,h,v]),settlementId:_,step:p.name===`activityList`?`activityList`:p.name===`activityDetail`?`activityDetail`:`other`}}export{l as useDepositActivitySource};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AmountEntryBodyProps } from "../../../../shared/widgets/amount-entry/compound/types.js";
|
|
3
|
+
import { AmountEntryHeader } from "../../../../shared/widgets/amount-entry/compound/components/Header.js";
|
|
4
|
+
import { AmountEntryFlow } from "../../../../shared/widgets/amount-entry/compound/components/Flow.js";
|
|
5
|
+
import { AmountEntryFooter } from "../../../../shared/widgets/amount-entry/compound/components/Footer.js";
|
|
6
|
+
import { AmountEntryHero } from "../../../../shared/widgets/amount-entry/compound/components/Hero/Hero.js";
|
|
7
|
+
import { AmountEntryNotice } from "../../../../shared/widgets/amount-entry/compound/components/Notice.js";
|
|
8
|
+
import { AmountEntryPills } from "../../../../shared/widgets/amount-entry/compound/components/Pills.js";
|
|
9
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
10
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
11
|
|
|
5
12
|
//#region src/flows/deposit/widgets/amount-entry/AmountEntry.d.ts
|
|
@@ -14,11 +21,24 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
14
21
|
* minimum-deposit USD floor from the driver's `target` entity. Renders nothing on any other
|
|
15
22
|
* FSM state.
|
|
16
23
|
*
|
|
17
|
-
* Honors `target.payload.
|
|
24
|
+
* Honors `target.payload.minAmountUsd.value`: when the entered amount is below it, the footer
|
|
18
25
|
* CTA flips to "Update order" and clicking auto-snaps the amount up to the floor. The widget
|
|
19
26
|
* also prefills the entry to the floor on first render so the user starts at a valid amount.
|
|
20
27
|
*/
|
|
21
|
-
|
|
28
|
+
interface AmountEntryOwnProps {
|
|
29
|
+
/**
|
|
30
|
+
* Optional custom composition. Defaults to `<Header />` + `<Body><Hero /><Pills /><Flow />`
|
|
31
|
+
* + validation-notice slot `</Body>` + `<Footer />`. Pass children to interleave your own
|
|
32
|
+
* elements between compound parts. Note — the default composition embeds a runtime-driven
|
|
33
|
+
* `<NoticeSlot />` that surfaces validation hints (min / max / insufficient-balance); custom
|
|
34
|
+
* children replace it entirely.
|
|
35
|
+
*/
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare function AmountEntry({
|
|
39
|
+
children,
|
|
40
|
+
...props
|
|
41
|
+
}: ComponentProps<"div"> & AmountEntryOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
22
42
|
declare function AmountEntryDialog({
|
|
23
43
|
open,
|
|
24
44
|
defaultOpen,
|
|
@@ -27,9 +47,16 @@ declare function AmountEntryDialog({
|
|
|
27
47
|
...rootProps
|
|
28
48
|
}: AmountEntry.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
29
49
|
declare namespace AmountEntry {
|
|
30
|
-
type Props = ComponentProps<"div"
|
|
31
|
-
type DialogProps = ComponentProps<"div"> & DialogShellControls;
|
|
50
|
+
type Props = ComponentProps<"div"> & AmountEntryOwnProps;
|
|
51
|
+
type DialogProps = ComponentProps<"div"> & DialogShellControls & AmountEntryOwnProps;
|
|
32
52
|
const Dialog: typeof AmountEntryDialog;
|
|
53
|
+
const Header: typeof AmountEntryHeader;
|
|
54
|
+
const Body: (props: AmountEntryBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
55
|
+
const Hero: typeof AmountEntryHero;
|
|
56
|
+
const Pills: typeof AmountEntryPills;
|
|
57
|
+
const Flow: typeof AmountEntryFlow;
|
|
58
|
+
const Footer: typeof AmountEntryFooter;
|
|
59
|
+
const Notice: typeof AmountEntryNotice;
|
|
33
60
|
}
|
|
34
61
|
//#endregion
|
|
35
62
|
export { AmountEntry };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useOptionalActivityDriverInstance as e}from"../../../activity/driver/context.js";import{useKitI18n as t}from"../../../../shared/i18n/useKitI18n.js";import{Trans as n}from"../../../../shared/i18n/Trans.js";import{useLingui as r}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as i}from"../../driver/context.js";import{useDepositActions as a,useDepositEffectiveState as ee}from"../../orchestrator/controller.js";import{formatTokenAmount as o}from"../../../../shared/format/formatTokenAmount.js";import{useKitEmitter as s}from"../../../../events/emit/useKitEmitter.js";import"../../../../events/emit/index.js";import{DialogShell as c}from"../../../../shared/dialog/DialogShell.js";import{AmountEntry as l}from"../../../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../../../shared/widgets/amount-entry/compound/index.js";import{ActivityTrigger as u}from"../../../../shared/widgets/activity/ActivityTrigger.js";import"../../../../shared/widgets/activity/index.js";import{toAssetDescriptor as d}from"../../../../shared/widgets/asset-descriptor.js";import{effectiveMaxUsd as f,resolveFooterIntent as te}from"./footerIntent.js";import{useEffect as p,useRef as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";const y=[{value:`25`,label:`25%`},{value:`50`,label:`50%`},{value:`75`,label:`75%`},{value:`max`,label:`Max`}];function b({children:n,...c}){let b=i(),C=ee(),{confirmAmount:w,back:T,openActivity:E}=a(),D=e()!==null,{_:O}=r(),k=t(),A=b.target,j=A.status===`ready`||A.status===`stale`?A.payload:void 0,M=C.name===`amountEntry`?C.ctx.asset:void 0,N=M?.amountUsd?.value??0,P=j?.minAmountUsd?.value,F=j?.minAmountUsd?.formatted,I=j?.maxAmountUsd?.value,L=j?.maxAmountUsd?.formatted,R=f(N,I),z=M?.priceUsd,[B,V]=h(P??null),[H,U]=h(),W=s(),G=e=>{W({type:`deposit.amount.changed`,flow:`deposit`,tier:`ui`,payload:{raw:e===null?``:String(e),numeric:e}})},K=m(void 0),q=M?`${M.eip155Id??``}:${M.address??``}`:void 0;p(()=>{q&&K.current!==q&&(K.current=q,typeof P==`number`&&(V(P),U(void 0)))},[q,P]);let J=e=>{U(e);let t=e===`max`?1:Number.parseInt(e,10)/100;if(Number.isFinite(t)){let n=R*t;V(n),G(n),e===`max`&&W({type:`deposit.max.clicked`,flow:`deposit`,tier:`ui`,payload:{}})}},Y=e=>{V(e),U(void 0),G(e)},X=te({amount:B,...P===void 0?{}:{minAmountUsd:P},...I===void 0?{}:{maxAmountUsd:I},walletBalanceUsd:N}),Z=()=>{if(X===`aboveBalance`||X===`aboveCap`){V(R),U(`max`);return}if(X===`belowMin`&&typeof P==`number`){V(P),U(void 0);return}B!==null&&w(z&&z>0?B/z:B)};if(C.name!==`amountEntry`||!M||!j)return null;let Q=C.ctx.backTarget===`closed`?void 0:T,ne=d(M)??{symbol:M.symbol},re=d(j)??{symbol:j.symbol},ie=`${o((B??0)/1,k,{maxDecimals:5})} ${j.symbol}`,$=x(X,{updateOrder:O({id:`bOZXx5`,message:`Update order`}),depositMax:O({id:`9cCjMJ`,message:`Deposit max balance`})}),ae=S(X,L,F);return _(l,{...c,amount:B,sendToken:ne,receiveToken:re,max:R,...P===void 0?{}:{min:P},onAmountChange:Y,...Q?{onBack:Q}:{},subLineAmount:ie,presets:y,...H===void 0?{}:{activePreset:H},onPresetSelect:J,...$===void 0?{}:{footerLabel:$},onContinue:Z,notice:ae,...D?{headerTrailing:_(u,{onOpen:E})}:{},children:n??v(g,{children:[_(l.Header,{}),v(l.Body,{children:[_(l.Hero,{}),_(l.Pills,{}),_(l.Flow,{}),_(l.Notice,{})]}),_(l.Footer,{})]})})}function x(e,t){if(e===`aboveCap`||e===`belowMin`)return t.updateOrder;if(e===`aboveBalance`)return t.depositMax}function S(e,t,r){if(e===`aboveCap`&&t)return _(n,{id:`-I_tc5`,message:`Max {formattedCap}`,values:{formattedCap:t}});if(e===`aboveBalance`)return _(n,{id:`znqB4T`,message:`Insufficient balance`});if(e===`belowMin`&&r)return _(n,{id:`3eKjkO`,message:`{formattedMin} minimum deposit`,values:{formattedMin:r}})}function C({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return _(c,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:_(b,{...i})})}(function(e){e.Dialog=C,e.Header=l.Header,e.Body=l.Body,e.Hero=l.Hero,e.Pills=l.Pills,e.Flow=l.Flow,e.Footer=l.Footer,e.Notice=l.Notice})(b||={});export{b as AmountEntry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let{amount:r,minAmountUsd:i,maxAmountUsd:a,walletBalanceUsd:o}=e,s=t(o,a);return r!==null&&s>0&&r>s?n(o,a)?`aboveCap`:`aboveBalance`:typeof i==`number`&&i>0&&(r===null||r<i)?`belowMin`:`ready`}function t(e,t){return typeof t==`number`&&t>0?Math.min(e,t):e}function n(e,t){return typeof t==`number`&&t>0&&t<=e}export{t as effectiveMaxUsd,e as resolveFooterIntent};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AssetPickerBodyProps } from "../../../../shared/widgets/asset-picker/compound/types.js";
|
|
3
|
+
import { AssetPickerEmpty } from "../../../../shared/widgets/asset-picker/compound/components/Empty.js";
|
|
4
|
+
import { AssetPickerFooter } from "../../../../shared/widgets/asset-picker/compound/components/Footer.js";
|
|
5
|
+
import { AssetPickerHeader } from "../../../../shared/widgets/asset-picker/compound/components/Header.js";
|
|
6
|
+
import { AssetPickerList } from "../../../../shared/widgets/asset-picker/compound/components/List.js";
|
|
7
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
8
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
9
|
|
|
5
10
|
//#region src/flows/deposit/widgets/asset-picker/AssetPicker.d.ts
|
|
@@ -8,7 +13,17 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
13
|
* entity and the destination header title from `target`. Owns the selected-id state locally and
|
|
9
14
|
* routes the footer Continue through orchestrator's `confirmAsset`.
|
|
10
15
|
*/
|
|
11
|
-
|
|
16
|
+
interface AssetPickerOwnProps {
|
|
17
|
+
/**
|
|
18
|
+
* Optional custom composition. Defaults to `<Header />` + `<Body><List /></Body>` + `<Footer />`.
|
|
19
|
+
* Pass children to interleave your own elements between compound parts.
|
|
20
|
+
*/
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare function AssetPicker({
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}: ComponentProps<"div"> & AssetPickerOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
12
27
|
declare function AssetPickerDialog({
|
|
13
28
|
open,
|
|
14
29
|
defaultOpen,
|
|
@@ -17,9 +32,14 @@ declare function AssetPickerDialog({
|
|
|
17
32
|
...rootProps
|
|
18
33
|
}: AssetPicker.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
19
34
|
declare namespace AssetPicker {
|
|
20
|
-
type Props = ComponentProps<"div"
|
|
21
|
-
type DialogProps = ComponentProps<"div"> & DialogShellControls;
|
|
35
|
+
type Props = ComponentProps<"div"> & AssetPickerOwnProps;
|
|
36
|
+
type DialogProps = ComponentProps<"div"> & DialogShellControls & AssetPickerOwnProps;
|
|
22
37
|
const Dialog: typeof AssetPickerDialog;
|
|
38
|
+
const Header: typeof AssetPickerHeader;
|
|
39
|
+
const Body: (props: AssetPickerBodyProps) => _$react_jsx_runtime0.JSX.Element;
|
|
40
|
+
const List: typeof AssetPickerList;
|
|
41
|
+
const Footer: typeof AssetPickerFooter;
|
|
42
|
+
const Empty: typeof AssetPickerEmpty;
|
|
23
43
|
}
|
|
24
44
|
//#endregion
|
|
25
45
|
export { AssetPicker };
|