@stridge/kit 0.1.0-alpha.3 → 0.1.0-alpha.31
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 +29 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/drivers/stridge/index.d.ts +2 -2
- package/dist/_internal/drivers/stridge/index.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/deposit/compound/index.d.ts +2 -2
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +26 -13
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/metadata.js +1 -1
- package/dist/drivers/stridge/types.d.ts +20 -14
- package/dist/drivers/stridge/types.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -2
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +13 -11
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/driver/payloads.d.ts +10 -4
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +30 -1
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +18 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +1 -1
- 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/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +6 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +6 -3
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +7 -0
- 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/processing-state/ProcessingState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.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 +2 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.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/shared/transformers/pickRelevantSettlement.js +1 -1
- 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 +58 -12
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- 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 +69 -13
- 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 +106 -32
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +18 -1
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
- 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/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 +2 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.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 +2 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.js +1 -1
- package/dist/package.js +1 -0
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +18 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +17 -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 -0
- package/dist/shared/cuer/QrCode.js +1 -0
- package/dist/shared/cuer/index.js +1 -0
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- 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/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportButton.d.ts +1 -0
- package/dist/shared/support/SupportButton.js +1 -0
- 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/resolveSupport.d.ts +1 -0
- package/dist/shared/support/resolveSupport.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/TermsButton.d.ts +1 -0
- package/dist/shared/terms/TermsButton.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/resolveTerms.d.ts +1 -0
- package/dist/shared/terms/resolveTerms.js +1 -0
- package/dist/shared/terms/types.d.ts +43 -0
- 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.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
- package/dist/shared/ui/ExternalLink/ExternalLink.js +1 -1
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.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/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/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/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 +11 -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 +7 -26
- 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/RouteValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
- package/dist/stridge/StridgeProvider.d.ts +172 -18
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +58 -12
- package/dist/types.d.ts +5 -4
- package/dist/ui/index.js +1 -1
- package/dist/withdraw/compound/index.d.ts +2 -2
- package/dist/withdraw/dialog/index.d.ts +3 -1
- package/package.json +10 -11
- package/dist/kit/package.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/{utils/src/use-copy-to-clipboard.js → shared/utils/useCopyToClipboard.js} +0 -0
package/dist/icons/index.d.ts
CHANGED
|
@@ -19,9 +19,10 @@ import { OkxIcon } from "../shared/icons/exchanges/OkxIcon.js";
|
|
|
19
19
|
import { RobinhoodIcon } from "../shared/icons/exchanges/RobinhoodIcon.js";
|
|
20
20
|
import { InfoIcon } from "../shared/icons/InfoIcon.js";
|
|
21
21
|
import { LoaderIcon } from "../shared/icons/LoaderIcon.js";
|
|
22
|
+
import { LogoIcon } from "../shared/icons/LogoIcon.js";
|
|
22
23
|
import { MailIcon } from "../shared/icons/MailIcon.js";
|
|
23
24
|
import { PackageIcon } from "../shared/icons/PackageIcon.js";
|
|
24
25
|
import { QrCodeIcon } from "../shared/icons/QrCodeIcon.js";
|
|
25
26
|
import { WalletIcon } from "../shared/icons/WalletIcon.js";
|
|
26
27
|
import { XIcon } from "../shared/icons/XIcon.js";
|
|
27
|
-
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
|
28
|
+
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, LogoIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
package/dist/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{
|
|
1
|
+
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{LogoIcon as x}from"../shared/icons/LogoIcon.js";import{MailIcon as S}from"../shared/icons/MailIcon.js";import{PackageIcon as C}from"../shared/icons/PackageIcon.js";import{QrCodeIcon as w}from"../shared/icons/QrCodeIcon.js";import{WalletIcon as T}from"../shared/icons/WalletIcon.js";import{XIcon as E}from"../shared/icons/XIcon.js";export{e as AlertIcon,t as ArrowDownIcon,n as ArrowRightIcon,r as ArrowRightLeftIcon,m as BinanceIcon,i as CheckIcon,a as ChevronDownIcon,o as ChevronLeftIcon,s as ChevronRightIcon,c as ChevronUpIcon,l as CircleArrowUpIcon,u as CircleHelpIcon,d as ClockIcon,h as CoinbaseIcon,f as CopyIcon,p as ExternalLinkIcon,y as InfoIcon,g as KrakenIcon,b as LoaderIcon,x as LogoIcon,S as MailIcon,_ as OkxIcon,C as PackageIcon,w as QrCodeIcon,v as RobinhoodIcon,T as WalletIcon,E as XIcon};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { TxRef } from "./shared/driver/types.js";
|
|
2
2
|
import { DepositSnapshot } from "./flows/deposit/driver/types.js";
|
|
3
3
|
import { useDepositSnapshot } from "./flows/deposit/driver/context.js";
|
|
4
|
+
import { FailureInfo } from "./shared/orchestrator/types.js";
|
|
5
|
+
import { DepositActions, DepositController, DepositMethod, DepositMethodConfig, DepositMethodsConfig, DepositState, DepositStateName, OpenInput } from "./flows/deposit/orchestrator/types.js";
|
|
6
|
+
import { ChainType, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType } from "./shared/chains/index.js";
|
|
4
7
|
import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
|
|
5
8
|
import { useWithdrawSnapshot } from "./flows/withdraw/driver/context.js";
|
|
6
9
|
import { useKitConfig } from "./scope/context.js";
|
|
7
10
|
import { KitPortalScope } from "./scope/KitPortalScope.js";
|
|
11
|
+
import { IntercomMerchantContext } from "./shared/support/useIntercomMerchantContext.js";
|
|
12
|
+
import { SupportConfig, SupportOpenContext } from "./shared/support/types.js";
|
|
13
|
+
import { TermsConfig, TermsSelectContext } from "./shared/terms/types.js";
|
|
8
14
|
import { createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, resolveStorageAdapter } from "./storage/adapters.js";
|
|
9
15
|
import { createKitStorage } from "./storage/createKitStorage.js";
|
|
10
16
|
import { DEFAULT_KIT_STORAGE_NAMESPACE, KitStorageProvider, useKitStorage, useKitStorageValue } from "./storage/context.js";
|
|
11
17
|
import { StridgeEnvironment } from "./drivers/stridge/types.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
15
|
-
import { ChainInput, ChainSlug, chains } from "./shared/chains/index.js";
|
|
18
|
+
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
19
|
+
import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient, useWithdrawBindings } from "./flows/withdraw/bindings/WithdrawBindings.js";
|
|
16
20
|
import { ChainLogoMeta } from "./shared/utils/logos/chains.js";
|
|
17
21
|
import { ChainLogoInput, TokenLogoInput } from "./shared/utils/logos/types.js";
|
|
18
22
|
import { LogosNamespace, logos } from "./shared/utils/logos/api.js";
|
|
19
23
|
import { BannerAckBucket, bannerAckStorageKey, bucketFromSettlement, useBannerAck, useBannerAckForSettlement } from "./banners/useBannerAck.js";
|
|
20
24
|
import { useDepositState } from "./flows/deposit/orchestrator/controller.js";
|
|
21
|
-
import { useDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
|
|
25
|
+
import { useDeposit, useOptionalDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
|
|
22
26
|
import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
|
|
23
|
-
import { useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
|
|
27
|
+
import { useOptionalWithdraw, useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
|
|
24
28
|
import { useOptionalStridge, useStridge } from "./stridge/StridgeContext.js";
|
|
25
|
-
import { StridgeAppearance, StridgeAsset, StridgeDepositFlowConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
26
|
-
export { type BannerAckBucket, type
|
|
29
|
+
import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
30
|
+
export { type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type DepositMethodConfig, type DepositMethodsConfig, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeDepositMethodConfig, type StridgeDepositMethodsConfig, type StridgeEnvironment, type StridgeFlowOwner, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TermsConfig, type TermsSelectContext, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalDeposit, useOptionalStridge, useOptionalWithdraw, useStridge, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isValidAddressForChainType as e,isValidEvmAddress as t,isValidTronAddress as n,toChainType as r}from"./shared/chains/index.js";import{logos as i}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as a,createMemoryStorageAdapter as o,createSessionStorageAdapter as s,resolveStorageAdapter as c}from"./storage/adapters.js";import{createKitStorage as l}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as u,KitStorageProvider as d,useKitStorage as f,useKitStorageValue as p}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as m,bucketFromSettlement as h,useBannerAck as g,useBannerAckForSettlement as _}from"./banners/useBannerAck.js";import"./banners/index.js";import{useDepositSnapshot as v}from"./flows/deposit/driver/context.js";import{useDepositState as y}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as b,useOptionalDeposit as x}from"./flows/deposit/orchestrator/useDeposit.js";import{useWithdrawBindings as S}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{useWithdrawSnapshot as C}from"./flows/withdraw/driver/context.js";import{useWithdrawState as w}from"./flows/withdraw/orchestrator/controller.js";import{useOptionalWithdraw as T,useWithdraw as E}from"./flows/withdraw/orchestrator/useWithdraw.js";import"./flows/withdraw/orchestrator/index.js";import{useKitConfig as D}from"./scope/context.js";import{KitPortalScope as O}from"./scope/KitPortalScope.js";import{useOptionalStridge as k,useStridge as A}from"./stridge/StridgeContext.js";import{StridgeProvider as j}from"./stridge/StridgeProvider.js";export{u as DEFAULT_KIT_STORAGE_NAMESPACE,O as KitPortalScope,d as KitStorageProvider,j as StridgeProvider,m as bannerAckStorageKey,h as bucketFromSettlement,l as createKitStorage,a as createLocalStorageAdapter,o as createMemoryStorageAdapter,s as createSessionStorageAdapter,e as isValidAddressForChainType,t as isValidEvmAddress,n as isValidTronAddress,i as logos,c as resolveStorageAdapter,r as toChainType,g as useBannerAck,_ as useBannerAckForSettlement,b as useDeposit,v as useDepositSnapshot,y as useDepositState,D as useKitConfig,f as useKitStorage,p as useKitStorageValue,x as useOptionalDeposit,k as useOptionalStridge,T as useOptionalWithdraw,A as useStridge,E as useWithdraw,S as useWithdrawBindings,C as useWithdrawSnapshot,w as useWithdrawState};
|
package/dist/package.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`0.1.0-alpha.31`;export{e as version};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitConfig as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{jsx as n}from"react/jsx-runtime";import{DirectionProvider as r}from"@base-ui/react/direction-provider";function i({className:i,style:a,children:o,...s}){let{accent:c,direction:l,
|
|
1
|
+
"use client";import{useKitConfig as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{jsx as n}from"react/jsx-runtime";import{DirectionProvider as r}from"@base-ui/react/direction-provider";function i({className:i,style:a,children:o,...s}){let{accent:c,direction:l,locale:u,radius:d,theme:f}=e(),p=c?{"--stridge-kit-primary":c}:void 0,m=p||a?{...p,...a}:void 0;return n(r,{direction:l??`ltr`,children:n(`div`,{...s,dir:l,"data-stridge-scope":``,"data-stridge-radius":d,"data-stridge-theme":f,"data-stridge-locale":u,"data-stridge-slot":t.portalScope,className:i,style:m,children:o})})}export{i as KitPortalScope};
|
package/dist/scope/KitScope.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KitDirection, KitRadius, KitTarget, KitTheme } from "./context.js";
|
|
1
|
+
import { KitAttribution, KitDirection, KitRadius, KitTarget, KitTheme } from "./context.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -19,7 +19,9 @@ declare function KitScope({
|
|
|
19
19
|
radius,
|
|
20
20
|
theme,
|
|
21
21
|
direction: directionProp,
|
|
22
|
+
locale,
|
|
22
23
|
target,
|
|
24
|
+
attribution,
|
|
23
25
|
className,
|
|
24
26
|
style,
|
|
25
27
|
dir,
|
|
@@ -55,6 +57,21 @@ declare namespace KitScope {
|
|
|
55
57
|
* Use the standard HTML `dir` prop instead when you want a tree-wide DOM flip.
|
|
56
58
|
*/
|
|
57
59
|
direction?: KitDirection;
|
|
60
|
+
/**
|
|
61
|
+
* Active BCP-47 locale tag (`"en"`, `"ar"`, `"fa"`, …). Forwarded by `KitProvider` from
|
|
62
|
+
* `i18n.locale` and stamped onto the scope div as `data-stridge-locale="…"` so hosts can
|
|
63
|
+
* target script-specific styling per locale — e.g. swap the kit's font stack to a Persian
|
|
64
|
+
* face on `[data-stridge-locale^="fa"]` while keeping the Arabic face on `[…^="ar"]`. RTL
|
|
65
|
+
* alone isn't fine-grained enough because both share `dir="rtl"`.
|
|
66
|
+
*/
|
|
67
|
+
locale?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
|
|
70
|
+
* `"visible"` (default) auto-mounts the brand row at the bottom of every step; `"hidden"`
|
|
71
|
+
* suppresses the auto-mount for white-label installs. Explicit `<Stridge.PoweredBy />`
|
|
72
|
+
* compositions always render — set this to `"hidden"` when composing the brand row manually.
|
|
73
|
+
*/
|
|
74
|
+
attribution?: KitAttribution;
|
|
58
75
|
/** Children rendered inside the kit scope. */
|
|
59
76
|
children?: ReactNode;
|
|
60
77
|
}
|
package/dist/scope/KitScope.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,
|
|
1
|
+
"use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,locale:m,target:h,attribution:g,className:_,style:v,dir:y,ref:b,children:x,...S}){let C=a(null),w=f(C,y),T=u(y)??d??w,E=n(e=>{C.current=e,p(b,e)},[b]),D=i(()=>({accent:r,radius:o,theme:l,direction:T,locale:m,target:h,attribution:g}),[r,o,l,T,m,h,g]),O=r?{"--stridge-kit-primary":r}:void 0,k=O||v?{...O,...v}:void 0;return s(e.Provider,{value:D,children:s(c,{direction:T??`ltr`,children:s(`div`,{...S,ref:E,dir:y,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-locale":m,"data-stridge-slot":t.root,className:_,style:k,children:x})})})}function u(e){return e===`ltr`||e===`rtl`?e:void 0}function d(e){for(let t=e;t;t=t.parentElement){let e=u(t.getAttribute(`dir`)??void 0);if(e)return e}if(!(typeof window>`u`))return u(window.getComputedStyle(e).direction)}function f(e,t){let[n,i]=o(()=>u(t));return r(()=>{let n=e.current;if(!n){i(u(t));return}let r=()=>{i(d(n))};if(r(),typeof MutationObserver>`u`)return;let a=new MutationObserver(r);for(let e=n;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`dir`]});return()=>a.disconnect()},[t,e]),n}function p(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}export{l as KitScope};
|
package/dist/scope/context.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
type KitRadius = "sharp" | "subtle" | "rounded" | "pill";
|
|
3
3
|
type KitTheme = "dark" | "light";
|
|
4
4
|
type KitDirection = "ltr" | "rtl";
|
|
5
|
+
type KitAttribution = "visible" | "hidden";
|
|
5
6
|
/**
|
|
6
7
|
* Destination token credited by the gateway flow.
|
|
7
8
|
*/
|
|
@@ -53,10 +54,25 @@ interface KitConfig {
|
|
|
53
54
|
* behavior when they render outside the provider's DOM subtree.
|
|
54
55
|
*/
|
|
55
56
|
direction?: KitDirection;
|
|
57
|
+
/**
|
|
58
|
+
* Active BCP-47 locale tag (e.g. `"en"`, `"ar"`, `"fa"`, `"ar-EG"`). Forwarded by `KitProvider`
|
|
59
|
+
* from `i18n.locale` and stamped onto every kit scope as `data-stridge-locale="…"` so the host
|
|
60
|
+
* can target script-specific styling (typically the font stack) per locale — RTL alone isn't
|
|
61
|
+
* fine-grained enough (Arabic and Persian are both RTL but commonly want different faces).
|
|
62
|
+
*/
|
|
63
|
+
locale?: string;
|
|
56
64
|
/**
|
|
57
65
|
* Destination token configuration.
|
|
58
66
|
*/
|
|
59
67
|
target?: KitTarget;
|
|
68
|
+
/**
|
|
69
|
+
* Resolved state of the "Powered by Stridge" attribution row. `"visible"` (default) lets the
|
|
70
|
+
* gateway frame auto-mount the brand row at the bottom of every step; `"hidden"` suppresses
|
|
71
|
+
* the auto-mount for white-label installs. Explicit `<Stridge.PoweredBy />` compositions
|
|
72
|
+
* ignore this value and always render — the contract is "set `attribution=\"hidden\"` when
|
|
73
|
+
* composing the brand row manually".
|
|
74
|
+
*/
|
|
75
|
+
attribution?: KitAttribution;
|
|
60
76
|
}
|
|
61
77
|
/**
|
|
62
78
|
* Reads the active {@link KitConfig} from the nearest provider. Returns `{}` when no provider is
|
|
@@ -64,4 +80,4 @@ interface KitConfig {
|
|
|
64
80
|
*/
|
|
65
81
|
declare function useKitConfig(): KitConfig;
|
|
66
82
|
//#endregion
|
|
67
|
-
export { KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig };
|
|
83
|
+
export { KitAttribution, KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig };
|
package/dist/scope/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig } from "./context.js";
|
|
1
|
+
import { KitAttribution, KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig } from "./context.js";
|
|
2
2
|
import { KitPortalScope } from "./KitPortalScope.js";
|
|
3
3
|
import { KitScope } from "./KitScope.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../i18n/useLingui.js";import"../../i18n/index.js";import{joinClassNames as t}from"../utils/joinClassNames.js";import{LogoIcon as n}from"../icons/LogoIcon.js";import"../../icons/index.js";import{ATTRIBUTION_SLOTS as r}from"./Attribution.slots.js";import{elementStyles as i,styles as a}from"./Attribution.styles.js";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({href:u=`https://stridge.com`,target:d=`_blank`,rel:f=`noopener noreferrer`,asStatic:p,className:m,style:h}){let{_:g}=e(),_=l.props(a.root),v=l.props(a.link,!p&&a.anchor),y=l.props(i.prefix),b=l.props(i.mark),x=l.props(i.wordmark),S=t(_.className,m),C=_.style||h?{..._.style,...h}:void 0,w=c(o,{children:[s(`span`,{"data-stridge-slot":r.prefix,className:y.className,style:y.style,children:g({id:`g2UNkE`,message:`Powered by`})}),s(`span`,{"data-stridge-slot":r.mark,className:b.className,style:b.style,children:s(n,{"aria-hidden":!0,focusable:!1})}),s(`span`,{"data-stridge-slot":r.wordmark,className:x.className,style:x.style,children:`Stridge`})]});return s(`div`,{"data-stridge-slot":r.root,className:S,style:C,children:p?s(`span`,{className:v.className,style:v.style,children:w}):s(`a`,{href:u,target:d,rel:f,className:v.className,style:v.style,children:w})})}export{u as Attribution};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`attribution`,prefix:`attribution-prefix`,mark:`attribution-mark`,wordmark:`attribution-wordmark`};export{e as ATTRIBUTION_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"Attribution__styles.root":`Attribution__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`x19ment4`,"paddingBottom-kGO01o":`xfvigk`,"paddingInline-kg3NbH":`x1ujb8i1`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:11`},link:{"Attribution__styles.link":`Attribution__styles.link`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"textDecoration-kybGjl":`x1hl2dhg`,"outline-kI3sdo":`x1a2a7pz`,"transitionProperty-k1ekBW":`xt3l3uh`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x1xv5090`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:20`},anchor:{"Attribution__styles.anchor":`Attribution__styles.anchor`,":focus-visible_outline-k3Woio":`x1gvykhg`,":focus-visible_outlineOffset-kiEn40":`x7s97pk`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:35`}},t={prefix:{"Attribution__elementStyles.prefix":`Attribution__elementStyles.prefix`,"fontSize-kGuDYH":`x1oae1zf`,"fontWeight-k63SB2":`xxjjie5`,"lineHeight-kLWn49":`x1d3mw78`,"color-kMwMTN":`xd2gg92`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-prefix']_color-kKNNVu":`x1wa2jhk`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:51`},mark:{"Attribution__elementStyles.mark":`Attribution__elementStyles.mark`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"color-kMwMTN":`x9irweu`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-mark']_color-kEC4n1":`x1perupi`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:60`},wordmark:{"Attribution__elementStyles.wordmark":`Attribution__elementStyles.wordmark`,"fontSize-kGuDYH":`x1oae1zf`,"fontWeight-k63SB2":`x1qvi77d`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"lineHeight-kLWn49":`x1d3mw78`,"color-kMwMTN":`x1nxg1fm`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_color-kKiZkk":`x19k0ldo`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_textDecoration-k7BEHM":`x1l0eogd`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_textUnderlineOffset-kHPfEo":`x1diuls0`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:68`}};export{t as elementStyles,e as styles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Attribution.slots.js";import"./Attribution.js";
|
|
@@ -1,40 +1,59 @@
|
|
|
1
1
|
//#region src/shared/chains/index.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Chain
|
|
4
|
-
* slug, suitable for IDE autocomplete) and a normalizer that converts any accepted form
|
|
5
|
-
* (slug, EIP-155 number, Stridge networkId) into the wire-shape `network_id` string the gateway
|
|
6
|
-
* expects.
|
|
3
|
+
* Chain-family types and recipient-address validators for `@stridge/kit`.
|
|
7
4
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* The kit does not ship a static chain catalog — the gateway is the single source of truth for
|
|
6
|
+
* which networks exist. Consumers pass the Stridge network id (read straight off
|
|
7
|
+
* `Uda.supportedAssets()`) as `StridgeAsset.networkId`, and the kit forwards it to
|
|
8
|
+
* `gateway/start` verbatim. This module only carries the chain-*family* tag (`ChainType`) and
|
|
9
|
+
* the address-shape validators that depend on it.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Chain family a network belongs to. The kit-internal, case-stable mirror of the gateway's
|
|
13
|
+
* `chain_type` wire tag (`SupportedAssetDto.chain_type`):
|
|
11
14
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* - `"evm"` — every EIP-155 chain (Ethereum, BSC, Polygon, …); addresses are `0x` + 40 hex.
|
|
16
|
+
* - `"tron"` — Tron mainnet; addresses are base58check, 34 chars, leading `T`.
|
|
17
|
+
* - `"unknown"` — a family the kit predates. Address validation falls back to a permissive
|
|
18
|
+
* shape check (see {@link isValidAddressForChainType}) so a chain the backend lists before
|
|
19
|
+
* the kit ships explicit support is still usable rather than hard-blocked.
|
|
20
|
+
*
|
|
21
|
+
* Drivers are the source of truth: each one tags its payloads (`ReceiveChainPayload.chainType`,
|
|
22
|
+
* …) so widgets and headless consumers never re-derive the family from chain-id heuristics.
|
|
23
|
+
*/
|
|
24
|
+
type ChainType = "evm" | "tron" | "unknown";
|
|
25
|
+
/**
|
|
26
|
+
* Normalize a raw gateway `chain_type` value (or a missing one) into a {@link ChainType}.
|
|
27
|
+
* Surrounding whitespace is trimmed and matching is case-insensitive; the gateway tags Tron as
|
|
28
|
+
* `"TVM"` (Tron Virtual Machine). Any value the kit doesn't recognize — including `undefined` —
|
|
29
|
+
* collapses to `"unknown"`, which keeps the address gate permissive instead of blocking the flow.
|
|
30
|
+
*/
|
|
31
|
+
declare function toChainType(raw: string | null | undefined): ChainType;
|
|
32
|
+
/**
|
|
33
|
+
* Lightweight EVM-address validator. Matches `0x` followed by exactly 40 hex characters.
|
|
34
|
+
* Does NOT enforce the EIP-55 mixed-case checksum — the gateway lowercases before routing, and
|
|
35
|
+
* checksum validation would reject the all-lowercase forms wallets and explorers commonly emit.
|
|
36
|
+
* Input is trimmed before matching.
|
|
17
37
|
*/
|
|
38
|
+
declare function isValidEvmAddress(value: string): boolean;
|
|
18
39
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
40
|
+
* Lightweight Tron-address validator. Matches the base58check mainnet shape: a leading `T`
|
|
41
|
+
* followed by 33 base58 characters (34 total). Does NOT verify the trailing checksum bytes —
|
|
42
|
+
* that needs a base58check decode the kit deliberately keeps out of the bundle; the gateway
|
|
43
|
+
* performs the authoritative check. Input is trimmed before matching.
|
|
22
44
|
*/
|
|
23
|
-
declare
|
|
24
|
-
readonly ethereum: 1;
|
|
25
|
-
readonly bsc: 56;
|
|
26
|
-
readonly polygon: 137;
|
|
27
|
-
readonly arbitrum: 42161;
|
|
28
|
-
readonly base: 8453;
|
|
29
|
-
};
|
|
30
|
-
type ChainSlug = keyof typeof chains;
|
|
45
|
+
declare function isValidTronAddress(value: string): boolean;
|
|
31
46
|
/**
|
|
32
|
-
*
|
|
47
|
+
* Validate a recipient address against the chain family it's being sent to — the chain-type-aware
|
|
48
|
+
* gate the withdraw form and headless integrators share. Pass the `chainType` the driver tagged
|
|
49
|
+
* onto the receive-chain payload.
|
|
50
|
+
*
|
|
51
|
+
* - `"evm"` / `"tron"` — checked against the family's real address shape.
|
|
52
|
+
* - `"unknown"` — a family the kit predates: accepts any whitespace-free token of at least 8
|
|
53
|
+
* characters, so a backend-listed chain still works before the kit ships a dedicated matcher.
|
|
33
54
|
*
|
|
34
|
-
* -
|
|
35
|
-
* - `string` — chain slug (`"bsc"`), the matching EIP-155 id as text (`"56"`), or a Stridge
|
|
36
|
-
* `network_id` (`"9006"`). The kit normalizes via {@link normalizeChainToNetworkId}.
|
|
55
|
+
* Empty / whitespace-only input is always rejected. Trim is handled internally.
|
|
37
56
|
*/
|
|
38
|
-
|
|
57
|
+
declare function isValidAddressForChainType(value: string, chainType: ChainType): boolean;
|
|
39
58
|
//#endregion
|
|
40
|
-
export {
|
|
59
|
+
export { ChainType, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e){switch(e?.trim().toUpperCase()){case`EVM`:return`evm`;case`TVM`:return`tron`;default:return`unknown`}}const t=/^0x[0-9a-fA-F]{40}$/,n=/^T[1-9A-HJ-NP-Za-km-z]{33}$/;function r(e){return t.test(e.trim())}function i(e){return n.test(e.trim())}function a(e,r){let i=e.trim();if(i.length===0)return!1;switch(r){case`evm`:return t.test(i);case`tron`:return n.test(i);default:return/^\S{8,}$/.test(i)}}export{a as isValidAddressForChainType,r as isValidEvmAddress,i as isValidTronAddress,e as toChainType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={appId:`ii7w0vsj`};export{e as BRAND_INTERCOM};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create as e}from"./QrCode.js";import*as t from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";const a=e=>Math.max(0,Math.min(1,e));function o(e){let{arena:t,...n}=e;return i(o.Root,{...n,children:[r(o.Finder,{}),r(o.Cells,{}),t&&r(o.Arena,{href:t})]})}(function(o){let s=o.Context=t.createContext(null);function c(n){let{children:a,size:o=`100%`,value:c,version:l,errorCorrection:u,...d}=n,f=t.useMemo(()=>(t.Children.map(a,e=>!t.isValidElement(e)||typeof e.type==`string`?null:`displayName`in e.type&&e.type.displayName===`Arena`?!0:null)??[]).some(Boolean),[a]),p=t.useMemo(()=>{let t=u;return f&&u===`low`&&(t=`medium`),e(c,{errorCorrection:t,version:l})},[c,f,u,l]),m=p.edgeLength*1,h=p.finderLength*1/2,g=f?Math.floor(m/4):0,_=(m-g)/2,v=t.useMemo(()=>({arenaSize:g,arenaStart:_,cellSize:1,edgeSize:m,qrcode:p,finderSize:h}),[g,_,m,p,h]);return r(s.Provider,{value:v,children:i(`svg`,{...d,width:o,height:o,viewBox:`0 0 ${m} ${m}`,xmlns:`http://www.w3.org/2000/svg`,children:[r(`title`,{children:`QR Code`}),a]})})}o.Root=c,(function(e){e.displayName=`Root`})(c||=o.Root||={});function l(e){let{className:o,fill:c,innerClassName:l,radius:u=.25,stroke:d}=e,{cellSize:f,edgeSize:p,finderSize:m}=t.useContext(s),h=a(u);function g({position:e}){let t=m-(m-f)-f/2;e===`top-right`&&(t=p-m-(m-f)-f/2);let a=m-(m-f)-f/2;e===`bottom-left`&&(a=p-m-(m-f)-f/2);let s=m-f*1.5;e===`top-right`&&(s=p-m-f*1.5);let u=m-f*1.5;return e===`bottom-left`&&(u=p-m-f*1.5),i(n,{children:[r(`rect`,{className:o,stroke:d??c??`currentColor`,fill:`transparent`,x:t,y:a,width:f+(m-f)*2,height:f+(m-f)*2,rx:2*h*(m-f),ry:2*h*(m-f),strokeWidth:f}),r(`rect`,{className:l,fill:c??`currentColor`,x:s,y:u,width:f*3,height:f*3,rx:2*h*f,ry:2*h*f})]})}return i(n,{children:[r(g,{position:`top-left`}),r(g,{position:`top-right`}),r(g,{position:`bottom-left`})]})}o.Finder=l,(function(e){e.displayName=`Finder`})(l||=o.Finder||={});function u(e){let{className:n,fill:i=`currentColor`,inset:o=!0,radius:c=1}=e,{arenaSize:l,arenaStart:u,cellSize:d,qrcode:f}=t.useContext(s),{edgeLength:p,finderLength:m}=f,h=a(c);return r(`path`,{className:n,d:t.useMemo(()=>{let e=``,t=u+l;for(let n=0;n<f.grid.length;n++){let r=f.grid[n];if(r)for(let i=0;i<r.length;i++){if(!r[i])continue;if(l>0){let e=(i+.5)*d,r=(n+.5)*d;if(e>=u&&e<=t&&r>=u&&r<=t)continue}let a=n<m&&i<m,s=n<m&&i>=p-m,c=n>=p-m&&i<m;if(a||s||c)continue;let f=(d-(o?d*.1:0)*2)/2,g=i*d+d/2,_=n*d+d/2,v=g-f,y=g+f,b=_-f,x=_+f,S=h*f;e+=[`M ${v+S},${b}`,`L ${y-S},${b}`,`A ${S},${S} 0 0,1 ${y},${b+S}`,`L ${y},${x-S}`,`A ${S},${S} 0 0,1 ${y-S},${x}`,`L ${v+S},${x}`,`A ${S},${S} 0 0,1 ${v},${x-S}`,`L ${v},${b+S}`,`A ${S},${S} 0 0,1 ${v+S},${b}`,`z`].join(` `)}}return e},[l,u,d,p,m,f.grid,o,h]),fill:i})}o.Cells=u,(function(e){e.displayName=`Cells`})(u||=o.Cells||={});function d(e){let{href:n,preserveAspectRatio:i=`xMidYMid meet`,...a}=e,{arenaSize:o,arenaStart:c,cellSize:l}=t.useContext(s),u=l/2,d=c+u,f=o-u*2;return r(`image`,{href:n,...a,x:d,y:d,width:f,height:f,preserveAspectRatio:i})}o.Arena=d,(function(e){e.displayName=`Arena`})(d||=o.Arena||={})})(o||={});export{o as Cuer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{encodeQR as e}from"qr";function t(t,n={}){let{errorCorrection:r,version:i}=n,a=e(t,`raw`,{border:1,ecc:r,scale:1,version:i}).slice(1,-1).map(e=>e.slice(1,-1));return{edgeLength:a.length,finderLength:7,grid:a,value:t}}export{t as create};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Cuer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitConfig as e}from"../../scope/context.js";import{useIsInsideDialogContent as t}from"../ui/Dialog/Dialog.js";import"../ui/Dialog/index.js";import{
|
|
1
|
+
"use client";import{useKitConfig as e}from"../../scope/context.js";import{useIsInsideDialogContent as t}from"../ui/Dialog/Dialog.js";import"../ui/Dialog/index.js";import{Attribution as n}from"../attribution/Attribution.js";import"../attribution/index.js";import{Card as r}from"../ui/Card/Card.js";import"../../ui/index.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({className:o,style:s,dir:c,children:l,...u}){let d=t(),{direction:f,attribution:p}=e(),m=c??f,h=p!==`hidden`;if(d){let e={className:`Frame__styles.bare x78zum5 xdt5ytf xkz0k9k x2lwn1j x7giv3`,"data-style-src":`@stridge/kit:src/shared/dialog/Frame.tsx:33`};return a(`div`,{...u,dir:m,className:[e.className,o].filter(Boolean).join(` `)||void 0,style:{...e.style,...s},children:[l,h?i(n,{}):null]})}return a(r,{variant:`frame`,dir:m,className:o,style:s,...u,children:[l,h?i(n,{}):null]})}export{o as Frame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,
|
|
1
|
+
"use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,m as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t||document.visibilityState===`hidden`)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),g.current!==null&&(window.clearTimeout(g.current),g.current=null);let e=u.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)}},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* public `@stridge/kit/<flow>/driver` surface.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* On-chain transaction reference.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* On-chain transaction reference. The deposit driver returns one from `submitDeposit`; the
|
|
10
|
+
* withdraw flow's host-supplied `onSubmit` surfaces one via `actions.beginProcessing({ hash })`
|
|
11
|
+
* or `actions.setTxHash`. The orchestrator stamps it on the FSM's `tx` slot until the matching
|
|
12
|
+
* settlement entity catches up and exposes a richer `txHash` / `txExplorerUrl` pair.
|
|
12
13
|
*/
|
|
13
14
|
interface TxRef {
|
|
14
15
|
hash: string;
|
|
@@ -3,21 +3,24 @@ import { ReactNode } from "react";
|
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/shared/i18n/KitI18nProvider.d.ts
|
|
6
|
-
interface Props extends KitI18nConfig {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
}
|
|
9
6
|
/**
|
|
10
7
|
* Mounts a per-request Lingui `I18n` instance into React context. Re-creates the instance only
|
|
11
|
-
* when `locale` or the identity of `
|
|
12
|
-
* other context providers, and the SSR-safe alternative to mutating a module-level
|
|
8
|
+
* when `locale` or the identity of `messages` changes — same render-stable pattern as the
|
|
9
|
+
* kit's other context providers, and the SSR-safe alternative to mutating a module-level
|
|
10
|
+
* singleton.
|
|
13
11
|
*
|
|
14
12
|
* Used internally by `KitProvider`. Hosts don't mount this directly; they pass a single
|
|
15
|
-
* `i18n={{ locale,
|
|
13
|
+
* `i18n={{ locale, messages }}` prop on `<KitProvider>` and the kit handles the wiring.
|
|
16
14
|
*/
|
|
17
15
|
declare function KitI18nProvider({
|
|
18
16
|
locale,
|
|
19
|
-
|
|
17
|
+
messages,
|
|
20
18
|
children
|
|
21
|
-
}: Props): _$react_jsx_runtime0.JSX.Element;
|
|
19
|
+
}: KitI18nProvider.Props): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
+
declare namespace KitI18nProvider {
|
|
21
|
+
interface Props extends KitI18nConfig {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
22
25
|
//#endregion
|
|
23
26
|
export { KitI18nProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createKitI18n as e}from"./createKitI18n.js";import{useMemo as t}from"react";import{jsx as n}from"react/jsx-runtime";import{I18nProvider as r}from"@lingui/react";function i({locale:i=`en`,
|
|
1
|
+
"use client";import{createKitI18n as e}from"./createKitI18n.js";import{useMemo as t}from"react";import{jsx as n}from"react/jsx-runtime";import{I18nProvider as r}from"@lingui/react";function i({locale:i=`en`,messages:a,children:o}){return n(r,{i18n:t(()=>e({locale:i,messages:a}),[i,a]),children:o})}export{i as KitI18nProvider};
|
|
@@ -1,33 +1,96 @@
|
|
|
1
|
+
import { SupportedLocale } from "./locales.js";
|
|
2
|
+
import { KitTranslatableKey } from "../../i18n/locales/source-keys.js";
|
|
1
3
|
import { I18n, Messages } from "@lingui/core";
|
|
2
4
|
|
|
3
5
|
//#region src/shared/i18n/createKitI18n.d.ts
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
* (`"en"`, `"es"`,
|
|
7
|
-
*
|
|
7
|
+
* Locale codes the kit's i18n surface accepts. Autocompletes on the locales the kit ships
|
|
8
|
+
* catalogs for ({@link SupportedLocale} — `"en"`, `"es"`, `"ar"`) while still accepting any
|
|
9
|
+
* other BCP-47 tag, so hosts who add their own catalogs via `defineMessages` aren't fenced
|
|
10
|
+
* out of the type.
|
|
11
|
+
*
|
|
12
|
+
* The `(string & {})` intersection is the standard escape hatch for "literal union + open
|
|
13
|
+
* string with autocomplete": without it, TypeScript collapses `Supported | string` to plain
|
|
14
|
+
* `string` and the editor loses the autocomplete suggestions for the named literals.
|
|
15
|
+
*/
|
|
16
|
+
type KitLocale = SupportedLocale | (string & {});
|
|
17
|
+
/**
|
|
18
|
+
* Map of locale codes to compiled message catalogs. Values are lingui `Messages` —
|
|
19
|
+
* content-hash-keyed `{ [id]: translation }` maps where ICU placeholders and plurals are
|
|
20
|
+
* compiled at runtime by {@link compileMessage}.
|
|
21
|
+
*
|
|
22
|
+
* Shipped locales (`@stridge/kit/i18n/locales/<code>`) export `Messages` directly. For hosts
|
|
23
|
+
* authoring their own translations, the recommended path is {@link defineMessages}, which
|
|
24
|
+
* takes a plain English-keyed map and emits the same hash-keyed shape — so shipped and
|
|
25
|
+
* host-authored translations slot into the same prop without different shapes.
|
|
8
26
|
*/
|
|
9
|
-
type
|
|
27
|
+
type KitMessages = Partial<Record<KitLocale, Messages>>;
|
|
28
|
+
/**
|
|
29
|
+
* Hash a plain English-keyed translation map into the lingui `Messages` shape, ready to drop
|
|
30
|
+
* into `<KitProvider i18n={{ messages: { … } }}>`. Use this whenever you want to author
|
|
31
|
+
* translations by hand — adding a locale the kit doesn't ship, overriding a single key on a
|
|
32
|
+
* shipped locale, or tweaking the source English copy.
|
|
33
|
+
*
|
|
34
|
+
* Keys are constrained to {@link KitTranslatableKey} — the literal union of every English
|
|
35
|
+
* source the kit actually translates. Editors autocomplete on every valid key, and typos /
|
|
36
|
+
* stale keys fail at compile time via excess-property checks on the object literal. The union
|
|
37
|
+
* is codegened from `en.po` at `pnpm i18n:compile` time.
|
|
38
|
+
*
|
|
39
|
+
* Hashing runs once per call (typically at module load), not on every render. ICU placeholders
|
|
40
|
+
* (`{symbol}`) and plurals (`{count, plural, one {# item} other {# items}}`) are supported in
|
|
41
|
+
* both keys and values; the kit's runtime compiler handles ICU on access.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* import { messages as es } from "@stridge/kit/i18n/locales/es";
|
|
46
|
+
* import { defineMessages } from "@stridge/kit/i18n";
|
|
47
|
+
*
|
|
48
|
+
* const fr = defineMessages({
|
|
49
|
+
* Continue: "Suivant",
|
|
50
|
+
* "Deposit {symbol}": "Dépôt de {symbol}",
|
|
51
|
+
* "{count, plural, one {# item} other {# items}}":
|
|
52
|
+
* "{count, plural, one {# article} other {# articles}}",
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* // Add a brand-new locale:
|
|
56
|
+
* <KitProvider i18n={{ locale: "fr", messages: { fr } }} />;
|
|
57
|
+
*
|
|
58
|
+
* // Override one key on a shipped locale (spread to preserve the rest):
|
|
59
|
+
* <KitProvider i18n={{ locale: "es", messages: { es: { ...es, ...defineMessages({ Continue: "Adelante" }) } } }} />;
|
|
60
|
+
*
|
|
61
|
+
* // Override source English:
|
|
62
|
+
* <KitProvider i18n={{ locale: "en", messages: { en: defineMessages({ Deposit: "Top up" }) } }} />;
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare function defineMessages(translations: Partial<Record<KitTranslatableKey, string>>): Messages;
|
|
10
66
|
/**
|
|
11
67
|
* Public-facing i18n configuration. Pass the whole object to `<KitProvider i18n={…}>` —
|
|
12
|
-
* `locale` selects the active locale, `
|
|
13
|
-
* against. Locales not present in `
|
|
68
|
+
* `locale` selects the active locale, `messages` lists the catalogs the kit can resolve
|
|
69
|
+
* against. Locales not present in `messages` fall back to the source English string per leaf.
|
|
14
70
|
*/
|
|
15
71
|
interface KitI18nConfig {
|
|
16
|
-
/** Active locale code. Defaults to `"en"`. */
|
|
17
|
-
locale?: string;
|
|
18
72
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
73
|
+
* Active locale code. Defaults to `"en"`. Autocompletes on shipped locales (`"en"`, `"es"`,
|
|
74
|
+
* `"ar"`) but accepts any other BCP-47 tag for host-supplied catalogs.
|
|
75
|
+
*/
|
|
76
|
+
locale?: KitLocale;
|
|
77
|
+
/**
|
|
78
|
+
* Locale catalogs the kit can resolve against. Each value is a hash-keyed lingui
|
|
79
|
+
* `Messages` map — either deep-imported from `@stridge/kit/i18n/locales/<code>` (shipped
|
|
80
|
+
* locales: `en`, `es`, `ar`) or produced by {@link defineMessages} from a plain
|
|
81
|
+
* English-keyed map (host-authored locales and per-key overrides). Same-locale entries
|
|
82
|
+
* merge per-key — spread a shipped catalog and overlay specific keys via `defineMessages`
|
|
83
|
+
* to override individual phrases without touching the rest.
|
|
22
84
|
*/
|
|
23
|
-
|
|
85
|
+
messages?: KitMessages;
|
|
24
86
|
}
|
|
25
87
|
/**
|
|
26
88
|
* Build a fresh {@link I18n} instance for one render tree (one `KitProvider` mount, one SSR
|
|
27
|
-
* request). Loads `
|
|
89
|
+
* request). Loads each entry of `messages`, registers the runtime message compiler, and
|
|
90
|
+
* activates `locale`.
|
|
28
91
|
*
|
|
29
92
|
* Per-request instances are the SSR-safe alternative to mutating a process-wide singleton. The
|
|
30
|
-
* kit's {@link KitProvider} calls this on every render that changes `locale` or `
|
|
93
|
+
* kit's {@link KitProvider} calls this on every render that changes `locale` or `messages`.
|
|
31
94
|
*
|
|
32
95
|
* `setupI18n` ships its own no-op compiler in production builds; we override with the real
|
|
33
96
|
* `compileMessage` so ICU placeholders (`{symbol}`) and plurals (`{count, plural, one {…}
|
|
@@ -35,7 +98,7 @@ interface KitI18nConfig {
|
|
|
35
98
|
*/
|
|
36
99
|
declare function createKitI18n({
|
|
37
100
|
locale,
|
|
38
|
-
|
|
101
|
+
messages
|
|
39
102
|
}?: KitI18nConfig): I18n;
|
|
40
103
|
//#endregion
|
|
41
|
-
export {
|
|
104
|
+
export { KitI18nConfig, KitLocale, KitMessages, createKitI18n, defineMessages };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setupI18n as e}from"@lingui/core";import{compileMessage as t}from"@lingui/message-utils/compileMessage";function n({locale:n=`en`,
|
|
1
|
+
import{setupI18n as e}from"@lingui/core";import{compileMessage as t}from"@lingui/message-utils/compileMessage";import{generateMessageId as n}from"@lingui/message-utils/generateMessageId";function r(e){let t={};for(let[r,i]of Object.entries(e))!r||typeof i!=`string`||(t[n(r)]=i);return t}function i({locale:n=`en`,messages:r}={}){let i=e();if(i.setMessagesCompiler(t),i.load(`en`,{}),r)for(let[e,t]of Object.entries(r))t&&i.load(e,t);return i.activate(n),i}export{i as createKitI18n,r as defineMessages};
|
|
@@ -2,7 +2,15 @@ import { ComponentType } from "react";
|
|
|
2
2
|
import { I18n } from "@lingui/core";
|
|
3
3
|
|
|
4
4
|
//#region src/shared/i18n/useLingui.d.ts
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Shape of the value returned by the kit's {@link useLingui}. Mirrors Lingui's own
|
|
7
|
+
* `LinguiContextValue` (`{ i18n, _, defaultComponent? }`) so the macro's rewrite of `` t`…` ``
|
|
8
|
+
* into `_({ id, message })` calls type-checks against this surface.
|
|
9
|
+
*
|
|
10
|
+
* Exported alongside {@link useLingui} so power users wrapping the hook can name the return
|
|
11
|
+
* type without reaching back into Lingui internals.
|
|
12
|
+
*/
|
|
13
|
+
interface KitLinguiContextValue {
|
|
6
14
|
i18n: I18n;
|
|
7
15
|
defaultComponent?: ComponentType<{
|
|
8
16
|
id: string;
|
|
@@ -30,6 +38,6 @@ interface LinguiContextValue {
|
|
|
30
38
|
* Callers shouldn't import this directly — they should write `import { useLingui } from
|
|
31
39
|
* "@lingui/react/macro"` and let the build pipeline rewire the runtime target.
|
|
32
40
|
*/
|
|
33
|
-
declare function useLingui():
|
|
41
|
+
declare function useLingui(): KitLinguiContextValue;
|
|
34
42
|
//#endregion
|
|
35
|
-
export { useLingui };
|
|
43
|
+
export { KitLinguiContextValue, useLingui };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SVGProps } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/icons/LogoIcon.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Stridge brand mark. Path is the optimized 18×18 variant used in social cards, scaled to
|
|
7
|
+
* whatever `width`/`height` the caller passes (defaults to 14×14 for inline use). Decorative
|
|
8
|
+
* when paired with the "Stridge" wordmark — mark it `aria-hidden` in those compositions so
|
|
9
|
+
* screen readers announce the wordmark only once.
|
|
10
|
+
*/
|
|
11
|
+
declare function LogoIcon(props: SVGProps<SVGSVGElement>): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { LogoIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";function t(t){return e(`svg`,{fill:`currentColor`,height:`14`,viewBox:`0 0 18 18`,width:`14`,xmlns:`http://www.w3.org/2000/svg`,...t,children:e(`path`,{clipRule:`evenodd`,d:`M0 9a9 9 0 0 0 9 9A9 9 0 1 0 9 0a9 9 0 0 0-9 9Zm11.675 1.953a.88.88 0 0 0-.742.198 5.311 5.311 0 0 1-3.998 1.807C-.985 12.958.955 1.742 9 1.742a7.24 7.24 0 0 1 5.374 2.379 7.042 7.042 0 0 0-3.309-.82A7.048 7.048 0 0 0 5.76 5.697.879.879 0 0 0 7.068 6.85a5.31 5.31 0 0 1 3.998-1.807c7.92 0 5.98 11.216-2.066 11.216a7.237 7.237 0 0 1-5.373-2.379 7.035 7.035 0 0 0 3.308.821 7.044 7.044 0 0 0 5.306-2.398.878.878 0 0 0-.566-1.349Z`,fillRule:`evenodd`})})}export{t as LogoIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as e}from"react";function
|
|
1
|
+
import{useEffect as e,useRef as t}from"react";function n(n,r,i){let a=t(r);a.current=r,e(()=>{let e=a.current;if(e==null)return;let t=new AbortController;return n.watchSettlement(e,()=>void 0,t.signal),()=>t.abort()},[n,i])}export{n as useSettlementWatcher};
|