@stridge/kit 0.1.0-alpha.2 → 0.1.0-alpha.21
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/payloads.d.ts +10 -1
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.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 +15 -5
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
- package/dist/i18n/index.d.ts +5 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +12 -0
- package/dist/i18n/locales/source-keys.js +0 -0
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1 -1
- package/dist/package.js +1 -0
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +18 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +17 -1
- package/dist/scope/index.d.ts +1 -1
- package/dist/shared/attribution/Attribution.js +1 -0
- package/dist/shared/attribution/Attribution.slots.js +1 -0
- package/dist/shared/attribution/Attribution.styles.js +1 -0
- package/dist/shared/attribution/index.js +1 -0
- package/dist/shared/chains/index.d.ts +48 -1
- package/dist/shared/chains/index.js +1 -1
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/cuer/Cuer.js +1 -0
- package/dist/shared/cuer/QrCode.js +1 -0
- package/dist/shared/cuer/index.js +1 -0
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/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 +88 -4
- 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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IntercomMerchantContext } from "./useIntercomMerchantContext.js";
|
|
2
|
+
import { MouseEvent } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/support/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Configures the kit's in-dialog "Get help" entry point.
|
|
7
|
+
*
|
|
8
|
+
* Omit `support` to boot Stridge's hosted messenger on plain left-click and fall back to
|
|
9
|
+
* {@link https://stridge.com/contact-us | the support URL}. Provide `url`, `onOpen`, or both
|
|
10
|
+
* to use merchant-owned support; either field opts out of Stridge messenger globals. Empty
|
|
11
|
+
* values (`{}` or `{ url: "" }`) fall back to the Stridge default.
|
|
12
|
+
*
|
|
13
|
+
* Treated as static across the kit's lifetime. Switching the mode after mount (e.g. from
|
|
14
|
+
* Stridge to merchant-owned support) is not supported — the kit will not shut down an
|
|
15
|
+
* already-booted Stridge messenger or clear `window.intercomSettings` on the transition.
|
|
16
|
+
* Resolve support configuration before the first render of `<StridgeProvider>`.
|
|
17
|
+
*/
|
|
18
|
+
interface SupportConfig {
|
|
19
|
+
/**
|
|
20
|
+
* URL used as the "Get help" anchor `href`.
|
|
21
|
+
*
|
|
22
|
+
* Empty string is treated as if the field were omitted.
|
|
23
|
+
*/
|
|
24
|
+
url?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Custom click handler invoked instead of the default Stridge messenger.
|
|
27
|
+
*
|
|
28
|
+
* Fires on plain left-click with the click event and the merchant/user triage metadata.
|
|
29
|
+
* Modified clicks keep anchor navigation when `url` is set.
|
|
30
|
+
*/
|
|
31
|
+
onOpen?: (ctx: SupportOpenContext) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Represents the argument passed to {@link SupportConfig.onOpen}.
|
|
35
|
+
*
|
|
36
|
+
* Combines the click event with the same triage metadata used by the Stridge messenger.
|
|
37
|
+
*/
|
|
38
|
+
interface SupportOpenContext extends IntercomMerchantContext {
|
|
39
|
+
/** React synthetic event for the click that triggered support. */
|
|
40
|
+
event: MouseEvent<HTMLElement>;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { SupportConfig, SupportOpenContext };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/shared/support/useIntercomMerchantContext.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Merchant, asset, and end-user triage metadata the kit attaches to support requests.
|
|
4
|
+
*
|
|
5
|
+
* Stridge's hosted messenger reads these fields via `window.intercomSettings` so support
|
|
6
|
+
* agents can route an incoming conversation without asking the user for context. Merchant-
|
|
7
|
+
* owned support entry points receive the same shape via
|
|
8
|
+
* {@link SupportOpenContext}, so triage data carries through verbatim into custom handlers.
|
|
9
|
+
*/
|
|
10
|
+
interface IntercomMerchantContext {
|
|
11
|
+
/** Stridge gateway key — primary key uniquely identifying which integrating business the user is coming through. */
|
|
12
|
+
gatewayKey: string;
|
|
13
|
+
/** Stridge API environment the kit is talking to. Goes alongside the gateway key for support triage. */
|
|
14
|
+
environment: string;
|
|
15
|
+
/** Stridge `network_id` of the settlement asset (e.g. `"60"`, `"9006"`). */
|
|
16
|
+
assetChain: string;
|
|
17
|
+
/** Settlement asset symbol (e.g. `"USDC"`). */
|
|
18
|
+
assetSymbol: string;
|
|
19
|
+
/** Connected wallet address — best-effort end-user identifier in a web3 context. */
|
|
20
|
+
userAddress?: string;
|
|
21
|
+
/** Merchant display name resolved from `gateway/start.metadata.brand_name`. Async; undefined pre-bootstrap. */
|
|
22
|
+
brandName?: string;
|
|
23
|
+
/** Optional secondary line from `gateway/start.metadata.checkout_item_title`. */
|
|
24
|
+
checkoutItemTitle?: string;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { IntercomMerchantContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{BRAND_INTERCOM as e}from"../constants/brand-intercom.js";import{useEffect as t}from"react";function n(n){let r=n?.gatewayKey,i=n?.environment,a=n?.assetChain,o=n?.assetSymbol,s=n?.userAddress,c=n?.brandName,l=n?.checkoutItemTitle;t(()=>{if(!r||!i||!a||!o||typeof window>`u`)return;let t=window.intercomSettings?.app_id;if(typeof t==`string`&&t!==e.appId)return;let n={company_id:r,environment:i,asset_chain:a,asset_symbol:o};c&&(n.name=c),l&&(n.checkout_item_title=l);let u={...window.intercomSettings,app_id:e.appId,hide_default_launcher:!0,company:n};if(s&&(u.user_id=s,u.wallet_address=s),window.intercomSettings=u,typeof window.Intercom==`function`)try{window.Intercom(`update`,u)}catch{}},[r,i,a,o,s,c,l])}export{n as useIntercomMerchantContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{shutdownIntercom as e}from"./intercom-loader.js";import{useEffect as t}from"react";function n(){t(()=>()=>{e()},[])}export{n as useIntercomShutdownOnUnmount};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useSyncExternalStore as e}from"react";function t({gatewayKey:t,environment:n,assetChain:r,assetSymbol:i,userAddress:a,depositDriver:o}){let s=e(e=>o?.subscribe(e)??(()=>{}),()=>{if(!o)return;let e=o.getSnapshot();if(e.brand.status===`ready`||e.brand.status===`stale`)return e.brand.payload.name},()=>void 0),c=e(e=>o?.subscribe(e)??(()=>{}),()=>{if(!o)return;let e=o.getSnapshot();if(e.brand.status===`ready`||e.brand.status===`stale`)return e.brand.payload.checkoutItemTitle},()=>void 0);return{gatewayKey:t,environment:n,assetChain:r,assetSymbol:i,...a?{userAddress:a}:{},...s?{brandName:s}:{},...c?{checkoutItemTitle:c}:{}}}export{t as useMerchantContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{isIntercomReady as e,openIntercom as t}from"./intercom-loader.js";import{BRAND_LINKS as n}from"../constants/brand-links.js";import{useCallback as r,useRef as i,useState as a}from"react";function o(){let[n,o]=a(()=>e()?`ready`:`idle`),c=i(!1);return{status:n,open:r(()=>{c.current||(c.current=!0,o(`loading`),t().then(()=>{c.current=!1,o(`ready`)},()=>{c.current=!1,s(),o(`error`)}))},[])}}function s(){typeof window>`u`||window.open(n.support,`_blank`,`noopener,noreferrer`)}export{o as useSupportTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={root:{"Card__styles.root":`Card__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"overflow-kVQacm":`x7giv3`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:4`}},t={default:{"Card__variantStyles.default":`Card__variantStyles.default`,"backgroundColor-kWkggS":`x12obg9s`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x5bw3pk`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:13`},subdued:{"Card__variantStyles.subdued":`Card__variantStyles.subdued`,"backgroundColor-kWkggS":`x407w7c`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x5bw3pk`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:18`},frame:{"Card__variantStyles.frame":`Card__variantStyles.frame`,"backgroundColor-kWkggS":`x3cgcfv`,"borderColor-kVAM5u":`x1aqcfi1`,"borderRadius-kaIpWk":`x1c2egtx`,"boxShadow-kGVxlE":`xa2vu2y`,"color-kMwMTN":`xzn0pkc`,"fontFamily-kMv6JI":`xlaww2m`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:23`}},n={root:{"Card__headerStyles.root":`Card__headerStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1hhzuzn`,"paddingInlineStart-kZCmMZ":`xz7312c`,"borderBottomWidth-kt9PQ7":`xso031l`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomColor-kL6WhQ":`x188r5k3`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:39`}},r={root:{"Card__footerStyles.root":`Card__footerStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"borderTopWidth-kEafiO":`x178xt8z`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopColor-kLZC3w":`x1wc9ssx`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:54`}},i={root:{"Card__bodyStyles.root":`Card__bodyStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:71`},scroll:{"Card__bodyStyles.scroll":`Card__bodyStyles.scroll`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:82`},scrollArea:{"Card__bodyStyles.scrollArea":`Card__bodyStyles.scrollArea`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:97`},scrollViewport:{"Card__bodyStyles.scrollViewport":`Card__bodyStyles.scrollViewport`,"flex-kUk6DE":`x845mor`,"minHeight-kAzted":`x2lwn1j`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"height-kZKoxP":`xt7dq6l`,"maxHeight-kskxy":`xmz0i5r`,"overflowX-kXHlph":`x6ikm8r`,"overflowY-kORKVm":`
|
|
1
|
+
const e={root:{"Card__styles.root":`Card__styles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"overflow-kVQacm":`x7giv3`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:4`}},t={default:{"Card__variantStyles.default":`Card__variantStyles.default`,"backgroundColor-kWkggS":`x12obg9s`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x5bw3pk`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:13`},subdued:{"Card__variantStyles.subdued":`Card__variantStyles.subdued`,"backgroundColor-kWkggS":`x407w7c`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x5bw3pk`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:18`},frame:{"Card__variantStyles.frame":`Card__variantStyles.frame`,"backgroundColor-kWkggS":`x3cgcfv`,"borderColor-kVAM5u":`x1aqcfi1`,"borderRadius-kaIpWk":`x1c2egtx`,"boxShadow-kGVxlE":`xa2vu2y`,"color-kMwMTN":`xzn0pkc`,"fontFamily-kMv6JI":`xlaww2m`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:23`}},n={root:{"Card__headerStyles.root":`Card__headerStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1hhzuzn`,"paddingInlineStart-kZCmMZ":`xz7312c`,"borderBottomWidth-kt9PQ7":`xso031l`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomColor-kL6WhQ":`x188r5k3`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:39`}},r={root:{"Card__footerStyles.root":`Card__footerStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"borderTopWidth-kEafiO":`x178xt8z`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopColor-kLZC3w":`x1wc9ssx`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:54`}},i={root:{"Card__bodyStyles.root":`Card__bodyStyles.root`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:71`},scroll:{"Card__bodyStyles.scroll":`Card__bodyStyles.scroll`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:82`},scrollArea:{"Card__bodyStyles.scrollArea":`Card__bodyStyles.scrollArea`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:97`},scrollViewport:{"Card__bodyStyles.scrollViewport":`Card__bodyStyles.scrollViewport`,"flex-kUk6DE":`x845mor`,"minHeight-kAzted":`x2lwn1j`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"height-kZKoxP":`xt7dq6l`,"maxHeight-kskxy":`xmz0i5r`,"overflowX-kXHlph":`x6ikm8r`,"overflowY-kORKVm":`x1odjw0f`,$$css:`@stridge/kit:src/shared/ui/Card/Card.styles.ts:103`}};export{i as bodyStyles,r as footerStyles,n as headerStyles,e as styles,t as variantStyles};
|
|
@@ -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.
|
|
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] محفظة (…
|
|
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`,"
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{KitPortalScope as t}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{KitPortalScope as t}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{joinClassNames as n}from"../../utils/joinClassNames.js";import{XIcon as r}from"../../icons/XIcon.js";import"../../../icons/index.js";import{mergeClassName as i}from"../../utils/mergeClassName.js";import{mergeStyle as a}from"../../utils/mergeStyle.js";import{IconButton as o}from"../IconButton/IconButton.js";import"../IconButton/index.js";import{ScrollArea as s}from"../ScrollArea/ScrollArea.js";import"../ScrollArea/index.js";import{DIALOG_SLOTS as c}from"./Dialog.slots.js";import{styles as l}from"./Dialog.styles.js";import{createContext as u,use as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";import{Dialog as h}from"@base-ui/react/dialog";const g=u(!1);function _(){return d(g)}function v(e){return f(h.Root,{"data-stridge-slot":c.root,...e})}function y(e){return f(h.Trigger,{"data-stridge-slot":c.trigger,...e})}function b(e){return f(h.Portal,{"data-stridge-slot":c.portal,...e})}function x(e){return f(h.Close,{"data-stridge-slot":c.close,...e})}function S({className:e,style:t,...n}){let r=m.props(l.overlay);return f(h.Backdrop,{"data-stridge-slot":c.overlay,...n,className:i(r.className,e),style:a(r.style,t)})}function C({children:e,className:n,style:r,container:o,...s}){let u=m.props(l.content);return f(b,{container:o??void 0,children:p(t,{children:[f(S,{}),f(h.Popup,{"data-stridge-slot":c.content,...s,className:i(u.className,n),style:a(u.style,r),children:f(g.Provider,{value:!0,children:e})})]})})}function w(){let t=_(),{_:n}=e();return t?f(h.Close,{"data-stridge-slot":c.close,render:f(o,{"aria-label":n({id:`yz7wBu`,message:`Close`}),...m.props(l.closeButton),children:f(r,{"aria-hidden":!0})})}):null}function T({className:e,style:t,...r}){let i=m.props(l.header);return f(`div`,{"data-stridge-slot":c.header,...r,className:n(i.className,e),style:{...i.style,...t}})}function E({className:e,style:t,children:r,...i}){let a=m.props(l.body),o=m.props(l.bodyScrollArea),u=m.props(l.bodyScrollViewport),d=m.props(l.bodyInner);return f(`div`,{"data-stridge-slot":c.body,className:a.className,style:a.style,children:p(s,{className:o.className,style:o.style,children:[f(s.Viewport,{...i,className:n(u.className,e),style:{...u.style,...t},children:f(`div`,{className:d.className,style:d.style,children:r})}),f(s.Scrollbar,{orientation:`vertical`,children:f(s.Thumb,{})})]})})}function D({className:e,style:t,...r}){let i=m.props(l.footer);return f(`div`,{"data-stridge-slot":c.footer,...r,className:n(i.className,e),style:{...i.style,...t}})}function O({className:e,style:t,...n}){let r=m.props(l.title);return f(h.Title,{"data-stridge-slot":c.title,...n,className:i(r.className,e),style:a(r.style,t)})}function k({className:e,style:t,...n}){let r=m.props(l.description);return f(h.Description,{"data-stridge-slot":c.description,...n,className:i(r.className,e),style:a(r.style,t)})}(function(e){e.Trigger=y,e.Close=x,e.CloseButton=w,e.Portal=b,e.Overlay=S,e.Content=C,e.Header=T,e.Body=E,e.Footer=D,e.Title=O,e.Description=k})(v||={});export{v as Dialog,_ as useIsInsideDialogContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={overlay:{"Dialog__styles.overlay":`Dialog__styles.overlay`,"position-kVAEAm":`xixxii4`,"inset-kpwlN0":`x10a8y8t`,"zIndex-kY2c9j":`xg4qres`,"backgroundColor-kWkggS":`xyxldge`,"[data-open]_animationName-k6MjMx":`x12nsbnh`,"[data-open]_animationDuration-kQT8Nr":`x1e1ssmj`,"[data-open]_animationTimingFunction-kGrMy9":`x1o9hdch`,"[data-open]_animationFillMode-kmxUqy":`x1je04mk`,"[data-closed]_animationName-khiDtg":`x5l6jkr`,"[data-closed]_animationDuration-kfqKPr":`x1ej03p1`,"[data-closed]_animationTimingFunction-kBIjI2":`x7w1vdx`,"[data-closed]_animationFillMode-kd5yZw":`x1i76y9b`,"@media (prefers-reduced-motion: reduce)_animationName-kjO2d4":`x1aquc0h`,"@media (prefers-reduced-motion: reduce)_animationDuration-kkDQuc":`x1u6grsq`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:26`},content:{"Dialog__styles.content":`Dialog__styles.content`,"position-kVAEAm":`xixxii4`,"inset-kpwlN0":`x10a8y8t`,"margin-kogj98":`x1bpp3o7`,"zIndex-kY2c9j":`x51lqrf`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"width-kzqmXN":`xh8yej3`,"height-kZKoxP":`xg7h5cd`,"maxWidth-ks0D6T":`xvq9yp0`,"maxHeight-kskxy":`x1q5actc`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1aqcfi1`,"borderRadius-kaIpWk":`x1c2egtx`,"backgroundColor-kWkggS":`x3cgcfv`,"color-kMwMTN":`xzn0pkc`,"boxShadow-kGVxlE":`xa2vu2y`,"fontFamily-kMv6JI":`xlaww2m`,"outline-kI3sdo":`x1a2a7pz`,"overflow-kVQacm":`x7giv3`,"
|
|
1
|
+
const e={overlay:{"Dialog__styles.overlay":`Dialog__styles.overlay`,"position-kVAEAm":`xixxii4`,"inset-kpwlN0":`x10a8y8t`,"zIndex-kY2c9j":`xg4qres`,"backgroundColor-kWkggS":`xyxldge`,"[data-open]_animationName-k6MjMx":`x12nsbnh`,"[data-open]_animationDuration-kQT8Nr":`x1e1ssmj`,"[data-open]_animationTimingFunction-kGrMy9":`x1o9hdch`,"[data-open]_animationFillMode-kmxUqy":`x1je04mk`,"[data-closed]_animationName-khiDtg":`x5l6jkr`,"[data-closed]_animationDuration-kfqKPr":`x1ej03p1`,"[data-closed]_animationTimingFunction-kBIjI2":`x7w1vdx`,"[data-closed]_animationFillMode-kd5yZw":`x1i76y9b`,"@media (prefers-reduced-motion: reduce)_animationName-kjO2d4":`x1aquc0h`,"@media (prefers-reduced-motion: reduce)_animationDuration-kkDQuc":`x1u6grsq`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:26`},content:{"Dialog__styles.content":`Dialog__styles.content`,"position-kVAEAm":`xixxii4`,"inset-kpwlN0":`x10a8y8t`,"margin-kogj98":`x1bpp3o7`,"zIndex-kY2c9j":`x51lqrf`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"width-kzqmXN":`xh8yej3`,"height-kZKoxP":`xg7h5cd`,"maxWidth-ks0D6T":`xvq9yp0`,"maxHeight-kskxy":`x1q5actc`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1aqcfi1`,"borderRadius-kaIpWk":`x1c2egtx`,"backgroundColor-kWkggS":`x3cgcfv`,"color-kMwMTN":`xzn0pkc`,"boxShadow-kGVxlE":`xa2vu2y`,"fontFamily-kMv6JI":`xlaww2m`,"outline-kI3sdo":`x1a2a7pz`,"overflow-kVQacm":`x7giv3`,"transformOrigin-k3nNDw":`x1g0ag68`,"[data-open]_animationName-k6MjMx":`x1lhd1x2`,"[data-open]_animationDuration-kQT8Nr":`x1e1ssmj`,"[data-open]_animationTimingFunction-kGrMy9":`x1o9hdch`,"[data-open]_animationFillMode-kmxUqy":`x1je04mk`,"[data-closed]_animationName-khiDtg":`x1t6nk59`,"[data-closed]_animationDuration-kfqKPr":`x1ej03p1`,"[data-closed]_animationTimingFunction-kBIjI2":`x7w1vdx`,"[data-closed]_animationFillMode-kd5yZw":`x1i76y9b`,"@media (prefers-reduced-motion: reduce)_animationName-kjO2d4":`x1aquc0h`,"@media (prefers-reduced-motion: reduce)_animationDuration-kkDQuc":`x1u6grsq`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:66`},closeButton:{"Dialog__styles.closeButton":`Dialog__styles.closeButton`,"marginInlineStart-keTefX":`xvc5jky`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:131`},header:{"Dialog__styles.header":`Dialog__styles.header`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1hhzuzn`,"paddingInlineStart-kZCmMZ":`xz7312c`,"borderBottomWidth-kt9PQ7":`xso031l`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomColor-kL6WhQ":`x188r5k3`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:139`},body:{"Dialog__styles.body":`Dialog__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:164`},bodyScrollArea:{"Dialog__styles.bodyScrollArea":`Dialog__styles.bodyScrollArea`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:177`},bodyScrollViewport:{"Dialog__styles.bodyScrollViewport":`Dialog__styles.bodyScrollViewport`,"flex-kUk6DE":`x845mor`,"minHeight-kAzted":`x2lwn1j`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"height-kZKoxP":`xt7dq6l`,"maxHeight-kskxy":`xmz0i5r`,"overflowX-kXHlph":`x6ikm8r`,"overflowY-kORKVm":`x1odjw0f`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:183`},bodyInner:{"Dialog__styles.bodyInner":`Dialog__styles.bodyInner`,"boxSizing-kB7OPa":`x9f619`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"minWidth-k7Eaqz":`xeuugli`,"paddingTop-kLKAdn":`x1h03h88`,"paddingBottom-kGO01o":`xfvigk`,"paddingInlineStart-kZCmMZ":`xz7312c`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:203`},footer:{"Dialog__styles.footer":`Dialog__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"borderTopWidth-kEafiO":`x178xt8z`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopColor-kLZC3w":`x1wc9ssx`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:218`},title:{"Dialog__styles.title":`Dialog__styles.title`,"marginTop-keoZOQ":`xdj266r`,"marginBottom-k1K539":`xat24cr`,"color-kMwMTN":`xzn0pkc`,"fontFamily-kMv6JI":`xlaww2m`,"fontSize-kGuDYH":`x126f79r`,"fontWeight-k63SB2":`x1qvi77d`,"lineHeight-kLWn49":`xfh9y1j`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:227`},description:{"Dialog__styles.description":`Dialog__styles.description`,"marginTop-keoZOQ":`xdj266r`,"marginBottom-k1K539":`xat24cr`,"color-kMwMTN":`xi96bwj`,"fontFamily-kMv6JI":`xlaww2m`,"fontSize-kGuDYH":`x14qa7mu`,"lineHeight-kLWn49":`x14vj8e1`,$$css:`@stridge/kit:src/shared/ui/Dialog/Dialog.styles.ts:236`}};export{e as styles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{styles as e}from"./ExternalLink.styles.js";import{joinClassNames as t}from"../../utils/joinClassNames.js";import{EXTERNAL_LINK_SLOTS as n}from"./ExternalLink.slots.js";import{toSafeHref as r}from"./toSafeHref.js";import{cloneElement as i,isValidElement as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({href:i,suffix:a,className:l,style:d,children:f,...p}){let m=r(i)??`#`,h=a!=null&&a!==!1,g=c.props(e.root),_=t(g.className,l),v=c.props(e.iconSlot,e.suffixSpacing);return s(`a`,{"data-stridge-slot":n.root,...p,href:m,target:`_blank`,rel:`noreferrer noopener`,className:_,style:{...g.style,...d},children:[f,h?o(`span`,{"data-icon":`inline-end`,...v,children:u(a)}):null]})}function u(t){if(!a(t))return t;let n=c.props(e.iconSvg);return i(t,{className:[t.props.className,n.className].filter(Boolean).join(` `),style:{...t.props.style,...n.style}})}export{l as ExternalLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{KitPortalScope as e}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{
|
|
1
|
+
"use client";import{KitPortalScope as e}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{joinClassNames as t}from"../../utils/joinClassNames.js";import{ChevronDownIcon as n}from"../../icons/ChevronDownIcon.js";import{ChevronUpIcon as r}from"../../icons/ChevronUpIcon.js";import"../../../icons/index.js";import{mergeClassName as i}from"../../utils/mergeClassName.js";import{mergeStyle as a}from"../../utils/mergeStyle.js";import{ScrollArea as o}from"../ScrollArea/ScrollArea.js";import"../ScrollArea/index.js";import{DEFAULT_SELECT_CONTEXT as s,SelectContext as c,useSelectContext as l}from"./Select.context.js";import{SELECT_SLOTS as u}from"./Select.slots.js";import{styles as d}from"./Select.styles.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";import{Select as h}from"@base-ui/react/select";function g({variant:e=s.variant,...t}){return f(c.Provider,{value:{variant:e},children:f(h.Root,{"data-stridge-slot":u.root,...t})})}function _(e){return f(h.Group,{"data-stridge-slot":u.group,...e})}function v({placeholder:e,className:t,style:n,...r}){let o=m.props(d.value),s=m.props(d.value,d.placeholder);return e?f(h.Value,{render:(c,{value:l})=>(Array.isArray(l)?l.length>0:l!=null)?f(h.Value,{"data-stridge-slot":u.value,...r,className:i(o.className,t),style:a(o.style,n)}):f(`span`,{"data-stridge-slot":u.value,...s,children:e}),...r}):f(h.Value,{"data-stridge-slot":u.value,...r,className:i(o.className,t),style:a(o.style,n)})}function y({children:e,className:t,style:r,...o}){let{variant:s}=l(),c=m.props(d.triggerBase,s===`tile`?d.triggerTile:d.triggerOutline),g=m.props(d.triggerContent),_=m.props(d.iconBase,s===`tile`?d.iconTile:d.iconOutline);return p(h.Trigger,{"data-stridge-slot":u.trigger,...o,className:i(c.className,t),style:a(c.style,r),children:[f(`span`,{...g,children:e}),f(h.Icon,{children:f(n,{"data-stridge-slot":u.icon,..._})})]})}function b({variant:e=s.variant,children:r,className:i,style:a,...o}){let c=m.props(d.triggerBase,e===`tile`?d.triggerTile:d.triggerOutline,d.triggerStatic),l=m.props(d.triggerContent),h=m.props(d.iconBase,e===`tile`?d.iconTile:d.iconOutline);return p(`div`,{"data-stridge-slot":u.staticTrigger,...o,className:t(c.className,i),style:{...c.style,...a},children:[f(`span`,{...l,children:r}),f(n,{"data-stridge-slot":u.icon,"aria-hidden":!0,...h})]})}function x(e){return f(h.Portal,{"data-stridge-slot":u.portal,...e})}function S(e){return f(h.Positioner,{"data-stridge-slot":u.positioner,...e,...m.props(d.positioner)})}function C({position:n=`popper`,side:r=`bottom`,align:s=`center`,sideOffset:c=4,scrollArrows:g=!0,className:_,style:v,children:y,...b}){let{variant:C}=l(),w=m.props(d.popupBase,C===`tile`?d.popupTile:d.popupOutline),T=m.props(d.popupScrollArea),E=m.props(d.popupViewport);return f(x,{children:f(e,{children:p(S,{align:s,alignItemWithTrigger:n===`item-aligned`,side:r,sideOffset:c,children:[g?f(O,{}):null,f(h.Popup,{"data-stridge-slot":u.content,...b,render:e=>{let{children:n,className:r,style:i,...a}=e;return p(o,{className:T.className,style:T.style,children:[f(o.Viewport,{...a,className:t(E.className,r),style:{...E.style,...i},children:n}),f(o.Scrollbar,{orientation:`vertical`,children:f(o.Thumb,{})})]})},className:i(w.className,_),style:a(w.style,v),children:y}),g?f(k,{}):null]})})})}function w({className:e,style:t,...n}){let r=m.props(d.label);return f(h.GroupLabel,{"data-stridge-slot":u.label,...n,className:i(r.className,e),style:a(r.style,t)})}function T({children:e,className:t,style:n,...r}){let{variant:o}=l(),s=m.props(d.itemBase,o===`tile`?d.itemTile:d.itemOutline),c=m.props(d.itemText);return f(h.Item,{"data-stridge-slot":u.item,...r,className:i(s.className,t),style:a(s.style,n),children:f(h.ItemText,{...c,children:e})})}function E({children:e,className:n,style:r,...i}){let{variant:a}=l(),o=m.props(d.itemBase,a===`tile`?d.itemTile:d.itemOutline,d.itemDisabled),s=m.props(d.itemText);return f(`div`,{role:`option`,"aria-disabled":`true`,"aria-selected":`false`,tabIndex:-1,"data-stridge-slot":u.item,"data-disabled":``,...i,className:t(o.className,n),style:{...o.style,...r},children:f(`span`,{...s,children:e})})}function D({className:e,style:t,...n}){let r=m.props(d.separator);return f(h.Separator,{"data-stridge-slot":u.separator,...n,className:i(r.className,e),style:a(r.style,t)})}function O({className:e,style:t,...n}){let o=m.props(d.scrollButton,d.scrollUpButton),s=m.props(d.scrollIcon);return f(h.ScrollUpArrow,{"data-stridge-slot":u.scrollUpButton,...n,className:i(o.className,e),style:a(o.style,t),children:f(r,{...s})})}function k({className:e,style:t,...r}){let o=m.props(d.scrollButton,d.scrollDownButton),s=m.props(d.scrollIcon);return f(h.ScrollDownArrow,{"data-stridge-slot":u.scrollDownButton,...r,className:i(o.className,e),style:a(o.style,t),children:f(n,{...s})})}(function(e){e.Group=_,e.Value=v,e.Trigger=y,e.StaticTrigger=b,e.Portal=x,e.Positioner=S,e.Content=C,e.Label=w,e.Item=T,e.DisabledItem=E,e.Separator=D,e.ScrollUpButton=O,e.ScrollDownButton=k})(g||={});export{g as Select};
|
|
@@ -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
|
-
* `
|
|
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{
|
|
1
|
+
"use client";import{toSafeHref as e}from"../ExternalLink/toSafeHref.js";import{ExternalLink as t}from"../ExternalLink/ExternalLink.js";import"../ExternalLink/index.js";import{ExternalLinkIcon as n}from"../../icons/ExternalLinkIcon.js";import"../../../icons/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=e(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(t,{dir:`ltr`,href:v,suffix:l(n,{"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 +1 @@
|
|
|
1
|
-
"use client";import{Trans as e}from"../../../../i18n/Trans.js";import"../../../../../i18n/index.js";import{
|
|
1
|
+
"use client";import{Trans as e}from"../../../../i18n/Trans.js";import"../../../../../i18n/index.js";import{BRAND_LINKS as t}from"../../../../constants/brand-links.js";import{ExternalLink as n}from"../../../../ui/ExternalLink/ExternalLink.js";import"../../../../ui/ExternalLink/index.js";import{InfoIcon as r}from"../../../../icons/InfoIcon.js";import"../../../../../icons/index.js";import{Alert as i}from"../../../../ui/Alert/Alert.js";import"../../../../../ui/index.js";import{CONFIRM_TRANSFER_SLOTS as a}from"../ConfirmTransfer.slots.js";import{styles as o}from"../ConfirmTransfer.styles.js";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";const l=s(e,{id:`kR8ayx`,message:`By clicking Confirm Deposit, you agree to our <0>terms</0>.`,components:{0:s(n,{href:t.terms,...c.props(o.disclaimerTermsLink)})}});function u({children:e=l}){return s(i,{"data-stridge-slot":a.disclaimer,variant:`default`,icon:s(r,{}),...c.props(o.section),children:e})}export{u as ConfirmTransferDisclaimer};
|
|
@@ -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:`
|
|
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{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/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{ExternalLinkIcon as r}from"../../../../icons/ExternalLinkIcon.js";import{InfoIcon as i}from"../../../../icons/InfoIcon.js";import"../../../../../icons/index.js";import{Alert as a}from"../../../../ui/Alert/Alert.js";import"../../../../ui/Alert/index.js";import{useErrorStateContext as o}from"../context.js";import{ERROR_STATE_SLOTS as s}from"../ErrorState.slots.js";import{styles as c}from"../ErrorState.styles.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=o(`ErrorState.HelpInfo`),{_:p}=e(),m=f.help;if(!m)return null;let h=t(m.url);return h?u(a,{"data-stridge-slot":s.helpInfo,variant:`primary`,icon:l(i,{}),...d.props(c.helpInfo),children:[m.message??p({id:`Dd7jP5`,message:`Experiencing problems?`}),` `,l(n,{href:h,suffix:l(r,{"aria-hidden":!0}),...d.props(c.helpInfoLink),children:m.ctaLabel??p({id:`AWtGgd`,message:`Get help`})})]}):null}export{f as ErrorStateHelpInfo};
|
|
@@ -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:`
|
|
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{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ExternalLink as t}from"../../../../ui/ExternalLink/ExternalLink.js";import"../../../../ui/ExternalLink/index.js";import{ExternalLinkIcon as n}from"../../../../icons/ExternalLinkIcon.js";import"../../../../../icons/index.js";import{Button as r}from"../../../../ui/Button/Button.js";import"../../../../ui/Button/index.js";import{text as i}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{useSuccessStateContext as a}from"../context.js";import{SUCCESS_STATE_SLOTS as o}from"../SuccessState.slots.js";import{styles as s}from"../SuccessState.styles.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";import*as u from"@stylexjs/stylex";function d({onDone:d,onClose:f,doneLabel:p,closeLabel:m}={}){let h=a(`SuccessState.Actions`),{_:g}=e(),_=d??h.onDone,v=f??h.onClose,y=typeof _==`function`,b=typeof v==`function`,x=p??h.doneLabel??g({id:`DPfwMq`,message:`Done`}),S=m??h.closeLabel??g({id:`yz7wBu`,message:`Close`});return l(`div`,{"data-stridge-slot":o.actions,...u.props(s.actions),children:[l(`div`,{...u.props(s.actionRow,b&&s.actionRowPair),children:[b?c(r,{size:`cta`,variant:`secondary`,onClick:v,...u.props(s.closeButton,s.doneButtonInteractive),children:c(i.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:S})}):null,c(r,{size:`cta`,onClick:y?_:void 0,...u.props(s.doneButton,y?s.doneButtonInteractive:s.doneButtonInert),children:c(i.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:x})})]}),h.explorer?c(t,{href:h.explorer.url,suffix:c(n,{"aria-hidden":!0}),...u.props(s.explorerLink),children:c(i.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:h.explorer.label??g({id:`Sjplg3`,message:`View on Explorer`})})}):null]})}export{d as SuccessStateActions};
|
|
@@ -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:`
|
|
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:`
|
|
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:`
|
|
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,6 +1,8 @@
|
|
|
1
|
+
import { ChainInput } from "../shared/chains/index.js";
|
|
1
2
|
import { KitI18nConfig } from "../shared/i18n/createKitI18n.js";
|
|
3
|
+
import { SupportConfig } from "../shared/support/types.js";
|
|
2
4
|
import { StridgeEnvironment } from "../drivers/stridge/types.js";
|
|
3
|
-
import {
|
|
5
|
+
import { Address } from "viem";
|
|
4
6
|
import { ReactNode } from "react";
|
|
5
7
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
8
|
|
|
@@ -21,9 +23,44 @@ interface StridgeAsset {
|
|
|
21
23
|
symbol: string;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Settlement destination for the deposit flow. The kit does not infer a destination from any
|
|
27
|
+
* connected wagmi wallet — businesses pass the treasury / settlement address where deposited
|
|
28
|
+
* funds should land.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* If the gateway-kit admin config has "Same-owner only" enabled (default), `address` must
|
|
32
|
+
* equal {@link StridgeDepositFlowConfig.owner | the deposit owner}. Turn the toggle off — and
|
|
33
|
+
* optionally pair it with a destination whitelist — to route funds to an address that differs
|
|
34
|
+
* from the owner.
|
|
35
|
+
*/
|
|
36
|
+
interface StridgeDepositDestination {
|
|
37
|
+
address: Address;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Stridge `gateway/start.owner` identifier for a single flow. Scopes UDA provisioning and the
|
|
41
|
+
* proactive `gateway/{owner}` settlement poll. The kit treats the address as opaque — businesses
|
|
42
|
+
* pick whatever per-customer (real EOA, derived per-user EOA) or shared (treasury) granularity
|
|
43
|
+
* fits their model.
|
|
44
|
+
*/
|
|
45
|
+
interface StridgeFlowOwner {
|
|
46
|
+
address: Address;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Per-flow deposit tuning.
|
|
25
50
|
*/
|
|
26
51
|
interface StridgeDepositFlowConfig {
|
|
52
|
+
/**
|
|
53
|
+
* Settlement destination address — where settled brand-currency funds land at completion.
|
|
54
|
+
* Required when the deposit flow is enabled.
|
|
55
|
+
*/
|
|
56
|
+
destination: StridgeDepositDestination;
|
|
57
|
+
/**
|
|
58
|
+
* Owner used as `gateway/start.owner` for deposit UDAs. Optional — falls back to the
|
|
59
|
+
* connected wagmi wallet address, then to `dev.userAddressOverride`. Set explicitly when
|
|
60
|
+
* the customer is identified by something other than their wagmi address (e.g. a derived
|
|
61
|
+
* per-user identifier, or a shared business owner that is not the wagmi-connected EOA).
|
|
62
|
+
*/
|
|
63
|
+
owner?: StridgeFlowOwner;
|
|
27
64
|
/**
|
|
28
65
|
* Low-balance / amount-entry USD floor. Defaults to the kit's internal default
|
|
29
66
|
* (`STRIDGE_DEFAULT_MIN_DEPOSIT_USD`) when omitted.
|
|
@@ -36,9 +73,15 @@ interface StridgeDepositFlowConfig {
|
|
|
36
73
|
metadata?: Record<string, unknown>;
|
|
37
74
|
}
|
|
38
75
|
/**
|
|
39
|
-
* Per-flow withdraw tuning.
|
|
76
|
+
* Per-flow withdraw tuning.
|
|
40
77
|
*/
|
|
41
78
|
interface StridgeWithdrawFlowConfig {
|
|
79
|
+
/**
|
|
80
|
+
* Owner used as `gateway/start.owner` for every withdraw UDA the flow provisions. Required —
|
|
81
|
+
* the withdraw flow has no wagmi fallback because the business (not the end-user) is the
|
|
82
|
+
* party broadcasting the source-chain tx to the UDA.
|
|
83
|
+
*/
|
|
84
|
+
owner: StridgeFlowOwner;
|
|
42
85
|
/**
|
|
43
86
|
* Metadata persisted on every UDA the withdraw flow provisions. Merged under the kit-set
|
|
44
87
|
* `kit_flow` / `kit_version` / `source` keys (kit keys win).
|
|
@@ -61,6 +104,32 @@ interface StridgeAppearance {
|
|
|
61
104
|
* (`"rtl"` for Arabic, Hebrew, Persian, Urdu) when omitted.
|
|
62
105
|
*/
|
|
63
106
|
direction?: "ltr" | "rtl";
|
|
107
|
+
/**
|
|
108
|
+
* Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
|
|
109
|
+
* `"visible"` (default) auto-mounts the brand row at the bottom of every step; `"hidden"`
|
|
110
|
+
* suppresses the auto-mount for white-label installs.
|
|
111
|
+
*/
|
|
112
|
+
attribution?: "visible" | "hidden";
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Development / preview-only knobs. Grouped under a single `dev` prop so production integrations
|
|
116
|
+
* never reach for these accidentally and `Cmd-F dev` finds every preview-only escape hatch in one
|
|
117
|
+
* place. Read-only paths under `dev.userAddressOverride` (gateway/start, balances, addresses,
|
|
118
|
+
* brand) work end-to-end; signing still requires a real wagmi connector.
|
|
119
|
+
*/
|
|
120
|
+
interface StridgeDevConfig {
|
|
121
|
+
/**
|
|
122
|
+
* Address-only override used when no wagmi account is connected. Lets demos, sample apps, and
|
|
123
|
+
* read-only previews bootstrap the kit (gateway/start, balances, deposit addresses, brand)
|
|
124
|
+
* against a pasted EOA without firing up a wallet. The wagmi-connected account always wins —
|
|
125
|
+
* the override only fills in when `useAccount()` returns no address.
|
|
126
|
+
*
|
|
127
|
+
* Signing still requires a real connector. The submit and broadcast paths call into
|
|
128
|
+
* `createWagmiSigner`, which surfaces a user-readable "Connect a wallet to sign and submit
|
|
129
|
+
* the deposit." error if it's invoked without an active connector. Read-only paths
|
|
130
|
+
* (balances, addresses, brand, quotes) work end-to-end under the override.
|
|
131
|
+
*/
|
|
132
|
+
userAddressOverride?: Address;
|
|
64
133
|
}
|
|
65
134
|
/**
|
|
66
135
|
* Persistence configuration for the kit's per-tab state (settlement banner acks, future
|
|
@@ -113,6 +182,19 @@ declare namespace StridgeProvider {
|
|
|
113
182
|
i18n?: KitI18nConfig;
|
|
114
183
|
/** Persistence configuration for kit-internal state. */
|
|
115
184
|
storage?: StridgeStorageConfig;
|
|
185
|
+
/**
|
|
186
|
+
* Development / preview-only knobs. Grouped under `dev` so production integrations never
|
|
187
|
+
* reach for them accidentally — every preview escape hatch surfaces with the same `dev.`
|
|
188
|
+
* prefix at the call site.
|
|
189
|
+
*/
|
|
190
|
+
dev?: StridgeDevConfig;
|
|
191
|
+
/**
|
|
192
|
+
* Customer-support entry point configuration.
|
|
193
|
+
*
|
|
194
|
+
* Omit to use Stridge Intercom. Provide `url`, `onOpen`, or both to use merchant-owned
|
|
195
|
+
* support and opt out of Stridge messenger globals.
|
|
196
|
+
*/
|
|
197
|
+
support?: SupportConfig;
|
|
116
198
|
/** Optional className applied to the kit's scope root `<div>`. */
|
|
117
199
|
className?: string;
|
|
118
200
|
children?: ReactNode;
|
|
@@ -151,8 +233,10 @@ declare function StridgeProvider({
|
|
|
151
233
|
appearance,
|
|
152
234
|
i18n,
|
|
153
235
|
storage,
|
|
236
|
+
dev,
|
|
237
|
+
support,
|
|
154
238
|
className,
|
|
155
239
|
children
|
|
156
240
|
}: StridgeProvider.Props): _$react_jsx_runtime0.JSX.Element;
|
|
157
241
|
//#endregion
|
|
158
|
-
export { StridgeAppearance, StridgeAsset, StridgeDepositFlowConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
|
|
242
|
+
export { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
|
|
@@ -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{
|
|
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{resolveSupport as o}from"../shared/support/resolveSupport.js";import{useIntercomMerchantContext as s}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as c}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useOptionalWagmi as l}from"./optionalWagmi.js";import{createStubDepositDriver as u,createStubWithdrawDriver as d}from"./stubs.js";import{useMemo as f,useRef as p,useSyncExternalStore as m}from"react";import{jsx as h}from"react/jsx-runtime";function g({gatewayKey:g,environment:_,asset:v,flows:y,appearance:b,i18n:x,storage:S,dev:C,support:w,className:T,children:E}){if(!y.deposit&&!y.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!v)throw Error("<StridgeProvider /> requires `asset: { chain, symbol }`.");let{config:D,address:O}=l(),k=f(()=>t(x??{}),[x?.locale,x?.messages]),A=p(k);A.current=k;let j=f(()=>e(v.chain),[v.chain]),M=v.symbol,N=y.deposit,P=y.withdraw,F=N?.owner?.address??O??C?.userAddressOverride,I=P?.owner.address,L=f(()=>{if(!(!N||!F))return r({userAddress:F,projectKey:g,destination:{network_id:j,asset_symbol:M,to_address:N.destination.address},wagmiConfig:D,getI18n:()=>A.current,..._?{environment:_}:{},...N.minDepositUsd===void 0?{}:{minDepositUsd:N.minDepositUsd},...N.metadata?{metadata:N.metadata}:{}})},[N,F,g,_,j,M,D]),R=f(()=>u(),[]),z=N?L??R:void 0,B=f(()=>{if(!(!P||!I))return i({userAddress:I,projectKey:g,currency:{networkId:j,assetSymbol:M},wagmiConfig:D,getI18n:()=>A.current,..._?{environment:_}:{},...P.metadata?{metadata:P.metadata}:{}})},[P,I,g,_,j,M,D]),V=f(()=>d(),[]),H=P?B??V:void 0,U=L??B,W=m(e=>U?.subscribe(e)??(()=>{}),()=>{if(L){let e=L.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return B?B.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1),G=F??I,K=c({gatewayKey:g,environment:_??`production`,assetChain:j,assetSymbol:M,...G?{userAddress:G}:{},...L?{depositDriver:L}:{}});return s(o(w).kind===`stridge`?K:null),h(n,{value:f(()=>({isReady:W,driver:L}),[W,L]),children:h(a,{theme:b?.theme,accent:b?.accent,radius:b?.radius,direction:b?.direction,attribution:b?.attribution,i18n:x,storage:S?.driver,storageNamespace:S?.namespace,className:T,support:w,merchantContext:K,...z?{deposit:z}:{},...H?{withdraw:H}:{},children:E})})}export{g as StridgeProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{use as e,useCallback as t,useSyncExternalStore as n}from"react";import{getAccount as r,watchAccount as i}from"wagmi/actions";import{WagmiContext as a}from"wagmi";function o(){let o=e(a);return{config:o,address:n(t(e=>o?i(o,{onChange:()=>e()}):()=>{},[o]),t(()=>{if(o)return r(o).address},[o]),()=>void 0)}}export{o as useOptionalWagmi};
|
package/dist/stridge/stubs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,requestQuote:(e,t)=>a(t),
|
|
1
|
+
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
|