@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.61
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 +40 -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 +3 -3
- 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 +4 -2
- 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 +25 -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 +17 -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/checkoutChannel.d.ts +31 -0
- package/dist/drivers/stridge-mock/checkoutChannel.js +1 -0
- 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 +30 -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 +19 -13
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
- 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/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 +109 -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 +92 -5
- 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 +276 -12
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
- package/dist/flows/deposit/shared/onramp.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/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 +15 -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/onramp-amount-entry/OnrampAmountEntry.d.ts +64 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +29 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +50 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +42 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +24 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +25 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.d.ts +4 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/types.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +48 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +63 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
- 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 +5 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +35 -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/BitcoinIcon.d.ts +14 -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/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.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/useOnrampSessionWatcher.js +1 -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 +69 -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 +177 -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 +567 -12
- package/dist/types.d.ts +8 -6
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){throw Error(`Unhandled discriminant: ${JSON.stringify(e)}`)}export{e as assertNever};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Trustwallet CDN and the gradient+letter fallback. Use when a definitive logo URL is
|
|
10
10
|
* available and no CDN probing is desired.
|
|
11
11
|
* - `logoUrl` — appended after the CDN candidates. Used when the convention URLs 404. Typical
|
|
12
|
-
* source: a backend's per-token `logo` field (e.g. Stridge's `
|
|
12
|
+
* source: a backend's per-token `logo` field (e.g. Stridge's `Gateway.assets()` payload).
|
|
13
13
|
*/
|
|
14
14
|
interface TokenLogoInput {
|
|
15
15
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as e}from"react";function t(t){let r=e(null),i=n(t);return(r.current===null||r.current.serialized!==i)&&(r.current={value:t,serialized:i}),r.current.value}function n(e){return JSON.stringify(e,(e,t)=>t&&typeof t==`object`&&!Array.isArray(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}export{t as useDeepMemo};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/shared/wallet/ConnectWalletContext.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Host-supplied "Connect a wallet" affordance. When the user opens the deposit dialog without a
|
|
4
|
+
* resolvable owner (no `flows.deposit.owner`, no wagmi connection, no `dev.userAddressOverride`),
|
|
5
|
+
* the dialog renders `<WalletRequiredState>` with the `onClick` CTA labeled with `label` (or the
|
|
6
|
+
* kit's default copy when omitted). When the host doesn't supply this config, the state still
|
|
7
|
+
* renders — just without an actionable button, leaving the host to surface the connect affordance
|
|
8
|
+
* elsewhere on the page.
|
|
9
|
+
*/
|
|
10
|
+
interface ConnectWalletConfig {
|
|
11
|
+
/** Click handler invoked by the dialog's "Connect wallet" button. */
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
/** Optional override for the button label. Defaults to the kit's localized "Connect wallet" copy. */
|
|
14
|
+
label?: string;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ConnectWalletConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`ConnectWalletContext`;function r(){return t(n)}export{n as ConnectWalletContext,r as useConnectWallet};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{ActivityIcon as t}from"../../icons/ActivityIcon.js";import"../../../icons/index.js";import{IconButton as n}from"../../ui/IconButton/IconButton.js";import"../../../ui/index.js";import{styles as r}from"./ActivityTrigger.styles.js";import{jsx as i}from"react/jsx-runtime";import*as a from"@stylexjs/stylex";function o({onOpen:o}){let{_:s}=e();return i(n,{"aria-label":s({id:`c3aao_`,message:`View activity`}),onClick:o,children:i(t,{"aria-hidden":!0,...a.props(r.icon)})})}export{o as ActivityTrigger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={icon:{"ActivityTrigger__styles.icon":`ActivityTrigger__styles.icon`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/activity/ActivityTrigger.styles.ts:3`}};export{e as styles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveDirection as e}from"../transformers/resolveDirection.js";import{settlementToPayload as t}from"../../../../flows/deposit/driver/transformers/settlementToPayload.js";function n(n,r,i){let a=i.sourceWallet.address.toLowerCase();for(let o of n)for(let n of o.settlements)if(n.id===r){let r=e(o,a);return{payload:t(n,o,r===`withdraw`&&i.brandName!==void 0?{...i,brandName:void 0}:i),uda:o,direction:r}}return null}export{n as settlementToWidgetProps};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ActivityHeader, ActivityListHeader } from "./components/ActivityHeader.js";
|
|
2
|
+
import { ActivityEmpty } from "./components/Empty.js";
|
|
3
|
+
import { ActivityErrorView } from "./components/ErrorView.js";
|
|
4
|
+
import { ActivityList } from "./components/List.js";
|
|
5
|
+
import { ActivityRow } from "./components/Row.js";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/shared/widgets/activity/compound/Activity.d.ts
|
|
10
|
+
interface ActivityOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* Optional custom composition. Defaults to `<Header /> + <List />`. Pass children to
|
|
13
|
+
* interleave host-supplied elements between compound parts.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Root of the `<Activity>` list compound. Flow-agnostic — every flow-specific concern
|
|
19
|
+
* (snapshot read, action dispatch, owner address derivation) is encapsulated in the
|
|
20
|
+
* `<ActivitySourceProvider>` value the dialog mounts above. The same JSX renders from
|
|
21
|
+
* both `<DepositDialog>` and `<WithdrawDialog>` without imports across the flow boundary.
|
|
22
|
+
*
|
|
23
|
+
* Mounted by the dialog's `activityList` step. The peer compound {@link ActivityDetail}
|
|
24
|
+
* handles the per-settlement detail step; the kit's `Steps` primitive routes between them via
|
|
25
|
+
* the FSM state name, so the slide+blur step transition is supplied automatically.
|
|
26
|
+
*
|
|
27
|
+
* Compound parts:
|
|
28
|
+
* - {@link Activity.Header} — back chevron + title + close X.
|
|
29
|
+
* - {@link Activity.ListHeader} — underlying header primitive that accepts explicit
|
|
30
|
+
* `title` + `onBack` props. Public because the detail compound's per-kind parts mount it
|
|
31
|
+
* inside their delegated success / error / processing composition.
|
|
32
|
+
* - {@link Activity.List} — list body (skeleton / empty / error / rows). Pure reader
|
|
33
|
+
* of the `activity` entity; recurring updates land via the controller-mounted `watchActivity`
|
|
34
|
+
* watcher with adaptive cadence.
|
|
35
|
+
* - {@link Activity.Row} — single row primitive (button-semantic).
|
|
36
|
+
* - {@link Activity.Empty} — empty-state body.
|
|
37
|
+
* - {@link Activity.ErrorView} — initial-error body with retry.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <ActivitySourceProvider value={sourceValue}>
|
|
42
|
+
* <Activity />
|
|
43
|
+
* </ActivitySourceProvider>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example Custom composition — interleave between parts
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <ActivitySourceProvider value={sourceValue}>
|
|
49
|
+
* <Activity>
|
|
50
|
+
* <Activity.Header />
|
|
51
|
+
* <Activity.List />
|
|
52
|
+
* </Activity>
|
|
53
|
+
* </ActivitySourceProvider>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function Activity({
|
|
57
|
+
children,
|
|
58
|
+
...props
|
|
59
|
+
}: ComponentProps<"div"> & ActivityOwnProps): _$react_jsx_runtime0.JSX.Element;
|
|
60
|
+
declare namespace Activity {
|
|
61
|
+
type Props = ComponentProps<"div"> & ActivityOwnProps;
|
|
62
|
+
/**
|
|
63
|
+
* Card header — back chevron + title + close X. Mounted by the default composition above
|
|
64
|
+
* the list body. The peer detail compound supplies its own header inside the
|
|
65
|
+
* SuccessState / ErrorState / ProcessingState composition.
|
|
66
|
+
*/
|
|
67
|
+
const Header: typeof ActivityHeader;
|
|
68
|
+
/**
|
|
69
|
+
* Underlying list-view header primitive — accepts explicit `title` and `onBack` props
|
|
70
|
+
* and renders unconditionally. The detail compound's per-kind parts mount this inside
|
|
71
|
+
* their delegated state composition to keep the back chevron + title affordance
|
|
72
|
+
* consistent across the surface.
|
|
73
|
+
*/
|
|
74
|
+
const ListHeader: typeof ActivityListHeader;
|
|
75
|
+
/**
|
|
76
|
+
* List body — skeleton / empty / error / rows. Pure reader; the controller-mounted
|
|
77
|
+
* `watchActivity` watcher drives recurring updates.
|
|
78
|
+
*/
|
|
79
|
+
const List: typeof ActivityList;
|
|
80
|
+
/**
|
|
81
|
+
* Single row primitive. Hosts that want a fully-headless surface can mount Row directly
|
|
82
|
+
* with their own payload assembly.
|
|
83
|
+
*/
|
|
84
|
+
const Row: typeof ActivityRow;
|
|
85
|
+
/**
|
|
86
|
+
* Empty-state body — centered icon + headline + subline.
|
|
87
|
+
*/
|
|
88
|
+
const Empty: typeof ActivityEmpty;
|
|
89
|
+
/**
|
|
90
|
+
* Initial-error body — `Alert` + retry button.
|
|
91
|
+
*/
|
|
92
|
+
const ErrorView: typeof ActivityErrorView;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { Activity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Frame as e}from"../../../dialog/Frame.js";import{ACTIVITY_SLOTS as t}from"./Activity.slots.js";import{styles as n}from"./Activity.styles.js";import{ActivityHeader as r,ActivityListHeader as i}from"./components/ActivityHeader.js";import{ActivityEmpty as a}from"./components/Empty.js";import{ActivityErrorView as o}from"./components/ErrorView.js";import{ActivityRow as s}from"./components/Row.js";import{ActivityList as c}from"./components/List.js";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";const p=d(l,{children:[u(r,{}),u(c,{})]});function m({children:r,...i}){return u(e,{"data-stridge-slot":t.root,...f.props(n.root),...i,children:r??p})}(function(e){e.Header=r,e.ListHeader=i,e.List=c,e.Row=s,e.Empty=a,e.ErrorView=o})(m||={});export{m as Activity};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/shared/widgets/activity/compound/Activity.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Slot vocabulary for `<Activity>`. Each meaningful element carries
|
|
4
|
+
* `data-stridge-slot={ACTIVITY_SLOTS.<part>}` so hosts can target a sub-part with
|
|
5
|
+
* `[data-stridge-slot="activity-row"]` without forking the kit. Slots are public API —
|
|
6
|
+
* renames are breaking changes.
|
|
7
|
+
*/
|
|
8
|
+
declare const ACTIVITY_SLOTS: {
|
|
9
|
+
readonly root: "activity";
|
|
10
|
+
readonly header: "activity-header";
|
|
11
|
+
readonly body: "activity-body";
|
|
12
|
+
readonly list: "activity-list";
|
|
13
|
+
readonly empty: "activity-empty";
|
|
14
|
+
readonly emptyIcon: "activity-empty-icon";
|
|
15
|
+
readonly error: "activity-error";
|
|
16
|
+
readonly retry: "activity-retry";
|
|
17
|
+
readonly skeleton: "activity-skeleton";
|
|
18
|
+
readonly skeletonRow: "activity-skeleton-row";
|
|
19
|
+
};
|
|
20
|
+
type ActivitySlot = (typeof ACTIVITY_SLOTS)[keyof typeof ACTIVITY_SLOTS];
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ACTIVITY_SLOTS, ActivitySlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`activity`,header:`activity-header`,body:`activity-body`,list:`activity-list`,empty:`activity-empty`,emptyIcon:`activity-empty-icon`,error:`activity-error`,retry:`activity-retry`,skeleton:`activity-skeleton`,skeletonRow:`activity-skeleton-row`};export{e as ACTIVITY_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"Activity__styles.root":`Activity__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:21`},header:{"Activity__styles.header":`Activity__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:28`},headerLeft:{"Activity__styles.headerLeft":`Activity__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:31`},headerRight:{"Activity__styles.headerRight":`Activity__styles.headerRight`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:37`},backIcon:{"Activity__styles.backIcon":`Activity__styles.backIcon`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:42`},body:{"Activity__styles.body":`Activity__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x4xct4k`,"paddingBottom-kGO01o":`xpnfv0q`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:54`},bodyCap:{"Activity__styles.bodyCap":`Activity__styles.bodyCap`,"maxHeight-kskxy":`x17geuhg`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:70`},skeletonRow:{"Activity__styles.skeletonRow":`Activity__styles.skeletonRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"backgroundColor-kWkggS":`xjbqb8w`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:75`},skeletonText:{"Activity__styles.skeletonText":`Activity__styles.skeletonText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1r05nms`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:83`},empty:{"Activity__styles.empty":`Activity__styles.empty`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x1saie51`,"paddingBottom-kGO01o":`x1ej8hiu`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:94`},emptyIcon:{"Activity__styles.emptyIcon":`Activity__styles.emptyIcon`,"width-kzqmXN":`x1td3qas`,"height-kZKoxP":`x10w6t97`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:106`},error:{"Activity__styles.error":`Activity__styles.error`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x2blr79`,"paddingTop-kLKAdn":`x2tg1xt`,"paddingBottom-kGO01o":`x1ww8orz`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:114`},retryRow:{"Activity__styles.retryRow":`Activity__styles.retryRow`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:121`},bodyEnter:{"Activity__styles.bodyEnter":`Activity__styles.bodyEnter`,"animationName-kKVMdj":`xqcmdr3`,"animationDuration-k44tkh":`x19y0sg2`,"animationTimingFunction-kyAemX":`xrkt6z0`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:126`}};export{e as styles};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/widgets/activity/compound/ActivityDetail.d.ts
|
|
5
|
+
interface ActivityDetailOwnProps {
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom composition. Defaults to mounting all three per-kind parts — each gates
|
|
8
|
+
* internally on the resolved payload's `kind`, so only the matching one renders.
|
|
9
|
+
*/
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Per-settlement detail compound — peer of {@link Activity}. Mounted by the dialog's
|
|
14
|
+
* `activityDetail` step. Resolves the selected settlement against
|
|
15
|
+
* `source.entity.raw[].settlements[]`, exposes the discriminated payload via the inner
|
|
16
|
+
* context, and lets per-kind parts (`Processing` / `Succeeded` / `Failed`) render the matching
|
|
17
|
+
* existing state compound with derived props.
|
|
18
|
+
*
|
|
19
|
+
* The default composition wraps the three per-kind branches in a nested `<Steps>` keyed by
|
|
20
|
+
* `payload.kind` so substate transitions (pending → succeeded / failed) inherit the kit's
|
|
21
|
+
* slide+blur step animation — without it, the inner compound would swap synchronously and
|
|
22
|
+
* the activity surface would feel discontinuous compared to the in-flow deposit dialog where
|
|
23
|
+
* each kind is a top-level `<Step>` and the same transition fires automatically.
|
|
24
|
+
*
|
|
25
|
+
* Returns `null` when the entity hasn't materialised raw data yet or when the settlement id
|
|
26
|
+
* misses (e.g. it aged out between row render and row tap). The lookup-miss arm silently
|
|
27
|
+
* dispatches `back()` (in-flow / via-list entries) or the bridge-supplied `onLookupMiss`
|
|
28
|
+
* (standalone direct entries) so the next paint shows the list.
|
|
29
|
+
*/
|
|
30
|
+
declare function ActivityDetail({
|
|
31
|
+
children
|
|
32
|
+
}: ActivityDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
33
|
+
/**
|
|
34
|
+
* Pending-payload branch. Mounts the kit's `<ProcessingStateCompound>` with the resolved
|
|
35
|
+
* settlement details and an `<ActivityListHeader>` in the header slot so the back
|
|
36
|
+
* chevron + title affordance matches the list view.
|
|
37
|
+
*/
|
|
38
|
+
declare function ActivityDetailProcessing({
|
|
39
|
+
children
|
|
40
|
+
}: {
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
}): _$react_jsx_runtime0.JSX.Element | null;
|
|
43
|
+
/**
|
|
44
|
+
* Succeeded-payload branch. Mounts `<SuccessStateCompound>` with per-direction headline copy
|
|
45
|
+
* so a withdraw row drilling into detail keeps `Withdrawal successful` (matching the row
|
|
46
|
+
* title vocabulary) instead of falling through to the deposit-only default.
|
|
47
|
+
*/
|
|
48
|
+
declare function ActivityDetailSucceeded({
|
|
49
|
+
children
|
|
50
|
+
}: {
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
}): _$react_jsx_runtime0.JSX.Element | null;
|
|
53
|
+
/**
|
|
54
|
+
* Failed-payload branch. Mounts `<ErrorStateCompound>` with per-direction failure headline so
|
|
55
|
+
* a withdraw row keeps `Withdrawal failed` (the deposit branch is a no-op explicit set —
|
|
56
|
+
* matches the existing default; symmetric explicit form keeps both branches aligned).
|
|
57
|
+
*/
|
|
58
|
+
declare function ActivityDetailFailed({
|
|
59
|
+
children
|
|
60
|
+
}: {
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
}): _$react_jsx_runtime0.JSX.Element | null;
|
|
63
|
+
declare namespace ActivityDetail {
|
|
64
|
+
type Props = ActivityDetailOwnProps;
|
|
65
|
+
/**
|
|
66
|
+
* Pending-payload branch. Mounts `<ProcessingStateCompound>` with the resolved settlement
|
|
67
|
+
* details. Returns `null` when the resolved payload's kind isn't `"pending"`.
|
|
68
|
+
*/
|
|
69
|
+
const Processing: typeof ActivityDetailProcessing;
|
|
70
|
+
/**
|
|
71
|
+
* Succeeded-payload branch. Mounts `<SuccessStateCompound>` with per-direction headline
|
|
72
|
+
* copy. Returns `null` when the resolved payload's kind isn't `"succeeded"`.
|
|
73
|
+
*/
|
|
74
|
+
const Succeeded: typeof ActivityDetailSucceeded;
|
|
75
|
+
/**
|
|
76
|
+
* Failed-payload branch. Mounts `<ErrorStateCompound>` with per-direction failure headline.
|
|
77
|
+
* Returns `null` when the resolved payload's kind isn't `"failed"`.
|
|
78
|
+
*/
|
|
79
|
+
const Failed: typeof ActivityDetailFailed;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { ActivityDetail };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../i18n/useLingui.js";import"../../../../i18n/index.js";import{useFailureReasonForKind as t}from"../../../orchestrator/failureReason.js";import"../../../orchestrator/index.js";import{Step as n,Steps as r}from"../../../ui/Steps/Steps.js";import"../../../ui/Steps/index.js";import{ProcessingState as i}from"../../processing-state/compound/ProcessingState.js";import"../../processing-state/compound/index.js";import{ErrorState as a}from"../../error-state/compound/ErrorState.js";import"../../error-state/compound/index.js";import{SuccessState as o}from"../../success-state/compound/SuccessState.js";import"../../success-state/compound/index.js";import{useActivitySource as s}from"./context.js";import{ActivityListHeader as c}from"./components/ActivityHeader.js";import{toAssetDescriptor as l}from"../../asset-descriptor.js";import{settlementToWidgetProps as u}from"../adapters/settlementToWidgetProps.js";import{createContext as d,use as f,useEffect as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g(e,t,n){return t===`withdraw`?n===`pending`?e.withdrawPending:n===`succeeded`?e.withdrawSucceeded:e.withdrawFailed:n===`pending`?e.depositPending:n===`succeeded`?e.depositSucceeded:e.depositFailed}const _=d(null);_.displayName=`ActivityDetailContext`;function v({children:t}){let i=s(`ActivityDetail`),{_:a}=e(),o=i.entity,c=o.status===`ready`||o.status===`stale`,l=c?o.raw:void 0,d=i.settlementId,f=l&&d?u(l,d,i.settlementContext):null,v=c&&d!==void 0&&!f,S=i.back,C=i.onLookupMiss;if(p(()=>{v&&(S??C)?.()},[v,S,C]),!f)return null;let w={depositPending:a({id:`JYp-ic`,message:`Deposit processing`}),depositSucceeded:a({id:`e3xU5E`,message:`Deposit received`}),depositFailed:a({id:`i-4Fbp`,message:`Deposit failed`}),withdrawPending:a({id:`w-2VR9`,message:`Withdrawal in progress…`}),withdrawSucceeded:a({id:`q32Nt8`,message:`Withdrawal complete`}),withdrawFailed:a({id:`KTNWsg`,message:`Withdrawal failed`})},T={payload:f.payload,direction:f.direction,headerTitle:g(w,f.direction,f.payload.kind),...S?{onBack:S}:{}},E=h(r,{activeStep:f.payload.kind,children:[m(n,{name:`pending`,children:m(y,{})}),m(n,{name:`succeeded`,children:m(b,{})}),m(n,{name:`failed`,children:m(x,{})})]});return m(_,{value:T,children:t??E})}function y({children:e}){let t=f(_);if(!t||t.payload.kind!==`pending`)return null;let{payload:n,headerTitle:r,onBack:a}=t,o=l(n.creditedAsset)??{symbol:n.creditedAsset.symbol},s={...n.sourceWallet.name===void 0?{}:{name:n.sourceWallet.name},address:n.sourceWallet.address.formatted,...n.sourceWallet.explorerUrl?{explorerUrl:n.sourceWallet.explorerUrl}:{}},u=n.receiveAmount.value===0;return h(i,{amount:n.receiveAmount.formatted,creditedAsset:o,creditedTo:n.creditedTo,headerTitle:r,...u?{loading:!0}:{},...n.txHash?{sourceTx:{hash:n.txHash.formatted,...n.txExplorerUrl?{explorerUrl:n.txExplorerUrl}:{}}}:{},...s.address?{sourceWallet:s}:{},submittedAt:n.submittedAt.formatted,...n.detectedAt?{detectedAt:n.detectedAt.formatted}:{},children:[m(c,{title:r,onBack:a}),e??h(i.Body,{children:[m(i.Hero,{}),m(i.StatusPill,{}),h(i.Details,{children:[m(i.SourceRow,{}),m(i.SourceTxRow,{}),m(i.SubmittedAtRow,{}),m(i.DetectedAtRow,{})]})]})]})}function b({children:t}){let{_:n}=e(),r=f(_);if(!r||r.payload.kind!==`succeeded`)return null;let{payload:i,direction:a,headerTitle:s,onBack:u}=r,d=l(i.creditedAsset)??{symbol:i.creditedAsset.symbol},p={...i.sourceWallet.name===void 0?{}:{name:i.sourceWallet.name},address:i.sourceWallet.address.formatted,...i.sourceWallet.explorerUrl?{explorerUrl:i.sourceWallet.explorerUrl}:{}},g=i.destination.name??i.creditedAsset.symbol,v=i.aggregatorExplorerUrl?{url:i.aggregatorExplorerUrl}:void 0,y=i.depositTx||i.completionTx||i.submittedAt||i.filledAt,b=n(a===`withdraw`?{id:`_girqu`,message:`Withdrawal successful`}:{id:`--OGth`,message:`Deposit successful`}),x=n(a===`withdraw`?{id:`_QZdX-`,message:`Your withdrawal was completed successfully.`}:{id:`oW1G8i`,message:`Your funds were successfully deposited.`});return h(o,{amount:i.receiveAmount.formatted,creditedAsset:d,creditedTo:g,headerTitle:s,headlineTitle:b,headlineDescription:x,...v?{explorer:v}:{},...i.depositTx?{depositTx:{hash:i.depositTx.hash.formatted,...i.depositTx.explorerUrl?{explorerUrl:i.depositTx.explorerUrl}:{}}}:{},...i.completionTx?{completionTx:{hash:i.completionTx.hash.formatted,...i.completionTx.explorerUrl?{explorerUrl:i.completionTx.explorerUrl}:{}}}:{},submittedAt:i.submittedAt.formatted,filledAt:i.filledAt.formatted,totalTime:i.totalTime.formatted,sourceWallet:p,children:[m(c,{title:s,onBack:u}),t??h(o.Body,{children:[m(o.Headline,{}),h(o.Details,{children:[m(o.FillStatusRow,{}),m(o.TotalTimeRow,{}),m(o.SourceRow,{}),m(o.DestinationRow,{}),m(o.YouReceiveRow,{}),y?h(o.MoreDetails,{children:[m(o.DepositTxRow,{}),m(o.CompletionTxRow,{}),m(o.SubmittedAtRow,{}),m(o.FilledAtRow,{})]}):null]})]})]})}function x({children:n}){let{_:r}=e(),i=t(),o=f(_);if(!o||o.payload.kind!==`failed`)return null;let{payload:s,direction:u,headerTitle:d,onBack:p}=o,g={...s.sourceWallet.name===void 0?{}:{name:s.sourceWallet.name},address:s.sourceWallet.address.formatted,...s.sourceWallet.explorerUrl?{explorerUrl:s.sourceWallet.explorerUrl}:{}},v={...s.destination.name===void 0?{}:{name:s.destination.name},address:s.destination.address.formatted},y=l(s.creditedAsset)??{symbol:s.creditedAsset.symbol},b={hash:s.txHash.formatted,...s.txExplorerUrl?{explorerUrl:s.txExplorerUrl}:{}},x=i(s.failureKind);return h(a,{headline:r(u===`withdraw`?{id:`KTNWsg`,message:`Withdrawal failed`}:{id:`i-4Fbp`,message:`Deposit failed`}),reason:x,headerTitle:d,sourceWallet:g,destination:v,receiveAmount:s.receiveAmount.formatted,receiveAsset:y,depositTx:b,submittedAt:s.submittedAt.formatted,failedAt:s.failedAt.formatted,children:[m(c,{title:d,onBack:p}),n??h(a.Body,{children:[m(a.Hero,{}),h(a.Details,{children:[m(a.FillStatusRow,{}),m(a.SourceRow,{}),m(a.DestinationRow,{}),m(a.YouReceiveRow,{}),h(a.MoreDetails,{children:[m(a.DepositTxRow,{}),m(a.SubmittedAtRow,{}),m(a.FailedAtRow,{})]})]}),m(a.HelpInfo,{})]})]})}(function(e){e.Processing=y,e.Succeeded=b,e.Failed=x})(v||={});export{v as ActivityDetail};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/shared/widgets/activity/compound/Row.slots.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Slot vocabulary for `<Activity.Row>`. Same `data-stridge-slot` convention as the parent
|
|
4
|
+
* compound — see {@link import("./Activity.slots").ACTIVITY_SLOTS}. Kept in its
|
|
5
|
+
* own file so the Row primitive stays a self-contained unit (matches the
|
|
6
|
+
* `<PrimitiveName>.slots.ts` convention used across `packages/kit/src/shared/ui/`).
|
|
7
|
+
*/
|
|
8
|
+
declare const ACTIVITY_ROW_SLOTS: {
|
|
9
|
+
readonly root: "activity-row";
|
|
10
|
+
readonly leading: "activity-row-leading";
|
|
11
|
+
readonly statusPip: "activity-row-status-pip";
|
|
12
|
+
readonly text: "activity-row-text";
|
|
13
|
+
readonly title: "activity-row-title";
|
|
14
|
+
readonly date: "activity-row-date";
|
|
15
|
+
readonly trailing: "activity-row-trailing";
|
|
16
|
+
readonly amount: "activity-row-amount";
|
|
17
|
+
readonly chevron: "activity-row-chevron";
|
|
18
|
+
};
|
|
19
|
+
type ActivityRowSlot = (typeof ACTIVITY_ROW_SLOTS)[keyof typeof ACTIVITY_ROW_SLOTS];
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ACTIVITY_ROW_SLOTS, ActivityRowSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`activity-row`,leading:`activity-row-leading`,statusPip:`activity-row-status-pip`,text:`activity-row-text`,title:`activity-row-title`,date:`activity-row-date`,trailing:`activity-row-trailing`,amount:`activity-row-amount`,chevron:`activity-row-chevron`};export{e as ACTIVITY_ROW_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={rowLayout:{"Row__styles.rowLayout":`Row__styles.rowLayout`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInlineStart-kZCmMZ":`xiplbrm`,"paddingInlineEnd-kwRFfy":`xvkiva6`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:35`},leading:{"Row__styles.leading":`Row__styles.leading`,"position-kVAEAm":`x1n2onr6`,"flexShrink-kmuXW":`x2lah0s`,"width-kzqmXN":`x187nhsf`,"height-kZKoxP":`xn3w4p2`,"overflow-kVQacm":`x1rea2x4`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:44`},statusPip:{"Row__styles.statusPip":`Row__styles.statusPip`,"position-kVAEAm":`x10l6tqk`,"zIndex-kY2c9j":`x1vjfegm`,"bottom-krVfgx":`x1t1qrwb`,"insetInlineEnd-kt4wiu":`x1d0qlrl`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"borderRadius-kaIpWk":`x1e6avla`,"borderWidth-kMzoRj":`xdh2fpr`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`xv87bwv`,"pointerEvents-kfzvcC":`x47corl`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:59`},statusPipCompleted:{"Row__styles.statusPipCompleted":`Row__styles.statusPipCompleted`,"backgroundColor-kWkggS":`xelfwhf`,"color-kMwMTN":`x1e8cn3g`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:88`},statusPipFailed:{"Row__styles.statusPipFailed":`Row__styles.statusPipFailed`,"backgroundColor-kWkggS":`x1qvyn6m`,"color-kMwMTN":`x18o46el`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:92`},statusPipPending:{"Row__styles.statusPipPending":`Row__styles.statusPipPending`,"backgroundColor-kWkggS":`x1qkydf4`,"color-kMwMTN":`xi96bwj`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:96`},statusPipIcon:{"Row__styles.statusPipIcon":`Row__styles.statusPipIcon`,"width-kzqmXN":`x1fsd2vl`,"height-kZKoxP":`x170jfvy`,"strokeWidth-kfJifR":`x1ip4yf`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:100`},statusPipSpinner:{"Row__styles.statusPipSpinner":`Row__styles.statusPipSpinner`,"width-kzqmXN":`x1fsd2vl`,"height-kZKoxP":`x170jfvy`,"animationName-kKVMdj":`x1aerksh`,"animationDuration-k44tkh":`x1q3qbx4`,"animationTimingFunction-kyAemX":`x1esw782`,"animationIterationCount-ko0y90":`xa4qsjk`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:105`},text:{"Row__styles.text":`Row__styles.text`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1r05nms`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:123`},title:{"Row__styles.title":`Row__styles.title`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:132`},date:{"Row__styles.date":`Row__styles.date`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:137`},trailing:{"Row__styles.trailing":`Row__styles.trailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:144`},chevron:{"Row__styles.chevron":`Row__styles.chevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`xvlca1e`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Row.styles.ts:150`}};export{e as styles};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/widgets/activity/compound/components/ActivityHeader.d.ts
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Optional override for the title. Defaults to `t\`Activity\`` for the list view; detail
|
|
7
|
+
* views pass a per-state title (e.g. `t\`Deposit in progress\``, `t\`Withdrawal failed\``).
|
|
8
|
+
*/
|
|
9
|
+
title?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Back chevron handler. When set, renders the chevron on the leading edge; when omitted,
|
|
12
|
+
* the title aligns flush with the leading edge. The list view always supplies a handler;
|
|
13
|
+
* detail views always supply one.
|
|
14
|
+
*/
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Shared `Card.Header` for the activity surface. Renders a back chevron (when `onBack` is
|
|
19
|
+
* set) on the leading edge + title + trailing `Dialog.CloseButton`. Mirrors the rhythm of
|
|
20
|
+
* `WithdrawForm.Header` (the kit's other multi-element dialog header) so the header chrome
|
|
21
|
+
* stays consistent across flows.
|
|
22
|
+
*
|
|
23
|
+
* Mounted by both the List view and the Detail view's per-payload compound — the chevron
|
|
24
|
+
* routes `actions.back()` through the source context, which the FSM disambiguates via the
|
|
25
|
+
* active state name (`activityDetail → activityList → source`).
|
|
26
|
+
*/
|
|
27
|
+
declare function ActivityListHeader({
|
|
28
|
+
title,
|
|
29
|
+
onBack
|
|
30
|
+
}: Props): _$react_jsx_runtime0.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Public `<Activity.Header>` part — thin wrapper around {@link ActivityListHeader}
|
|
33
|
+
* that reads `back` from the source context so hosts get a zero-prop part to drop into list
|
|
34
|
+
* compositions. The peer detail compound mounts `<Activity.ListHeader>` itself with an
|
|
35
|
+
* explicit title and back handler.
|
|
36
|
+
*/
|
|
37
|
+
declare function ActivityHeader(): _$react_jsx_runtime0.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ActivityHeader, ActivityListHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import"../../../../ui/IconButton/index.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import"../../../../ui/Card/index.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{ACTIVITY_SLOTS as o}from"../Activity.slots.js";import{styles as s}from"../Activity.styles.js";import{useActivitySource as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:c,onBack:f}){let{_:p}=e(),m=c??p({id:`XJOV1Y`,message:`Activity`});return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[u(`div`,{...d.props(s.headerLeft),children:[typeof f==`function`?l(n,{"aria-label":p({id:`iH8pgl`,message:`Back`}),onClick:f,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:m})]}),l(`div`,{...d.props(s.headerRight),children:l(r.CloseButton,{})})]})}function p(){return l(f,{onBack:c(`Activity.Header`).back})}export{p as ActivityHeader,f as ActivityListHeader};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/widgets/activity/compound/components/Empty.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Empty-state body for the activity surface. Reached when the gateway's poll returned an
|
|
6
|
+
* empty UDA list for the connected owner — typically a brand-new wallet that hasn't deposited
|
|
7
|
+
* or withdrawn yet. Renders centered icon + headline + subline; no CTA — the user is already
|
|
8
|
+
* inside an active dialog, so the surrounding flow (deposit method picker, withdraw form) is
|
|
9
|
+
* the implicit next step.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
declare function ActivityEmpty(): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ActivityEmpty };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ClockIcon as t}from"../../../../icons/ClockIcon.js";import"../../../../../icons/index.js";import{text as n}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{ACTIVITY_SLOTS as r}from"../Activity.slots.js";import{styles as i}from"../Activity.styles.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import*as s from"@stylexjs/stylex";function c(){let{_:c}=e();return o(`div`,{"data-stridge-slot":r.empty,...s.props(i.empty),children:[a(t,{"aria-hidden":!0,"data-stridge-slot":r.emptyIcon,...s.props(i.emptyIcon)}),a(n.span,{size:`base`,fontWeight:`semibold`,color:`default`,children:c({id:`aXFOuf`,message:`No activity yet`})}),a(n.span,{size:`sm`,fontWeight:`medium`,color:`subdued`,children:c({id:`Xzw7uC`,message:`Your deposits and withdrawals will appear here.`})})]})}export{c as ActivityEmpty};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/widgets/activity/compound/components/ErrorView.d.ts
|
|
4
|
+
interface ActivityErrorViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* Retry handler. Wired by the List to fire a fresh `refresh(signal)` against the source
|
|
7
|
+
* context — the entity transitions back through `loading → ready | error`.
|
|
8
|
+
*/
|
|
9
|
+
onRetry: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Initial-error body for the activity surface. Rendered only when the first fetch failed
|
|
13
|
+
* AND the entity has no prior payload to fall back to (status `error` from `idle | loading`).
|
|
14
|
+
* Refresh failures while a payload is already cached are silent — the entity stays `stale`
|
|
15
|
+
* and the next controller-driven `watchActivity` tick retries; that branch never reaches this
|
|
16
|
+
* component.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
* @see {@link ActivityList} for the entity-status branching that decides when this
|
|
20
|
+
* renders vs the silent stale-while-revalidate path.
|
|
21
|
+
*/
|
|
22
|
+
declare function ActivityErrorView({
|
|
23
|
+
onRetry
|
|
24
|
+
}: ActivityErrorViewProps): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ActivityErrorView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{AlertIcon as t}from"../../../../icons/AlertIcon.js";import"../../../../../icons/index.js";import{Button as n}from"../../../../ui/Button/Button.js";import"../../../../ui/Button/index.js";import{Alert as r}from"../../../../ui/Alert/Alert.js";import"../../../../ui/Alert/index.js";import{ACTIVITY_SLOTS as i}from"../Activity.slots.js";import{styles as a}from"../Activity.styles.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({onRetry:l}){let{_:u}=e();return s(`div`,{"data-stridge-slot":i.error,...c.props(a.error),children:[o(r,{variant:`danger`,icon:o(t,{}),children:u({id:`B-4zEC`,message:`Couldn't load activity. Please try again.`})}),o(`div`,{...c.props(a.retryRow),children:o(n,{type:`button`,variant:`secondary`,size:`sm`,onClick:l,"data-stridge-slot":i.retry,children:u({id:`KDw4GX`,message:`Try again`})})})]})}export{l as ActivityErrorView};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/widgets/activity/compound/components/List.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* List body for the activity surface. Reads the `activity` entity from
|
|
6
|
+
* {@link useActivitySource} and branches on status:
|
|
7
|
+
*
|
|
8
|
+
* - `idle | loading` (cold path, no prior payload) → skeleton × 4.
|
|
9
|
+
* - `ready | stale` → rows. `stale` keeps the prior list rendered while a refresh is in
|
|
10
|
+
* flight so the user never sees an empty pause. The refresh is silent — no spinner.
|
|
11
|
+
* - `error` (cold path) → {@link ActivityErrorView} with a retry button.
|
|
12
|
+
* - `ready` with zero rows → {@link ActivityEmpty}.
|
|
13
|
+
*
|
|
14
|
+
* Recurring updates land via the controller-mounted `watchActivity` watcher (mounted on entry
|
|
15
|
+
* to `activityList` / `activityDetail`, with adaptive cadence — short while any row is
|
|
16
|
+
* `pending`, long once all rows are terminal). The widget itself is a pure reader; the only
|
|
17
|
+
* imperative surface left here is the retry button, which fires `source.refresh(signal)` once.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
declare function ActivityList(): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ActivityList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Card as e}from"../../../../ui/Card/Card.js";import"../../../../ui/Card/index.js";import{Skeleton as t}from"../../../../ui/Skeleton/Skeleton.js";import"../../../../ui/Skeleton/index.js";import{ACTIVITY_SLOTS as n}from"../Activity.slots.js";import{styles as r}from"../Activity.styles.js";import{useActivitySource as i}from"../context.js";import{ActivityEmpty as a}from"./Empty.js";import{ActivityErrorView as o}from"./ErrorView.js";import{ActivityRow as s}from"./Row.js";import{useRef as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";const f=[`skeleton-1`,`skeleton-2`,`skeleton-3`,`skeleton-4`];function p(){let t=i(`Activity.List`),u=c(null),f=c(t.refresh);f.current=t.refresh;let p=t.entity;if(p.status===`error`)return l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),children:l(o,{onRetry:()=>{u.current?.abort();let e=new AbortController;u.current=e,f.current(e.signal)}})});if(p.status===`idle`||p.status===`loading`)return l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),"aria-busy":`true`,"aria-live":`polite`,children:l(g,{})});let _=p.payload.rows;return _.length===0?l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),children:l(a,{})}):l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body,r.bodyCap,r.bodyEnter),children:l(`ul`,{"data-stridge-slot":n.list,style:m,children:_.map(e=>l(`li`,{style:h,children:l(s,{payload:e,onSelect:t.selectSettlement})},`${e.udaId}:${e.id}`))})})}const m={display:`flex`,flexDirection:`column`,gap:`var(--stridge-kit-space-2)`,listStyle:`none`,marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0},h={listStyle:`none`};function g(){return l(`div`,{"data-stridge-slot":n.skeleton,children:f.map(e=>u(`div`,{"data-stridge-slot":n.skeletonRow,...d.props(r.skeletonRow),children:[l(t,{width:44,height:44,radius:999}),u(`div`,{...d.props(r.skeletonText),children:[l(t,{width:`60%`,height:14}),l(t,{width:`40%`,height:12})]}),l(t,{width:56,height:14})]},e))})}export{p as ActivityList};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ActivityRowPayload } from "../../payloads.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/widgets/activity/compound/components/Row.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props the row needs to render. The payload carries *raw* numeric / identity slots — the row
|
|
7
|
+
* formats every visible string itself via `useLingui()` so locale flips take effect on the
|
|
8
|
+
* same React commit (mirrors deposit's `AmountEntry.tsx` / `ConfirmDeposit.tsx` pattern).
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
/**
|
|
12
|
+
* Raw row payload from the driver's transformer. Carries amount value + kind, asset
|
|
13
|
+
* identity, and updated-at timestamp; the row component formats them inline per render.
|
|
14
|
+
*/
|
|
15
|
+
payload: ActivityRowPayload;
|
|
16
|
+
/**
|
|
17
|
+
* Row click handler. Receives the settlement id from the payload; the parent compound
|
|
18
|
+
* forwards it to {@link import("../context").ActivitySourceValue.selectSettlement}.
|
|
19
|
+
*/
|
|
20
|
+
onSelect: (settlementId: string) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Public alias for {@link Props}. Preserved as the externally visible name so the
|
|
24
|
+
* compound's `index.ts` and the API-extractor snapshot keep referencing `ActivityRowProps`.
|
|
25
|
+
*/
|
|
26
|
+
type ActivityRowProps = Props;
|
|
27
|
+
/**
|
|
28
|
+
* One row of the activity surface — leading asset glyph (with corner status pip), title +
|
|
29
|
+
* date stack, trailing amount + chevron. Composes
|
|
30
|
+
* `<SelectableTile shape="card" interactive="navigation">` so the surface treatment (hover
|
|
31
|
+
* wash, focus ring, border palette) matches the kit's asset-picker rows; the `rowLayout`
|
|
32
|
+
* override keeps the row's 68px height byte-identical to the design (44px disc + 12px block
|
|
33
|
+
* padding + 16px inline padding + 12px gap). `aria-label` encodes direction + amount + date
|
|
34
|
+
* because the leading icon doesn't carry direction on its own.
|
|
35
|
+
*
|
|
36
|
+
* Designed against Paper artboard `1HA2-0` (Deposit Tracker — Cards, Dark) — see
|
|
37
|
+
* {@link import("../Row.styles").styles} for the per-property snap rationale.
|
|
38
|
+
*
|
|
39
|
+
* **Asset glyph composition (Paper artboard `1HA2-0`).** The artboard shows the status pip
|
|
40
|
+
* in the bottom-trailing corner of the asset logo AND omits the chain glyph badge entirely.
|
|
41
|
+
* Row density is the optimization target, and the user is already inside the brand's dialog
|
|
42
|
+
* so chain identity carries lower weight than recognising the action+status at a glance.
|
|
43
|
+
* {@link TokenLogo}'s built-in chain badge is therefore disabled via `hideChainBadge` and
|
|
44
|
+
* the {@link StatusPip} renders inside the row's leading slot instead.
|
|
45
|
+
*/
|
|
46
|
+
declare function ActivityRow({
|
|
47
|
+
payload,
|
|
48
|
+
onSelect
|
|
49
|
+
}: Props): _$react_jsx_runtime0.JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ActivityRow, ActivityRowProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{formatSmartRelative as t}from"../../../../format/formatSmartRelative.js";import{formatTokenAmount as n}from"../../../../format/formatTokenAmount.js";import{formatUsd as r}from"../../../../format/formatUsd.js";import{ChevronRightIcon as i}from"../../../../icons/ChevronRightIcon.js";import"../../../../../icons/index.js";import{SelectableTile as a}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as o}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{TokenLogo as s}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import{ACTIVITY_ROW_SLOTS as c}from"../Row.slots.js";import{styles as l}from"../Row.styles.js";import{StatusPip as u}from"./StatusPip.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({payload:m,onSelect:g}){let{_,i18n:v}=e(),y={depositCompleted:_({id:`3kg1gB`,message:`Deposit completed`}),depositFailed:_({id:`i-4Fbp`,message:`Deposit failed`}),depositInProgress:_({id:`Cs44l6`,message:`Deposit in progress`}),withdrawalCompleted:_({id:`jKZO-R`,message:`Withdrawal completed`}),withdrawalFailed:_({id:`KTNWsg`,message:`Withdrawal failed`}),withdrawalInProgress:_({id:`6yS5kL`,message:`Withdrawal in progress`})},b=h(m.direction,m.status.kind,y),x=m.amount.kind===`usd`?r(m.amount.value,v):`${n(m.amount.value,v,{maxDecimals:m.assetDecimals})} ${m.assetSymbol}`,S=t(m.updatedAtMs,Date.now(),v),C=m.direction===`deposit`?_({id:`hBIHD-`,message:`Deposit of {amount}, {date}`,values:{amount:x,date:S}}):_({id:`Rm325-`,message:`Withdrawal of {amount}, {date}`,values:{amount:x,date:S}});return f(a,{shape:`card`,interactive:`navigation`,"data-stridge-slot":c.root,"aria-label":C,onClick:()=>g(m.id),...p.props(l.rowLayout),children:[f(`span`,{"data-stridge-slot":c.leading,...p.props(l.leading),children:[d(s,{symbol:m.assetSymbol,...m.chainId===void 0?{}:{chainId:m.chainId},...m.assetLogoUrl===void 0?{}:{logoUrl:m.assetLogoUrl},...m.chainLogoUrl===void 0?{}:{chainLogoUrl:m.chainLogoUrl},size:44,hideChainBadge:!0}),d(u,{kind:m.status.kind})]}),f(`span`,{"data-stridge-slot":c.text,...p.props(l.text),children:[d(o.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":c.title,...p.props(l.title),children:b}),d(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,"data-stridge-slot":c.date,...p.props(l.date),children:S})]}),f(`span`,{"data-stridge-slot":c.trailing,...p.props(l.trailing),children:[d(o.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":c.amount,children:x}),d(i,{"aria-hidden":!0,"data-stridge-slot":c.chevron,...p.props(l.chevron)})]})]})}function h(e,t,n){return e===`deposit`?t===`completed`?n.depositCompleted:t===`failed`?n.depositFailed:n.depositInProgress:t===`completed`?n.withdrawalCompleted:t===`failed`?n.withdrawalFailed:n.withdrawalInProgress}export{m as ActivityRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{CheckIcon as e}from"../../../../icons/CheckIcon.js";import{LoaderIcon as t}from"../../../../icons/LoaderIcon.js";import{XIcon as n}from"../../../../icons/XIcon.js";import"../../../../../icons/index.js";import{ACTIVITY_ROW_SLOTS as r}from"../Row.slots.js";import{styles as i}from"../Row.styles.js";import{jsx as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({kind:s}){let c=s===`completed`?i.statusPipCompleted:s===`failed`?i.statusPipFailed:i.statusPipPending;return a(`span`,{"data-stridge-slot":r.statusPip,...o.props(i.statusPip,c),children:s===`completed`?a(e,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):s===`failed`?a(n,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):a(t,{"aria-hidden":!0,...o.props(i.statusPipSpinner)})})}export{s as StatusPip};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Entity } from "../../../driver/types.js";
|
|
2
|
+
import { ActivityPayload } from "../payloads.js";
|
|
3
|
+
import { SettlementPayloadContext } from "../../../../flows/deposit/driver/transformers/settlementToPayload.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { GatewayPollResponse, GatewayUdaDto } from "@stridge/sdk";
|
|
6
|
+
|
|
7
|
+
//#region src/shared/widgets/activity/compound/context.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Source of truth handed to `<Activity>` and `<ActivityDetail>` from whichever
|
|
10
|
+
* dialog (deposit / withdraw) mounts them. Each dialog assembles this value once from its own
|
|
11
|
+
* snapshot + actions and wraps the activity step body in
|
|
12
|
+
* `<ActivitySourceProvider value={…}>`. The compound stays flow-agnostic — it reads
|
|
13
|
+
* the entity and the imperative actions from this single value.
|
|
14
|
+
*
|
|
15
|
+
* View routing is external: the FSM now exposes `activityList` and `activityDetail` as separate
|
|
16
|
+
* state names; the dialog's step router mounts {@link Activity} for the list step and
|
|
17
|
+
* {@link ActivityDetail} for the detail step. Each orchestrated wrapper supplies the
|
|
18
|
+
* source value with the slots its step needs (the list wrapper omits `settlementId`; the
|
|
19
|
+
* detail wrapper sets it).
|
|
20
|
+
*
|
|
21
|
+
* @see {@link ActivitySourceProvider}
|
|
22
|
+
* @see {@link useActivitySource}
|
|
23
|
+
*/
|
|
24
|
+
interface ActivitySourceValue {
|
|
25
|
+
/**
|
|
26
|
+
* The driver's `activity` entity. Same shape on both flows (`DepositSnapshot["activity"]`
|
|
27
|
+
* and `WithdrawSnapshot["activity"]` are structurally identical — both back onto the
|
|
28
|
+
* multi-UDA envelope from `GET /gateway/{owner}`). Status discriminator drives the
|
|
29
|
+
* compound's branch (idle / loading → skeleton; ready / stale → rows; error → retry).
|
|
30
|
+
*/
|
|
31
|
+
entity: Entity<ActivityPayload, ReadonlyArray<GatewayUdaDto>, GatewayPollResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Trigger a fresh one-shot fetch. Wired by each dialog to `driver.refreshActivity(signal)`.
|
|
34
|
+
* The compound calls this from the error-view retry button; each call passes an
|
|
35
|
+
* `AbortSignal` the compound owns so it can cancel mid-fetch on rapid re-clicks. Recurring
|
|
36
|
+
* updates while the list is visible land separately via the controller-mounted
|
|
37
|
+
* `watchActivity` watcher — this callback is not the steady-state polling surface.
|
|
38
|
+
*/
|
|
39
|
+
refresh: (signal: AbortSignal) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Dispatch a row selection. Wired to `actions.selectSettlement(id)` — the FSM transitions
|
|
42
|
+
* from `activityList` to `activityDetail` carrying the selected `settlementId`.
|
|
43
|
+
*/
|
|
44
|
+
selectSettlement: (settlementId: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Back chevron handler. Wired to `actions.back()` — the FSM disambiguates via the current
|
|
47
|
+
* state name (`activityDetail → activityList → source`). The compound renders the chevron in
|
|
48
|
+
* both the list step's header AND inside the detail step's header composition.
|
|
49
|
+
*
|
|
50
|
+
* Optional. The per-flow source-bridge hook omits `back` when the active state's
|
|
51
|
+
* `backTarget.kind === "closed"` (imperative direct-entry — no source step to restore), so
|
|
52
|
+
* the header renders without a chevron. The user dismisses via the dialog's `X`.
|
|
53
|
+
*/
|
|
54
|
+
back?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* Recovery fallback the detail compound invokes when the selected settlement has aged off
|
|
57
|
+
* the envelope (rare race — host calls `useActivity().open({ settlementId })`, then the
|
|
58
|
+
* background watcher tick lands a fresh response without that row). The compound prefers
|
|
59
|
+
* {@link back} when present; this slot only fires on direct-entry detail where `back` is
|
|
60
|
+
* undefined and the user would otherwise stare at an empty body until they hit `X`.
|
|
61
|
+
*
|
|
62
|
+
* Optional. The deposit / withdraw bridges always supply `back`, so they leave this unset.
|
|
63
|
+
* The standalone activity bridge wires it to a "re-open list" dispatch — `useActivity().open()`
|
|
64
|
+
* with no args — which the standalone reducer re-targets to `activityList` from `activityDetail`.
|
|
65
|
+
*/
|
|
66
|
+
onLookupMiss?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Selected settlement id when the dialog is mounting the detail step. Carried so the
|
|
69
|
+
* `<ActivityDetail>` compound can look up the matching `GatewaySettlementDto`
|
|
70
|
+
* inside `entity.raw[].settlements[]` and feed it to {@link
|
|
71
|
+
* import("../adapters").settlementToWidgetProps}. Absent when the list wrapper supplies
|
|
72
|
+
* the source value.
|
|
73
|
+
*/
|
|
74
|
+
settlementId?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Context the detail compound's adapter passes to {@link
|
|
77
|
+
* import("#/flows/deposit/driver/transformers").settlementToPayload}. Each dialog
|
|
78
|
+
* assembles this from its own driver snapshot — deposit reads `wallet`, `brand`, the
|
|
79
|
+
* driver's explorers map; withdraw reads its equivalents. Carrying the resolved context
|
|
80
|
+
* here keeps the compound flow-agnostic.
|
|
81
|
+
*/
|
|
82
|
+
settlementContext: SettlementPayloadContext;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Provider for {@link ActivitySourceValue}. Each dialog mounts one above its
|
|
86
|
+
* activity step body — see `DepositDialog` / `WithdrawDialog`.
|
|
87
|
+
*/
|
|
88
|
+
declare const ActivitySourceProvider: _$react.Provider<ActivitySourceValue | null>;
|
|
89
|
+
/**
|
|
90
|
+
* Read the active {@link ActivitySourceValue}. Throws when called outside an
|
|
91
|
+
* `<ActivitySourceProvider>`.
|
|
92
|
+
*/
|
|
93
|
+
declare function useActivitySource(consumer: string): ActivitySourceValue;
|
|
94
|
+
//#endregion
|
|
95
|
+
export { ActivitySourceProvider, ActivitySourceValue, useActivitySource };
|