@funkit/connect 1.1.1 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 891ab59: fix: conditional targetAssetTicker
8
+ - e5e0262: refactor: tx summary payment route field
9
+ - f765c12: feat: On checkout show chain information as seperate line items
10
+ - 17e31e8: feat: standardized truncation for account names
11
+
3
12
  ## 1.1.1
4
13
 
5
14
  ### Patch Changes
@@ -49,7 +49,7 @@ export declare const Box: React.ForwardRefExoticComponent<{
49
49
  readonly gap?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
50
50
  readonly height?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
51
51
  readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
52
- readonly textAlign?: "inherit" | "left" | "center" | undefined;
52
+ readonly textAlign?: "inherit" | "left" | "right" | "center" | undefined;
53
53
  readonly marginBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
54
54
  readonly marginLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
55
55
  readonly marginRight?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Formats users' account name for display
3
+ * - If the account name is shorter than 15 characters, it will be displayed as is
4
+ * - If the account name is longer than 15 characters, it will be shortened to 12 characters + 3 ellipsis
5
+ * - Additionally, If it is an email, the suffix will be removed
6
+ *
7
+ * Examples:
8
+ * - `chloe@fun.xyz` -> `chloe@fun.xyz`
9
+ * - `longname@outlook.com` -> `longname`
10
+ * - `supersuperlongname@gmail.com` -> `supersuperlo...`
11
+ * - `@chloefunxyz` -> `@chloefunxyz`
12
+ * - `@chloefunxyzlongtwittername` -> `@chloefunxyz...`
13
+ */
14
+ export declare function formatAccountName(accountName: string, isEmail: boolean): string;
@@ -1,6 +1,4 @@
1
- import './FunTransactionSummary.css';
2
- import React, { ReactNode } from 'react';
3
- import { PaymentMethod } from '../../consts/payment';
1
+ import React from 'react';
4
2
  export type FeesItem = null | {
5
3
  totalUsd: string | number | null;
6
4
  transactionFeesUsd: string | number | null;
@@ -10,16 +8,7 @@ export type FeesItem = null | {
10
8
  platformFeesTokenAmount?: string | number | null;
11
9
  platformFeesTokenSymbol?: string | null;
12
10
  };
13
- export declare function FunTransactionSummary({ estFees, estTime, isLoading, hasTotal, total, hasPaymentToken, symbol, paymentTokenString, suffixComponent, errorMessage, paymentMethod, }: {
14
- estFees: FeesItem;
15
- estTime: string | number | null;
16
- isLoading?: boolean;
17
- hasTotal?: boolean;
18
- hasPaymentToken?: boolean;
19
- symbol?: string | null;
20
- paymentTokenString?: string;
21
- total?: string | number | null;
22
- suffixComponent?: ReactNode;
11
+ export declare function FunTransactionSummary({ checkoutId, errorMessage, }: {
12
+ checkoutId: string | null;
23
13
  errorMessage?: string;
24
- paymentMethod: PaymentMethod;
25
14
  }): React.JSX.Element;
@@ -1,8 +1,18 @@
1
- import React from 'react';
1
+ import './FunTxSummaryComponents.css';
2
+ import React, { ReactNode } from 'react';
2
3
  export declare function FunTxSummaryBox({ children }: {
3
4
  children: any;
4
5
  }): React.JSX.Element;
5
6
  export declare function FunTxSummaryLineItem({ children, ...otherProps }: any): React.JSX.Element;
7
+ export declare function FunTxSummaryLineItemCollapsibleTrigger({ children, isDisabled, onClick, }: {
8
+ children: ReactNode;
9
+ isDisabled: boolean;
10
+ onClick: () => void;
11
+ }): React.JSX.Element;
12
+ export declare function FunTxSummaryCollapsibleBox({ isExpanded, children, }: {
13
+ isExpanded: boolean;
14
+ children: ReactNode;
15
+ }): React.JSX.Element;
6
16
  export declare function FunTxSummaryLineItemKeyText({ text }: {
7
17
  text: string;
8
18
  }): React.JSX.Element;
@@ -1,5 +1,3 @@
1
1
  import React from 'react';
2
2
  export declare const FunDownArrow: () => React.JSX.Element;
3
3
  export declare const FunUpArrow: () => React.JSX.Element;
4
- export declare const FunNarrowRightArrow: () => React.JSX.Element;
5
- export declare const FunNarrowDownArrow: () => React.JSX.Element;
@@ -13,6 +13,7 @@ export interface FunkitUserInfo {
13
13
  userId: string | null;
14
14
  accountLabel: string;
15
15
  accountName: string;
16
+ accountNameDisplay: string;
16
17
  accountPicSrc: string;
17
18
  }
18
19
  export interface FinalFunkitUserInfo extends FunkitUserInfo {
@@ -318,7 +318,7 @@ export declare const mapResponsiveValue: <OutputValue extends string | number |
318
318
  };
319
319
  };
320
320
  };
321
- }, string | number | boolean>>(value: Value, fn: (inputValue: Value extends import("@vanilla-extract/sprinkles").ResponsiveArray<1, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2 | 4, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2 | 5 | 4, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2 | 5 | 4 | 6, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2 | 5 | 4 | 6 | 7, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2 | 5 | 4 | 6 | 7 | 8, string | number | boolean | null> ? NonNullable<Value[number]> : Value extends Partial<Record<string, string | number | boolean>> ? NonNullable<Value[keyof Value]> : Value, key: "smallScreen" | "largeScreen") => OutputValue) => Value extends string | number | boolean ? OutputValue : Partial<Record<"smallScreen" | "largeScreen", OutputValue>>;
321
+ }, string | number | boolean>>(value: Value, fn: (inputValue: Value extends import("@vanilla-extract/sprinkles").ResponsiveArray<1, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 2, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 4 | 2, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 4 | 2 | 5, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 4 | 2 | 5 | 6, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 4 | 2 | 5 | 6 | 7, string | number | boolean | null> | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 3 | 4 | 2 | 5 | 6 | 7 | 8, string | number | boolean | null> ? NonNullable<Value[number]> : Value extends Partial<Record<string, string | number | boolean>> ? NonNullable<Value[keyof Value]> : Value, key: "smallScreen" | "largeScreen") => OutputValue) => Value extends string | number | boolean ? OutputValue : Partial<Record<"smallScreen" | "largeScreen", OutputValue>>;
322
322
  export declare const normalizeResponsiveValue: <Value extends string | number | boolean>(value: import("@vanilla-extract/sprinkles").ConditionalValue<{
323
323
  conditions: {
324
324
  defaultCondition: "smallScreen";
@@ -432,7 +432,7 @@ export declare const sprinkles: ((props: {
432
432
  readonly gap?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
433
433
  readonly height?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
434
434
  readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
435
- readonly textAlign?: "inherit" | "left" | "center" | undefined;
435
+ readonly textAlign?: "inherit" | "left" | "right" | "center" | undefined;
436
436
  readonly marginBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
437
437
  readonly marginLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
438
438
  readonly marginRight?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;