@stridge/kit 0.1.0-alpha.1 → 0.1.0-alpha.10

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.
Files changed (44) hide show
  1. package/README.md +2 -2
  2. package/dist/KitProvider.js +1 -1
  3. package/dist/drivers/stridge/internal/metadata.js +1 -1
  4. package/dist/drivers/stridge-mock/fixtures.d.ts +1 -1
  5. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  6. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  7. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  8. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  9. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +1 -1
  10. package/dist/i18n/index.d.ts +5 -4
  11. package/dist/i18n/index.js +1 -1
  12. package/dist/i18n/locales/source-keys.d.ts +12 -0
  13. package/dist/i18n/locales/source-keys.js +0 -0
  14. package/dist/package.js +1 -0
  15. package/dist/scope/KitPortalScope.js +1 -1
  16. package/dist/scope/KitScope.d.ts +9 -0
  17. package/dist/scope/KitScope.js +1 -1
  18. package/dist/scope/context.d.ts +7 -0
  19. package/dist/shared/cuer/Cuer.js +1 -0
  20. package/dist/shared/cuer/QrCode.js +1 -0
  21. package/dist/shared/cuer/index.js +1 -0
  22. package/dist/shared/format/shortenAddress.d.ts +2 -2
  23. package/dist/shared/format/types.d.ts +2 -2
  24. package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
  25. package/dist/shared/i18n/KitI18nProvider.js +1 -1
  26. package/dist/shared/i18n/createKitI18n.d.ts +79 -16
  27. package/dist/shared/i18n/createKitI18n.js +1 -1
  28. package/dist/shared/i18n/useLingui.d.ts +11 -3
  29. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  30. package/dist/shared/ui/Details/Details.d.ts +10 -2
  31. package/dist/shared/ui/Details/Details.styles.js +1 -1
  32. package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
  33. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  34. package/dist/shared/widgets/confirm-transfer/compound/types.d.ts +1 -1
  35. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
  36. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
  37. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
  38. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
  39. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
  40. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
  41. package/dist/stridge/StridgeProvider.js +1 -1
  42. package/package.json +9 -10
  43. package/dist/kit/package.js +0 -1
  44. /package/dist/{utils/src/use-copy-to-clipboard.js → shared/utils/useCopyToClipboard.js} +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  React widgets and headless hooks for the Stridge Gateway — drop-in deposit and withdraw flows for crypto apps.
4
4
 
