@fluent.xyz/connect 0.2.1 → 0.2.2

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/dist/index.d.ts CHANGED
@@ -1241,6 +1241,12 @@ type FluentWidgetConfig = {
1241
1241
  gasPayment?: {
1242
1242
  ethValueByToken?: FluentGasPaymentEthRates;
1243
1243
  };
1244
+ /**
1245
+ * `false` drops the Reputation tab from the account drawer — and with it the
1246
+ * whole tab strip, since Home is then the only tab. The families request is
1247
+ * never made. Default `true`.
1248
+ */
1249
+ reputationEnabled?: boolean;
1244
1250
  scopes?: string[];
1245
1251
  source?: string;
1246
1252
  campaign?: string;
@@ -1259,6 +1265,19 @@ type FluentWidgetConfig = {
1259
1265
  */
1260
1266
  authTokenRenewalOffsetSeconds?: number;
1261
1267
  assets?: Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
1268
+ /** The account avatar shown on the connect button and in the account drawer. */
1269
+ avatar?: {
1270
+ /**
1271
+ * Image used when there is no X avatar to show — a URL or a data URI.
1272
+ * Defaults to the Fluent mark.
1273
+ */
1274
+ defaultLogoUrl?: string;
1275
+ /**
1276
+ * Always show `defaultLogoUrl`, even for users who signed in with X.
1277
+ * Default `false` (the X avatar wins when Privy has one).
1278
+ */
1279
+ forceDefault?: boolean;
1280
+ };
1262
1281
  };
1263
1282
  type ResolvedFluentWidgetConfig = {
1264
1283
  partnerId: string;
@@ -1285,10 +1304,15 @@ type ResolvedFluentWidgetConfig = {
1285
1304
  gasPayment: {
1286
1305
  ethValueByToken: FluentGasPaymentEthRates | undefined;
1287
1306
  };
1307
+ reputationEnabled: boolean;
1288
1308
  scopes: string[];
1289
1309
  source: string;
1290
1310
  campaign: string | undefined;
1291
1311
  assets: typeof FLUENT_CONNECT_DEFAULT_ASSETS & Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
1312
+ avatar: {
1313
+ defaultLogoUrl: string | undefined;
1314
+ forceDefault: boolean;
1315
+ };
1292
1316
  };
1293
1317
 
1294
1318
  declare function normalizeFluentWidgetNetwork(value: string | undefined): FluentWidgetNetwork | undefined;
@@ -1784,9 +1808,11 @@ type FluentWidgetConnectButtonProps = {
1784
1808
  onClick: () => void;
1785
1809
  className?: string;
1786
1810
  userLogoUrl?: string | null;
1811
+ /** Shown instead of the Fluent mark when there is no `userLogoUrl` — a URL or a data URI. */
1812
+ defaultLogoUrl?: string | null;
1787
1813
  };
1788
1814
  /** Default Fluent Connect / account button — place it anywhere in your layout. */
1789
- declare function FluentWidgetConnectButton({ connected, pending, addressLabel, onClick, className, userLogoUrl, }: FluentWidgetConnectButtonProps): React.JSX.Element;
1815
+ declare function FluentWidgetConnectButton({ connected, pending, addressLabel, onClick, className, userLogoUrl, defaultLogoUrl, }: FluentWidgetConnectButtonProps): React.JSX.Element;
1790
1816
 
1791
1817
  declare const FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY = "selfFunded=true";
1792
1818
  declare const FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT: "0x000000000000000000000000000000000000dEaD";
@@ -1954,6 +1980,8 @@ interface FluentAccountDrawerProps {
1954
1980
  disablePointerDismissal?: boolean;
1955
1981
  children: ReactNode;
1956
1982
  userLogoUrl?: string | null;
1983
+ /** Shown instead of the Fluent mark when there is no `userLogoUrl` — a URL or a data URI. */
1984
+ defaultLogoUrl?: string | null;
1957
1985
  }
1958
1986
  /**
1959
1987
  * The connected-account drawer shell: the connect-button trigger, the account
@@ -1961,7 +1989,7 @@ interface FluentAccountDrawerProps {
1961
1989
  * (`children`) for the wallet menu card. Rendered whenever the widget has a
1962
1990
  * connected account.
1963
1991
  */
1964
- declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
1992
+ declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
1965
1993
 
1966
1994
  /** Colour scheme and design tokens for the widget's own UI — never around host content. */
1967
1995
  declare const WIDGET_STYLE_SCOPE = "fluent-root dark contents text-foreground";
@@ -2043,4 +2071,18 @@ declare function Icon({ name, className, ...props }: {
2043
2071
  name: IconName;
2044
2072
  } & SVGProps<SVGSVGElement>): React.JSX.Element;
2045
2073
 
2046
- export { type AppDefinition, type BridgeAddresses, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FLUENT_CONNECT_DEFAULT_ASSETS, FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES, FLUENT_USER_TOKEN_LIMIT, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentAccountCapabilities, FluentAccountDrawer, type FluentAccountType, FluentAuthError, type FluentAuthErrorCode, type FluentBatchApi, type FluentBatchCallInput, type FluentBatchConfirmationMode, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationExecutor, type FluentBatchOperationInput, type FluentBatchOperationReview, type FluentCallPermission, type FluentChainDefinition, type FluentClient, type FluentClientConfig, type FluentEncodedBatchCall, type FluentExecuteResult, type FluentExternalWalletState, type FluentFamilies, type FluentFamiliesClient, type FluentFamiliesClientConfig, type FluentFamily, type FluentFamilyTier, type FluentFamilyType, type FluentGasPayment, type FluentGasPaymentEthRates, type FluentGasPaymentSelection, type FluentGasPaymentValueTier, type FluentGasTokenSymbol, type FluentPermissionApi, type FluentPermissionArgConstraint, type FluentPermissionArgs, type FluentPermissionBatchPolicy, type FluentPermissionBatchPolicyInput, type FluentPermissionCallInput, type FluentPermissionCallPolicy, type FluentPermissionClient, type FluentPermissionClientConfig, type FluentPermissionGrant, type FluentPermissionGrantRequest, type FluentPermissionPolicy, type FluentPermissionPolicyBuilders, type FluentPermissionPreview, type FluentPermissionSession, type FluentPermissionSessionExecutor, type FluentPermissionSessionInput, type FluentPermissionStatus, FluentPortalContainerProvider, type FluentSession, type FluentSpendPeriod, type FluentSpendPermission, type FluentSponsorshipReason, type FluentTokenBalance, type FluentTokenDefinition, type FluentUserTokenAddResult, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMode, type FluentWidgetConfig, FluentWidgetConnectButton, type FluentWidgetConnectButtonProps, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetNetwork, FluentWidgetNetworkProvider, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenInfo, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, Icon, type IconName, type L1ChainDefinition, Label, type ResolvedFluentWidgetConfig, Separator, type UserTokenStore, WIDGET_STYLE_SCOPE, WalletMenuActionCard, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentSponsorshipRpcUrl, createFluentUserTokenStore, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, createFluentZeroDevSponsoredPaymaster, findFluentSymbolCollisions, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentTestnet, fluentTestnetTokenDefaults, fluentTokenIdentity, fluentZeroDevChainIds, getApp, getContractAddressFromChain, getFluentChain, getFluentChainByChainId, getFluentChainForNetwork, getFluentDefaultWidgetDisplayTokens, getFluentDefaultWidgetGasTokens, getFluentExplorerBaseUrl, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, getFluentGasTokenAddress, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentDefaultToken, isFluentNativeToken, isFluentZeroDevChain, l1DefinitionToViemChain, mergeFluentDisplayTokens, normalizeFluentWidgetNetwork, readFluentTokenBalances, readFluentTokenMetadata, registryVersion, resolveBridgeAddresses, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, sortFluentGasTokens, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget };
2074
+ type AccountAvatarProps = {
2075
+ /** The signed-in user's X avatar, when Privy has one. Wins over `defaultLogoUrl`. */
2076
+ userLogoUrl?: string | null;
2077
+ /** Host-supplied stand-in for the Fluent mark — a URL or a data URI. */
2078
+ defaultLogoUrl?: string | null;
2079
+ className?: string;
2080
+ };
2081
+ /**
2082
+ * The 32px account tile's contents: X avatar, else the host's default logo, else
2083
+ * the Fluent mark. A logo that fails to load falls through to the next option
2084
+ * rather than leaving a broken image in the button.
2085
+ */
2086
+ declare function AccountAvatar({ userLogoUrl, defaultLogoUrl, className }: AccountAvatarProps): React.JSX.Element;
2087
+
2088
+ export { AccountAvatar, type AccountAvatarProps, type AppDefinition, type BridgeAddresses, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FLUENT_CONNECT_DEFAULT_ASSETS, FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES, FLUENT_USER_TOKEN_LIMIT, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentAccountCapabilities, FluentAccountDrawer, type FluentAccountType, FluentAuthError, type FluentAuthErrorCode, type FluentBatchApi, type FluentBatchCallInput, type FluentBatchConfirmationMode, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationExecutor, type FluentBatchOperationInput, type FluentBatchOperationReview, type FluentCallPermission, type FluentChainDefinition, type FluentClient, type FluentClientConfig, type FluentEncodedBatchCall, type FluentExecuteResult, type FluentExternalWalletState, type FluentFamilies, type FluentFamiliesClient, type FluentFamiliesClientConfig, type FluentFamily, type FluentFamilyTier, type FluentFamilyType, type FluentGasPayment, type FluentGasPaymentEthRates, type FluentGasPaymentSelection, type FluentGasPaymentValueTier, type FluentGasTokenSymbol, type FluentPermissionApi, type FluentPermissionArgConstraint, type FluentPermissionArgs, type FluentPermissionBatchPolicy, type FluentPermissionBatchPolicyInput, type FluentPermissionCallInput, type FluentPermissionCallPolicy, type FluentPermissionClient, type FluentPermissionClientConfig, type FluentPermissionGrant, type FluentPermissionGrantRequest, type FluentPermissionPolicy, type FluentPermissionPolicyBuilders, type FluentPermissionPreview, type FluentPermissionSession, type FluentPermissionSessionExecutor, type FluentPermissionSessionInput, type FluentPermissionStatus, FluentPortalContainerProvider, type FluentSession, type FluentSpendPeriod, type FluentSpendPermission, type FluentSponsorshipReason, type FluentTokenBalance, type FluentTokenDefinition, type FluentUserTokenAddResult, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMode, type FluentWidgetConfig, FluentWidgetConnectButton, type FluentWidgetConnectButtonProps, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetNetwork, FluentWidgetNetworkProvider, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenInfo, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, Icon, type IconName, type L1ChainDefinition, Label, type ResolvedFluentWidgetConfig, Separator, type UserTokenStore, WIDGET_STYLE_SCOPE, WalletMenuActionCard, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentSponsorshipRpcUrl, createFluentUserTokenStore, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, createFluentZeroDevSponsoredPaymaster, findFluentSymbolCollisions, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentTestnet, fluentTestnetTokenDefaults, fluentTokenIdentity, fluentZeroDevChainIds, getApp, getContractAddressFromChain, getFluentChain, getFluentChainByChainId, getFluentChainForNetwork, getFluentDefaultWidgetDisplayTokens, getFluentDefaultWidgetGasTokens, getFluentExplorerBaseUrl, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, getFluentGasTokenAddress, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentDefaultToken, isFluentNativeToken, isFluentZeroDevChain, l1DefinitionToViemChain, mergeFluentDisplayTokens, normalizeFluentWidgetNetwork, readFluentTokenBalances, readFluentTokenMetadata, registryVersion, resolveBridgeAddresses, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, sortFluentGasTokens, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget };