@stridge/kit 0.1.0-alpha.2 → 0.1.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -3
- package/dist/KitProvider.d.ts +13 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +10 -12
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/metadata.js +1 -1
- package/dist/drivers/stridge/types.d.ts +7 -4
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +2 -2
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +1 -1
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +2 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
- package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
- package/dist/flows/withdraw/bindings/index.d.ts +1 -0
- package/dist/flows/withdraw/bindings/index.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +57 -11
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +53 -11
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +106 -31
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +8 -5
- package/dist/i18n/index.d.ts +5 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +12 -0
- package/dist/i18n/locales/source-keys.js +0 -0
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/package.js +1 -0
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +18 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +17 -1
- package/dist/scope/index.d.ts +1 -1
- package/dist/shared/attribution/Attribution.js +1 -0
- package/dist/shared/attribution/Attribution.slots.js +1 -0
- package/dist/shared/attribution/Attribution.styles.js +1 -0
- package/dist/shared/attribution/index.js +1 -0
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/cuer/Cuer.js +1 -0
- package/dist/shared/cuer/QrCode.js +1 -0
- package/dist/shared/cuer/index.js +1 -0
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/format/shortenAddress.d.ts +2 -2
- package/dist/shared/format/types.d.ts +2 -2
- package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
- package/dist/shared/i18n/KitI18nProvider.js +1 -1
- package/dist/shared/i18n/createKitI18n.d.ts +79 -16
- package/dist/shared/i18n/createKitI18n.js +1 -1
- package/dist/shared/i18n/useLingui.d.ts +11 -3
- package/dist/shared/icons/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportButton.d.ts +1 -0
- package/dist/shared/support/SupportButton.js +1 -0
- package/dist/shared/support/SupportConfigContext.d.ts +1 -0
- package/dist/shared/support/SupportConfigContext.js +1 -0
- package/dist/shared/support/SupportLink.d.ts +1 -0
- package/dist/shared/support/SupportLink.js +1 -0
- package/dist/shared/support/SupportSpinner.d.ts +1 -0
- package/dist/shared/support/SupportSpinner.js +1 -0
- package/dist/shared/support/index.d.ts +2 -0
- package/dist/shared/support/index.js +1 -0
- package/dist/shared/support/intercom-loader.d.ts +17 -0
- package/dist/shared/support/intercom-loader.js +1 -0
- package/dist/shared/support/resolveSupport.d.ts +1 -0
- package/dist/shared/support/resolveSupport.js +1 -0
- package/dist/shared/support/types.d.ts +43 -0
- package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
- package/dist/shared/support/useIntercomMerchantContext.js +1 -0
- package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
- package/dist/shared/support/useMerchantContext.d.ts +1 -0
- package/dist/shared/support/useMerchantContext.js +1 -0
- package/dist/shared/support/useSupportTrigger.js +1 -0
- package/dist/shared/ui/Card/Card.styles.js +1 -1
- package/dist/shared/ui/Details/Details.d.ts +10 -2
- package/dist/shared/ui/Details/Details.styles.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
- package/dist/shared/ui/ExternalLink/ExternalLink.js +1 -1
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/types.d.ts +1 -1
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
- package/dist/stridge/StridgeProvider.d.ts +87 -3
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +58 -12
- package/dist/types.d.ts +3 -2
- package/dist/ui/index.js +1 -1
- package/dist/withdraw/dialog/index.d.ts +3 -1
- package/package.json +10 -11
- package/dist/kit/package.js +0 -1
- /package/dist/{utils/src/use-copy-to-clipboard.js → shared/utils/useCopyToClipboard.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawDriverInstance as
|
|
1
|
+
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawBindingsValue as n}from"../../bindings/WithdrawBindings.js";import"../../bindings/index.js";import{useWithdrawDriverInstance as r,useWithdrawSnapshot as i}from"../../driver/context.js";import{useWithdrawActions as ee,useWithdrawEffectiveState as te}from"../../orchestrator/controller.js";import{formatTokenAmount as ne}from"../../../../shared/format/formatTokenAmount.js";import{parseAmountInputValue as re}from"../../../../shared/ui/AmountInput/utils.js";import"../../../../shared/ui/AmountInput/index.js";import{toAssetDescriptor as a}from"../../../../shared/widgets/asset-descriptor.js";import{useQuoteCountdown as ie}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{WithdrawForm as o}from"./compound/WithdrawForm.js";import"./compound/index.js";import{useWithdrawDialogEvents as ae}from"../../dialog/WithdrawDialogEventsContext.js";import{isValidEvmAddress as oe,resolveSubmitLabel as se}from"./validation.js";import{useCallback as s,useEffect as c,useMemo as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as ce}from"react/jsx-runtime";function p({events:p}){let m=i(),h=r(),g=te(),_=ee(),{i18n:le,_:v}=t(),ue=ae(),de=l(()=>({...ue,...p??{}}),[ue,p]),y=u(de);y.current=de;let{balance:b,suggestedRecipient:fe}=n(),[x,pe]=d(``),[me,he]=d(``),S=g.name===`submitting`,C=g.name===`form`?g.ctx?.notice:void 0,ge=u(C);ge.current=C;let w=m.withdrawableBalances.status===`ready`||m.withdrawableBalances.status===`stale`?m.withdrawableBalances.payload[0]:void 0,T=l(()=>a(w)??{symbol:`USDC`},[w]),_e=l(()=>a(w?{symbol:w.networkName,eip155Id:w.eip155Id,isNative:!0,logoUrl:w.chainLogoUrl}:void 0)??{symbol:`BSC`},[w]),E=typeof b==`number`?b:typeof b==`object`?b.amount:void 0,ve=w?.symbol??T.symbol,D=E??w?.amount.value,ye=E===void 0?w?.symbol:ve,O=D!==void 0&&ye!==void 0?{amount:E===void 0?w?.amount.formatted??ne(D,le):ne(E,le),symbol:ye}:void 0,k=m.receiveOptions.status===`ready`||m.receiveOptions.status===`stale`?m.receiveOptions.payload:[],A=w?.eip155Id?Number(w.eip155Id):void 0,j=w?.symbol??T.symbol,M=l(()=>{let e=new Map;for(let t of k)for(let n of t.tokens){let r=n.symbol.toUpperCase(),i=e.get(r);i?i.push({chain:t,token:n}):e.set(r,[{chain:t,token:n}])}return e},[k]),N=l(()=>{if(M.size===0)return;let e=j.toUpperCase();return M.has(e)?e:M.keys().next().value},[M,j]),P=s(e=>{let t=M.get(e);if(!(!t||t.length===0))return(A===void 0?void 0:t.find(e=>e.chain.eip155Id===A))??t[0]},[M,A]),[F,I]=d(void 0),[L,R]=d(void 0);c(()=>{if(L||!N)return;let e=P(N);e&&(I(e.chain),R(e.token))},[N,P,L]);let z=s(()=>{ge.current&&_.clearNotice()},[_]),be=s(e=>{z(),pe(e),y.current.onRecipientChanged?.(e)},[z]),B=e().locale,V=s(e=>{z(),he(e);let t=re(e,B);y.current.onAmountChanged?.({raw:e,numeric:t})},[z,B]),xe=s(e=>{z();let t=e.symbol.toUpperCase(),n=M.get(t)?.find(e=>e.chain.eip155Id===F?.eip155Id)??P(t);n&&(I(n.chain),R(n.token),y.current.onReceiveTokenChanged?.(n.token),n.chain.eip155Id!==F?.eip155Id&&y.current.onReceiveChainChanged?.(n.chain))},[z,M,P,F?.eip155Id]),Se=s(e=>{z(),I(e);let t=L?.symbol.toUpperCase(),n=(t?e.tokens.find(e=>e.symbol.toUpperCase()===t):void 0)??e.tokens[0];n&&R(n),y.current.onReceiveChainChanged?.(e),n&&n.symbol!==L?.symbol&&y.current.onReceiveTokenChanged?.(n)},[z,L?.symbol]),H=re(me,B),U=H!==null&&H>0,Ce=x.trim(),we=Ce.length>0,W=oe(Ce),G=F!==void 0&&L!==void 0,K=U&&D!==void 0&&H>D,[q,Te]=d(null),J=(m.quote.status===`ready`||m.quote.status===`stale`)&&we&&U&&G&&q!==null&&q.recipient===x&&q.amount===H&&q.receiveChainId===F.eip155Id&&q.receiveSymbol===L.symbol?m.quote.payload:void 0,Ee=l(()=>M.size===0?[T]:[...M.values()].map(e=>{let t=e[0];return a({symbol:t.token.symbol,eip155Id:t.chain.eip155Id,address:t.token.address,isNative:t.token.isNative,logoUrl:t.token.assetLogoUrl})??{symbol:t.token.symbol}}),[M,T]),De=l(()=>{let e=L?.symbol.toUpperCase(),t=e?M.get(e):void 0;return(t?t.map(e=>e.chain):k).map(e=>a({symbol:e.networkName,eip155Id:e.eip155Id,isNative:!0,logoUrl:e.chainLogoUrl})??{symbol:e.networkName})},[L?.symbol,M,k]),Oe=L?a({symbol:L.symbol,eip155Id:F?.eip155Id,address:L.address,isNative:L.isNative,logoUrl:L.assetLogoUrl}):T,ke=F?a({symbol:F.networkName,eip155Id:F.eip155Id,isNative:!0,logoUrl:F.chainLogoUrl}):_e,Ae=l(()=>{if(J?.breakdown)return{route:J.breakdown.selectedRoute?.label,networkCost:J.breakdown.networkCost?.formatted,priceImpact:J.breakdown.priceImpact?.formatted}},[J]),je=l(()=>{if(U)return J?.receiveAmountUsd?J.receiveAmountUsd.formatted:`$${H.toFixed(2)}`},[H,U,J]),Me=J&&U?J.receiveAmount.formatted:void 0,Ne=J?.receiveAmountUsd?.formatted,Y=W&&U&&!K&&G&&J===void 0&&m.quote.status!==`error`,X=W&&U&&!K&&G&&J!==void 0,Pe=ie({expiresAt:J?.expiresAt,enabled:X}),Fe=X&&J?J.quoteTotalSeconds:void 0,[Z,Q]=d(!1);c(()=>{Q(!1)},[x,H,F?.eip155Id,L?.symbol,g.name]),c(()=>{if(!X||!J||g.name!==`form`||Z)return;let e=Math.max(0,J.expiresAt-Date.now()),t=setTimeout(()=>{Q(!0)},e);return()=>clearTimeout(t)},[X,J,g.name,Z]),c(()=>{if(!Z||g.name!==`form`||A===void 0||!F||!L||!W||!U||K)return;let e=new AbortController,t={recipient:x,amount:H??0,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n={sourceAssetSymbol:j,sourceChainId:A,amount:H??0,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};return y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Te(t)}).catch(()=>{}).finally(()=>{e.signal.aborted||Q(!1)}),()=>e.abort()},[Z,h,x,H,W,U,K,A,j,F,L,g.name]);let $=!W||!U||K||!G||Y||Z,Ie=se({enterRecipientAddress:v({id:`nr03QI`,message:`Enter Recipient Address`}),enterValidRecipientAddress:v({id:`GZPxmc`,message:`Enter Valid Recipient Address`}),enterAmount:v({id:`yH9V_J`,message:`Enter Amount`}),insufficientBalance:v({id:`N2DUxS`,message:`Insufficient Balance`}),regeneratingQuote:v({id:`Ly6geA`,message:`Regenerating quote…`}),estimatingQuote:v({id:`Uevt3L`,message:`Estimating quote`})},{isRecipientFilled:we,isRecipientValid:W,isAmountValid:U,exceedsBalance:K,quoteEstimating:Y,quoteRegenerating:Z}),Le=u(null);c(()=>{if(Le.current?.abort(),!W||!U||K||!G||g.name!==`form`||A===void 0)return;let e=new AbortController;Le.current=e;let t={recipient:x,amount:H,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n=setTimeout(()=>{let n={sourceAssetSymbol:j,sourceChainId:A,amount:H,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Te(t)}).catch(()=>{})},400);return()=>{clearTimeout(n),e.abort()}},[h,x,H,W,U,K,G,A,j,F?.eip155Id,L?.symbol,g.name]);let Re=s(()=>{O&&V(O.amount)},[O,V]),ze=s(()=>{S||$||A===void 0||!F||!L||_.submit({sourceAssetSymbol:j,sourceChainId:A,amount:H??0,recipientAddress:x,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id})},[_,H,A,j,F,L,x,$,S]),Be=s(e=>{let t=k.find(t=>String(t.eip155Id)===String(e.chainId));t&&Se(t)},[Se,k]),Ve=s(e=>{let t=e.symbol.toUpperCase(),n=M.get(t);!n||n.length===0||xe((n.find(e=>e.chain.eip155Id===F?.eip155Id)??n[0]).token)},[xe,M,F?.eip155Id]);return g.name!==`form`&&g.name!==`submitting`?null:ce(o,{recipientAddress:x,onRecipientChange:be,...fe?{suggestedRecipient:fe}:{},amount:me,onAmountChange:V,onAmountMax:Re,sourceAsset:T,sourceChain:_e,receiveAsset:Oe,receiveChain:ke,receiveAssetOptions:Ee,onReceiveAssetChange:Ve,receiveChainOptions:De,onReceiveChainChange:Be,balance:O,amountUsd:je,receiveAmount:Me,receiveAmountUsd:Ne,breakdown:Ae,quoteEstimating:Y,quoteRegenerating:Z,...Pe===void 0?{}:{quoteSeconds:Pe},...Fe===void 0?{}:{quoteTotalSeconds:Fe},submitting:S,submitDisabled:$,submitLabel:Ie,...C?{notice:C}:{},onSubmit:ze,children:[f(o.Header,{}),ce(o.Body,{children:[f(o.RecipientField,{}),f(o.AmountField,{}),f(o.ReceiveSelectors,{}),f(o.BreakdownCard,{})]}),f(o.Footer,{})]})}export{p as WithdrawForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,suggestedRecipient:c,amount:l=``,onAmountChange:u,onAmountMax:d,sourceAsset:f,sourceChain:y,receiveAsset:b,receiveChain:x,receiveAssetOptions:S,onReceiveAssetChange:C,receiveChainOptions:w,onReceiveChainChange:T,balance:E,amountUsd:D,receiveAmount:O,receiveAmountUsd:k,breakdown:A,quoteEstimating:j=!1,quoteRegenerating:M=!1,quoteSeconds:N,quoteTotalSeconds:P,submitting:F=!1,submitDisabled:I=!1,submitLabel:L,notice:R,onSubmit:z,defaultBreakdownOpen:B=!1,breakdownOpen:V,onBreakdownOpenChange:H,children:U}=e,[W,G]=h(B),K=V!==void 0,q=K?V:W,J=p(e=>{K||G(e),H?.(e)},[K,H]),Y=b??f,X=x??y;return g(r,{value:m(()=>({recipientAddress:o,onRecipientChange:s??v,suggestedRecipient:c,amount:l,onAmountChange:u??v,onAmountMax:d,sourceAsset:f,sourceChain:y,receiveAsset:Y,receiveChain:X,receiveAssetOptions:S,onReceiveAssetChange:C,receiveChainOptions:w,onReceiveChainChange:T,balance:E,amountUsd:D,receiveAmount:O,receiveAmountUsd:k,breakdown:A,quoteEstimating:j,quoteRegenerating:M,quoteSeconds:N,quoteTotalSeconds:P,submitting:F,submitDisabled:I,submitLabel:L,notice:R,onSubmit:z,breakdownOpen:q,onBreakdownOpenChange:J}),[o,s,c,l,u,d,f,y,Y,X,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,q,J]),children:g(t.Provider,{children:g(n,{"data-stridge-slot":i.root,..._.props(a.root),children:U})})})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return g(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:g(y,{...o,children:a})})}(function(e){e.Header=u,e.Body=s,e.RecipientField=f,e.AmountField=o,e.ReceiveSelectors=d,e.BreakdownCard=c,e.Footer=l,e.Dialog=b})(y||={});export{y as WithdrawForm};
|
|
@@ -2,17 +2,19 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
2
2
|
|
|
3
3
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Recipient address field — label + auto-growing textarea + trailing
|
|
5
|
+
* Recipient address field — label + auto-growing textarea + trailing prefill chip.
|
|
6
6
|
*
|
|
7
7
|
* The textarea wraps long hex addresses up to `maxBlockSize`, then scrolls. Single-line semantics
|
|
8
8
|
* are kept by stripping any `\r\n` in `onChange` — no `onKeyDown` Enter-blocker, since that would
|
|
9
9
|
* also swallow IME composition keys for CJK input. The stripping handler lives here (not in
|
|
10
10
|
* `InputGroup.Textarea`) so the kit primitive stays neutral on the single-vs-multi-line decision.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
* input.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The chip is host-controlled via `suggestedRecipient` on `<WithdrawDialog>` (or the compound
|
|
13
|
+
* root prop). Clicking it fills the input. Hidden entirely when no suggestion is supplied. The
|
|
14
|
+
* chip's `aria-label` reads off the host-supplied `label` so screen readers describe which
|
|
15
|
+
* address is being prefilled; the visible text shows the truncated address so sighted users
|
|
16
|
+
* see "this is mine" recognition. The kit no longer auto-derives this from `wagmi.address` —
|
|
17
|
+
* that misled users on embedded-wallet integrations.
|
|
16
18
|
*/
|
|
17
19
|
declare function WithdrawFormRecipientField(): _$react_jsx_runtime0.JSX.Element;
|
|
18
20
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{suggestedRecipient:v,onRecipientChange:y}=f,b=v?.address,x=v?.label?.trim()||m({id:`BhQhbU`,message:`Use suggested recipient address`}),S=s(e=>{y(e.target.value.replace(/[\r\n]+/g,``))},[y]),C=s(()=>{b&&y(b)},[b,y]),w=b?p(b):``;return u(t,{"data-stridge-slot":a.recipientField,children:[l(t.Label,{htmlFor:_,children:g}),u(r,{children:[l(r.Textarea,{id:_,"data-stridge-slot":a.recipientInput,rows:1,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,placeholder:h,value:f.recipientAddress,onChange:S,...d.props(o.recipientInputMono)}),b?l(r.Addon,{align:`inline-end`,children:u(`button`,{type:`button`,"data-stridge-slot":a.recipientPill,onClick:C,"aria-label":x,...d.props(o.pillBase,o.pillInteractive,o.recipientPill),children:[l(n,{size:`sm`,alt:m({id:`sb9Y58`,message:`Wallet`})}),l(`span`,{...d.props(o.recipientPillText),children:w})]})}):null]})]})}function p(e){return e.length<=10?e:`${e.slice(0,4)}…${e.slice(-4)}`}export{f as WithdrawFormRecipientField};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
2
|
import { AssetDescriptor } from "../../../../../shared/widgets/asset-descriptor.js";
|
|
3
|
+
import { WithdrawSuggestedRecipient } from "../../../bindings/WithdrawBindings.js";
|
|
3
4
|
import { ComponentProps, ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/types.d.ts
|
|
@@ -38,12 +39,14 @@ interface WithdrawFormProps {
|
|
|
38
39
|
/** Fired when the user types into the recipient field. */
|
|
39
40
|
onRecipientChange?: (next: string) => void;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
-
* {@link WithdrawForm.RecipientField}.
|
|
43
|
-
*
|
|
44
|
-
* the
|
|
42
|
+
* Host-supplied recipient suggestion surfaced as a prefill chip on
|
|
43
|
+
* {@link WithdrawForm.RecipientField}. Clicking the chip fills the recipient input via
|
|
44
|
+
* {@link WithdrawFormProps.onRecipientChange}. The chip's accessible name reads off
|
|
45
|
+
* `suggestedRecipient.label` so the user knows which address they are filling with. When
|
|
46
|
+
* omitted, no chip renders. See {@link WithdrawSuggestedRecipient} for the rationale —
|
|
47
|
+
* the kit no longer auto-derives this from `wagmi.address`.
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
suggestedRecipient?: WithdrawSuggestedRecipient;
|
|
47
50
|
/** Current amount-field value, in display units, as a string (controlled). */
|
|
48
51
|
amount?: string;
|
|
49
52
|
/** Fired when the user types into the amount field. */
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 };
|
package/dist/i18n/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createKitI18n as e}from"../shared/i18n/createKitI18n.js";import{getLocaleDirection as
|
|
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};
|
package/dist/i18n/locales/ar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["اتصل بمحفظة للمتابعة"],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"9JHY2T":["تمت إضافة أموال إيداعك إلى حسابك."],"9cCjMJ":["إيداع الحد الأقصى من الرصيد"],"< 1 min":["< دقيقة"],"AO44G_":["عرض الإيصال"],"AOPSKq":["إيداع ",["0"]],"AWtGgd":["احصل على المساعدة"],"AeXO77":["حساب"],"AeZIvT":["ستستلم"],"AikETk":["الحد الأدنى ",["minDeposit"]],"BhQhbU":["استخدم عنوان المستلم المقترح"],"CK1KXz":["الأقصى"],"Ck1xL4":["ترسل"],"D79cZK":["فوري"],"DPfwMq":["تم"],"Dd7jP5":["تواجه مشكلات؟"],"DoS2vD":["إخفاء التفاصيل التقنية"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["الوجهة"],"G-SK3q":["واجهت الواجهة خطأً غير متوقع وتعذَّر إكمال العرض. حاول مرة أخرى، أو أغلق هذا الحوار وأعد المحاولة من التطبيق."],"GX8GKD":["الأصول"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["تمت الإضافة إلى ",["captionSuffix"]],"GwkmPx":["تبديل المبلغ المعروض"],"HfPDJV":["إغلاق — سنُشعرك"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["تمت إضافة أموال إيداعك إلى ",["brand"],"."],"KDw4GX":["حاول مرة أخرى"],"KGoAE6":["تلقائي · ",["value"]],"KTNWsg":["فشل السحب"],"KuqCAK":["~ 2 دقيقة"],"LEbOpR":["مزيد من التفاصيل"],"Ly6geA":["جاري إعادة احتساب عرض السعر…"],"MZ_nQf":["عنوان المستلم"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["ستُضاف أموال إيداعك إلى حسابك."],"Oi8TiZ":["عرض التقدم"],"OsyKSt":["سحب"],"P9fBwv":["Stack"],"PiH3UR":["تم النسخ!"],"Q12Rrs":["معاملة الإيداع"],"QU2cIs":["لديك أسئلة؟"],"Rxjdjn":["لم يكتمل الإيداع"],"SOVBoe":["نسخ عنوان الإيداع"],"SZRUQ4":["أقصى انزلاق سعري"],"Sjplg3":["عرض في المستكشف"],"SlfejT":["Error"],"TG4WOd":["ستُضاف أموال إيداعك إلى ",["brand"],"."],"TT0aVH":["تم إرسال الطلب"],"Uevt3L":["جاري تقدير العرض"],"UqHbdz":["إغلاق إشعار الإيداع قيد التنفيذ"],"V1fa9u":["عرض المزيد"],"VAZUpd":["فشل الطلب"],"WkRH60":["الحد الأدنى ",["0"]],"Wqz0SO":["رصيد منخفض"],"Z1WbO6":["الأموال آمنة على شبكة المصدر — تواصل مع الدعم للاسترجاع."],"ZqugiS":["الرصيد: ",["0"]," ",["1"]],"_girqu":["نجح السحب"],"_kXBrK":["إجمالي الوقت"],"a2WllD":["العملة المستلمة"],"aiEUrg":["إظهار التفاصيل التقنية"],"bOZXx5":["تحديث الطلب"],"bZnukT":["تكلفة الشبكة"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["تطبَّق الشروط"],"cHPbBJ":["تعذَّر على الجسر تمويل معاملة الوجهة (نفد رصيد الغاز)."],"cxR5Qy":["معاملة التسوية"],"e3xU5E":["تم استلام الإيداع"],"fKSGnu":["الحد الأدنى للمبلغ المطلوب على هذه الشبكة لتغطية رسوم الشبكة والتوجيه."],"fWsBTs":["حدث خطأ. حاول مرة أخرى."],"flMR3h":["تم سحب أموالك بنجاح."],"g2UNkE":["مشغل بواسطة"],"gfh8CC":["الشبكات"],"hKMHs1":["الفرق بين الناتج المتوقع للمسار وسعر السوق الأوسط الأساسي."],"he3ygx":["نسخ"],"hehnjM":["المبلغ"],"i-4Fbp":["فشل الإيداع"],"i-EgW-":["التكلفة التقديرية لبث هذه المعاملة على سلسلة الوجهة."],"iH8pgl":["رجوع"],"junZX6":["تم استلام الإيداع وجاري المعالجة…"],"kH6wUX":["تأثير السعر"],"kR8ayx":["بالنقر على تأكيد الإيداع، فإنك توافق على <0>الشروط</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["إيداع"],"kjrq_8":["مزيد من المعلومات"],"lOEm_1":["تم تنفيذ الطلب"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["مسار السيولة المختار المستخدم لتسوية هذا السحب."],"mgLWEL":["تراجعت معاملة الوجهة على السلسلة."],"mvYQx_":["تم الاكتشاف"],"njn4bC":["أكِّد المعاملة في محفظتك"],"nr03QI":["أدخل عنوان المستلم"],"nwtY4N":["حدث خطأ"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["إيداع ",["symbol"]],"oW1G8i":["تم إيداع أموالك بنجاح."],"ob8R_m":["حاول مرة أخرى أو تواصل معنا إذا استمرت المشكلة."],"ogD_nm":["إيداع إلى ",["0"]],"olEUh2":["ناجح"],"pCzTTC":["عنوان الإيداع الخاص بك"],"q32Nt8":["اكتمل السحب"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["تأكيد الإيداع"],"qtoOYG":["بدون حد"],"rT8e1f":["المسار"],"rZdp61":["معاملة الإكمال"],"sSiLKx":["شبكة الاستلام"],"sb9Y58":["محفظة"],"sbwbC0":["طريقة الدفع"],"uPo3PQ":["عرض أقل"],"vrnnn9":["جاري المعالجة"],"w-2VR9":["جاري السحب…"],"wdxz7K":["المصدر"],"xDAtGP":["Message"],"xGVfLh":["متابعة"],"yH9V_J":["أدخل المبلغ"],"yrvWai":["معاملة المصدر"],"yxnt3y":["حالة التنفيذ"],"yy2rkt":["0x…"],"yz7wBu":["إغلاق"],"zYD5xm":["جاري الإضافة"],"zbtijb":["إيداع ",["0"]," إلى ",["1"]],"znqB4T":["رصيد غير كافٍ"],"{hours} hr":[["hours"]," ساعة"],"{minutes} min":[["minutes"]," دقيقة"],"{n}h":[["n"],"س"],"{n}m":[["n"],"د"],"{n}s":[["n"],"ث"]}`);export{e as messages};
|
package/dist/i18n/locales/es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"HfPDJV":["Cerrar — te notificaremos"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["Tu depósito se acreditó a ",["brand"],"."],"KDw4GX":["Reintentar"],"KGoAE6":["Auto · ",["value"]],"KTNWsg":["El retiro falló"],"KuqCAK":["~ 2 min"],"LEbOpR":["Más detalles"],"Ly6geA":["Regenerando cotización…"],"MZ_nQf":["Dirección del destinatario"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["Tu depósito se acreditará en tu cuenta."],"Oi8TiZ":["Ver progreso"],"OsyKSt":["Retirar"],"P9fBwv":["Stack"],"PiH3UR":["¡Copiado!"],"Q12Rrs":["Tx depósito"],"QU2cIs":["¿Tienes preguntas?"],"Rxjdjn":["El depósito no se completó"],"SOVBoe":["Copiar dirección de depósito"],"SZRUQ4":["Deslizamiento máximo"],"Sjplg3":["Ver en el explorador"],"SlfejT":["Error"],"TG4WOd":["Tu depósito se acreditará a ",["brand"],"."],"TT0aVH":["Orden enviada"],"Uevt3L":["Estimando cotización"],"UqHbdz":["Descartar aviso de depósito pendiente"],"V1fa9u":["Ver más"],"VAZUpd":["Orden fallida"],"WkRH60":["Mín ",["0"]],"Wqz0SO":["Saldo bajo"],"Z1WbO6":["Los fondos están seguros en la red de origen — contacta a soporte para recuperarlos."],"ZqugiS":["Saldo: ",["0"]," ",["1"]],"_girqu":["Retiro exitoso"],"_kXBrK":["Tiempo total"],"a2WllD":["Token a recibir"],"aiEUrg":["Mostrar detalles técnicos"],"bOZXx5":["Actualizar orden"],"bZnukT":["Costo de red"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["Aplican términos"],"cHPbBJ":["El puente no pudo financiar la transacción de destino (presupuesto de gas agotado)."],"cxR5Qy":["Tx liquidación"],"e3xU5E":["Depósito recibido"],"fKSGnu":["Cantidad mínima requerida para que esta red cubra las tarifas y el enrutamiento."],"fWsBTs":["Algo salió mal. Vuelve a intentarlo."],"flMR3h":["Tus fondos fueron retirados con éxito."],"g2UNkE":["Con tecnología de"],"gfh8CC":["Redes"],"hKMHs1":["Diferencia entre el resultado esperado de la ruta y el precio medio de mercado subyacente."],"he3ygx":["Copiar"],"hehnjM":["Monto"],"i-4Fbp":["Depósito fallido"],"i-EgW-":["El costo estimado para emitir esta transacción en la red de destino."],"iH8pgl":["Atrás"],"junZX6":["Depósito recibido y procesando…"],"kH6wUX":["Impacto en precio"],"kR8ayx":["Al hacer clic en Confirmar depósito, aceptas nuestros <0>términos</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["Depositar"],"kjrq_8":["Más información"],"lOEm_1":["Orden completada"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["La ruta de liquidez seleccionada para liquidar este retiro."],"mgLWEL":["La transacción del tramo de destino se revirtió en cadena."],"mvYQx_":["Detectado"],"njn4bC":["Confirma la transacción en tu billetera"],"nr03QI":["Ingresa la dirección del destinatario"],"nwtY4N":["Algo salió mal"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["Depositar ",["symbol"]],"oW1G8i":["Tus fondos se depositaron correctamente."],"ob8R_m":["Inténtalo nuevamente o contáctanos si el problema persiste."],"ogD_nm":["Depositar a ",["0"]],"olEUh2":["Exitoso"],"pCzTTC":["Tu dirección de depósito"],"q32Nt8":["Retiro completado"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["Confirmar depósito"],"qtoOYG":["Sin límite"],"rT8e1f":["Ruta"],"rZdp61":["Tx finalización"],"sSiLKx":["Red a recibir"],"sb9Y58":["Billetera"],"sbwbC0":["Método de pago"],"uPo3PQ":["Ver menos"],"vrnnn9":["Procesando"],"w-2VR9":["Retiro en curso…"],"wdxz7K":["Origen"],"xDAtGP":["Message"],"xGVfLh":["Continuar"],"yH9V_J":["Ingresa el monto"],"yrvWai":["Tx origen"],"yxnt3y":["Estado de ejecución"],"yy2rkt":["0x…"],"yz7wBu":["Cerrar"],"zYD5xm":["Acreditando"],"zbtijb":["Depositar ",["0"]," a ",["1"]],"znqB4T":["Saldo insuficiente"],"{hours} hr":[["hours"]," h"],"{minutes} min":[["minutes"]," min"],"{n}h":[["n"],"h"],"{n}m":[["n"],"m"],"{n}s":[["n"],"s"]}`);export{e as messages};
|
|
@@ -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" | "Connect a wallet to continue" | "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." | "Powered by" | "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 suggested recipient 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
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -19,9 +19,10 @@ import { OkxIcon } from "../shared/icons/exchanges/OkxIcon.js";
|
|
|
19
19
|
import { RobinhoodIcon } from "../shared/icons/exchanges/RobinhoodIcon.js";
|
|
20
20
|
import { InfoIcon } from "../shared/icons/InfoIcon.js";
|
|
21
21
|
import { LoaderIcon } from "../shared/icons/LoaderIcon.js";
|
|
22
|
+
import { LogoIcon } from "../shared/icons/LogoIcon.js";
|
|
22
23
|
import { MailIcon } from "../shared/icons/MailIcon.js";
|
|
23
24
|
import { PackageIcon } from "../shared/icons/PackageIcon.js";
|
|
24
25
|
import { QrCodeIcon } from "../shared/icons/QrCodeIcon.js";
|
|
25
26
|
import { WalletIcon } from "../shared/icons/WalletIcon.js";
|
|
26
27
|
import { XIcon } from "../shared/icons/XIcon.js";
|
|
27
|
-
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
|
28
|
+
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, LogoIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
package/dist/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{
|
|
1
|
+
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{LogoIcon as x}from"../shared/icons/LogoIcon.js";import{MailIcon as S}from"../shared/icons/MailIcon.js";import{PackageIcon as C}from"../shared/icons/PackageIcon.js";import{QrCodeIcon as w}from"../shared/icons/QrCodeIcon.js";import{WalletIcon as T}from"../shared/icons/WalletIcon.js";import{XIcon as E}from"../shared/icons/XIcon.js";export{e as AlertIcon,t as ArrowDownIcon,n as ArrowRightIcon,r as ArrowRightLeftIcon,m as BinanceIcon,i as CheckIcon,a as ChevronDownIcon,o as ChevronLeftIcon,s as ChevronRightIcon,c as ChevronUpIcon,l as CircleArrowUpIcon,u as CircleHelpIcon,d as ClockIcon,h as CoinbaseIcon,f as CopyIcon,p as ExternalLinkIcon,y as InfoIcon,g as KrakenIcon,b as LoaderIcon,x as LogoIcon,S as MailIcon,_ as OkxIcon,C as PackageIcon,w as QrCodeIcon,v as RobinhoodIcon,T as WalletIcon,E as XIcon};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,16 @@ import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
|
|
|
5
5
|
import { useWithdrawSnapshot } from "./flows/withdraw/driver/context.js";
|
|
6
6
|
import { useKitConfig } from "./scope/context.js";
|
|
7
7
|
import { KitPortalScope } from "./scope/KitPortalScope.js";
|
|
8
|
+
import { IntercomMerchantContext } from "./shared/support/useIntercomMerchantContext.js";
|
|
9
|
+
import { SupportConfig, SupportOpenContext } from "./shared/support/types.js";
|
|
8
10
|
import { createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, resolveStorageAdapter } from "./storage/adapters.js";
|
|
9
11
|
import { createKitStorage } from "./storage/createKitStorage.js";
|
|
10
12
|
import { DEFAULT_KIT_STORAGE_NAMESPACE, KitStorageProvider, useKitStorage, useKitStorageValue } from "./storage/context.js";
|
|
11
13
|
import { StridgeEnvironment } from "./drivers/stridge/types.js";
|
|
12
14
|
import { FailureInfo } from "./shared/orchestrator/types.js";
|
|
13
15
|
import { DepositActions, DepositController, DepositMethod, DepositState, DepositStateName, OpenInput } from "./flows/deposit/orchestrator/types.js";
|
|
14
|
-
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
16
|
+
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
17
|
+
import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient, useWithdrawBindings } from "./flows/withdraw/bindings/WithdrawBindings.js";
|
|
15
18
|
import { ChainInput, ChainSlug, chains } from "./shared/chains/index.js";
|
|
16
19
|
import { ChainLogoMeta } from "./shared/utils/logos/chains.js";
|
|
17
20
|
import { ChainLogoInput, TokenLogoInput } from "./shared/utils/logos/types.js";
|
|
@@ -22,5 +25,5 @@ import { useDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
|
|
|
22
25
|
import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
|
|
23
26
|
import { useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
|
|
24
27
|
import { useOptionalStridge, useStridge } from "./stridge/StridgeContext.js";
|
|
25
|
-
import { StridgeAppearance, StridgeAsset, StridgeDepositFlowConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
26
|
-
export { type BannerAckBucket, type ChainInput, type ChainLogoInput, type ChainLogoMeta, type ChainSlug, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositFlowConfig, type StridgeEnvironment, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, chains, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, logos, resolveStorageAdapter, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalStridge, useStridge, useWithdraw, useWithdrawSnapshot, useWithdrawState };
|
|
28
|
+
import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
29
|
+
export { type BannerAckBucket, type ChainInput, type ChainLogoInput, type ChainLogoMeta, type ChainSlug, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeEnvironment, type StridgeFlowOwner, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, chains, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, logos, resolveStorageAdapter, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalStridge, useStridge, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{chains as e}from"./shared/chains/index.js";import{logos as t}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as n,createMemoryStorageAdapter as r,createSessionStorageAdapter as i,resolveStorageAdapter as a}from"./storage/adapters.js";import{createKitStorage as o}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as s,KitStorageProvider as c,useKitStorage as l,useKitStorageValue as u}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as d,bucketFromSettlement as f,useBannerAck as p,useBannerAckForSettlement as m}from"./banners/useBannerAck.js";import"./banners/index.js";import{useDepositSnapshot as h}from"./flows/deposit/driver/context.js";import{useDepositState as g}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as _}from"./flows/deposit/orchestrator/useDeposit.js";import{
|
|
1
|
+
import{chains as e}from"./shared/chains/index.js";import{logos as t}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as n,createMemoryStorageAdapter as r,createSessionStorageAdapter as i,resolveStorageAdapter as a}from"./storage/adapters.js";import{createKitStorage as o}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as s,KitStorageProvider as c,useKitStorage as l,useKitStorageValue as u}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as d,bucketFromSettlement as f,useBannerAck as p,useBannerAckForSettlement as m}from"./banners/useBannerAck.js";import"./banners/index.js";import{useDepositSnapshot as h}from"./flows/deposit/driver/context.js";import{useDepositState as g}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as _}from"./flows/deposit/orchestrator/useDeposit.js";import{useWithdrawBindings as v}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{useWithdrawSnapshot as y}from"./flows/withdraw/driver/context.js";import{useWithdrawState as b}from"./flows/withdraw/orchestrator/controller.js";import{useWithdraw as x}from"./flows/withdraw/orchestrator/useWithdraw.js";import"./flows/withdraw/orchestrator/index.js";import{useKitConfig as S}from"./scope/context.js";import{KitPortalScope as C}from"./scope/KitPortalScope.js";import{useOptionalStridge as w,useStridge as T}from"./stridge/StridgeContext.js";import{StridgeProvider as E}from"./stridge/StridgeProvider.js";export{s as DEFAULT_KIT_STORAGE_NAMESPACE,C as KitPortalScope,c as KitStorageProvider,E as StridgeProvider,d as bannerAckStorageKey,f as bucketFromSettlement,e as chains,o as createKitStorage,n as createLocalStorageAdapter,r as createMemoryStorageAdapter,i as createSessionStorageAdapter,t as logos,a as resolveStorageAdapter,p as useBannerAck,m as useBannerAckForSettlement,_ as useDeposit,h as useDepositSnapshot,g as useDepositState,S as useKitConfig,l as useKitStorage,u as useKitStorageValue,w as useOptionalStridge,T as useStridge,x as useWithdraw,v as useWithdrawBindings,y as useWithdrawSnapshot,b as useWithdrawState};
|
package/dist/package.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`0.1.0-alpha.20`;export{e as version};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitConfig as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{jsx as n}from"react/jsx-runtime";import{DirectionProvider as r}from"@base-ui/react/direction-provider";function i({className:i,style:a,children:o,...s}){let{accent:c,direction:l,
|
|
1
|
+
"use client";import{useKitConfig as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{jsx as n}from"react/jsx-runtime";import{DirectionProvider as r}from"@base-ui/react/direction-provider";function i({className:i,style:a,children:o,...s}){let{accent:c,direction:l,locale:u,radius:d,theme:f}=e(),p=c?{"--stridge-kit-primary":c}:void 0,m=p||a?{...p,...a}:void 0;return n(r,{direction:l??`ltr`,children:n(`div`,{...s,dir:l,"data-stridge-scope":``,"data-stridge-radius":d,"data-stridge-theme":f,"data-stridge-locale":u,"data-stridge-slot":t.portalScope,className:i,style:m,children:o})})}export{i as KitPortalScope};
|
package/dist/scope/KitScope.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KitDirection, KitRadius, KitTarget, KitTheme } from "./context.js";
|
|
1
|
+
import { KitAttribution, KitDirection, KitRadius, KitTarget, KitTheme } from "./context.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -19,7 +19,9 @@ declare function KitScope({
|
|
|
19
19
|
radius,
|
|
20
20
|
theme,
|
|
21
21
|
direction: directionProp,
|
|
22
|
+
locale,
|
|
22
23
|
target,
|
|
24
|
+
attribution,
|
|
23
25
|
className,
|
|
24
26
|
style,
|
|
25
27
|
dir,
|
|
@@ -55,6 +57,21 @@ declare namespace KitScope {
|
|
|
55
57
|
* Use the standard HTML `dir` prop instead when you want a tree-wide DOM flip.
|
|
56
58
|
*/
|
|
57
59
|
direction?: KitDirection;
|
|
60
|
+
/**
|
|
61
|
+
* Active BCP-47 locale tag (`"en"`, `"ar"`, `"fa"`, …). Forwarded by `KitProvider` from
|
|
62
|
+
* `i18n.locale` and stamped onto the scope div as `data-stridge-locale="…"` so hosts can
|
|
63
|
+
* target script-specific styling per locale — e.g. swap the kit's font stack to a Persian
|
|
64
|
+
* face on `[data-stridge-locale^="fa"]` while keeping the Arabic face on `[…^="ar"]`. RTL
|
|
65
|
+
* alone isn't fine-grained enough because both share `dir="rtl"`.
|
|
66
|
+
*/
|
|
67
|
+
locale?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
|
|
70
|
+
* `"visible"` (default) auto-mounts the brand row at the bottom of every step; `"hidden"`
|
|
71
|
+
* suppresses the auto-mount for white-label installs. Explicit `<Stridge.PoweredBy />`
|
|
72
|
+
* compositions always render — set this to `"hidden"` when composing the brand row manually.
|
|
73
|
+
*/
|
|
74
|
+
attribution?: KitAttribution;
|
|
58
75
|
/** Children rendered inside the kit scope. */
|
|
59
76
|
children?: ReactNode;
|
|
60
77
|
}
|
package/dist/scope/KitScope.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,
|
|
1
|
+
"use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,locale:m,target:h,attribution:g,className:_,style:v,dir:y,ref:b,children:x,...S}){let C=a(null),w=f(C,y),T=u(y)??d??w,E=n(e=>{C.current=e,p(b,e)},[b]),D=i(()=>({accent:r,radius:o,theme:l,direction:T,locale:m,target:h,attribution:g}),[r,o,l,T,m,h,g]),O=r?{"--stridge-kit-primary":r}:void 0,k=O||v?{...O,...v}:void 0;return s(e.Provider,{value:D,children:s(c,{direction:T??`ltr`,children:s(`div`,{...S,ref:E,dir:y,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-locale":m,"data-stridge-slot":t.root,className:_,style:k,children:x})})})}function u(e){return e===`ltr`||e===`rtl`?e:void 0}function d(e){for(let t=e;t;t=t.parentElement){let e=u(t.getAttribute(`dir`)??void 0);if(e)return e}if(!(typeof window>`u`))return u(window.getComputedStyle(e).direction)}function f(e,t){let[n,i]=o(()=>u(t));return r(()=>{let n=e.current;if(!n){i(u(t));return}let r=()=>{i(d(n))};if(r(),typeof MutationObserver>`u`)return;let a=new MutationObserver(r);for(let e=n;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`dir`]});return()=>a.disconnect()},[t,e]),n}function p(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}export{l as KitScope};
|
package/dist/scope/context.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
type KitRadius = "sharp" | "subtle" | "rounded" | "pill";
|
|
3
3
|
type KitTheme = "dark" | "light";
|
|
4
4
|
type KitDirection = "ltr" | "rtl";
|
|
5
|
+
type KitAttribution = "visible" | "hidden";
|
|
5
6
|
/**
|
|
6
7
|
* Destination token credited by the gateway flow.
|
|
7
8
|
*/
|
|
@@ -53,10 +54,25 @@ interface KitConfig {
|
|
|
53
54
|
* behavior when they render outside the provider's DOM subtree.
|
|
54
55
|
*/
|
|
55
56
|
direction?: KitDirection;
|
|
57
|
+
/**
|
|
58
|
+
* Active BCP-47 locale tag (e.g. `"en"`, `"ar"`, `"fa"`, `"ar-EG"`). Forwarded by `KitProvider`
|
|
59
|
+
* from `i18n.locale` and stamped onto every kit scope as `data-stridge-locale="…"` so the host
|
|
60
|
+
* can target script-specific styling (typically the font stack) per locale — RTL alone isn't
|
|
61
|
+
* fine-grained enough (Arabic and Persian are both RTL but commonly want different faces).
|
|
62
|
+
*/
|
|
63
|
+
locale?: string;
|
|
56
64
|
/**
|
|
57
65
|
* Destination token configuration.
|
|
58
66
|
*/
|
|
59
67
|
target?: KitTarget;
|
|
68
|
+
/**
|
|
69
|
+
* Resolved state of the "Powered by Stridge" attribution row. `"visible"` (default) lets the
|
|
70
|
+
* gateway frame auto-mount the brand row at the bottom of every step; `"hidden"` suppresses
|
|
71
|
+
* the auto-mount for white-label installs. Explicit `<Stridge.PoweredBy />` compositions
|
|
72
|
+
* ignore this value and always render — the contract is "set `attribution=\"hidden\"` when
|
|
73
|
+
* composing the brand row manually".
|
|
74
|
+
*/
|
|
75
|
+
attribution?: KitAttribution;
|
|
60
76
|
}
|
|
61
77
|
/**
|
|
62
78
|
* Reads the active {@link KitConfig} from the nearest provider. Returns `{}` when no provider is
|
|
@@ -64,4 +80,4 @@ interface KitConfig {
|
|
|
64
80
|
*/
|
|
65
81
|
declare function useKitConfig(): KitConfig;
|
|
66
82
|
//#endregion
|
|
67
|
-
export { KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig };
|
|
83
|
+
export { KitAttribution, KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig };
|
package/dist/scope/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig } from "./context.js";
|
|
1
|
+
import { KitAttribution, KitConfig, KitDirection, KitRadius, KitTarget, KitTheme, useKitConfig } from "./context.js";
|
|
2
2
|
import { KitPortalScope } from "./KitPortalScope.js";
|
|
3
3
|
import { KitScope } from "./KitScope.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useLingui as e}from"../i18n/useLingui.js";import"../../i18n/index.js";import{joinClassNames as t}from"../utils/joinClassNames.js";import{LogoIcon as n}from"../icons/LogoIcon.js";import"../../icons/index.js";import{ATTRIBUTION_SLOTS as r}from"./Attribution.slots.js";import{elementStyles as i,styles as a}from"./Attribution.styles.js";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({href:u=`https://stridge.com`,target:d=`_blank`,rel:f=`noopener noreferrer`,asStatic:p,className:m,style:h}){let{_:g}=e(),_=l.props(a.root),v=l.props(a.link,!p&&a.anchor),y=l.props(i.prefix),b=l.props(i.mark),x=l.props(i.wordmark),S=t(_.className,m),C=_.style||h?{..._.style,...h}:void 0,w=c(o,{children:[s(`span`,{"data-stridge-slot":r.prefix,className:y.className,style:y.style,children:g({id:`g2UNkE`,message:`Powered by`})}),s(`span`,{"data-stridge-slot":r.mark,className:b.className,style:b.style,children:s(n,{"aria-hidden":!0,focusable:!1})}),s(`span`,{"data-stridge-slot":r.wordmark,className:x.className,style:x.style,children:`Stridge`})]});return s(`div`,{"data-stridge-slot":r.root,className:S,style:C,children:p?s(`span`,{className:v.className,style:v.style,children:w}):s(`a`,{href:u,target:d,rel:f,className:v.className,style:v.style,children:w})})}export{u as Attribution};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:`attribution`,prefix:`attribution-prefix`,mark:`attribution-mark`,wordmark:`attribution-wordmark`};export{e as ATTRIBUTION_SLOTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"Attribution__styles.root":`Attribution__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`x19ment4`,"paddingBottom-kGO01o":`xfvigk`,"paddingInline-kg3NbH":`x1ujb8i1`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:11`},link:{"Attribution__styles.link":`Attribution__styles.link`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"textDecoration-kybGjl":`x1hl2dhg`,"outline-kI3sdo":`x1a2a7pz`,"transitionProperty-k1ekBW":`xt3l3uh`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x1xv5090`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:20`},anchor:{"Attribution__styles.anchor":`Attribution__styles.anchor`,":focus-visible_outline-k3Woio":`x1gvykhg`,":focus-visible_outlineOffset-kiEn40":`x7s97pk`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:35`}},t={prefix:{"Attribution__elementStyles.prefix":`Attribution__elementStyles.prefix`,"fontSize-kGuDYH":`x1oae1zf`,"fontWeight-k63SB2":`xxjjie5`,"lineHeight-kLWn49":`x1d3mw78`,"color-kMwMTN":`xd2gg92`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-prefix']_color-kKNNVu":`x1wa2jhk`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:51`},mark:{"Attribution__elementStyles.mark":`Attribution__elementStyles.mark`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"color-kMwMTN":`x9irweu`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-mark']_color-kEC4n1":`x1perupi`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:60`},wordmark:{"Attribution__elementStyles.wordmark":`Attribution__elementStyles.wordmark`,"fontSize-kGuDYH":`x1oae1zf`,"fontWeight-k63SB2":`x1qvi77d`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"lineHeight-kLWn49":`x1d3mw78`,"color-kMwMTN":`x1nxg1fm`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_color-kKiZkk":`x19k0ldo`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_textDecoration-k7BEHM":`x1l0eogd`,":is(a:hover, a:focus-visible) [data-stridge-slot~='attribution-wordmark']_textUnderlineOffset-kHPfEo":`x1diuls0`,$$css:`@stridge/kit:src/shared/attribution/Attribution.styles.ts:68`}};export{t as elementStyles,e as styles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Attribution.slots.js";import"./Attribution.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={appId:`ii7w0vsj`};export{e as BRAND_INTERCOM};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{create as e}from"./QrCode.js";import*as t from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";const a=e=>Math.max(0,Math.min(1,e));function o(e){let{arena:t,...n}=e;return i(o.Root,{...n,children:[r(o.Finder,{}),r(o.Cells,{}),t&&r(o.Arena,{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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitConfig as e}from"../../scope/context.js";import{useIsInsideDialogContent as t}from"../ui/Dialog/Dialog.js";import"../ui/Dialog/index.js";import{
|
|
1
|
+
"use client";import{useKitConfig as e}from"../../scope/context.js";import{useIsInsideDialogContent as t}from"../ui/Dialog/Dialog.js";import"../ui/Dialog/index.js";import{Attribution as n}from"../attribution/Attribution.js";import"../attribution/index.js";import{Card as r}from"../ui/Card/Card.js";import"../../ui/index.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({className:o,style:s,dir:c,children:l,...u}){let d=t(),{direction:f,attribution:p}=e(),m=c??f,h=p!==`hidden`;if(d){let e={className:`Frame__styles.bare x78zum5 xdt5ytf xkz0k9k x2lwn1j x7giv3`,"data-style-src":`@stridge/kit:src/shared/dialog/Frame.tsx:33`};return a(`div`,{...u,dir:m,className:[e.className,o].filter(Boolean).join(` `)||void 0,style:{...e.style,...s},children:[l,h?i(n,{}):null]})}return a(r,{variant:`frame`,dir:m,className:o,style:s,...u,children:[l,h?i(n,{}):null]})}export{o as Frame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,motion as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
|
|
1
|
+
"use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,motion as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t||document.visibilityState===`hidden`)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),g.current!==null&&(window.clearTimeout(g.current),g.current=null);let e=u.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)}},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* public `@stridge/kit/<flow>/driver` surface.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* On-chain transaction reference.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* On-chain transaction reference. The deposit driver returns one from `submitDeposit`; the
|
|
10
|
+
* withdraw flow's host-supplied `onSubmit` surfaces one via `actions.beginProcessing({ hash })`
|
|
11
|
+
* or `actions.setTxHash`. The orchestrator stamps it on the FSM's `tx` slot until the matching
|
|
12
|
+
* settlement entity catches up and exposes a richer `txHash` / `txExplorerUrl` pair.
|
|
12
13
|
*/
|
|
13
14
|
interface TxRef {
|
|
14
15
|
hash: string;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* @example
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
|
-
* shortenAddress("
|
|
15
|
-
* // → "0x…
|
|
14
|
+
* shortenAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266");
|
|
15
|
+
* // → "0x…2266"
|
|
16
16
|
*
|
|
17
17
|
* shortenAddress("0xa15b11eb774cfac27b369f3d1908b0d1d8aa48b893d7a1e89612d8438920650f");
|
|
18
18
|
* // → "0x…650f"
|