5
- **Links**  ·  [Website](https://stridge.com)  ·  [Documentation](https://docs.stridge.com)  ·  [Live demo](https://demo.stridge.com)  ·  [Repo](https://github.com/stridge-foundation/kit)
5
+ **Links**  ·  [Website](https://stridge.com)  ·  [Documentation](https://docs.stridge.com)  ·  [Live demo](https://demo.stridge.com)
6
6
 
7
7
  ## Install
8
8
 
@@ -39,4 +39,4 @@ Full setup, configuration, and integration patterns at [docs.stridge.com](https:
39
39
 
40
40
  ## License
41
41
 
42
- [MIT](https://github.com/stridge-foundation/kit/blob/main/LICENSE) © Stridge Foundation.
42
+ MIT © Stridge Foundation.
@@ -1 +1 @@
1
- "use client";import{KitStorageProvider as e}from"./storage/context.js";import"./storage/index.js";import{DepositDriverProvider as t}from"./flows/deposit/driver/context.js";import{getLocaleDirection as n}from"./shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"./shared/i18n/KitI18nProvider.js";import"./i18n/index.js";import{GatewayController as i}from"./flows/deposit/orchestrator/controller.js";import{WithdrawDriverProvider as a}from"./flows/withdraw/driver/context.js";import{WithdrawControllerProvider as o}from"./flows/withdraw/orchestrator/controller.js";import{KitScope as s}from"./scope/KitScope.js";import"./scope/index.js";import{jsx as c}from"react/jsx-runtime";function l({children:l,i18n:u,direction:d,deposit:f,withdraw:p,storage:m,storageNamespace:h,...g}){let _=n(u?.locale),v=l;return p&&(v=c(a,{driver:p,children:c(o,{children:v})})),f&&(v=c(t,{driver:f,children:c(i,{children:v})})),c(r,{locale:u?.locale,catalogs:u?.catalogs,children:c(s,{...g,direction:d??_,children:c(e,{storage:m,namespace:h,children:v})})})}export{l as KitProvider};
1
+ "use client";import{KitStorageProvider as e}from"./storage/context.js";import"./storage/index.js";import{DepositDriverProvider as t}from"./flows/deposit/driver/context.js";import{getLocaleDirection as n}from"./shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"./shared/i18n/KitI18nProvider.js";import"./i18n/index.js";import{GatewayController as i}from"./flows/deposit/orchestrator/controller.js";import{WithdrawDriverProvider as a}from"./flows/withdraw/driver/context.js";import{WithdrawControllerProvider as o}from"./flows/withdraw/orchestrator/controller.js";import{KitScope as s}from"./scope/KitScope.js";import"./scope/index.js";import{jsx as c}from"react/jsx-runtime";function l({children:l,i18n:u,direction:d,deposit:f,withdraw:p,storage:m,storageNamespace:h,...g}){let _=n(u?.locale),v=l;return p&&(v=c(a,{driver:p,children:c(o,{children:v})})),f&&(v=c(t,{driver:f,children:c(i,{children:v})})),c(r,{locale:u?.locale,messages:u?.messages,children:c(s,{...g,direction:d??_,locale:u?.locale,children:c(e,{storage:m,namespace:h,children:v})})})}export{l as KitProvider};
@@ -1 +1 @@
1
- import{version as e}from"../../../kit/package.js";function t(t){return{...t.hostMetadata??{},kit_flow:t.flow,kit_version:e,...t.extras??{}}}export{t as buildKitMetadata};
1
+ import{version as e}from"../../../package.js";function t(t){return{...t.hostMetadata??{},kit_flow:t.flow,kit_version:e,...t.extras??{}}}export{t as buildKitMetadata};
@@ -69,7 +69,7 @@ declare function buildDefaultAddressesPayload(i18n: I18n, minDepositUsd?: number
69
69
  declare const DEFAULT_ADDRESSES_PAYLOAD: ReadonlyArray<AddressItemPayload>;
70
70
  /**
71
71
  * Default source-side balance list — derived from the captured `/v1/balance/onchain/{wallet}`
72
- * response for `0xCA8779685c` against the production UDA, filtered through routability +
72
+ * response for `0xf39Fd62266` against the production UDA, filtered through routability +
73
73
  * spam-drop + the kit's `minDepositUsd` floor (rows whose `amountUsd` is below the floor ride in
74
74
  * as `lowBalance + disabled` so the picker dims them out instead of dropping them).
75
75
  *
@@ -1 +1 @@
1
- import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xCA8779a5FD7cEAf54211177A2b22dB5E0480685c`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.chain.toLowerCase(),n=k.find(e=>e.networkName.toLowerCase()===t);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function O(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1]},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453]},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161]},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_}]}];function A(e,t){let n=t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`9001`,8453:`8453`,42161:`42161`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function F(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function I(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function L(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function R(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function z(e,t=S){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const B={deposit_addresses:[],metadata:{brand_name:o}},V=[],H={assets:[]},U={chains:[]},W={},G={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},K={settlements:[],is_terminal:!1};function q(e,t,n,r){return t===`pending`?I(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?L(e,n&&typeof n!=`string`?n:void 0):R(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,V as STUB_DEPOSIT_ADDRESSES_RAW,K as STUB_GATEWAY_POLL_RESPONSE,G as STUB_GATEWAY_SETTLEMENT_DTO,B as STUB_GATEWAY_START_RESPONSE,U as STUB_ONCHAIN_BALANCE_RESPONSE,W as STUB_QUOTE_RESPONSE,H as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,R as buildDefaultFailurePayload,I as buildDefaultPendingPayload,F as buildDefaultQuotePayload,L as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,E as buildDefaultTargetRaw,z as buildDefaultWalletPayload,q as buildSettlementPayload,T as resolveMockAsset};
1
+ import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.chain.toLowerCase(),n=k.find(e=>e.networkName.toLowerCase()===t);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function O(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1]},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453]},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161]},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_}]}];function A(e,t){let n=t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`9001`,8453:`8453`,42161:`42161`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function F(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function I(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function L(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function R(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function z(e,t=S){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const B={deposit_addresses:[],metadata:{brand_name:o}},V=[],H={assets:[]},U={chains:[]},W={},G={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},K={settlements:[],is_terminal:!1};function q(e,t,n,r){return t===`pending`?I(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?L(e,n&&typeof n!=`string`?n:void 0):R(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,V as STUB_DEPOSIT_ADDRESSES_RAW,K as STUB_GATEWAY_POLL_RESPONSE,G as STUB_GATEWAY_SETTLEMENT_DTO,B as STUB_GATEWAY_START_RESPONSE,U as STUB_ONCHAIN_BALANCE_RESPONSE,W as STUB_QUOTE_RESPONSE,H as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,R as buildDefaultFailurePayload,I as buildDefaultPendingPayload,F as buildDefaultQuotePayload,L as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,E as buildDefaultTargetRaw,z as buildDefaultWalletPayload,q as buildSettlementPayload,T as resolveMockAsset};
@@ -1 +1 @@
1
- "use client";import{useBannerAckForSettlement as e}from"../../../../banners/useBannerAck.js";import"../../../../banners/index.js";import{useDepositSnapshot as t}from"../../driver/context.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as r,useDepositState as i}from"../../orchestrator/controller.js";import{stepRendersSettlement as a}from"../../orchestrator/steps.js";import{DepositStatusBanner as o}from"./compound/DepositStatusBanner.js";import"./compound/index.js";import{useEffect as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{AnimatePresence as d}from"motion/react";function f(){let o=t(),u=i().name,{resumeToProcessing:f,resumeToSuccess:h,resumeToError:_}=r(),{_:v}=n(),y=o.settlement,b=y.status===`ready`||y.status===`stale`?y.payload:void 0,{acked:x,ack:S}=e(b),[C,w]=c(!1);s(()=>{w(!1)},[b?`${b.kind}:${p(b)}`:null]);let T=b!==void 0&&!x&&!a(u);function E(e){return()=>{S(),e()}}return l(d,{children:T&&b?l(m,{payload:b,brandName:o.brand.status===`ready`||o.brand.status===`stale`?o.brand.payload.name:void 0,expanded:C,onToggleExpanded:()=>w(e=>!e),onDismiss:S,onResumeToProcessing:E(()=>f(`wallet`,g(b))),onResumeToSuccess:E(()=>h(`wallet`,g(b))),onResumeToError:E(()=>_(g(b))),labels:{completed:v({id:`3kg1gB`,message:`Deposit completed`}),didntComplete:v({id:`Rxjdjn`,message:`Deposit didn't complete`}),receivedProcessing:v({id:`junZX6`,message:`Deposit received and processing…`}),creditedToBrand:e=>v({id:`IRogzB`,message:`Your deposit has been credited to {brand}.`,values:{brand:e}}),creditedToAccount:v({id:`9JHY2T`,message:`Your deposit has been credited to your account.`}),fundsSafe:v({id:`Z1WbO6`,message:`Funds are safe on the source chain — contact support to recover.`}),willBeCreditedToBrand:e=>v({id:`TG4WOd`,message:`Your deposit will be credited to {brand}.`,values:{brand:e}}),willBeCreditedToAccount:v({id:`Offl0a`,message:`Your deposit will be credited to your account.`})}},`banner`):null})}function p(e){return e.kind===`succeeded`?e.depositTx.hash.value:e.kind===`failed`?e.txHash.value:e.txHash?.value??`pending`}function m({payload:e,brandName:t,expanded:n,onToggleExpanded:r,onDismiss:i,onResumeToProcessing:a,onResumeToSuccess:s,onResumeToError:c,labels:d}){let f=e.kind,p={symbol:e.creditedAsset.symbol,...e.creditedAsset.address?{address:e.creditedAsset.address}:{},...e.creditedAsset.isNative===void 0?{}:{isNative:e.creditedAsset.isNative},...e.creditedAsset.assetLogoUrl?{logoUrl:e.creditedAsset.assetLogoUrl}:{}},m=f===`succeeded`?d.completed:f===`failed`?d.didntComplete:d.receivedProcessing,g=f===`succeeded`?t?d.creditedToBrand(t):d.creditedToAccount:f===`failed`?d.fundsSafe:t?d.willBeCreditedToBrand(t):d.willBeCreditedToAccount,_=h(e),v=e.kind===`succeeded`&&e.completionTx?{hash:e.completionTx.hash.formatted,...e.completionTx.explorerUrl?{explorerUrl:e.completionTx.explorerUrl}:{}}:void 0,y=e.kind===`succeeded`||e.kind===`failed`?e.submittedAt.formatted:void 0,b=e.kind===`succeeded`?e.filledAt.formatted:void 0,x=f===`succeeded`?s:f===`failed`?c:a;return u(o,{kind:f,asset:p,headline:m,subline:g,expanded:n,onToggleExpanded:r,onDismiss:i,..._?{depositTx:_}:{},...v?{completionTx:v}:{},...y===void 0?{}:{submittedAt:y},...b===void 0?{}:{filledAt:b},onPrimaryAction:x,children:[u(o.Body,{children:[l(o.Hero,{}),l(o.Close,{})]}),u(o.Details,{children:[l(o.DepositTxRow,{}),l(o.CompletionTxRow,{}),l(o.SubmittedAtRow,{}),l(o.FilledAtRow,{})]}),u(o.Footer,{children:[l(o.Toggle,{}),l(o.PrimaryAction,{})]})]})}function h(e){if(e.kind===`succeeded`)return{hash:e.depositTx.hash.formatted,...e.depositTx.explorerUrl?{explorerUrl:e.depositTx.explorerUrl}:{}};if(e.kind===`failed`||e.txHash)return{hash:e.txHash.formatted,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}}function g(e){return e.kind===`succeeded`?{hash:e.depositTx.hash.value,...e.depositTx.explorerUrl?{explorerUrl:e.depositTx.explorerUrl}:{}}:e.kind===`failed`?{hash:e.txHash.value,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}:{hash:e.txHash?.value??``,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}}export{f as DepositStatusBanner};
1
+ "use client";import{useBannerAckForSettlement as e}from"../../../../banners/useBannerAck.js";import"../../../../banners/index.js";import{useDepositSnapshot as t}from"../../driver/context.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as r,useDepositState as i}from"../../orchestrator/controller.js";import{stepRendersSettlement as a}from"../../orchestrator/steps.js";import{DepositStatusBanner as o}from"./compound/DepositStatusBanner.js";import"./compound/index.js";import{useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{AnimatePresence as u}from"motion/react";function d(){let o=t(),s=i().name,{resumeToProcessing:l,resumeToSuccess:d,resumeToError:p}=r(),{_:h}=n(),g=o.settlement,_=g.status===`ready`||g.status===`stale`?g.payload:void 0,{acked:v,ack:y}=e(_),b=_!==void 0&&!v&&!a(s);function x(e){return()=>{y(),e()}}return c(u,{children:b&&_?c(f,{payload:_,brandName:o.brand.status===`ready`||o.brand.status===`stale`?o.brand.payload.name:void 0,onDismiss:y,onResumeToProcessing:x(()=>l(`wallet`,m(_))),onResumeToSuccess:x(()=>d(`wallet`,m(_))),onResumeToError:x(()=>p(m(_))),labels:{completed:h({id:`3kg1gB`,message:`Deposit completed`}),didntComplete:h({id:`Rxjdjn`,message:`Deposit didn't complete`}),receivedProcessing:h({id:`junZX6`,message:`Deposit received and processing…`}),creditedToBrand:e=>h({id:`IRogzB`,message:`Your deposit has been credited to {brand}.`,values:{brand:e}}),creditedToAccount:h({id:`9JHY2T`,message:`Your deposit has been credited to your account.`}),fundsSafe:h({id:`Z1WbO6`,message:`Funds are safe on the source chain — contact support to recover.`}),willBeCreditedToBrand:e=>h({id:`TG4WOd`,message:`Your deposit will be credited to {brand}.`,values:{brand:e}}),willBeCreditedToAccount:h({id:`Offl0a`,message:`Your deposit will be credited to your account.`})}},`banner`):null})}function f({payload:e,brandName:t,onDismiss:n,onResumeToProcessing:r,onResumeToSuccess:i,onResumeToError:a,labels:u}){let[d,f]=s(!1),m=()=>f(e=>!e),h=e.kind,g={symbol:e.creditedAsset.symbol,...e.creditedAsset.address?{address:e.creditedAsset.address}:{},...e.creditedAsset.isNative===void 0?{}:{isNative:e.creditedAsset.isNative},...e.creditedAsset.assetLogoUrl?{logoUrl:e.creditedAsset.assetLogoUrl}:{}},_=h===`succeeded`?u.completed:h===`failed`?u.didntComplete:u.receivedProcessing,v=h===`succeeded`?t?u.creditedToBrand(t):u.creditedToAccount:h===`failed`?u.fundsSafe:t?u.willBeCreditedToBrand(t):u.willBeCreditedToAccount,y=p(e),b=e.kind===`succeeded`&&e.completionTx?{hash:e.completionTx.hash.formatted,...e.completionTx.explorerUrl?{explorerUrl:e.completionTx.explorerUrl}:{}}:void 0,x=e.kind===`succeeded`||e.kind===`failed`?e.submittedAt.formatted:void 0,S=e.kind===`succeeded`?e.filledAt.formatted:void 0,C=h===`succeeded`?i:h===`failed`?a:r;return l(o,{kind:h,asset:g,headline:_,subline:v,expanded:d,onToggleExpanded:m,onDismiss:n,...y?{depositTx:y}:{},...b?{completionTx:b}:{},...x===void 0?{}:{submittedAt:x},...S===void 0?{}:{filledAt:S},onPrimaryAction:C,children:[l(o.Body,{children:[c(o.Hero,{}),c(o.Close,{})]}),l(o.Details,{children:[c(o.DepositTxRow,{}),c(o.CompletionTxRow,{}),c(o.SubmittedAtRow,{}),c(o.FilledAtRow,{})]}),l(o.Footer,{children:[c(o.Toggle,{}),c(o.PrimaryAction,{})]})]})}function p(e){if(e.kind===`succeeded`)return{hash:e.depositTx.hash.formatted,...e.depositTx.explorerUrl?{explorerUrl:e.depositTx.explorerUrl}:{}};if(e.kind===`failed`||e.txHash)return{hash:e.txHash.formatted,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}}function m(e){return e.kind===`succeeded`?{hash:e.depositTx.hash.value,...e.depositTx.explorerUrl?{explorerUrl:e.depositTx.explorerUrl}:{}}:e.kind===`failed`?{hash:e.txHash.value,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}:{hash:e.txHash?.value??``,...e.txExplorerUrl?{explorerUrl:e.txExplorerUrl}:{}}}export{d as DepositStatusBanner};
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{CopyIcon as t}from"../../../../../../shared/icons/CopyIcon.js";import{InfoIcon as n}from"../../../../../../shared/icons/InfoIcon.js";import"../../../../../../icons/index.js";import{Button as r}from"../../../../../../shared/ui/Button/Button.js";import"../../../../../../shared/ui/Button/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{ExternalLink as a}from"../../../../../../shared/ui/ExternalLink/ExternalLink.js";import"../../../../../../shared/ui/ExternalLink/index.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useCopyToClipboard as s}from"../../../../../../utils/src/use-copy-to-clipboard.js";import{BRAND_LINKS as c}from"../../../../../../shared/constants/brand-links.js";import{useTransferCryptoContext as l}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as u}from"../TransferCrypto.slots.js";import{styles as d}from"../TransferCrypto.styles.js";import{InfoTooltip as f}from"./InfoTooltip.js";import{useCallback as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import*as g from"@stylexjs/stylex";function _(){let _=l(`TransferCrypto.Address`),{_:v}=e(),{isCopied:y,copy:b}=s(_.depositAddress),x=v({id:`6D8qH6`,message:`Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer.`}),S=p(async()=>{await b()&&_.onCopy?.(_.depositAddress)},[b,_]);return h(`div`,{"data-stridge-slot":u.address,...g.props(d.addressSection),children:[h(`div`,{...g.props(d.addressLabelRow),children:[h(o.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...g.props(d.addressLabel),children:[v({id:`pCzTTC`,message:`Your deposit address`}),m(f,{content:x,children:m(n,{"aria-hidden":!0,...g.props(d.addressLabelInfo)})})]}),m(a,{href:c.terms,...g.props(d.termsLink),children:m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:v({id:`cGYrpE`,message:`Terms apply`})})})]}),h(i,{variant:`subdued`,dir:`ltr`,...g.props(d.addressPill),children:[m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,...g.props(d.addressText),children:_.depositAddress}),h(r,{variant:`secondary`,onClick:S,"aria-label":v({id:`SOVBoe`,message:`Copy deposit address`}),...g.props(d.copyButton),children:[m(t,{"aria-hidden":!0,...g.props(d.copyIcon)}),m(o.span,{size:`meta`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:v(y?{id:`PiH3UR`,message:`Copied!`}:{id:`he3ygx`,message:`Copy`})})]})]})]})}export{_ as TransferCryptoAddress};
1
+ "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{CopyIcon as t}from"../../../../../../shared/icons/CopyIcon.js";import{InfoIcon as n}from"../../../../../../shared/icons/InfoIcon.js";import"../../../../../../icons/index.js";import{Button as r}from"../../../../../../shared/ui/Button/Button.js";import"../../../../../../shared/ui/Button/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{ExternalLink as a}from"../../../../../../shared/ui/ExternalLink/ExternalLink.js";import"../../../../../../shared/ui/ExternalLink/index.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{BRAND_LINKS as s}from"../../../../../../shared/constants/brand-links.js";import{useCopyToClipboard as c}from"../../../../../../shared/utils/useCopyToClipboard.js";import{useTransferCryptoContext as l}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as u}from"../TransferCrypto.slots.js";import{styles as d}from"../TransferCrypto.styles.js";import{InfoTooltip as f}from"./InfoTooltip.js";import{useCallback as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import*as g from"@stylexjs/stylex";function _(){let _=l(`TransferCrypto.Address`),{_:v}=e(),{isCopied:y,copy:b}=c(_.depositAddress),x=v({id:`6D8qH6`,message:`Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer.`}),S=p(async()=>{await b()&&_.onCopy?.(_.depositAddress)},[b,_]);return h(`div`,{"data-stridge-slot":u.address,...g.props(d.addressSection),children:[h(`div`,{...g.props(d.addressLabelRow),children:[h(o.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...g.props(d.addressLabel),children:[v({id:`pCzTTC`,message:`Your deposit address`}),m(f,{content:x,children:m(n,{"aria-hidden":!0,...g.props(d.addressLabelInfo)})})]}),m(a,{href:s.terms,...g.props(d.termsLink),children:m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:v({id:`cGYrpE`,message:`Terms apply`})})})]}),h(i,{variant:`subdued`,dir:`ltr`,...g.props(d.addressPill),children:[m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,...g.props(d.addressText),children:_.depositAddress}),h(r,{variant:`secondary`,onClick:S,"aria-label":v({id:`SOVBoe`,message:`Copy deposit address`}),...g.props(d.copyButton),children:[m(t,{"aria-hidden":!0,...g.props(d.copyIcon)}),m(o.span,{size:`meta`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:v(y?{id:`PiH3UR`,message:`Copied!`}:{id:`he3ygx`,message:`Copy`})})]})]})]})}export{_ as TransferCryptoAddress};
@@ -1 +1 @@
1
- "use client";import{resolveChainLogoChain as e}from"../../../../../../shared/utils/logos/resolveLogoSrc.js";import"../../../../../../shared/utils/logos/index.js";import{useTransferCryptoContext as t}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as n}from"../TransferCrypto.slots.js";import{styles as r}from"../TransferCrypto.styles.js";import{useEffect as i,useState as a}from"react";import{jsx as o}from"react/jsx-runtime";import*as s from"@stylexjs/stylex";import{Cuer as c}from"cuer";function l(){let l=t(`TransferCrypto.QrCode`),u=e({...l.chain.chainId===void 0?{}:{chainId:l.chain.chainId},...l.chain.logoUrl===void 0?{}:{chainLogoUrl:l.chain.logoUrl}}),[d,f]=a(0);i(()=>{f(0)},[u.join(`|`)]);let p=u[d];return o(`div`,{"data-stridge-slot":n.qr,...s.props(r.qrFrame),children:o(c,{value:l.depositAddress,size:160,arena:p?o(`img`,{src:p,alt:l.chain.symbol,"data-stridge-slot":n.qrArena,onError:()=>{d<u.length-1&&f(d+1)},style:{width:`100%`,height:`100%`,objectFit:`contain`,display:`block`,borderRadius:`var(--stridge-kit-radius-lg)`}},p):null,...s.props(r.qrSvg)})})}export{l as TransferCryptoQrCode};
1
+ "use client";import{resolveChainLogoChain as e}from"../../../../../../shared/utils/logos/resolveLogoSrc.js";import"../../../../../../shared/utils/logos/index.js";import{useTransferCryptoContext as t}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as n}from"../TransferCrypto.slots.js";import{styles as r}from"../TransferCrypto.styles.js";import{Cuer as i}from"../../../../../../shared/cuer/Cuer.js";import"../../../../../../shared/cuer/index.js";import{useEffect as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l(){let l=t(`TransferCrypto.QrCode`),u=e({...l.chain.chainId===void 0?{}:{chainId:l.chain.chainId},...l.chain.logoUrl===void 0?{}:{chainLogoUrl:l.chain.logoUrl}}),[d,f]=o(0);a(()=>{f(0)},[u.join(`|`)]);let p=u[d];return s(`div`,{"data-stridge-slot":n.qr,...c.props(r.qrFrame),children:s(i,{value:l.depositAddress,size:160,arena:p?s(`img`,{src:p,alt:l.chain.symbol,"data-stridge-slot":n.qrArena,onError:()=>{d<u.length-1&&f(d+1)},style:{width:`100%`,height:`100%`,objectFit:`contain`,display:`block`,borderRadius:`var(--stridge-kit-radius-lg)`}},p):null,...c.props(r.qrSvg)})})}export{l as TransferCryptoQrCode};
@@ -11,7 +11,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
11
11
  *
12
12
  * The pill becomes an interactive button when `connectedAddress` is set; clicking it fills the
13
13
  * input. Omitted entirely when `connectedAddress` is absent. The pill renders the truncated
14
- * address (`0xCA1685`) — the user recognizes their own address, making the action self-evident
14
+ * address (`0x7079C8`) — the user recognizes their own address, making the action self-evident
15
15
  * while keeping pill width deterministic across locales.
16
16
  */
17
17
  declare function WithdrawFormRecipientField(): _$react_jsx_runtime0.JSX.Element;
@@ -1,9 +1,10 @@
1
- import { KitCatalogs, KitI18nConfig, createKitI18n } from "../shared/i18n/createKitI18n.js";
1
+ import { SUPPORTED_LOCALES, SupportedLocale } from "../shared/i18n/locales.js";
2
+ import { KitTranslatableKey } from "./locales/source-keys.js";
3
+ import { KitI18nConfig, KitLocale, KitMessages, createKitI18n, defineMessages } from "../shared/i18n/createKitI18n.js";
2
4
  import { getLocaleDirection } from "../shared/i18n/getLocaleDirection.js";
3
5
  import { KitI18nProvider } from "../shared/i18n/KitI18nProvider.js";
4
- import { SUPPORTED_LOCALES, SupportedLocale } from "../shared/i18n/locales.js";
5
6
  import { KitTransProps, Trans } from "../shared/i18n/Trans.js";
6
7
  import { useKitI18n } from "../shared/i18n/useKitI18n.js";
7
- import { useLingui } from "../shared/i18n/useLingui.js";
8
+ import { KitLinguiContextValue, useLingui } from "../shared/i18n/useLingui.js";
8
9
  import { useT } from "../shared/i18n/useT.js";
9
- export { type KitCatalogs, type KitI18nConfig, KitI18nProvider, type KitTransProps, SUPPORTED_LOCALES, type SupportedLocale, Trans, createKitI18n, getLocaleDirection, useKitI18n, useLingui, useT };
10
+ export { type KitI18nConfig, KitI18nProvider, type KitLinguiContextValue, type KitLocale, type KitMessages, type KitTransProps, type KitTranslatableKey, SUPPORTED_LOCALES, type SupportedLocale, Trans, createKitI18n, defineMessages, getLocaleDirection, useKitI18n, useLingui, useT };
@@ -1 +1 @@
1
- import{createKitI18n as e}from"../shared/i18n/createKitI18n.js";import{getLocaleDirection as t}from"../shared/i18n/getLocaleDirection.js";import{KitI18nProvider as n}from"../shared/i18n/KitI18nProvider.js";import{SUPPORTED_LOCALES as r}from"../shared/i18n/locales.js";import{useKitI18n as i}from"../shared/i18n/useKitI18n.js";import{Trans as a}from"../shared/i18n/Trans.js";import{useLingui as o}from"../shared/i18n/useLingui.js";import{useT as s}from"../shared/i18n/useT.js";export{n as KitI18nProvider,r as SUPPORTED_LOCALES,a as Trans,e as createKitI18n,t as getLocaleDirection,i as useKitI18n,o as useLingui,s as useT};
1
+ import{createKitI18n as e,defineMessages as t}from"../shared/i18n/createKitI18n.js";import{getLocaleDirection as n}from"../shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"../shared/i18n/KitI18nProvider.js";import{SUPPORTED_LOCALES as i}from"../shared/i18n/locales.js";import{useKitI18n as a}from"../shared/i18n/useKitI18n.js";import{Trans as o}from"../shared/i18n/Trans.js";import{useLingui as s}from"../shared/i18n/useLingui.js";import{useT as c}from"../shared/i18n/useT.js";export{r as KitI18nProvider,i as SUPPORTED_LOCALES,o as Trans,e as createKitI18n,t as defineMessages,n as getLocaleDirection,a as useKitI18n,s as useLingui,c as useT};
@@ -0,0 +1,12 @@
1
+ //#region src/shared/i18n/locales/source-keys.d.ts
2
+ /**
3
+ * Auto-generated by `scripts/codegen-source-keys.mjs` from `en.po`. Do not edit by hand —
4
+ * re-run `pnpm --filter @stridge/kit run i18n:compile` after changing translatable strings.
5
+ *
6
+ * String literal union of every English source the kit uses in `<Trans>` / `t` macros. Acts
7
+ * as the typed contract for {@link defineMessages}: callers get autocomplete on every key the
8
+ * kit translates, and unknown keys fail at compile time via excess-property checks.
9
+ */
10
+ type KitTranslatableKey = "0x…" | "< 1 min" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "Close — we'll notify you" | "Completion tx" | "Confirm Deposit" | "Confirm transaction in your wallet" | "Continue" | "Copied!" | "Copy" | "Copy deposit address" | "Couldn't load deposit options" | "Credited to {captionSuffix}" | "Crediting" | "Deposit" | "Deposit completed" | "Deposit didn't complete" | "Deposit failed" | "Deposit max balance" | "Deposit received" | "Deposit received and processing…" | "Deposit successful" | "Deposit to {0}" | "Deposit tx" | "Deposit {0}" | "Deposit {0} to {1}" | "Deposit {symbol}" | "Destination" | "Detected" | "Difference between the route's expected output and the underlying market mid-price." | "Dismiss pending deposit notice" | "Done" | "Enter Amount" | "Enter Recipient Address" | "Enter Valid Recipient Address" | "Error" | "Estimated time" | "Estimating gas…" | "Estimating quote" | "Experiencing problems?" | "Failed" | "Failed to submit deposit." | "Failed to submit withdrawal." | "Fill status" | "Funds are safe on the source chain — contact support to recover." | "Get help" | "Have questions?" | "Hide technical details" | "In transit" | "Instant" | "Insufficient Balance" | "Insufficient balance" | "Low Balance" | "Max" | "Max slippage" | "Message" | "Min {0}" | "Min {minDeposit}" | "More about {0}" | "More details" | "More information" | "Network cost" | "No limit" | "Order failed" | "Order filled" | "Order submitted" | "Payment Method" | "Please try again or contact us if the issue persists." | "Price impact" | "Processing" | "Processing time: {resolvedProcessingTime}" | "Receive chain" | "Receive token" | "Recipient address" | "Regenerating quote…" | "Route" | "See less" | "See more" | "Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer." | "Settlement tx" | "Show technical details" | "Signature declined. Please try again." | "Something went wrong" | "Something went wrong. Please try again." | "Source" | "Source tx" | "Stack" | "Successful" | "Swap displayed amount" | "Technical details" | "Terms apply" | "The bridge could not fund the destination transaction (gas budget exhausted)." | "The deposit driver failed to load gateway configuration." | "The destination-leg transaction reverted on-chain." | "The estimated cost to broadcast this transaction on the destination chain." | "The kit hit an unexpected error and could not finish rendering. Try again, or close this dialog and retry from the host." | "The minimum amount required for this chain to cover network fees and routing." | "The route's expected output drifted while your transaction was pending." | "The selected liquidity route used to settle this withdrawal." | "Toggle technical details" | "Tokens" | "Total time" | "Transaction breakdown" | "Transfer Crypto" | "Try again" | "Update order" | "Use connected wallet address" | "View details" | "View on Explorer" | "View progress" | "View receipt" | "Wallet" | "We can't reach the gateway right now" | "Withdraw" | "Withdrawal complete" | "Withdrawal failed" | "Withdrawal failed." | "Withdrawal in progress…" | "Withdrawal successful" | "Withdrawal tx" | "You receive" | "You send" | "You will receive" | "Your deposit address" | "Your deposit has been credited to your account." | "Your deposit has been credited to {brand}." | "Your deposit will be credited to your account." | "Your deposit will be credited to {brand}." | "Your funds were successfully deposited." | "Your funds were successfully withdrawn." | "{0, plural, one {# second} other {# seconds}} left on quote" | "{formattedMin} minimum deposit" | "{hours} hr" | "{minutes} min" | "{n}h" | "{n}m" | "{n}s" | "~ 2 min";
11
+ //#endregion
12
+ export { KitTranslatableKey };
File without changes
@@ -0,0 +1 @@
1
+ var e=`0.1.0-alpha.10`;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,radius:u,theme:d}=e(),f=c?{"--stridge-kit-primary":c}:void 0,p=f||a?{...f,...a}:void 0;return n(r,{direction:l??`ltr`,children:n(`div`,{...s,dir:l,"data-stridge-scope":``,"data-stridge-radius":u,"data-stridge-theme":d,"data-stridge-slot":t.portalScope,className:i,style:p,children:o})})}export{i as KitPortalScope};
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};
@@ -19,6 +19,7 @@ declare function KitScope({
19
19
  radius,
20
20
  theme,
21
21
  direction: directionProp,
22
+ locale,
22
23
  target,
23
24
  className,
24
25
  style,
@@ -55,6 +56,14 @@ declare namespace KitScope {
55
56
  * Use the standard HTML `dir` prop instead when you want a tree-wide DOM flip.
56
57
  */
57
58
  direction?: KitDirection;
59
+ /**
60
+ * Active BCP-47 locale tag (`"en"`, `"ar"`, `"fa"`, …). Forwarded by `KitProvider` from
61
+ * `i18n.locale` and stamped onto the scope div as `data-stridge-locale="…"` so hosts can
62
+ * target script-specific styling per locale — e.g. swap the kit's font stack to a Persian
63
+ * face on `[data-stridge-locale^="fa"]` while keeping the Arabic face on `[…^="ar"]`. RTL
64
+ * alone isn't fine-grained enough because both share `dir="rtl"`.
65
+ */
66
+ locale?: string;
58
67
  /** Children rendered inside the kit scope. */
59
68
  children?: ReactNode;
60
69
  }
@@ -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,target:m,className:h,style:g,dir:_,ref:v,children:y,...b}){let x=a(null),S=f(x,_),C=u(_)??d??S,w=n(e=>{x.current=e,p(v,e)},[v]),T=i(()=>({accent:r,radius:o,theme:l,direction:C,target:m}),[r,o,l,C,m]),E=r?{"--stridge-kit-primary":r}:void 0,D=E||g?{...E,...g}:void 0;return s(e.Provider,{value:T,children:s(c,{direction:C??`ltr`,children:s(`div`,{...b,ref:w,dir:_,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-slot":t.root,className:h,style:D,children:y})})})}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};
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,className:g,style:_,dir:v,ref:y,children:b,...x}){let S=a(null),C=f(S,v),w=u(v)??d??C,T=n(e=>{S.current=e,p(y,e)},[y]),E=i(()=>({accent:r,radius:o,theme:l,direction:w,locale:m,target:h}),[r,o,l,w,m,h]),D=r?{"--stridge-kit-primary":r}:void 0,O=D||_?{...D,..._}:void 0;return s(e.Provider,{value:E,children:s(c,{direction:w??`ltr`,children:s(`div`,{...x,ref:T,dir:v,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-locale":m,"data-stridge-slot":t.root,className:g,style:O,children:b})})})}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};
@@ -53,6 +53,13 @@ interface KitConfig {
53
53
  * behavior when they render outside the provider's DOM subtree.
54
54
  */
55
55
  direction?: KitDirection;
56
+ /**
57
+ * Active BCP-47 locale tag (e.g. `"en"`, `"ar"`, `"fa"`, `"ar-EG"`). Forwarded by `KitProvider`
58
+ * from `i18n.locale` and stamped onto every kit scope as `data-stridge-locale="…"` so the host
59
+ * can target script-specific styling (typically the font stack) per locale — RTL alone isn't
60
+ * fine-grained enough (Arabic and Persian are both RTL but commonly want different faces).
61
+ */
62
+ locale?: string;
56
63
  /**
57
64
  * Destination token configuration.
58
65
  */
@@ -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,{children:typeof t==`string`?r(`img`,{alt:`Arena`,src:t,style:{borderRadius:1,height:`100%`,objectFit:`cover`,width:`100%`}}):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,_=t.useMemo(()=>({arenaSize:g,cellSize:1,edgeSize:m,qrcode:p,finderSize:h}),[g,m,p,h]);return r(s.Provider,{value:_,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,cellSize:u,qrcode:d}=t.useContext(s),{edgeLength:f,finderLength:p}=d,m=a(c);return r(`path`,{className:n,d:t.useMemo(()=>{let e=``;for(let t=0;t<d.grid.length;t++){let n=d.grid[t];if(n)for(let r=0;r<n.length;r++){if(!n[r])continue;let i=f/2-l/2,a=i+l;if(t>=i&&t<=a&&r>=i&&r<=a)continue;let s=t<p&&r<p,c=t<p&&r>=f-p,d=t>=f-p&&r<p;if(s||c||d)continue;let h=(u-(o?u*.1:0)*2)/2,g=r*u+u/2,_=t*u+u/2,v=g-h,y=g+h,b=_-h,x=_+h,S=m*h;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,f,p,d.grid,o,m]),fill:i})}o.Cells=u,(function(e){e.displayName=`Cells`})(u||=o.Cells||={});function d(e){let{children:n}=e,{arenaSize:i,cellSize:a,edgeSize:o}=t.useContext(s),c=i,l=(o-c)/2;return r(`foreignObject`,{x:l,y:l,width:c,height:c,children:r(`div`,{style:{alignItems:`center`,display:`flex`,fontSize:1,justifyContent:`center`,height:`100%`,overflow:`hidden`,width:`100%`,padding:a/2,boxSizing:`border-box`},children:n})})}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";
@@ -11,8 +11,8 @@
11
11
  * @example
12
12
  *
13
13
  * ```ts
14
- * shortenAddress("0xCA8779a5FD7cEAf54211177A2b22dB5E0480685c");
15
- * // → "0x…685c"
14
+ * shortenAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266");
15
+ * // → "0x…2266"
16
16
  *
17
17
  * shortenAddress("0xa15b11eb774cfac27b369f3d1908b0d1d8aa48b893d7a1e89612d8438920650f");
18
18
  * // → "0x…650f"
@@ -18,8 +18,8 @@
18
18
  * };
19
19
  *
20
20
  * const address: FormattedField<string> = {
21
- * value: "0xCA8779a5FD7cEAf54211177A2b22dB5E0480685c",
22
- * formatted: "0x…685c",
21
+ * value: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
22
+ * formatted: "0x…2266",
23
23
  * };
24
24
  * ```
25
25
  */
@@ -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 `catalogs` changes — same render-stable pattern as the kit's
12
- * other context providers, and the SSR-safe alternative to mutating a module-level singleton.
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, catalogs }}` prop on `<KitProvider>` and the kit handles the wiring.
13
+ * `i18n={{ locale, messages }}` prop on `<KitProvider>` and the kit handles the wiring.
16
14
  */
17
15
  declare function KitI18nProvider({
18
16
  locale,
19
- catalogs,
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`,catalogs:a,children:o}){return n(r,{i18n:t(()=>e({locale:i,catalogs:a}),[i,a]),children:o})}export{i as KitI18nProvider};
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
- * Map of locale codes to message catalogs. Keyed by the locale string the host activates
6
- * (`"en"`, `"es"`, etc.). Values are plain `{ [id]: translation }` maps; ICU placeholders and
7
- * plurals are compiled at runtime by {@link compileMessage}.
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 KitCatalogs = Partial<Record<string, Messages>>;
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, `catalogs` lists the catalogs the kit can resolve
13
- * against. Locales not present in `catalogs` fall back to the source English string per leaf.
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
- * Locale catalogs the kit can resolve against. Deep-import the locales you ship from
20
- * `@stridge/kit/i18n/locales/<code>` and pass them as a map (e.g. `{ es: esMessages }`).
21
- * Tree-shaken: locales not referenced here aren't bundled.
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
- catalogs?: KitCatalogs;
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 `catalogs`, registers the runtime message compiler, and activates `locale`.
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 `catalogs`.
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
- catalogs
101
+ messages
39
102
  }?: KitI18nConfig): I18n;
40
103
  //#endregion
41
- export { KitCatalogs, KitI18nConfig, createKitI18n };
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`,catalogs: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{n as createKitI18n};
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
- interface LinguiContextValue {
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(): LinguiContextValue;
41
+ declare function useLingui(): KitLinguiContextValue;
34
42
  //#endregion
35
- export { useLingui };
43
+ export { KitLinguiContextValue, useLingui };
@@ -1 +1 @@
1
- "use client";import{ExternalLinkIcon as e}from"../../icons/ExternalLinkIcon.js";import"../../../icons/index.js";import{toSafeHref as t}from"../../ui/ExternalLink/toSafeHref.js";import{ExternalLink as n}from"../../ui/ExternalLink/ExternalLink.js";import"../../ui/ExternalLink/index.js";import{LtrAtom as r}from"../../ui/LtrAtom/LtrAtom.js";import"../../ui/LtrAtom/index.js";import{text as i}from"../../ui/Text/Text.js";import"../../ui/Text/index.js";import{TX_HASH_VALUE_SLOTS as a}from"./TxHashValue.slots.js";import{styles as o}from"./TxHashValue.styles.js";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({hash:l,explorerUrl:u,linkColor:d=`var(--stridge-kit-primary)`}){let f=t(u),p=c.props(o.root),m=s(i.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,color:`inherit`,children:s(r,{children:l})});return f?s(n,{dir:`ltr`,href:f,suffix:s(e,{"aria-hidden":!0}),"data-stridge-slot":a.root,className:p.className,style:{...p.style,color:d},children:m}):s(`span`,{dir:`ltr`,"data-stridge-slot":a.root,className:p.className,style:p.style,children:m})}export{l as TxHashValue};
1
+ "use client";import{ExternalLinkIcon as e}from"../../icons/ExternalLinkIcon.js";import"../../../icons/index.js";import{toSafeHref as t}from"../../ui/ExternalLink/toSafeHref.js";import{ExternalLink as n}from"../../ui/ExternalLink/ExternalLink.js";import"../../ui/ExternalLink/index.js";import{LtrAtom as r}from"../../ui/LtrAtom/LtrAtom.js";import"../../ui/LtrAtom/index.js";import{text as i}from"../../ui/Text/Text.js";import"../../ui/Text/index.js";import{TX_HASH_VALUE_SLOTS as a}from"./TxHashValue.slots.js";import{styles as o}from"./TxHashValue.styles.js";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({hash:l,explorerUrl:u,linkColor:d=`var(--stridge-kit-primary)`}){let f=t(u),p=c.props(o.root),m=s(i.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,color:`inherit`,children:s(r,{children:l})});return f?s(n,{dir:`ltr`,href:f,suffix:s(e,{"aria-hidden":!0}),"data-stridge-slot":a.root,className:p.className,style:{...p.style,color:d},children:m}):s(`span`,{dir:`ltr`,"data-stridge-slot":a.root,className:p.className,style:p.style,children:m})}export{l as TxHashValue};
@@ -25,7 +25,15 @@ declare function Details({
25
25
  }: Details.Props): _$react_jsx_runtime0.JSX.Element;
26
26
  /**
27
27
  * Single row inside a {@link Details} list. Renders a `label` on the leading edge and its `children` on the
28
- * trailing edge. Compose with {@link Details.Value} for the standard value typography, or pass any node directly.
28
+ * trailing edge.
29
+ *
30
+ * The row itself owns the row's typography (size, weight, color, leading, tracking), so a bare-string `children`
31
+ * ("Stridge ACME", "May 7, 18:54", "28m 5s") inherits the value baseline automatically. Reach for
32
+ * {@link Details.Value} only when you need the value's flex / gap / end-aligned layout chrome (e.g. pairing an
33
+ * `icon` with the value, or composing multiple inline atoms). Helpers like
34
+ * {@link import("#/shared/primitives/WalletValue").WalletValue} and
35
+ * {@link import("#/shared/primitives/TxHashValue").TxHashValue} set their own typography and override the row
36
+ * baseline where they need to.
29
37
  */
30
38
  declare function DetailsRow({
31
39
  label,
@@ -39,7 +47,7 @@ declare function DetailsRow({
39
47
  * render any `ReactNode` inside `Details.Row` directly instead.
40
48
  *
41
49
  * The cluster is force-LTR via `dir="ltr"` so an icon paired with a numeric / symbol / hex
42
- * atom — `[icon] 5 USDC`, `[icon] Stridge ACME`, `[wallet-icon] محفظة (…685c)` — keeps the
50
+ * atom — `[icon] 5 USDC`, `[icon] Stridge ACME`, `[wallet-icon] محفظة (…2266)` — keeps the
43
51
  * icon-leading visual ordering in RTL contexts. The pair is treated as a single LTR atom in
44
52
  * the row's flex layout; the surrounding Detail row and label still respect ambient direction.
45
53
  */
@@ -1 +1 @@
1
- const e={root:{"Details__styles.root":`Details__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"backgroundColor-kWkggS":`x14ogoj5`,"borderColor-kVAM5u":`xbeer74`,"borderRadius-kaIpWk":`xxbqt08`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"color-kMwMTN":`x1i40r7x`,"fontFamily-kMv6JI":`xlaww2m`,"overflow-kVQacm":`x7giv3`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:4`},row:{"Details__styles.row":`Details__styles.row`,"alignItems-kGNEyG":`x6s0dn4`,"borderBottomColor-kL6WhQ":`x2kdqbz`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomWidth-kt9PQ7":`xso031l`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"gap-kOIVth":`x1v2ro7d`,"justifyContent-kjj79g":`x1qughib`,"paddingBlock-k8WAf4":`xxlmvz2`,"paddingInline-kg3NbH":`x1hr3lfm`,":last-child_borderBottomWidth-kx8K5S":`x1t1lzn6`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:16`},label:{"Details__styles.label":`Details__styles.label`,"color-kMwMTN":`x18cw6k6`,"fontSize-kGuDYH":`x4z9k3i`,"fontWeight-k63SB2":`xk50ysn`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"lineHeight-kLWn49":`x1d3mw78`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:31`},value:{"Details__styles.value":`Details__styles.value`,"alignItems-kGNEyG":`x6s0dn4`,"color-kMwMTN":`x1i40r7x`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"fontSize-kGuDYH":`x4z9k3i`,"fontWeight-k63SB2":`x1s688f`,"gap-kOIVth":`x167g77z`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"lineHeight-kLWn49":`x1d3mw78`,"minWidth-k7Eaqz":`xeuugli`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:38`}};export{e as styles};
1
+ const e={root:{"Details__styles.root":`Details__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"backgroundColor-kWkggS":`x14ogoj5`,"borderColor-kVAM5u":`xbeer74`,"borderRadius-kaIpWk":`xxbqt08`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"color-kMwMTN":`x1i40r7x`,"fontFamily-kMv6JI":`xlaww2m`,"overflow-kVQacm":`x7giv3`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:4`},row:{"Details__styles.row":`Details__styles.row`,"alignItems-kGNEyG":`x6s0dn4`,"borderBottomColor-kL6WhQ":`x2kdqbz`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomWidth-kt9PQ7":`xso031l`,"color-kMwMTN":`x1i40r7x`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"fontSize-kGuDYH":`x1oae1zf`,"fontWeight-k63SB2":`x1qvi77d`,"gap-kOIVth":`x1v2ro7d`,"justifyContent-kjj79g":`x1qughib`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"lineHeight-kLWn49":`x2fnr2h`,"paddingBlock-k8WAf4":`xxlmvz2`,"paddingInline-kg3NbH":`x1hr3lfm`,":last-child_borderBottomWidth-kx8K5S":`x1t1lzn6`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:16`},label:{"Details__styles.label":`Details__styles.label`,"color-kMwMTN":`x18cw6k6`,"fontWeight-k63SB2":`xi0sa8g`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:36`},value:{"Details__styles.value":`Details__styles.value`,"alignItems-kGNEyG":`x6s0dn4`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,"textAlign-k9WMMc":`xp4054r`,$$css:`@stridge/kit:src/shared/ui/Details/Details.styles.ts:40`}};export{e as styles};
@@ -3,7 +3,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
  //#region src/shared/ui/WalletRow/WalletRow.d.ts
4
4
  /**
5
5
  * Typography rhythm for the name span. `regular` renders at `sm/medium`; `compact` at
6
- * `meta/semibold` for denser layouts (error-state receipt rows).
6
+ * `xs/semibold` for denser layouts (error-, success-, and processing-state receipt rows).
7
7
  */
8
8
  type WalletRowDensity = "regular" | "compact";
9
9
  interface WalletRowProps {
@@ -1 +1 @@
1
- "use client";import{ExternalLinkIcon as e}from"../../icons/ExternalLinkIcon.js";import"../../../icons/index.js";import{toSafeHref as t}from"../ExternalLink/toSafeHref.js";import{ExternalLink as n}from"../ExternalLink/ExternalLink.js";import"../ExternalLink/index.js";import{Image as r}from"../Image/Image.js";import"../Image/index.js";import{LtrAtom as i}from"../LtrAtom/LtrAtom.js";import"../LtrAtom/index.js";import{text as a}from"../Text/Text.js";import"../Text/index.js";import{WALLET_ROW_SLOTS as o}from"./WalletRow.slots.js";import{styles as s}from"./WalletRow.styles.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({iconUrl:f,name:p,formattedAddress:m,explorerUrl:h,density:g=`regular`,hideIcon:_=!1}){let v=t(h),y=d.props(s.root),b=u(c,{children:[_?null:l(r,{size:`md`,src:f,alt:p??``}),p?g===`compact`?l(a.span,{size:`meta`,fontWeight:`semibold`,leading:`tight`,children:p}):l(a.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,children:p}):null,l(a.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,color:`subdued`,children:l(i,{children:p?`(${m})`:m})})]});return v?l(n,{dir:`ltr`,href:v,suffix:l(e,{"aria-hidden":!0}),"data-stridge-slot":o.root,className:y.className,style:y.style,children:b}):l(`span`,{dir:`ltr`,"data-stridge-slot":o.root,className:y.className,style:y.style,children:b})}export{f as WalletRow};
1
+ "use client";import{ExternalLinkIcon as e}from"../../icons/ExternalLinkIcon.js";import"../../../icons/index.js";import{toSafeHref as t}from"../ExternalLink/toSafeHref.js";import{ExternalLink as n}from"../ExternalLink/ExternalLink.js";import"../ExternalLink/index.js";import{Image as r}from"../Image/Image.js";import"../Image/index.js";import{LtrAtom as i}from"../LtrAtom/LtrAtom.js";import"../LtrAtom/index.js";import{text as a}from"../Text/Text.js";import"../Text/index.js";import{WALLET_ROW_SLOTS as o}from"./WalletRow.slots.js";import{styles as s}from"./WalletRow.styles.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({iconUrl:f,name:p,formattedAddress:m,explorerUrl:h,density:g=`regular`,hideIcon:_=!1}){let v=t(h),y=d.props(s.root),b=u(c,{children:[_?null:l(r,{size:`md`,src:f,alt:p??``}),p?g===`compact`?l(a.span,{size:`xs`,fontWeight:`semibold`,leading:`tight`,children:p}):l(a.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,children:p}):null,l(a.span,{size:g===`compact`?`xs`:`meta`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,color:`subdued`,children:l(i,{children:p?`(${m})`:m})})]});return v?l(n,{dir:`ltr`,href:v,suffix:l(e,{"aria-hidden":!0}),"data-stridge-slot":o.root,className:y.className,style:y.style,children:b}):l(`span`,{dir:`ltr`,"data-stridge-slot":o.root,className:y.className,style:y.style,children:b})}export{f as WalletRow};
@@ -39,7 +39,7 @@ interface ConfirmTransferToken {
39
39
  */
40
40
  interface ConfirmTransferTransfer {
41
41
  /**
42
- * Source-row primary text — e.g. `"Wallet (…685c)"`.
42
+ * Source-row primary text — e.g. `"Wallet (…2266)"`.
43
43
  */
44
44
  sourceLabel: string;
45
45
  /**
@@ -1 +1 @@
1
- "use client";import{text as e}from"../../../../ui/Text/Text.js";import{TokenLogo as t}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{ERROR_STATE_SLOTS as n}from"../ErrorState.slots.js";import{styles as r}from"../ErrorState.styles.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({amount:s,symbol:c,chainId:l,address:u,isNative:d,logoUrl:f,struck:p=!0}){return a(`span`,{dir:`ltr`,"data-stridge-slot":n.assetValue,...o.props(r.assetValue),children:[i(t,{size:`md`,symbol:c,...l===void 0?{}:{chainId:l},...u===void 0?{}:{address:u},...d===void 0?{}:{isNative:d},...f===void 0?{}:{logoUrl:f},hideChainBadge:!0}),a(`span`,{...o.props(r.assetValueText),children:[i(e.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,font:`mono`,color:p?`tertiary`:`default`,...o.props(p?r.assetValueStruck:null),children:s}),i(e.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:p?`tertiary`:`default`,...o.props(p?r.assetValueStruck:null),children:c})]})]})}export{s as ErrorStateAssetValue};
1
+ "use client";import{text as e}from"../../../../ui/Text/Text.js";import{TokenLogo as t}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{ERROR_STATE_SLOTS as n}from"../ErrorState.slots.js";import{styles as r}from"../ErrorState.styles.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({amount:s,symbol:c,chainId:l,address:u,isNative:d,logoUrl:f,struck:p=!0}){return a(`span`,{dir:`ltr`,"data-stridge-slot":n.assetValue,...o.props(r.assetValue),children:[i(t,{size:`md`,symbol:c,...l===void 0?{}:{chainId:l},...u===void 0?{}:{address:u},...d===void 0?{}:{isNative:d},...f===void 0?{}:{logoUrl:f},hideChainBadge:!0}),a(`span`,{...o.props(r.assetValueText),children:[i(e.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,font:`mono`,color:p?`tertiary`:`default`,...o.props(p?r.assetValueStruck:null),children:s}),i(e.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:p?`tertiary`:`default`,...o.props(p?r.assetValueStruck:null),children:c})]})]})}export{s as ErrorStateAssetValue};
@@ -1 +1 @@
1
- "use client";import{text as e}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{ERROR_STATE_SLOTS as t}from"../ErrorState.slots.js";import{styles as n}from"../ErrorState.styles.js";import{jsx as r}from"react/jsx-runtime";import*as i from"@stylexjs/stylex";function a({tone:a=`failed`,children:o}){return r(e.span,{"data-stridge-slot":t.statusValue,size:`meta`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:a===`failed`?`inherit`:`default`,...i.props(a===`failed`?n.statusValueFailed:null),children:o})}export{a as ErrorStateStatusValue};
1
+ "use client";import{text as e}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{ERROR_STATE_SLOTS as t}from"../ErrorState.slots.js";import{styles as n}from"../ErrorState.styles.js";import{jsx as r}from"react/jsx-runtime";import*as i from"@stylexjs/stylex";function a({tone:a=`failed`,children:o}){return r(e.span,{"data-stridge-slot":t.statusValue,size:`xs`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:a===`failed`?`inherit`:`default`,...i.props(a===`failed`?n.statusValueFailed:null),children:o})}export{a as ErrorStateStatusValue};
@@ -1 +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{useProcessingStateContext as r}from"../context.js";import{ProcessingStateDetail as i}from"./Detail.js";import{jsx as a}from"react/jsx-runtime";function o({label:t}={}){let o=r(`ProcessingState.SourceRow`),{_:s}=e();if(!o.sourceWallet)return null;let{name:c,address:l,explorerUrl:u}=o.sourceWallet;return a(i,{label:t??s({id:`wdxz7K`,message:`Source`}),value:a(n,{name:c??s({id:`sb9Y58`,message:`Wallet`}),address:l,...u?{explorerUrl:u}:{}})})}function s({label:n}={}){let o=r(`ProcessingState.SourceTxRow`),{_:s}=e();return o.sourceTx?.hash?a(i,{label:n??s({id:`yrvWai`,message:`Source tx`}),value:a(t,{hash:o.sourceTx.hash,...o.sourceTx.explorerUrl?{explorerUrl:o.sourceTx.explorerUrl}:{}})}):null}function c({label:t}={}){let n=r(`ProcessingState.SubmittedAtRow`),{_:o}=e();return n.submittedAt===void 0?null:a(i,{label:t??o({id:`TT0aVH`,message:`Order submitted`}),value:n.submittedAt})}function l({label:t}={}){let n=r(`ProcessingState.DetectedAtRow`),{_:o}=e();return n.detectedAt===void 0?null:a(i,{label:t??o({id:`mvYQx_`,message:`Detected`}),value:n.detectedAt})}export{l as ProcessingStateDetectedAtRow,o as ProcessingStateSourceRow,s as ProcessingStateSourceTxRow,c as ProcessingStateSubmittedAtRow};
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{useProcessingStateContext as r}from"../context.js";import{ProcessingStateDetail as i}from"./Detail.js";import{jsx as a}from"react/jsx-runtime";function o({label:t}={}){let o=r(`ProcessingState.SourceRow`),{_:s}=e();if(!o.sourceWallet)return null;let{name:c,address:l,explorerUrl:u}=o.sourceWallet;return a(i,{label:t??s({id:`wdxz7K`,message:`Source`}),value:a(n,{name:c??s({id:`sb9Y58`,message:`Wallet`}),address:l,...u?{explorerUrl:u}:{},density:`compact`,hideIcon:!0})})}function s({label:n}={}){let o=r(`ProcessingState.SourceTxRow`),{_:s}=e();return o.sourceTx?.hash?a(i,{label:n??s({id:`yrvWai`,message:`Source tx`}),value:a(t,{hash:o.sourceTx.hash,...o.sourceTx.explorerUrl?{explorerUrl:o.sourceTx.explorerUrl}:{}})}):null}function c({label:t}={}){let n=r(`ProcessingState.SubmittedAtRow`),{_:o}=e();return n.submittedAt===void 0?null:a(i,{label:t??o({id:`TT0aVH`,message:`Order submitted`}),value:n.submittedAt})}function l({label:t}={}){let n=r(`ProcessingState.DetectedAtRow`),{_:o}=e();return n.detectedAt===void 0?null:a(i,{label:t??o({id:`mvYQx_`,message:`Detected`}),value:n.detectedAt})}export{l as ProcessingStateDetectedAtRow,o as ProcessingStateSourceRow,s as ProcessingStateSourceTxRow,c as ProcessingStateSubmittedAtRow};
@@ -1 +1 @@
1
- "use client";import{text as e}from"../../../../ui/Text/Text.js";import{TokenLogo as t}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{SUCCESS_STATE_SLOTS as n}from"../SuccessState.slots.js";import{styles as r}from"../SuccessState.styles.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({amount:s,symbol:c,chainId:l,address:u,isNative:d,logoUrl:f}){return a(`span`,{"data-stridge-slot":n.assetValue,...o.props(r.assetValue),children:[i(t,{size:`md`,symbol:c,...l===void 0?{}:{chainId:l},...u===void 0?{}:{address:u},...d===void 0?{}:{isNative:d},...f===void 0?{}:{logoUrl:f},hideChainBadge:!0}),i(e.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,children:s}),i(e.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,color:`subdued`,children:c})]})}export{s as SuccessStateAssetValue};
1
+ "use client";import{text as e}from"../../../../ui/Text/Text.js";import{TokenLogo as t}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{SUCCESS_STATE_SLOTS as n}from"../SuccessState.slots.js";import{styles as r}from"../SuccessState.styles.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({amount:s,symbol:c,chainId:l,address:u,isNative:d,logoUrl:f}){return a(`span`,{"data-stridge-slot":n.assetValue,...o.props(r.assetValue),children:[i(t,{size:`md`,symbol:c,...l===void 0?{}:{chainId:l},...u===void 0?{}:{address:u},...d===void 0?{}:{isNative:d},...f===void 0?{}:{logoUrl:f},hideChainBadge:!0}),i(e.span,{size:`xs`,fontWeight:`semibold`,leading:`tight`,children:s}),i(e.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,children:c})]})}export{s as SuccessStateAssetValue};
@@ -1 +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};
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:`xs`,fontWeight:`semibold`,leading:`tight`,children:n})]},`${n}-${c}`))})}export{c as SuccessStateRouteValue};
@@ -1 +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};
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:`xs`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`success`,children:o})}export{i as SuccessStateStatusPill};
@@ -1 +1 @@
1
- "use client";import{normalizeChainToNetworkId as e}from"../shared/chains/index.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{StridgeContext as n}from"./StridgeContext.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{KitProvider as a}from"../KitProvider.js";import{createStubDepositDriver as o,createStubWithdrawDriver as s}from"./stubs.js";import{useMemo as c,useRef as l,useSyncExternalStore as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useAccount as f,useConfig as p}from"wagmi";function m({gatewayKey:m,environment:h,asset:g,flows:_,appearance:v,i18n:y,storage:b,className:x,children:S}){if(!_.deposit&&!_.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!g)throw Error("<StridgeProvider /> requires `asset: { chain, symbol }`.");let C=p(),{address:w}=f(),T=c(()=>t(y??{}),[y?.locale,y?.catalogs]),E=l(T);E.current=T;let D=c(()=>e(g.chain),[g.chain]),O=g.symbol,k=_.deposit,A=_.withdraw,j=c(()=>{if(!(!k||!w))return r({userAddress:w,projectKey:m,destination:{network_id:D,asset_symbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...k.minDepositUsd===void 0?{}:{minDepositUsd:k.minDepositUsd},...k.metadata?{metadata:k.metadata}:{}})},[k,w,m,h,D,O,C]),M=c(()=>o(),[]),N=k?j??M:void 0,P=c(()=>{if(!(!A||!w))return i({userAddress:w,projectKey:m,currency:{networkId:D,assetSymbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...A.metadata?{metadata:A.metadata}:{}})},[A,w,m,h,D,O,C]),F=c(()=>s(),[]),I=A?P??F:void 0,L=j??P,R=u(e=>L?.subscribe(e)??(()=>{}),()=>{if(j){let e=j.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return P?P.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1);return d(n,{value:c(()=>({isReady:R,driver:j}),[R,j]),children:d(a,{theme:v?.theme,accent:v?.accent,radius:v?.radius,direction:v?.direction,i18n:y,storage:b?.driver,storageNamespace:b?.namespace,className:x,...N?{deposit:N}:{},...I?{withdraw:I}:{},children:S})})}export{m as StridgeProvider};
1
+ "use client";import{normalizeChainToNetworkId as e}from"../shared/chains/index.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{StridgeContext as n}from"./StridgeContext.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{KitProvider as a}from"../KitProvider.js";import{createStubDepositDriver as o,createStubWithdrawDriver as s}from"./stubs.js";import{useMemo as c,useRef as l,useSyncExternalStore as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useAccount as f,useConfig as p}from"wagmi";function m({gatewayKey:m,environment:h,asset:g,flows:_,appearance:v,i18n:y,storage:b,className:x,children:S}){if(!_.deposit&&!_.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!g)throw Error("<StridgeProvider /> requires `asset: { chain, symbol }`.");let C=p(),{address:w}=f(),T=c(()=>t(y??{}),[y?.locale,y?.messages]),E=l(T);E.current=T;let D=c(()=>e(g.chain),[g.chain]),O=g.symbol,k=_.deposit,A=_.withdraw,j=c(()=>{if(!(!k||!w))return r({userAddress:w,projectKey:m,destination:{network_id:D,asset_symbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...k.minDepositUsd===void 0?{}:{minDepositUsd:k.minDepositUsd},...k.metadata?{metadata:k.metadata}:{}})},[k,w,m,h,D,O,C]),M=c(()=>o(),[]),N=k?j??M:void 0,P=c(()=>{if(!(!A||!w))return i({userAddress:w,projectKey:m,currency:{networkId:D,assetSymbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...A.metadata?{metadata:A.metadata}:{}})},[A,w,m,h,D,O,C]),F=c(()=>s(),[]),I=A?P??F:void 0,L=j??P,R=u(e=>L?.subscribe(e)??(()=>{}),()=>{if(j){let e=j.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return P?P.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1);return d(n,{value:c(()=>({isReady:R,driver:j}),[R,j]),children:d(a,{theme:v?.theme,accent:v?.accent,radius:v?.radius,direction:v?.direction,i18n:y,storage:b?.driver,storageNamespace:b?.namespace,className:x,...N?{deposit:N}:{},...I?{withdraw:I}:{},children:S})})}export{m as StridgeProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -119,9 +119,8 @@
119
119
  "typescript": "6.0.3",
120
120
  "viem": "2.48.1",
121
121
  "vite-plugin-babel": "^1.6.0",
122
- "vitest": "4.1.2",
122
+ "vitest": "4.1.5",
123
123
  "wagmi": "3.6.3",
124
- "@stridge/utils": "0.1.0-alpha.1",
125
124
  "@stridge/kit-typescript": "0.0.0"
126
125
  },
127
126
  "dependencies": {
@@ -130,14 +129,14 @@
130
129
  "@lingui/message-utils": "^6.0.1",
131
130
  "@lingui/react": "^6.0.1",
132
131
  "@stylexjs/stylex": "^0.18.3",
133
- "cuer": "0.0.3",
134
132
  "motion": "^12.38.0",
135
- "@stridge/sdk": "0.1.0-alpha.1"
133
+ "qr": "0.6.0",
134
+ "@stridge/sdk": "0.1.0-alpha.3"
136
135
  },
137
136
  "scripts": {
138
137
  "build": "pnpm run i18n:compile && tsdown",
139
- "check:api": "api-extractor run",
140
- "check:api:update": "api-extractor run --local",
138
+ "check:api": "api-extractor run && api-extractor run --config api-extractor.i18n.json",
139
+ "check:api:update": "api-extractor run --local && api-extractor run --local --config api-extractor.i18n.json",
141
140
  "check:attw": "attw --pack . --profile esm-only --exclude-entrypoints ./styles.css",
142
141
  "check:isolation": "depcruise src",
143
142
  "check:publint": "publint",
@@ -145,9 +144,9 @@
145
144
  "check:size": "size-limit",
146
145
  "check:size:why": "size-limit --why",
147
146
  "dev": "pnpm run i18n:compile && tsdown --watch",
148
- "i18n:extract": "lingui extract --clean",
149
- "i18n:compile": "lingui compile --typescript",
150
- "i18n:check": "lingui extract --clean && git diff --exit-code -- src/shared/i18n/locales",
147
+ "i18n:extract": "lingui extract --clean && node scripts/codegen-source-keys.mjs",
148
+ "i18n:compile": "lingui compile --typescript && node scripts/codegen-source-keys.mjs",
149
+ "i18n:check": "lingui extract --clean && node scripts/codegen-source-keys.mjs && git diff --exit-code -- src/shared/i18n/locales",
151
150
  "test": "pnpm run i18n:compile && vitest --run",
152
151
  "test:coverage": "pnpm run i18n:compile && vitest --run --coverage",
153
152
  "test:watch": "pnpm run i18n:compile && vitest",
@@ -1 +0,0 @@
1
- var e=`0.1.0-alpha.1`;export{e as version};