@stridge/kit 0.1.0-alpha.0
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/LICENSE +21 -0
- package/dist/KitProvider.d.ts +91 -0
- package/dist/KitProvider.js +1 -0
- package/dist/_internal/deposit/driver/index.d.ts +5 -0
- package/dist/_internal/deposit/driver/index.js +1 -0
- package/dist/_internal/deposit/widgets/index.d.ts +11 -0
- package/dist/_internal/deposit/widgets/index.js +1 -0
- package/dist/_internal/drivers/stridge/index.d.ts +6 -0
- package/dist/_internal/drivers/stridge/index.js +1 -0
- package/dist/_internal/drivers/stridge-mock/index.d.ts +5 -0
- package/dist/_internal/drivers/stridge-mock/index.js +1 -0
- package/dist/_internal/index.d.ts +2 -0
- package/dist/_internal/index.js +1 -0
- package/dist/_internal/withdraw/driver/index.d.ts +6 -0
- package/dist/_internal/withdraw/driver/index.js +1 -0
- package/dist/_internal/withdraw/widgets/index.d.ts +5 -0
- package/dist/_internal/withdraw/widgets/index.js +1 -0
- package/dist/banners/index.d.ts +1 -0
- package/dist/banners/index.js +1 -0
- package/dist/banners/useBannerAck.d.ts +61 -0
- package/dist/banners/useBannerAck.js +1 -0
- package/dist/deposit/compound/index.d.ts +28 -0
- package/dist/deposit/compound/index.js +1 -0
- package/dist/deposit/dialog/index.d.ts +2 -0
- package/dist/deposit/dialog/index.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +29 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +113 -0
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -0
- package/dist/drivers/stridge/internal/encoding.js +1 -0
- package/dist/drivers/stridge/internal/env.js +1 -0
- package/dist/drivers/stridge/internal/metadata.js +1 -0
- package/dist/drivers/stridge/internal/pollOnce.js +1 -0
- package/dist/drivers/stridge/internal/signAndConfirm.js +1 -0
- package/dist/drivers/stridge/poll.js +1 -0
- package/dist/drivers/stridge/rpc.d.ts +77 -0
- package/dist/drivers/stridge/rpc.js +1 -0
- package/dist/drivers/stridge/types.d.ts +145 -0
- package/dist/drivers/stridge/types.js +1 -0
- package/dist/drivers/stridge/wagmiSigner.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +120 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +118 -0
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -0
- package/dist/drivers/stridge-mock/fixtures.d.ts +127 -0
- package/dist/drivers/stridge-mock/fixtures.js +1 -0
- package/dist/drivers/stridge-mock/store.js +1 -0
- package/dist/drivers/stridge-mock/triggers.d.ts +41 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.styles.js +1 -0
- package/dist/flows/deposit/dialog/DepositDialog.d.ts +112 -0
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -0
- package/dist/flows/deposit/driver/context.d.ts +37 -0
- package/dist/flows/deposit/driver/context.js +1 -0
- package/dist/flows/deposit/driver/payloads.d.ts +342 -0
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.js +1 -0
- package/dist/flows/deposit/driver/types.d.ts +177 -0
- package/dist/flows/deposit/orchestrator/controller.d.ts +11 -0
- package/dist/flows/deposit/orchestrator/controller.js +1 -0
- package/dist/flows/deposit/orchestrator/reducer.js +1 -0
- package/dist/flows/deposit/orchestrator/resolveAssetById.js +1 -0
- package/dist/flows/deposit/orchestrator/steps.d.ts +23 -0
- package/dist/flows/deposit/orchestrator/steps.js +1 -0
- package/dist/flows/deposit/orchestrator/types.d.ts +266 -0
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +35 -0
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +35 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +25 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/asset-picker/index.js +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +31 -0
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +30 -0
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +51 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +11 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +32 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +23 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +129 -0
- package/dist/flows/deposit/widgets/deposit/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/deposit/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.d.ts +102 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.styles.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.d.ts +13 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.d.ts +14 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.d.ts +26 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.d.ts +35 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.d.ts +18 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +188 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/index.js +1 -0
- package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +30 -0
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -0
- package/dist/flows/deposit/widgets/error-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/error-state/index.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +31 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/processing-state/index.js +1 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +30 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -0
- package/dist/flows/deposit/widgets/success-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/success-state/index.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +41 -0
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +56 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.d.ts +15 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.d.ts +10 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +17 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/InfoTooltip.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +21 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.d.ts +11 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.d.ts +11 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +187 -0
- package/dist/flows/deposit/widgets/transfer-crypto/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/index.js +1 -0
- package/dist/flows/shared/transformers/classifySettlementStatus.js +1 -0
- package/dist/flows/shared/transformers/computeQuoteAttrs.js +1 -0
- package/dist/flows/shared/transformers/parseIsoMs.js +1 -0
- package/dist/flows/shared/transformers/parseSmallestUnit.js +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +103 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +36 -0
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +1 -0
- package/dist/flows/withdraw/driver/context.d.ts +24 -0
- package/dist/flows/withdraw/driver/context.js +1 -0
- package/dist/flows/withdraw/driver/dto.d.ts +41 -0
- package/dist/flows/withdraw/driver/payloads.d.ts +206 -0
- package/dist/flows/withdraw/driver/transformers/balanceToWithdrawableBalancesPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/quoteToWithdrawalPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -0
- package/dist/flows/withdraw/driver/types.d.ts +133 -0
- package/dist/flows/withdraw/orchestrator/controller.d.ts +11 -0
- package/dist/flows/withdraw/orchestrator/controller.js +1 -0
- package/dist/flows/withdraw/orchestrator/index.d.ts +4 -0
- package/dist/flows/withdraw/orchestrator/index.js +1 -0
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -0
- package/dist/flows/withdraw/orchestrator/types.d.ts +156 -0
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +23 -0
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +22 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +29 -0
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.d.ts +55 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.d.ts +31 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.styles.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.d.ts +12 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +20 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.d.ts +17 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.d.ts +18 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +21 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/InfoTooltip.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.d.ts +13 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +19 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/context.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/index.d.ts +3 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +149 -0
- package/dist/flows/withdraw/widgets/withdraw-form/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +19 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +20 -0
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/index.js +1 -0
- package/dist/format/index.d.ts +10 -0
- package/dist/format/index.js +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/locales/ar.d.ts +6 -0
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/es.d.ts +6 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/icons/index.d.ts +27 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1 -0
- package/dist/kit/package.js +1 -0
- package/dist/scope/KitPortalScope.d.ts +31 -0
- package/dist/scope/KitPortalScope.js +1 -0
- package/dist/scope/KitScope.d.ts +63 -0
- package/dist/scope/KitScope.js +1 -0
- package/dist/scope/KitScope.slots.js +1 -0
- package/dist/scope/context.d.ts +67 -0
- package/dist/scope/context.js +1 -0
- package/dist/scope/index.d.ts +3 -0
- package/dist/scope/index.js +1 -0
- package/dist/shared/chains/index.d.ts +40 -0
- package/dist/shared/chains/index.js +1 -0
- package/dist/shared/constants/brand-links.js +1 -0
- package/dist/shared/dialog/DialogShell.d.ts +63 -0
- package/dist/shared/dialog/DialogShell.js +1 -0
- package/dist/shared/dialog/Frame.js +1 -0
- package/dist/shared/dialog/GatewayKitRoot.js +1 -0
- package/dist/shared/dialog/StepTransition.js +1 -0
- package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -0
- package/dist/shared/driver/types.d.ts +69 -0
- package/dist/shared/error-handling/components/GatewayKitBoundary.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.slots.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.styles.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Action.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Actions.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/CodeSample.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Description.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/DetailRow.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Guidance.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Section.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetails.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetailsToggle.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Title.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/context.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/index.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitRecoveryError.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitSetupError.js +1 -0
- package/dist/shared/error-handling/constants/guides.js +1 -0
- package/dist/shared/error-handling/constants/snippets.js +6 -0
- package/dist/shared/error-handling/index.js +1 -0
- package/dist/shared/error-handling/lib/isWagmiProviderMissingError.js +1 -0
- package/dist/shared/format/formatDurationCoarse.d.ts +29 -0
- package/dist/shared/format/formatDurationCoarse.js +1 -0
- package/dist/shared/format/formatDurationCompact.d.ts +28 -0
- package/dist/shared/format/formatDurationCompact.js +1 -0
- package/dist/shared/format/formatNetworkName.d.ts +27 -0
- package/dist/shared/format/formatNetworkName.js +1 -0
- package/dist/shared/format/formatPercent.d.ts +23 -0
- package/dist/shared/format/formatPercent.js +1 -0
- package/dist/shared/format/formatTimestamp.d.ts +22 -0
- package/dist/shared/format/formatTimestamp.js +1 -0
- package/dist/shared/format/formatTokenAmount.d.ts +46 -0
- package/dist/shared/format/formatTokenAmount.js +1 -0
- package/dist/shared/format/formatUsd.d.ts +41 -0
- package/dist/shared/format/formatUsd.js +1 -0
- package/dist/shared/format/shortenAddress.d.ts +27 -0
- package/dist/shared/format/shortenAddress.js +1 -0
- package/dist/shared/format/types.d.ts +33 -0
- package/dist/shared/i18n/KitI18nProvider.d.ts +23 -0
- package/dist/shared/i18n/KitI18nProvider.js +1 -0
- package/dist/shared/i18n/Trans.d.ts +39 -0
- package/dist/shared/i18n/Trans.js +1 -0
- package/dist/shared/i18n/createKitI18n.d.ts +41 -0
- package/dist/shared/i18n/createKitI18n.js +1 -0
- package/dist/shared/i18n/defaultI18n.js +1 -0
- package/dist/shared/i18n/getLocaleDirection.d.ts +24 -0
- package/dist/shared/i18n/getLocaleDirection.js +1 -0
- package/dist/shared/i18n/locales.d.ts +31 -0
- package/dist/shared/i18n/locales.js +1 -0
- package/dist/shared/i18n/useKitI18n.d.ts +14 -0
- package/dist/shared/i18n/useKitI18n.js +1 -0
- package/dist/shared/i18n/useLingui.d.ts +35 -0
- package/dist/shared/i18n/useLingui.js +1 -0
- package/dist/shared/i18n/useT.d.ts +25 -0
- package/dist/shared/i18n/useT.js +1 -0
- package/dist/shared/icons/AlertIcon.d.ts +12 -0
- package/dist/shared/icons/AlertIcon.js +1 -0
- package/dist/shared/icons/ArrowDownIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowDownIcon.js +1 -0
- package/dist/shared/icons/ArrowRightIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowRightIcon.js +1 -0
- package/dist/shared/icons/ArrowRightLeftIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowRightLeftIcon.js +1 -0
- package/dist/shared/icons/CheckIcon.d.ts +7 -0
- package/dist/shared/icons/CheckIcon.js +1 -0
- package/dist/shared/icons/ChevronDownIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronDownIcon.js +1 -0
- package/dist/shared/icons/ChevronLeftIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronLeftIcon.js +1 -0
- package/dist/shared/icons/ChevronRightIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronRightIcon.js +1 -0
- package/dist/shared/icons/ChevronUpIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronUpIcon.js +1 -0
- package/dist/shared/icons/CircleArrowUpIcon.d.ts +7 -0
- package/dist/shared/icons/CircleArrowUpIcon.js +1 -0
- package/dist/shared/icons/CircleHelpIcon.d.ts +7 -0
- package/dist/shared/icons/CircleHelpIcon.js +1 -0
- package/dist/shared/icons/ClockIcon.d.ts +7 -0
- package/dist/shared/icons/ClockIcon.js +1 -0
- package/dist/shared/icons/CopyIcon.d.ts +7 -0
- package/dist/shared/icons/CopyIcon.js +1 -0
- package/dist/shared/icons/ExternalLinkIcon.d.ts +7 -0
- package/dist/shared/icons/ExternalLinkIcon.js +1 -0
- package/dist/shared/icons/InfoIcon.d.ts +7 -0
- package/dist/shared/icons/InfoIcon.js +1 -0
- package/dist/shared/icons/LoaderIcon.d.ts +7 -0
- package/dist/shared/icons/LoaderIcon.js +1 -0
- package/dist/shared/icons/MailIcon.d.ts +7 -0
- package/dist/shared/icons/MailIcon.js +1 -0
- package/dist/shared/icons/PackageIcon.d.ts +7 -0
- package/dist/shared/icons/PackageIcon.js +1 -0
- package/dist/shared/icons/QrCodeIcon.d.ts +7 -0
- package/dist/shared/icons/QrCodeIcon.js +1 -0
- package/dist/shared/icons/WalletIcon.d.ts +7 -0
- package/dist/shared/icons/WalletIcon.js +1 -0
- package/dist/shared/icons/XIcon.d.ts +7 -0
- package/dist/shared/icons/XIcon.js +1 -0
- package/dist/shared/icons/exchanges/BinanceIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/BinanceIcon.js +1 -0
- package/dist/shared/icons/exchanges/CoinbaseIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/CoinbaseIcon.js +1 -0
- package/dist/shared/icons/exchanges/KrakenIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/KrakenIcon.js +1 -0
- package/dist/shared/icons/exchanges/OkxIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/OkxIcon.js +1 -0
- package/dist/shared/icons/exchanges/RobinhoodIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/RobinhoodIcon.js +1 -0
- package/dist/shared/icons/exchanges/index.d.ts +5 -0
- package/dist/shared/icons/exchanges/index.js +1 -0
- package/dist/shared/orchestrator/failureReason.js +1 -0
- package/dist/shared/orchestrator/index.js +1 -0
- package/dist/shared/orchestrator/toFailure.js +1 -0
- package/dist/shared/orchestrator/types.d.ts +20 -0
- package/dist/shared/orchestrator/useDialogLifecycle.js +1 -0
- package/dist/shared/orchestrator/useDriverSettlementListener.js +1 -0
- package/dist/shared/orchestrator/useEffectiveState.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -0
- package/dist/shared/orchestrator/userRejection.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.d.ts +20 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.slots.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.styles.js +1 -0
- package/dist/shared/primitives/TxHashValue/index.d.ts +2 -0
- package/dist/shared/primitives/TxHashValue/index.js +1 -0
- package/dist/shared/primitives/TxHashValue/types.d.ts +25 -0
- package/dist/shared/primitives/WalletValue/WalletValue.d.ts +40 -0
- package/dist/shared/primitives/WalletValue/WalletValue.js +1 -0
- package/dist/shared/primitives/WalletValue/index.d.ts +1 -0
- package/dist/shared/primitives/WalletValue/index.js +1 -0
- package/dist/shared/quote/index.js +1 -0
- package/dist/shared/quote/useQuoteCountdown.js +1 -0
- package/dist/shared/styles/tokens.stylex.js +1 -0
- package/dist/shared/ui/Alert/Alert.d.ts +105 -0
- package/dist/shared/ui/Alert/Alert.js +1 -0
- package/dist/shared/ui/Alert/Alert.slots.d.ts +10 -0
- package/dist/shared/ui/Alert/Alert.slots.js +1 -0
- package/dist/shared/ui/Alert/Alert.styles.js +1 -0
- package/dist/shared/ui/Alert/index.d.ts +2 -0
- package/dist/shared/ui/Alert/index.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.d.ts +132 -0
- package/dist/shared/ui/AmountInput/AmountInput.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.slots.d.ts +11 -0
- package/dist/shared/ui/AmountInput/AmountInput.slots.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.styles.js +1 -0
- package/dist/shared/ui/AmountInput/attachInputNormalization.js +1 -0
- package/dist/shared/ui/AmountInput/context.js +1 -0
- package/dist/shared/ui/AmountInput/index.d.ts +3 -0
- package/dist/shared/ui/AmountInput/index.js +1 -0
- package/dist/shared/ui/AmountInput/useAutoShrinkFontSize.js +14 -0
- package/dist/shared/ui/AmountInput/utils.d.ts +12 -0
- package/dist/shared/ui/AmountInput/utils.js +1 -0
- package/dist/shared/ui/Badge/Badge.d.ts +89 -0
- package/dist/shared/ui/Badge/Badge.js +1 -0
- package/dist/shared/ui/Badge/Badge.slots.d.ts +7 -0
- package/dist/shared/ui/Badge/Badge.slots.js +1 -0
- package/dist/shared/ui/Badge/Badge.styles.js +1 -0
- package/dist/shared/ui/Badge/index.d.ts +2 -0
- package/dist/shared/ui/Badge/index.js +1 -0
- package/dist/shared/ui/Button/Button.d.ts +82 -0
- package/dist/shared/ui/Button/Button.js +1 -0
- package/dist/shared/ui/Button/Button.slots.d.ts +7 -0
- package/dist/shared/ui/Button/Button.slots.js +1 -0
- package/dist/shared/ui/Button/Button.styles.js +1 -0
- package/dist/shared/ui/Button/index.d.ts +2 -0
- package/dist/shared/ui/Button/index.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +93 -0
- package/dist/shared/ui/Card/Card.js +1 -0
- package/dist/shared/ui/Card/Card.slots.d.ts +10 -0
- package/dist/shared/ui/Card/Card.slots.js +1 -0
- package/dist/shared/ui/Card/Card.styles.js +1 -0
- package/dist/shared/ui/Card/index.d.ts +2 -0
- package/dist/shared/ui/Card/index.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.d.ts +57 -0
- package/dist/shared/ui/Collapsible/Collapsible.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.slots.d.ts +10 -0
- package/dist/shared/ui/Collapsible/Collapsible.slots.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.styles.js +1 -0
- package/dist/shared/ui/Collapsible/index.d.ts +2 -0
- package/dist/shared/ui/Collapsible/index.js +1 -0
- package/dist/shared/ui/Details/Details.d.ts +76 -0
- package/dist/shared/ui/Details/Details.js +1 -0
- package/dist/shared/ui/Details/Details.slots.d.ts +9 -0
- package/dist/shared/ui/Details/Details.slots.js +1 -0
- package/dist/shared/ui/Details/Details.styles.js +1 -0
- package/dist/shared/ui/Details/index.d.ts +2 -0
- package/dist/shared/ui/Details/index.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.d.ts +147 -0
- package/dist/shared/ui/Dialog/Dialog.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.slots.d.ts +17 -0
- package/dist/shared/ui/Dialog/Dialog.slots.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -0
- package/dist/shared/ui/Dialog/index.d.ts +2 -0
- package/dist/shared/ui/Dialog/index.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.d.ts +41 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.slots.d.ts +7 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.slots.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.styles.js +1 -0
- package/dist/shared/ui/ExternalLink/index.d.ts +2 -0
- package/dist/shared/ui/ExternalLink/index.js +1 -0
- package/dist/shared/ui/ExternalLink/toSafeHref.js +1 -0
- package/dist/shared/ui/Field/Field.d.ts +185 -0
- package/dist/shared/ui/Field/Field.js +1 -0
- package/dist/shared/ui/Field/Field.slots.d.ts +21 -0
- package/dist/shared/ui/Field/Field.slots.js +1 -0
- package/dist/shared/ui/Field/Field.styles.js +1 -0
- package/dist/shared/ui/Field/index.d.ts +2 -0
- package/dist/shared/ui/Field/index.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.d.ts +48 -0
- package/dist/shared/ui/IconButton/IconButton.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.slots.d.ts +7 -0
- package/dist/shared/ui/IconButton/IconButton.slots.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.styles.js +1 -0
- package/dist/shared/ui/IconButton/index.d.ts +2 -0
- package/dist/shared/ui/IconButton/index.js +1 -0
- package/dist/shared/ui/Image/Image.d.ts +43 -0
- package/dist/shared/ui/Image/Image.js +1 -0
- package/dist/shared/ui/Image/Image.slots.d.ts +14 -0
- package/dist/shared/ui/Image/Image.slots.js +1 -0
- package/dist/shared/ui/Image/Image.styles.js +1 -0
- package/dist/shared/ui/Image/index.d.ts +3 -0
- package/dist/shared/ui/Image/index.js +1 -0
- package/dist/shared/ui/Image/types.d.ts +131 -0
- package/dist/shared/ui/InputGroup/InputGroup.d.ts +129 -0
- package/dist/shared/ui/InputGroup/InputGroup.js +1 -0
- package/dist/shared/ui/InputGroup/InputGroup.slots.d.ts +16 -0
- package/dist/shared/ui/InputGroup/InputGroup.slots.js +1 -0
- package/dist/shared/ui/InputGroup/InputGroup.styles.js +1 -0
- package/dist/shared/ui/InputGroup/index.d.ts +2 -0
- package/dist/shared/ui/InputGroup/index.js +1 -0
- package/dist/shared/ui/LtrAtom/LtrAtom.d.ts +31 -0
- package/dist/shared/ui/LtrAtom/LtrAtom.js +1 -0
- package/dist/shared/ui/LtrAtom/index.d.ts +1 -0
- package/dist/shared/ui/LtrAtom/index.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.d.ts +86 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.slots.d.ts +12 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.slots.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.styles.js +1 -0
- package/dist/shared/ui/ScrollArea/index.d.ts +2 -0
- package/dist/shared/ui/ScrollArea/index.js +1 -0
- package/dist/shared/ui/Select/Select.context.d.ts +10 -0
- package/dist/shared/ui/Select/Select.context.js +1 -0
- package/dist/shared/ui/Select/Select.d.ts +243 -0
- package/dist/shared/ui/Select/Select.js +1 -0
- package/dist/shared/ui/Select/Select.slots.d.ts +20 -0
- package/dist/shared/ui/Select/Select.slots.js +1 -0
- package/dist/shared/ui/Select/Select.styles.js +1 -0
- package/dist/shared/ui/Select/index.d.ts +3 -0
- package/dist/shared/ui/Select/index.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +83 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.slots.d.ts +7 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.slots.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.styles.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTileGroup.d.ts +82 -0
- package/dist/shared/ui/SelectableTile/SelectableTileGroup.js +1 -0
- package/dist/shared/ui/SelectableTile/index.d.ts +3 -0
- package/dist/shared/ui/SelectableTile/index.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.d.ts +41 -0
- package/dist/shared/ui/Skeleton/Skeleton.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.slots.d.ts +7 -0
- package/dist/shared/ui/Skeleton/Skeleton.slots.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.styles.js +1 -0
- package/dist/shared/ui/Skeleton/index.d.ts +2 -0
- package/dist/shared/ui/Skeleton/index.js +1 -0
- package/dist/shared/ui/Text/Text.d.ts +87 -0
- package/dist/shared/ui/Text/Text.js +1 -0
- package/dist/shared/ui/Text/Text.slots.d.ts +7 -0
- package/dist/shared/ui/Text/Text.slots.js +1 -0
- package/dist/shared/ui/Text/Text.styles.js +1 -0
- package/dist/shared/ui/Text/index.d.ts +2 -0
- package/dist/shared/ui/Text/index.js +1 -0
- package/dist/shared/ui/TokenLogo/TokenLogo.d.ts +41 -0
- package/dist/shared/ui/TokenLogo/TokenLogo.js +1 -0
- package/dist/shared/ui/TokenLogo/index.d.ts +2 -0
- package/dist/shared/ui/TokenLogo/index.js +1 -0
- package/dist/shared/ui/TokenLogo/types.d.ts +64 -0
- package/dist/shared/ui/Tooltip/Tooltip.d.ts +171 -0
- package/dist/shared/ui/Tooltip/Tooltip.js +1 -0
- package/dist/shared/ui/Tooltip/Tooltip.slots.d.ts +11 -0
- package/dist/shared/ui/Tooltip/Tooltip.slots.js +1 -0
- package/dist/shared/ui/Tooltip/Tooltip.styles.js +1 -0
- package/dist/shared/ui/Tooltip/index.d.ts +2 -0
- package/dist/shared/ui/Tooltip/index.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +55 -0
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.slots.d.ts +7 -0
- package/dist/shared/ui/WalletRow/WalletRow.slots.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.styles.js +1 -0
- package/dist/shared/ui/WalletRow/index.d.ts +2 -0
- package/dist/shared/ui/WalletRow/index.js +1 -0
- package/dist/shared/utils/explorers.js +1 -0
- package/dist/shared/utils/joinClassNames.js +1 -0
- package/dist/shared/utils/logos/api.d.ts +54 -0
- package/dist/shared/utils/logos/api.js +1 -0
- package/dist/shared/utils/logos/chains.d.ts +32 -0
- package/dist/shared/utils/logos/chains.js +1 -0
- package/dist/shared/utils/logos/conventionUrls.js +1 -0
- package/dist/shared/utils/logos/index.js +1 -0
- package/dist/shared/utils/logos/resolveLogoSrc.js +1 -0
- package/dist/shared/utils/logos/types.d.ts +62 -0
- package/dist/shared/utils/mergeClassName.js +1 -0
- package/dist/shared/utils/mergeStyle.js +1 -0
- package/dist/shared/wallet/resolveSupportedChainIds.js +1 -0
- package/dist/shared/wallet/resolveSupportedChains.js +1 -0
- package/dist/shared/wallet/types.d.ts +103 -0
- package/dist/shared/wallet/useWalletState.d.ts +21 -0
- package/dist/shared/wallet/useWalletState.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +59 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +15 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Flow.d.ts +14 -0
- package/dist/shared/widgets/amount-entry/compound/components/Flow.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +15 -0
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/StaticBand.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/index.d.ts +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/index.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/transitions.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/useSwapState.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/utils.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Pills.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Pills.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/context.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/index.d.ts +3 -0
- package/dist/shared/widgets/amount-entry/compound/index.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +224 -0
- package/dist/shared/widgets/asset-descriptor.d.ts +27 -0
- package/dist/shared/widgets/asset-descriptor.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +51 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +11 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +30 -0
- package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Footer.d.ts +16 -0
- package/dist/shared/widgets/asset-picker/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +19 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/List.d.ts +22 -0
- package/dist/shared/widgets/asset-picker/compound/components/List.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/context.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/index.d.ts +3 -0
- package/dist/shared/widgets/asset-picker/compound/index.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +212 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.d.ts +64 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.d.ts +15 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.d.ts +17 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +15 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Footer.d.ts +26 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Header.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Hero.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Meta.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Meta.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/splitAmount.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/context.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/index.d.ts +3 -0
- package/dist/shared/widgets/confirm-transfer/compound/index.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/types.d.ts +338 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.d.ts +96 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.js +1 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.slots.d.ts +18 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.slots.js +1 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.styles.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Actions.d.ts +17 -0
- package/dist/shared/widgets/error-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/AssetValue.d.ts +20 -0
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Detail.d.ts +14 -0
- package/dist/shared/widgets/error-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Details.d.ts +12 -0
- package/dist/shared/widgets/error-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.d.ts +11 -0
- package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/error-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.d.ts +10 -0
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Hero.d.ts +9 -0
- package/dist/shared/widgets/error-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +18 -0
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Rows.d.ts +57 -0
- package/dist/shared/widgets/error-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/StatusValue.d.ts +14 -0
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -0
- package/dist/shared/widgets/error-state/compound/context.js +1 -0
- package/dist/shared/widgets/error-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/error-state/compound/index.js +1 -0
- package/dist/shared/widgets/error-state/compound/types.d.ts +291 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +77 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +15 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +17 -0
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Detail.d.ts +14 -0
- package/dist/shared/widgets/processing-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +12 -0
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +15 -0
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +16 -0
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Rows.d.ts +36 -0
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.d.ts +13 -0
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -0
- package/dist/shared/widgets/processing-state/compound/context.js +1 -0
- package/dist/shared/widgets/processing-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/processing-state/compound/index.js +1 -0
- package/dist/shared/widgets/processing-state/compound/types.d.ts +216 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.d.ts +105 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.js +1 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.slots.d.ts +21 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.slots.js +1 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.styles.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Actions.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/AssetValue.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Detail.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Details.d.ts +16 -0
- package/dist/shared/widgets/success-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/success-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Headline.d.ts +16 -0
- package/dist/shared/widgets/success-state/compound/components/Headline.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Hero.d.ts +10 -0
- package/dist/shared/widgets/success-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +19 -0
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/RouteValue.d.ts +15 -0
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Rows.d.ts +69 -0
- package/dist/shared/widgets/success-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/StatusPill.d.ts +13 -0
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -0
- package/dist/shared/widgets/success-state/compound/context.js +1 -0
- package/dist/shared/widgets/success-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/success-state/compound/index.js +1 -0
- package/dist/shared/widgets/success-state/compound/types.d.ts +307 -0
- package/dist/storage/adapters.d.ts +29 -0
- package/dist/storage/adapters.js +1 -0
- package/dist/storage/context.d.ts +62 -0
- package/dist/storage/context.js +1 -0
- package/dist/storage/createKitStorage.d.ts +45 -0
- package/dist/storage/createKitStorage.js +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.js +1 -0
- package/dist/storage/types.d.ts +26 -0
- package/dist/stridge/StridgeContext.d.ts +29 -0
- package/dist/stridge/StridgeContext.js +1 -0
- package/dist/stridge/StridgeProvider.d.ts +158 -0
- package/dist/stridge/StridgeProvider.js +1 -0
- package/dist/stridge/stubs.js +1 -0
- package/dist/styles/index.css +3494 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.js +1 -0
- package/dist/ui/index.d.ts +48 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/src/use-copy-to-clipboard.js +1 -0
- package/dist/wallet/index.d.ts +3 -0
- package/dist/wallet/index.js +1 -0
- package/dist/withdraw/compound/index.d.ts +22 -0
- package/dist/withdraw/compound/index.js +1 -0
- package/dist/withdraw/dialog/index.d.ts +2 -0
- package/dist/withdraw/dialog/index.js +1 -0
- package/package.json +156 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronRightIcon as t}from"../../../../icons/ChevronRightIcon.js";import"../../../../../icons/index.js";import{Collapsible as n}from"../../../../ui/Collapsible/Collapsible.js";import"../../../../ui/Collapsible/index.js";import{Details as r}from"../../../../ui/Details/Details.js";import"../../../../ui/Details/index.js";import{useDirectionalChevronTransform as i}from"../../../../dialog/useDirectionalChevronTransform.js";import{SUCCESS_STATE_SLOTS as a}from"../SuccessState.slots.js";import{styles as o}from"../SuccessState.styles.js";import{useCallback as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({label:f,defaultOpen:p=!1,open:m,onOpenChange:h,children:g}){let{_}=e(),v=f??_({id:`LEbOpR`,message:`More details`}),y=typeof m==`boolean`,[b,x]=c(p),S=y?m:b,C=s(e=>{y||x(e),h?.(e)},[y,h]),w=d.props(o.moreDetailsTrigger,S?null:o.moreDetailsTriggerClosed),T=d.props(o.moreDetailsChevron),E=i(S);return u(n,{open:S,onOpenChange:C,children:[l(n.Trigger,{nativeButton:!1,render:l(r.Row,{"data-stridge-slot":a.moreDetailsTrigger,label:v,className:w.className,style:w.style,children:l(t,{"aria-hidden":!0,className:T.className,style:{...T.style,transform:E}})})}),l(n.Panel,{children:g})]})}export{f as SuccessStateMoreDetails};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SuccessStateRouteValueProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/widgets/success-state/compound/components/RouteValue.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* RouteValue helper — `Hop1 → Hop2 → Hop3`, the canonical composition
|
|
7
|
+
* used inside the Route row. Reuses the kit's `ArrowRightIcon` so the
|
|
8
|
+
* separator matches the visual language of the Send→Receive arrow in
|
|
9
|
+
* `TransferCrypto.Summary`.
|
|
10
|
+
*/
|
|
11
|
+
declare function SuccessStateRouteValue({
|
|
12
|
+
hops
|
|
13
|
+
}: SuccessStateRouteValueProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SuccessStateRouteValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{ArrowRightIcon as e}from"../../../../icons/ArrowRightIcon.js";import"../../../../../icons/index.js";import{text as t}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{SUCCESS_STATE_SLOTS as n}from"../SuccessState.slots.js";import{styles as r}from"../SuccessState.styles.js";import{Fragment as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import*as s from"@stylexjs/stylex";function c({hops:c}){return a(`span`,{"data-stridge-slot":n.routeValue,...s.props(r.routeValue),children:c.map((n,c)=>o(i,{children:[c>0?a(e,{"aria-hidden":!0,...s.props(r.routeArrow)}):null,a(t.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,children:n})]},`${n}-${c}`))})}export{c as SuccessStateRouteValue};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { SuccessStateRowProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/widgets/success-state/compound/components/Rows.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Predefined `Fill status` row — renders the kit's success status pill.
|
|
7
|
+
* Always renders.
|
|
8
|
+
*/
|
|
9
|
+
declare function SuccessStateFillStatusRow({
|
|
10
|
+
label
|
|
11
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Predefined `Total time` row. Reads `totalTime` from the
|
|
14
|
+
* {@link SuccessState} root and renders nothing when the value is missing.
|
|
15
|
+
*/
|
|
16
|
+
declare function SuccessStateTotalTimeRow({
|
|
17
|
+
label
|
|
18
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
19
|
+
/**
|
|
20
|
+
* Predefined `Source` row — wallet icon + name + truncated address +
|
|
21
|
+
* explorer link. Reads `sourceWallet` from the {@link SuccessState} root
|
|
22
|
+
* and renders nothing when the wallet payload is missing.
|
|
23
|
+
*/
|
|
24
|
+
declare function SuccessStateSourceRow({
|
|
25
|
+
label
|
|
26
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
27
|
+
/**
|
|
28
|
+
* Predefined `Destination` row. Reads `creditedTo` from the
|
|
29
|
+
* {@link SuccessState} root, falling back to the credited asset's symbol.
|
|
30
|
+
*/
|
|
31
|
+
declare function SuccessStateDestinationRow({
|
|
32
|
+
label
|
|
33
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Predefined `You receive` row — `<icon> amount symbol` composition. Reads
|
|
36
|
+
* `amount` and `creditedAsset` from the {@link SuccessState} root.
|
|
37
|
+
*/
|
|
38
|
+
declare function SuccessStateYouReceiveRow({
|
|
39
|
+
label
|
|
40
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* Predefined `Deposit tx` row inside `SuccessState.MoreDetails`. Reads
|
|
43
|
+
* `depositTx` from the {@link SuccessState} root and renders nothing when
|
|
44
|
+
* the tx is missing.
|
|
45
|
+
*/
|
|
46
|
+
declare function SuccessStateDepositTxRow({
|
|
47
|
+
label
|
|
48
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
49
|
+
/**
|
|
50
|
+
* Predefined `Settlement tx` row inside `SuccessState.MoreDetails`.
|
|
51
|
+
* Reads `completionTx` from the {@link SuccessState} root.
|
|
52
|
+
*/
|
|
53
|
+
declare function SuccessStateCompletionTxRow({
|
|
54
|
+
label
|
|
55
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
56
|
+
/**
|
|
57
|
+
* Predefined `Order submitted` row inside `SuccessState.MoreDetails`.
|
|
58
|
+
*/
|
|
59
|
+
declare function SuccessStateSubmittedAtRow({
|
|
60
|
+
label
|
|
61
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
62
|
+
/**
|
|
63
|
+
* Predefined `Order filled` row inside `SuccessState.MoreDetails`.
|
|
64
|
+
*/
|
|
65
|
+
declare function SuccessStateFilledAtRow({
|
|
66
|
+
label
|
|
67
|
+
}?: SuccessStateRowProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { SuccessStateCompletionTxRow, SuccessStateDepositTxRow, SuccessStateDestinationRow, SuccessStateFillStatusRow, SuccessStateFilledAtRow, SuccessStateSourceRow, SuccessStateSubmittedAtRow, SuccessStateTotalTimeRow, SuccessStateYouReceiveRow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{TxHashValue as t}from"../../../../primitives/TxHashValue/TxHashValue.js";import"../../../../primitives/TxHashValue/index.js";import{WalletValue as n}from"../../../../primitives/WalletValue/WalletValue.js";import"../../../../primitives/WalletValue/index.js";import{useSuccessStateContext as r}from"../context.js";import{SuccessStateAssetValue as i}from"./AssetValue.js";import{SuccessStateDetail as a}from"./Detail.js";import{SuccessStateStatusPill as o}from"./StatusPill.js";import{jsx as s}from"react/jsx-runtime";function c({label:t}={}){let{_:n}=e();return s(a,{label:t??n({id:`yxnt3y`,message:`Fill status`}),value:s(o,{})})}function l({label:t}={}){let n=r(`SuccessState.TotalTimeRow`),{_:i}=e();return n.totalTime===void 0?null:s(a,{label:t??i({id:`_kXBrK`,message:`Total time`}),value:n.totalTime})}function u({label:t}={}){let i=r(`SuccessState.SourceRow`),{_:o}=e();if(!i.sourceWallet)return null;let{name:c,address:l,explorerUrl:u}=i.sourceWallet;return s(a,{label:t??o({id:`wdxz7K`,message:`Source`}),value:s(n,{name:c??o({id:`sb9Y58`,message:`Wallet`}),address:l,...u?{explorerUrl:u}:{},density:`compact`,hideIcon:!0})})}function d({label:t}={}){let n=r(`SuccessState.DestinationRow`),{_:i}=e();return s(a,{label:t??i({id:`Enslfm`,message:`Destination`}),value:n.creditedTo??n.creditedAsset.symbol})}function f({label:t}={}){let n=r(`SuccessState.YouReceiveRow`),{_:o}=e(),c=n.creditedAsset;return s(a,{label:t??o({id:`88cUW-`,message:`You receive`}),value:s(i,{amount:n.amount,symbol:c.symbol,...c.chainId===void 0?{}:{chainId:c.chainId},...c.address?{address:c.address}:{},...c.isNative===void 0?{}:{isNative:c.isNative},...c.logoUrl?{logoUrl:c.logoUrl}:{}})})}function p({label:n}={}){let i=r(`SuccessState.DepositTxRow`),{_:o}=e();return i.depositTx?s(a,{label:n??o({id:`Q12Rrs`,message:`Deposit tx`}),value:s(t,{hash:i.depositTx.hash,...i.depositTx.explorerUrl?{explorerUrl:i.depositTx.explorerUrl}:{}})}):null}function m({label:n}={}){let i=r(`SuccessState.CompletionTxRow`),{_:o}=e();return i.completionTx?s(a,{label:n??o({id:`cxR5Qy`,message:`Settlement tx`}),value:s(t,{hash:i.completionTx.hash,...i.completionTx.explorerUrl?{explorerUrl:i.completionTx.explorerUrl}:{}})}):null}function h({label:t}={}){let n=r(`SuccessState.SubmittedAtRow`),{_:i}=e();return n.submittedAt===void 0?null:s(a,{label:t??i({id:`TT0aVH`,message:`Order submitted`}),value:n.submittedAt})}function g({label:t}={}){let n=r(`SuccessState.FilledAtRow`),{_:i}=e();return n.filledAt===void 0?null:s(a,{label:t??i({id:`lOEm_1`,message:`Order filled`}),value:n.filledAt})}export{m as SuccessStateCompletionTxRow,p as SuccessStateDepositTxRow,d as SuccessStateDestinationRow,c as SuccessStateFillStatusRow,g as SuccessStateFilledAtRow,u as SuccessStateSourceRow,h as SuccessStateSubmittedAtRow,l as SuccessStateTotalTimeRow,f as SuccessStateYouReceiveRow};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SuccessStateStatusPillProps } from "../types.js";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/widgets/success-state/compound/components/StatusPill.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* StatusPill helper — small inline label tinted with the kit's
|
|
7
|
+
* success accent. Used inside the "Fill status" detail row.
|
|
8
|
+
*/
|
|
9
|
+
declare function SuccessStateStatusPill({
|
|
10
|
+
children
|
|
11
|
+
}: SuccessStateStatusPillProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { SuccessStateStatusPill };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{text as t}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{SUCCESS_STATE_SLOTS as n}from"../SuccessState.slots.js";import{jsx as r}from"react/jsx-runtime";function i({children:i}){let{_:a}=e(),o=i??a({id:`olEUh2`,message:`Successful`});return r(t.span,{"data-stridge-slot":n.statusPill,size:`sm`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`success`,children:o})}export{i as SuccessStateStatusPill};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t}from"react";const n=e(null);function r(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <SuccessState>.`);return r}export{n as SuccessStateContext,r as useSuccessStateContext};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "./types.js";
|
|
2
|
+
import { SuccessState } from "./SuccessState.js";
|
|
3
|
+
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "./SuccessState.slots.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./SuccessState.slots.js";import"./SuccessState.js";
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../dialog/DialogShell.js";
|
|
2
|
+
import { AssetDescriptor } from "../../asset-descriptor.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayPollResponse } from "@stridge/sdk";
|
|
5
|
+
|
|
6
|
+
//#region src/shared/widgets/success-state/compound/types.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* The credited asset rendered in the Hero (icon + symbol) and used as the default suffix for the
|
|
9
|
+
* "CREDITED TO …" caption. Extends the kit-wide {@link AssetDescriptor} with the DTO + response
|
|
10
|
+
* slots headless integrators can read for the matched settlement.
|
|
11
|
+
*/
|
|
12
|
+
interface SuccessStateAsset extends AssetDescriptor {
|
|
13
|
+
/**
|
|
14
|
+
* Destination DTO carried from the matched (succeeded) settlement.
|
|
15
|
+
*/
|
|
16
|
+
raw?: DestinationDto;
|
|
17
|
+
/**
|
|
18
|
+
* Full `gateway/{owner}` poll response that produced the destination.
|
|
19
|
+
*/
|
|
20
|
+
responseRaw?: GatewayPollResponse;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Config for the secondary "View on …" link rendered inside the Actions
|
|
24
|
+
* footer. When omitted, the link is hidden and only the primary CTA
|
|
25
|
+
* remains.
|
|
26
|
+
*/
|
|
27
|
+
interface SuccessStateExplorer {
|
|
28
|
+
/** External URL the link opens in a new tab. */
|
|
29
|
+
url: string;
|
|
30
|
+
/** Visible link label. Defaults to `"View on Explorer"`. */
|
|
31
|
+
label?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props for `<SuccessState.Dialog>` — the dialog form of the
|
|
35
|
+
* SuccessState widget. Combines the widget root props with the shared
|
|
36
|
+
* dialog shell controls (`open` / `defaultOpen` / `onOpenChange` /
|
|
37
|
+
* `trigger`).
|
|
38
|
+
*/
|
|
39
|
+
type SuccessStateDialogProps = SuccessStateProps & DialogShellControls;
|
|
40
|
+
/**
|
|
41
|
+
* Reference to a single transaction surfaced inside the {@link SuccessStateMoreDetails} panel.
|
|
42
|
+
* `hash` is pre-formatted (driver-truncated to `0x…<last 4>`); the compound never reformats.
|
|
43
|
+
*/
|
|
44
|
+
interface SuccessStateTxRef {
|
|
45
|
+
/** Pre-formatted hash string (e.g. `"0x…f6b72a"`). */
|
|
46
|
+
hash: string;
|
|
47
|
+
explorerUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Source leg DTO (`from` for the deposit tx, `to` for the completion tx).
|
|
50
|
+
*/
|
|
51
|
+
raw?: GatewayLegFromDto | GatewayLegToDto;
|
|
52
|
+
/**
|
|
53
|
+
* Full `gateway/{owner}` poll response that produced the leg.
|
|
54
|
+
*/
|
|
55
|
+
responseRaw?: GatewayPollResponse;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Public props accepted by the {@link SuccessState} root.
|
|
59
|
+
*
|
|
60
|
+
* Receipt-row data is pre-formatted by driver transformer code — `amount` arrives as the kit-
|
|
61
|
+
* formatted display string, timestamps arrive as locale-aware date strings, hashes arrive
|
|
62
|
+
* truncated. The compound is pure layout.
|
|
63
|
+
*/
|
|
64
|
+
interface SuccessStateProps {
|
|
65
|
+
/** Pre-formatted hero amount string (e.g. `"1.99580"`). */
|
|
66
|
+
amount: string;
|
|
67
|
+
/**
|
|
68
|
+
* The asset that landed — drives the Hero icon, the Hero amount-line symbol, the
|
|
69
|
+
* default "CREDITED TO …" caption, and the `<YouReceiveRow>`'s logo.
|
|
70
|
+
*/
|
|
71
|
+
creditedAsset: SuccessStateAsset;
|
|
72
|
+
/**
|
|
73
|
+
* Optional caption suffix shown after `"CREDITED TO "`. Defaults to `creditedAsset.symbol`
|
|
74
|
+
* when omitted.
|
|
75
|
+
*/
|
|
76
|
+
creditedTo?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Optional secondary link rendered below the Done CTA in the Actions footer.
|
|
79
|
+
*/
|
|
80
|
+
explorer?: SuccessStateExplorer;
|
|
81
|
+
/** Source-chain broadcast tx — surfaced inside `SuccessState.MoreDetails`. */
|
|
82
|
+
depositTx?: SuccessStateTxRef;
|
|
83
|
+
/** Destination-chain settlement tx — surfaced inside `SuccessState.MoreDetails`. */
|
|
84
|
+
completionTx?: SuccessStateTxRef;
|
|
85
|
+
/** Pre-formatted "order submitted" timestamp string (locale-aware). */
|
|
86
|
+
submittedAt?: string;
|
|
87
|
+
/** Pre-formatted "order filled" timestamp string (locale-aware). */
|
|
88
|
+
filledAt?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Pre-formatted total-time string (e.g. `"23s"`). Surfaces as the
|
|
91
|
+
* `Total time` row inside `<SuccessState.TotalTimeRow />`.
|
|
92
|
+
*/
|
|
93
|
+
totalTime?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Source-wallet payload — surfaces as the `Source` row inside
|
|
96
|
+
* `<SuccessState.SourceRow />`.
|
|
97
|
+
*/
|
|
98
|
+
sourceWallet?: SuccessStateSourceWallet;
|
|
99
|
+
/**
|
|
100
|
+
* Optional override for the `Header` title. Defaults to
|
|
101
|
+
* `"Deposit received"`.
|
|
102
|
+
*/
|
|
103
|
+
headerTitle?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Optional override for the `Headline` title. Defaults to
|
|
106
|
+
* `"Deposit successful"`.
|
|
107
|
+
*/
|
|
108
|
+
headlineTitle?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Optional override for the `Headline` description. Defaults to
|
|
111
|
+
* `"Your funds were successfully deposited."`.
|
|
112
|
+
*/
|
|
113
|
+
headlineDescription?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Click handler routed to the primary Done CTA on the Actions footer.
|
|
116
|
+
*/
|
|
117
|
+
onDone?: () => void;
|
|
118
|
+
/**
|
|
119
|
+
* Optional secondary close-button click handler. When provided, the
|
|
120
|
+
* Actions footer renders a side-by-side pair (Close + Done).
|
|
121
|
+
*/
|
|
122
|
+
onClose?: () => void;
|
|
123
|
+
/**
|
|
124
|
+
* Optional override for the Done CTA label. Defaults to `"Done"`.
|
|
125
|
+
*/
|
|
126
|
+
doneLabel?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Optional override for the Close CTA label. Defaults to `"Close"`.
|
|
129
|
+
*/
|
|
130
|
+
closeLabel?: string;
|
|
131
|
+
/** Compound parts; see `SuccessState.Header`, `SuccessState.Hero`, etc. */
|
|
132
|
+
children?: ReactNode;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Source-wallet payload backing the predefined `Source` row.
|
|
136
|
+
*/
|
|
137
|
+
interface SuccessStateSourceWallet {
|
|
138
|
+
/** Wallet display name (e.g. `"Wallet"` or a host-supplied label). */
|
|
139
|
+
name?: string;
|
|
140
|
+
/** Pre-formatted address string. */
|
|
141
|
+
address: string;
|
|
142
|
+
/** Explorer URL for the wallet on its native chain. */
|
|
143
|
+
explorerUrl?: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Props for the predefined detail rows
|
|
147
|
+
* ({@link SuccessState.FillStatusRow},
|
|
148
|
+
* {@link SuccessState.TotalTimeRow},
|
|
149
|
+
* {@link SuccessState.SourceRow},
|
|
150
|
+
* {@link SuccessState.DestinationRow},
|
|
151
|
+
* {@link SuccessState.YouReceiveRow},
|
|
152
|
+
* {@link SuccessState.DepositTxRow},
|
|
153
|
+
* {@link SuccessState.CompletionTxRow},
|
|
154
|
+
* {@link SuccessState.SubmittedAtRow},
|
|
155
|
+
* {@link SuccessState.FilledAtRow}). Each row pulls its value from the
|
|
156
|
+
* {@link SuccessState} root's payload and renders nothing when its
|
|
157
|
+
* datum is missing.
|
|
158
|
+
*/
|
|
159
|
+
interface SuccessStateRowProps {
|
|
160
|
+
/** Override the row label. */
|
|
161
|
+
label?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Body slot part props. Forwards every native `<div>` prop through to the
|
|
165
|
+
* underlying `Card.Body`, which becomes the scrollable region when the
|
|
166
|
+
* widget is mounted inside `Dialog.Content`.
|
|
167
|
+
*/
|
|
168
|
+
type SuccessStateBodyProps = ComponentProps<"div">;
|
|
169
|
+
/**
|
|
170
|
+
* Header part props.
|
|
171
|
+
*/
|
|
172
|
+
interface SuccessStateHeaderProps {
|
|
173
|
+
/**
|
|
174
|
+
* Optional override for the title rendered in this slot. Defaults to
|
|
175
|
+
* the `headerTitle` set on the {@link SuccessState} root, falling
|
|
176
|
+
* back to `"Deposit received"`.
|
|
177
|
+
*/
|
|
178
|
+
title?: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Details (list container) part props.
|
|
182
|
+
*/
|
|
183
|
+
interface SuccessStateDetailsProps {
|
|
184
|
+
/** `SuccessState.Detail` children. */
|
|
185
|
+
children?: ReactNode;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Detail (single row) part props.
|
|
189
|
+
*/
|
|
190
|
+
interface SuccessStateDetailProps {
|
|
191
|
+
/** Row label rendered on the leading edge. */
|
|
192
|
+
label: string;
|
|
193
|
+
/**
|
|
194
|
+
* Row value rendered on the trailing edge. Accepts a free-form
|
|
195
|
+
* `ReactNode` so callers can mount the canonical helpers
|
|
196
|
+
* (`<SuccessState.AssetValue>`, `<SuccessState.RouteValue>`) or
|
|
197
|
+
* arbitrary inline content.
|
|
198
|
+
*/
|
|
199
|
+
value: ReactNode;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Actions part props.
|
|
203
|
+
*/
|
|
204
|
+
interface SuccessStateActionsProps {
|
|
205
|
+
/**
|
|
206
|
+
* Optional override for the primary CTA click handler. Defaults to
|
|
207
|
+
* the `onDone` set on the {@link SuccessState} root.
|
|
208
|
+
*/
|
|
209
|
+
onDone?: () => void;
|
|
210
|
+
/**
|
|
211
|
+
* Optional override for the primary CTA label. Defaults to the
|
|
212
|
+
* `doneLabel` set on the {@link SuccessState} root, falling back to
|
|
213
|
+
* `"Done"`.
|
|
214
|
+
*/
|
|
215
|
+
doneLabel?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Optional override for the secondary close-button click handler.
|
|
218
|
+
* Defaults to the `onClose` set on the {@link SuccessState} root.
|
|
219
|
+
* When neither is provided, only the primary CTA renders.
|
|
220
|
+
*/
|
|
221
|
+
onClose?: () => void;
|
|
222
|
+
/**
|
|
223
|
+
* Optional override for the secondary CTA label. Defaults to the
|
|
224
|
+
* `closeLabel` set on the {@link SuccessState} root, falling back to
|
|
225
|
+
* `"Close"`.
|
|
226
|
+
*/
|
|
227
|
+
closeLabel?: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Headline part props — textual outcome banner that replaces the
|
|
231
|
+
* amount-leading {@link SuccessStateHero}. Renders a success ring
|
|
232
|
+
* over a centered title + optional sub-line.
|
|
233
|
+
*/
|
|
234
|
+
interface SuccessStateHeadlineProps {
|
|
235
|
+
/**
|
|
236
|
+
* Optional override for the title. Defaults to the `headlineTitle`
|
|
237
|
+
* set on the {@link SuccessState} root, falling back to `"Deposit
|
|
238
|
+
* successful"`.
|
|
239
|
+
*/
|
|
240
|
+
title?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Optional override for the sub-line rendered under the title.
|
|
243
|
+
* Defaults to the `headlineDescription` set on the
|
|
244
|
+
* {@link SuccessState} root, falling back to a friendly confirmation.
|
|
245
|
+
* Pass `""` to suppress.
|
|
246
|
+
*/
|
|
247
|
+
description?: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* MoreDetails part props — collapsible row that expands inline as
|
|
251
|
+
* additional flat sibling rows in the same `Details` card. Mirrors
|
|
252
|
+
* `ErrorState.MoreDetails`. Children should be `SuccessState.Detail`
|
|
253
|
+
* rows; they render under the trigger when expanded.
|
|
254
|
+
*/
|
|
255
|
+
interface SuccessStateMoreDetailsProps {
|
|
256
|
+
/** Trigger row label. Defaults to `"More details"`. */
|
|
257
|
+
label?: ReactNode;
|
|
258
|
+
/** Initial open state when uncontrolled. Defaults to `false`. */
|
|
259
|
+
defaultOpen?: boolean;
|
|
260
|
+
/** Controlled open state. When set, `defaultOpen` is ignored. */
|
|
261
|
+
open?: boolean;
|
|
262
|
+
/** Fires on open/close transitions. */
|
|
263
|
+
onOpenChange?: (open: boolean) => void;
|
|
264
|
+
/** `SuccessState.Detail` children rendered when expanded. */
|
|
265
|
+
children?: ReactNode;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* StatusPill helper props — small inline label tinted with the kit's
|
|
269
|
+
* success accent. Used inside the `Fill status` detail row.
|
|
270
|
+
*/
|
|
271
|
+
interface SuccessStateStatusPillProps {
|
|
272
|
+
/** Pill text. Defaults to `"Successful"`. */
|
|
273
|
+
children?: ReactNode;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* AssetValue helper props — renders the canonical `[icon] amount symbol` composition.
|
|
277
|
+
*
|
|
278
|
+
* Pre-formatted by driver transformer code (e.g. `quote.payload.receiveAmount.formatted`,
|
|
279
|
+
* `settlement.payload.receiveAmount.formatted`). The compound is pure layout and never invokes
|
|
280
|
+
* `Intl.NumberFormat` itself.
|
|
281
|
+
*/
|
|
282
|
+
interface SuccessStateAssetValueProps {
|
|
283
|
+
/** Pre-formatted amount string (e.g. `"8.99327"`). */
|
|
284
|
+
amount: string;
|
|
285
|
+
/** Asset symbol, e.g. `"USDT"`. */
|
|
286
|
+
symbol: string;
|
|
287
|
+
/**
|
|
288
|
+
* EIP-155 chain id used to resolve the asset's logo.
|
|
289
|
+
*/
|
|
290
|
+
chainId?: number;
|
|
291
|
+
/** ERC-20 contract address on `chainId`. Omit for chain-native tokens. */
|
|
292
|
+
address?: string;
|
|
293
|
+
/** `true` for chain-native tokens (ETH, MATIC, …). */
|
|
294
|
+
isNative?: boolean;
|
|
295
|
+
/** Logo URL — final URL fallback before the gradient+letter visual. */
|
|
296
|
+
logoUrl?: string;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* RouteValue helper props — renders the canonical
|
|
300
|
+
* `Hop1 → Hop2 → Hop3` chain used inside the Route row.
|
|
301
|
+
*/
|
|
302
|
+
interface SuccessStateRouteValueProps {
|
|
303
|
+
/** Ordered list of hop labels (e.g. `["BSC", "Ethereum"]`). */
|
|
304
|
+
hops: readonly string[];
|
|
305
|
+
}
|
|
306
|
+
//#endregion
|
|
307
|
+
export { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { KitStorageAdapter, KitStoragePersistence } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/storage/adapters.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Adapter backed by `window.sessionStorage`. Values survive `dialog.close → dialog.open`
|
|
6
|
+
* round-trips inside the same tab; closing the tab forgets every key. Default for
|
|
7
|
+
* `<KitProvider storage="session" />`.
|
|
8
|
+
*/
|
|
9
|
+
declare function createSessionStorageAdapter(): KitStorageAdapter;
|
|
10
|
+
/**
|
|
11
|
+
* Adapter backed by `window.localStorage`. Values survive across tabs and across browser
|
|
12
|
+
* restarts. Useful for hosts that want banner acknowledgments / kit state to persist across
|
|
13
|
+
* sessions — pass via `<KitProvider storage="local" />`.
|
|
14
|
+
*/
|
|
15
|
+
declare function createLocalStorageAdapter(): KitStorageAdapter;
|
|
16
|
+
/**
|
|
17
|
+
* In-memory adapter — values live for the lifetime of the React tree. Default substitute when
|
|
18
|
+
* `Storage` is unavailable; also the recommended choice for tests and headless integrations
|
|
19
|
+
* that want each render-tree to start from a clean slate.
|
|
20
|
+
*/
|
|
21
|
+
declare function createMemoryStorageAdapter(): KitStorageAdapter;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve a {@link KitStoragePersistence} value into a concrete {@link KitStorageAdapter}. The
|
|
24
|
+
* three string variants map to the bundled `session` / `local` / `memory` adapters; an object
|
|
25
|
+
* value is treated as a custom adapter and returned as-is.
|
|
26
|
+
*/
|
|
27
|
+
declare function resolveStorageAdapter(persistence: KitStoragePersistence): KitStorageAdapter;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, resolveStorageAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return{get(t){let n=e();if(!n)return null;try{return n.getItem(t)}catch{return null}},set(t,n){let r=e();if(r)try{r.setItem(t,n)}catch{}},delete(t){let n=e();if(n)try{n.removeItem(t)}catch{}},clear(){let t=e();if(t)try{t.clear()}catch{}}}}function t(){return e(()=>typeof window>`u`?void 0:window.sessionStorage)}function n(){return e(()=>typeof window>`u`?void 0:window.localStorage)}function r(){let e=new Map;return{get:t=>e.has(t)?e.get(t):null,set:(t,n)=>{e.set(t,n)},delete:t=>{e.delete(t)},clear:()=>{e.clear()}}}function i(e){return typeof e==`object`?e:e===`session`?t():e===`local`?n():r()}export{n as createLocalStorageAdapter,r as createMemoryStorageAdapter,t as createSessionStorageAdapter,i as resolveStorageAdapter};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { KitStoragePersistence } from "./types.js";
|
|
2
|
+
import { KitStorage } from "./createKitStorage.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/storage/context.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Default namespace for `<KitProvider />`'s storage. Versioned so the kit can bump
|
|
9
|
+
* (`storage:v1` → `storage:v2`) and treat older entries as absent without crashing on parse.
|
|
10
|
+
* Hosts that mount multiple kit instances on the same page should pass an explicit
|
|
11
|
+
* `storageNamespace` to keep state isolated.
|
|
12
|
+
*/
|
|
13
|
+
declare const DEFAULT_KIT_STORAGE_NAMESPACE = "stridge-kit:storage:v1";
|
|
14
|
+
interface KitStorageProviderProps {
|
|
15
|
+
/**
|
|
16
|
+
* Persistence selection. `"session"` is the kit default — banner acks survive a `close()`/
|
|
17
|
+
* `open()` round-trip but are forgotten when the tab closes. `"local"` persists across tab
|
|
18
|
+
* + browser restarts; `"memory"` keeps state in-process for the lifetime of the React tree;
|
|
19
|
+
* an object value is treated as a custom {@link KitStorageAdapter}.
|
|
20
|
+
*/
|
|
21
|
+
storage?: KitStoragePersistence;
|
|
22
|
+
/**
|
|
23
|
+
* Prefix every key the kit writes under. Two `<KitProvider />` instances on the same page
|
|
24
|
+
* with the same persistence backend should pick distinct namespaces to avoid colliding on
|
|
25
|
+
* each other's banner acks. Defaults to {@link DEFAULT_KIT_STORAGE_NAMESPACE}.
|
|
26
|
+
*/
|
|
27
|
+
namespace?: string;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Mounts a {@link KitStorage} into context, resolving `storage` into a concrete adapter and
|
|
32
|
+
* scoping every key under `namespace`. The instance is memoized on the resolved adapter +
|
|
33
|
+
* namespace; passing the same `storage` object across renders keeps the same instance.
|
|
34
|
+
*
|
|
35
|
+
* Hosts rarely mount this directly — `<KitProvider />` does it. Use `<KitStorageProvider />`
|
|
36
|
+
* only when wiring kit-storage-aware widgets without mounting the full provider tree (e.g.
|
|
37
|
+
* isolated tests, kit-internal stories).
|
|
38
|
+
*/
|
|
39
|
+
declare function KitStorageProvider({
|
|
40
|
+
storage,
|
|
41
|
+
namespace,
|
|
42
|
+
children
|
|
43
|
+
}: KitStorageProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Access the kit's {@link KitStorage} handle. The returned object's identity is stable across
|
|
46
|
+
* renders so it is safe to capture in callbacks and dependency arrays. Use
|
|
47
|
+
* {@link useKitStorageValue} when you need a reactive read of a single key.
|
|
48
|
+
*
|
|
49
|
+
* Throws when no `<KitProvider />` / `<KitStorageProvider />` is mounted above the caller.
|
|
50
|
+
*/
|
|
51
|
+
declare function useKitStorage(): KitStorage;
|
|
52
|
+
/**
|
|
53
|
+
* Reactively read the value at `key` from the kit's storage. Re-renders the calling component
|
|
54
|
+
* whenever any kit-storage mutation lands on this `key`. Pass `null` for "no key yet" — the
|
|
55
|
+
* hook returns `null` in that case without subscribing.
|
|
56
|
+
*
|
|
57
|
+
* SSR-safe: the server snapshot is `null` (matches "absent"); the client hydrates with the
|
|
58
|
+
* real value on first commit.
|
|
59
|
+
*/
|
|
60
|
+
declare function useKitStorageValue(key: string | null): string | null;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { DEFAULT_KIT_STORAGE_NAMESPACE, KitStorageProvider, useKitStorage, useKitStorageValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{resolveStorageAdapter as e}from"./adapters.js";import{createKitStorage as t}from"./createKitStorage.js";import{createContext as n,use as r,useMemo as i,useSyncExternalStore as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=`stridge-kit:storage:v1`,c=n(null);c.displayName=`KitStorageContext`;function l({storage:n=`session`,namespace:r=s,children:a}){let l=i(()=>t(e(n),r),[n,r]);return o(c.Provider,{value:l,children:a})}function u(){let e=r(c);if(e===null)throw Error(`useKitStorage must be used inside a <KitProvider /> or <KitStorageProvider />.`);return e}function d(e){let t=u();return a(t.subscribe,()=>e===null?null:t.get(e),()=>null)}export{s as DEFAULT_KIT_STORAGE_NAMESPACE,l as KitStorageProvider,u as useKitStorage,d as useKitStorageValue};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { KitStorageAdapter } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/storage/createKitStorage.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Reactive façade over a {@link KitStorageAdapter}. All keys are namespaced under the provider's
|
|
6
|
+
* `storageNamespace` before reaching the adapter, so two `<KitProvider />` instances on the same
|
|
7
|
+
* page can share an underlying `sessionStorage` without colliding. Supports `subscribe()` for
|
|
8
|
+
* `useSyncExternalStore`-driven reactive reads — every call to `set` / `delete` / `clear`
|
|
9
|
+
* notifies all subscribers so dependent hooks re-render.
|
|
10
|
+
*/
|
|
11
|
+
interface KitStorage {
|
|
12
|
+
/** Read the value at `key`, scoped to the active namespace. `null` when absent. */
|
|
13
|
+
get(key: string): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Write `value` at `key`. Notifies every subscriber synchronously after the underlying adapter
|
|
16
|
+
* write completes. Silent no-op when the adapter rejects.
|
|
17
|
+
*/
|
|
18
|
+
set(key: string, value: string): void;
|
|
19
|
+
/** `true` when {@link get} would return a non-`null` value. */
|
|
20
|
+
has(key: string): boolean;
|
|
21
|
+
/** Remove `key`. Notifies every subscriber synchronously. */
|
|
22
|
+
delete(key: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Remove every key the adapter manages, **regardless of namespace**. Useful for tests; not
|
|
25
|
+
* called by the kit's own widgets. Notifies every subscriber.
|
|
26
|
+
*/
|
|
27
|
+
clear(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Subscribe to mutation notifications. The returned function unsubscribes. Suitable as the
|
|
30
|
+
* `subscribe` arg to `useSyncExternalStore`.
|
|
31
|
+
*/
|
|
32
|
+
subscribe(listener: () => void): () => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Build a {@link KitStorage} façade around `adapter`, scoping every key under `namespace`. The
|
|
36
|
+
* façade is a small in-memory wrapper — it does not cache values (every `get` reads from the
|
|
37
|
+
* adapter) but does maintain a listener set so React can re-render via `useSyncExternalStore`.
|
|
38
|
+
*
|
|
39
|
+
* The namespace prefix is appended with a literal `:` separator. Pass any non-empty string;
|
|
40
|
+
* the kit's default is `stridge-kit:storage:v1` so future shape changes can ignore the
|
|
41
|
+
* older suffix.
|
|
42
|
+
*/
|
|
43
|
+
declare function createKitStorage(adapter: KitStorageAdapter, namespace: string): KitStorage;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { KitStorage, createKitStorage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){let n=new Set,r=e=>`${t}:${e}`,i=()=>{for(let e of n)e()};return{get:t=>e.get(r(t)),set:(t,n)=>{e.set(r(t),n),i()},has:t=>e.get(r(t))!==null,delete:t=>{e.delete(r(t)),i()},clear:()=>{e.clear(),i()},subscribe:e=>(n.add(e),()=>{n.delete(e)})}}export{e as createKitStorage};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { KitStorageAdapter, KitStoragePersistence } from "./types.js";
|
|
2
|
+
import { createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, resolveStorageAdapter } from "./adapters.js";
|
|
3
|
+
import { KitStorage, createKitStorage } from "./createKitStorage.js";
|
|
4
|
+
import { DEFAULT_KIT_STORAGE_NAMESPACE, KitStorageProvider, useKitStorage, useKitStorageValue } from "./context.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./adapters.js";import"./createKitStorage.js";import"./context.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/storage/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Backing layer behind the kit's persistent {@link KitStorage}. Implementations are responsible
|
|
4
|
+
* for raw read / write of string values keyed by the fully-qualified, namespaced key the kit
|
|
5
|
+
* passes in — they should not interpret the key, mutate values, or throw on missing keys / quota
|
|
6
|
+
* exhaustion. The kit's adapters all fail silently because storage is never load-bearing for a
|
|
7
|
+
* render path.
|
|
8
|
+
*/
|
|
9
|
+
interface KitStorageAdapter {
|
|
10
|
+
/** Read the raw string value, or `null` when the key is absent. Never throws. */
|
|
11
|
+
get(key: string): string | null;
|
|
12
|
+
/** Write the raw string value. Silent no-op if the underlying storage rejects (quota, etc.). */
|
|
13
|
+
set(key: string, value: string): void;
|
|
14
|
+
/** Remove the key. Silent no-op if absent or rejected. */
|
|
15
|
+
delete(key: string): void;
|
|
16
|
+
/** Remove every key the adapter manages. Silent no-op if rejected. */
|
|
17
|
+
clear(): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Persistence selection consumed by `<KitProvider storage={…} />`. The string variants resolve
|
|
21
|
+
* to bundled adapters (`session` → `sessionStorage`, `local` → `localStorage`, `memory` →
|
|
22
|
+
* in-process `Map`); custom backends pass a {@link KitStorageAdapter} directly.
|
|
23
|
+
*/
|
|
24
|
+
type KitStoragePersistence = "session" | "local" | "memory" | KitStorageAdapter;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { KitStorageAdapter, KitStoragePersistence };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DepositDriver } from "../flows/deposit/driver/types.js";
|
|
2
|
+
//#region src/stridge/StridgeContext.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Slim Stridge-specific context published by `<StridgeProvider />`. The driver itself is the
|
|
5
|
+
* single source of entity data — components reach for `useDepositSnapshot()` to read brand / target /
|
|
6
|
+
* addresses / balances / quote / settlement / wallet entities. This context exposes only the
|
|
7
|
+
* driver instance + a readiness flag so consumers can branch on bootstrap state.
|
|
8
|
+
*/
|
|
9
|
+
interface StridgeContextValue {
|
|
10
|
+
/** `true` once the driver's bootstrap (`gateway/start` + `supportedAssets`) has resolved. */
|
|
11
|
+
isReady: boolean;
|
|
12
|
+
/** The active {@link DepositDriver} instance, when bootstrap completed. */
|
|
13
|
+
driver: DepositDriver | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Read the {@link StridgeContextValue} from the nearest `<StridgeProvider />`. Throws when no
|
|
17
|
+
* provider is mounted. For BYO-driver hosts using `<KitProvider deposit={…} />` directly,
|
|
18
|
+
* `useStridge` is not applicable — use {@link useOptionalStridge} when the same component may
|
|
19
|
+
* render under either provider.
|
|
20
|
+
*/
|
|
21
|
+
declare function useStridge(): StridgeContextValue;
|
|
22
|
+
/**
|
|
23
|
+
* Non-throwing variant of {@link useStridge}. Returns the context value when a
|
|
24
|
+
* `<StridgeProvider />` is mounted above, or `null` when the component renders under a plain
|
|
25
|
+
* `<KitProvider />`.
|
|
26
|
+
*/
|
|
27
|
+
declare function useOptionalStridge(): StridgeContextValue | null;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { useOptionalStridge, useStridge };
|