@jolibox/ui 1.0.0 → 1.3.3-beta.1
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/assets/close.d.ts +1 -0
- package/dist/assets/coin.d.ts +3 -0
- package/dist/assets/correct.d.ts +1 -0
- package/dist/assets/error.d.ts +1 -0
- package/dist/assets/success.d.ts +1 -0
- package/dist/assets/tips.d.ts +8 -0
- package/dist/bridge/coin/components/charge-grid.d.ts +15 -0
- package/dist/bridge/coin/components/coin-status.d.ts +22 -0
- package/dist/bridge/coin/components/fixed-image.d.ts +11 -0
- package/dist/bridge/coin/components/index.d.ts +45 -0
- package/dist/bridge/coin/components/toggle.d.ts +4 -0
- package/dist/bridge/coin/components/unlogin-modal.d.ts +13 -0
- package/dist/bridge/coin/index.d.ts +73 -0
- package/dist/bridge/index.d.ts +1 -0
- package/dist/bridge/recommend/components/grid/index.d.ts +2 -1
- package/dist/bridge/recommend/index.d.ts +1 -1
- package/dist/bridge/report/index.d.ts +9 -0
- package/dist/components/create-loading.d.ts +18 -0
- package/dist/components/create-modal.d.ts +4 -2
- package/dist/components/create-toast.d.ts +18 -0
- package/dist/components/drawer/index.d.ts +2 -1
- package/dist/components/i18n/index.d.ts +8 -0
- package/dist/components/pattern-processer/index.d.ts +20 -0
- package/dist/components/pattern-processer/patterns/coin.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/correct.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/error.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/i18n-text.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/i18n-trans.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/index.d.ts +2 -0
- package/dist/components/pattern-processer/patterns/mark.d.ts +1 -0
- package/dist/components/pattern-processer/patterns/success.d.ts +1 -0
- package/dist/components/utils/detect-language.d.ts +10 -0
- package/dist/components/utils/singleton-iframe.d.ts +21 -0
- package/dist/hooks/useOrientation.d.ts +7 -0
- package/dist/hooks/useTransition.d.ts +5 -0
- package/dist/index.cjs.js +566 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +4791 -980
- package/dist/index.es.js.map +1 -1
- package/dist/lib/i18n/i18n-context.d.ts +7 -0
- package/dist/lib/i18n/i18n-provider.d.ts +8 -0
- package/dist/lib/i18n/index.d.ts +1034 -0
- package/package.json +15 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Close: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const defaultCoinImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAC+lBMVEUAAABQTlBrQeL6+vufkPrEp/RcV2Pv6e23t7ehnqZVSIOZmaDy6vWRfPWDdvq6neHc29e5trzh4+DHyM2BUeHMteDIp+G2pd50SZV/aqmQkI1jWGyeYLz4+vTMh96RS8Lh2+XIwuGek6NEJn9RSF9QO8fBr+Xl1e2gh7e8e8FvUN1jO8dtbdDIzrr4zPzzxfv2yfrotPyzg/usgPrtufzBjfzyw/vjrvv80vy2hvv7z/zUnvvMl/zyv/vGkfuwgfn+9f7z1/7ep/z53Prtu/fvvf29keD///3u0vzkqfz91vv56vnorf27ifnbu/L54/3ttP3+7/zvt/q8jO+1gOzny/66gv757/zZovyjfvvy5Pr61vqjc/XlvfB0Ru+YZu68f+3+4P/+5/7bnvy6ePvgovr20fnQmvfq0/bImvafaPWDW/XNr/N7ZPPjxPHSj/DLl+7Lnu13WN9WMqHJqf/96/74x/3UtPutefjxy/Ttw/TZqe+re+/Ike2PYeStfd2NWsSVb77Ghv3+2vy8jfvcxfrntPTGhvKkbe7Qo+zSsuqdZdushdq4idl1S7zSmv3ssPvz2Pbu1fGvivCLYu2gdOuWcuqVY9KAVsXyuP7v3v3syP3bvf3Xkv2+oPy7mvzto/vnlvjgsfS7nvPEf/KSU/LbxO9xVu/Vne69l+6FWuyObuvbs+h9TO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dtCCMLlQSwdlZTQ7Ub9emhjYlCMGIAYs2fQ8wmhsPbP2tjpo/lzTMluQod7C3Ry2fadXWQ1ds28SlDe32PSgtVWcZ1HHm2sCVOZDAjd8CzdoK9GHuyYnruq+BjDTnewb+GatRWuzOLfqbCzviwEp6g6vIGFebAR3lY5n0DiAE5jpVlrRb19NRHPzmXq7qna2Hc8kxYaf8omOSM6ZF8H1Wel7TDJlJvANTJ8N2y3EDbuyjcJdQT4tuae2bj21s2UVVxIhWRuUA+Wp21oPAt/pxeirra7X1D8/Y+QJIxK9QLhS9bZtYbk5Pj52YJ5v2ICZ/NMBUdQnm9Eu1GgPWRjPWlXkNTRESDintmo0ErugVTpfPifJv9cvR5zrpgbXZGJ0VXIcr8loNJ4hEuPq6n24c1ddzPUtWm+F+TkP7eqCla+2OLntaKUUfFn9fCRhiV7RXqsuJtR09cs28v70SzAttOtJeoCosTHenUkrLCuJ9rpUxq65Ftds0XUY8Ed6OIYcf3g8DsfqfSxToYCX1zU86Luh4rGxb0/gb3SXUS3fvn/47uTJk9c+XOt66EbXGt+uI4B/0Ws8icWqPn58wwar7Lwa3qHZPYH/Yj1ywLCh/aZOmDBg5GTgNz4D2CYAK8x+JcUAAAAASUVORK5CYII=";
|
|
2
|
+
export declare const defaultCoinUrl = "https://fe-oss.jolibox.com/static/coin/jolicoin.png";
|
|
3
|
+
export declare const defaultGemImage = "https://fe-oss.jolibox.com/static/coin/gem.png";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultCorrectImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAwCAYAAAC4wJK5AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMYSURBVHgB7ZfPi1JRFMfvjNO22VbQZlrVbpr+AIPqDxgYiJjVLGYimPUsZpHrFkIuQmoTriLElYggKhGRIgniwoUkSiphimaZv5+dc7jXOZg2My9tnnC/8PA933n3ns+955x7rxB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xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentChildren, h } from 'preact';
|
|
2
|
+
export declare const Triangle: ({ style }: {
|
|
3
|
+
style?: preact.JSX.CSSProperties;
|
|
4
|
+
}) => h.JSX.Element;
|
|
5
|
+
export declare function TipsBubble({ children, style }: {
|
|
6
|
+
children: ComponentChildren;
|
|
7
|
+
style?: preact.JSX.CSSProperties;
|
|
8
|
+
}): h.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface RechargeOption {
|
|
2
|
+
coins: number;
|
|
3
|
+
price: string;
|
|
4
|
+
id: string;
|
|
5
|
+
defaultSelected?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface RechargeGridProps {
|
|
8
|
+
options: RechargeOption[];
|
|
9
|
+
selectedId: string;
|
|
10
|
+
currency: 'JOLI_COIN' | 'JOLI_GEM';
|
|
11
|
+
onSelect?: (option: RechargeOption) => void;
|
|
12
|
+
coinImageSrc?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ChargeGrid: import("preact").FunctionComponent<RechargeGridProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface CoinInfoProps {
|
|
2
|
+
unlockNeedsAmount?: number;
|
|
3
|
+
balanceAmount?: number;
|
|
4
|
+
coinImage?: string;
|
|
5
|
+
formatter?: (amount: number) => string;
|
|
6
|
+
hideNeeds?: boolean;
|
|
7
|
+
hideBalance?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
currency?: 'JOLI_COIN' | 'JOLI_GEM';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param unlockNeedsAmount
|
|
14
|
+
* @param balanceAmount
|
|
15
|
+
* @param coinImage
|
|
16
|
+
* @param formatter
|
|
17
|
+
* @param hideNeeds
|
|
18
|
+
* @param hideBalance
|
|
19
|
+
* @param className
|
|
20
|
+
*/
|
|
21
|
+
export declare const CoinInfoDisplay: React.FC<CoinInfoProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
interface FixedImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
top?: number | string;
|
|
8
|
+
style?: preact.JSX.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function FixedImage({ src, alt, width, height, top, style }: FixedImageProps): h.JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IPaymentChoice } from '@/index';
|
|
2
|
+
interface CoinConfirmProps {
|
|
3
|
+
currency: 'JOLI_COIN' | 'JOLI_GEM';
|
|
4
|
+
unlockNeedsAmount: number;
|
|
5
|
+
balanceAmount: number;
|
|
6
|
+
defaultEnableAutoDeduct: boolean;
|
|
7
|
+
confirmButtonKey: string;
|
|
8
|
+
cancelButtonKey: string;
|
|
9
|
+
onConfirm: (enableAutoDeduct: boolean) => void;
|
|
10
|
+
onClose: (params: {
|
|
11
|
+
type?: 'CANCEL' | 'FAILED' | 'CONFIRM';
|
|
12
|
+
}) => void;
|
|
13
|
+
onEnableDeductChanged: (enableAutoDeduct: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const styles: {
|
|
16
|
+
modal: import("@emotion/react").SerializedStyles;
|
|
17
|
+
header: import("@emotion/react").SerializedStyles;
|
|
18
|
+
closeButton: import("@emotion/react").SerializedStyles;
|
|
19
|
+
content: import("@emotion/react").SerializedStyles;
|
|
20
|
+
title: import("@emotion/react").SerializedStyles;
|
|
21
|
+
autoDeductOption: import("@emotion/react").SerializedStyles;
|
|
22
|
+
buttonContainer: import("@emotion/react").SerializedStyles;
|
|
23
|
+
buttonFlex: import("@emotion/react").SerializedStyles;
|
|
24
|
+
confirmButton: import("@emotion/react").SerializedStyles;
|
|
25
|
+
cancelButton: import("@emotion/react").SerializedStyles;
|
|
26
|
+
bottomIndicator: import("@emotion/react").SerializedStyles;
|
|
27
|
+
};
|
|
28
|
+
export declare const CoinConfirmContent: React.FC<CoinConfirmProps>;
|
|
29
|
+
interface CoinPaymentProps {
|
|
30
|
+
currency: 'JOLI_COIN' | 'JOLI_GEM';
|
|
31
|
+
balanceAmount: number;
|
|
32
|
+
unlockNeedsAmount: number;
|
|
33
|
+
defaultEnableAutoDeduct: boolean;
|
|
34
|
+
paymentChoices: IPaymentChoice[];
|
|
35
|
+
onConfirm: (productId: string) => void;
|
|
36
|
+
onClose: (params: {
|
|
37
|
+
type?: 'CANCEL' | 'FAILED' | 'CONFIRM';
|
|
38
|
+
}) => void;
|
|
39
|
+
onEnableDeductChanged: (enalbed: boolean) => void;
|
|
40
|
+
confirmButtonKey: string;
|
|
41
|
+
cancelButtonKey: string;
|
|
42
|
+
onSelect: (productId: string) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const CoinPaymentContent: React.FC<CoinPaymentProps>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface CoinUnloginContentProps {
|
|
2
|
+
rewardType: 'JOLI_COIN' | 'ADS-JOLI_COIN' | 'JOLI_GEM' | 'ADS-JOLI_GEM';
|
|
3
|
+
currency: 'JOLI_COIN' | 'JOLI_GEM';
|
|
4
|
+
rewardValue: number;
|
|
5
|
+
confirmButtonKey: string;
|
|
6
|
+
cancelButtonKey: string;
|
|
7
|
+
onClose: (params: {
|
|
8
|
+
type?: 'CANCEL' | 'FAILED' | 'CONFIRM';
|
|
9
|
+
}) => void;
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const CoinUnloginContent: ({ currency, rewardType, rewardValue, confirmButtonKey, cancelButtonKey, onClose, onConfirm }: CoinUnloginContentProps) => import("preact").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export interface IJoliCoin {
|
|
2
|
+
balance: number;
|
|
3
|
+
enableAutoDeduct: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IGem {
|
|
6
|
+
balance: number;
|
|
7
|
+
enableAutoDeduct: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IPaymentChoice {
|
|
10
|
+
productId: string;
|
|
11
|
+
totalAmountStr: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
defaultSelected?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface IButton {
|
|
16
|
+
text: string;
|
|
17
|
+
onPress: (...args: any[]) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const createConfirmJolicoinModal: (params: {
|
|
20
|
+
data: {
|
|
21
|
+
userCurrency: IJoliCoin | IGem;
|
|
22
|
+
enableAutoDeduct: boolean;
|
|
23
|
+
quantity: number;
|
|
24
|
+
currency: "JOLI_COIN" | "JOLI_GEM";
|
|
25
|
+
};
|
|
26
|
+
buttons: {
|
|
27
|
+
confirm: IButton;
|
|
28
|
+
cancel: IButton;
|
|
29
|
+
onEnableDeductChanged: (enalbed: boolean) => void;
|
|
30
|
+
};
|
|
31
|
+
}) => {
|
|
32
|
+
show: () => void;
|
|
33
|
+
hide: () => void;
|
|
34
|
+
isOpen: () => boolean;
|
|
35
|
+
destroy: () => void;
|
|
36
|
+
};
|
|
37
|
+
export declare const createPaymentJolicoinModal: (params: {
|
|
38
|
+
data: {
|
|
39
|
+
userCurrency: IJoliCoin | IGem;
|
|
40
|
+
paymentChoices: IPaymentChoice[];
|
|
41
|
+
enableAutoDeduct: boolean;
|
|
42
|
+
quantity: number;
|
|
43
|
+
currency: "JOLI_COIN" | "JOLI_GEM";
|
|
44
|
+
};
|
|
45
|
+
buttons: {
|
|
46
|
+
confirm: IButton;
|
|
47
|
+
cancel: IButton;
|
|
48
|
+
onEnableDeductChanged: (enalbed: boolean) => void;
|
|
49
|
+
};
|
|
50
|
+
onSelect: (productId: string) => void;
|
|
51
|
+
}) => {
|
|
52
|
+
show: () => void;
|
|
53
|
+
hide: () => void;
|
|
54
|
+
isOpen: () => boolean;
|
|
55
|
+
destroy: () => void;
|
|
56
|
+
};
|
|
57
|
+
export declare const createUnloginJolicoinModal: (params: {
|
|
58
|
+
data: {
|
|
59
|
+
rewardType: "JOLI_COIN" | "ADS-JOLI_COIN" | "JOLI_GEM" | "ADS-JOLI_GEM";
|
|
60
|
+
rewardValue: number;
|
|
61
|
+
currency: "JOLI_COIN" | "JOLI_GEM";
|
|
62
|
+
};
|
|
63
|
+
buttons: {
|
|
64
|
+
confirm: IButton;
|
|
65
|
+
cancel: IButton;
|
|
66
|
+
};
|
|
67
|
+
}) => {
|
|
68
|
+
show: () => void;
|
|
69
|
+
hide: () => void;
|
|
70
|
+
isOpen: () => boolean;
|
|
71
|
+
destroy: () => void;
|
|
72
|
+
};
|
|
73
|
+
export {};
|
package/dist/bridge/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ interface IGameListProps extends PropsWithChildren {
|
|
|
6
6
|
layerName: string;
|
|
7
7
|
routeMode: 'REDIRECT' | 'NAVIGATE';
|
|
8
8
|
onGameClick?: (game: IGame) => void;
|
|
9
|
+
orientation: 'portrait' | 'landscape';
|
|
9
10
|
}
|
|
10
|
-
export declare const GamesGrid: ({ list, routeMode, layerName, onGameClick, ...restProps }: IGameListProps) => h.JSX.Element;
|
|
11
|
+
export declare const GamesGrid: ({ list, routeMode, layerName, onGameClick, orientation, ...restProps }: IGameListProps) => h.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a loading manager instance that interacts with the singleton iframe.
|
|
3
|
+
* @returns An object with show, hide, and isLoading properties.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createLoading(): {
|
|
6
|
+
show: (options?: {
|
|
7
|
+
duration?: number;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
hide: () => void;
|
|
10
|
+
readonly isLoading: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const loadingManager: {
|
|
13
|
+
show: (options?: {
|
|
14
|
+
duration?: number;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
hide: () => void;
|
|
17
|
+
readonly isLoading: boolean;
|
|
18
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export type ModalPlacement = 'top' | 'end' | 'bottom' | 'start';
|
|
2
|
+
export type ModalPlacement = 'top' | 'end' | 'bottom' | 'start' | 'center';
|
|
3
3
|
export interface ModalOptions {
|
|
4
4
|
title: string;
|
|
5
5
|
content: h.JSX.Element | HTMLElement;
|
|
6
|
+
height?: number | string;
|
|
6
7
|
placement?: ModalPlacement;
|
|
7
8
|
noHeader?: boolean;
|
|
8
9
|
padding?: string;
|
|
9
10
|
onClose?: (...args: any[]) => void;
|
|
10
11
|
onOpen?: (...args: any[]) => void;
|
|
12
|
+
preventCloseOnBackdropClick?: boolean;
|
|
11
13
|
backdropColor?: string;
|
|
12
14
|
footerButtons?: Array<{
|
|
13
15
|
text: string;
|
|
@@ -17,7 +19,7 @@ export interface ModalOptions {
|
|
|
17
19
|
}) => void;
|
|
18
20
|
}>;
|
|
19
21
|
}
|
|
20
|
-
export declare const createModal: (options: ModalOptions) => {
|
|
22
|
+
export declare const createModal: (options: Omit<ModalOptions, "dynamicCss">) => {
|
|
21
23
|
show: () => void;
|
|
22
24
|
hide: () => void;
|
|
23
25
|
isOpen: () => boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IToastOptions {
|
|
2
|
+
type?: 'success' | 'error' | 'info' | 'warning';
|
|
3
|
+
duration?: number;
|
|
4
|
+
checkmarkImage?: string;
|
|
5
|
+
coinImage?: string;
|
|
6
|
+
gemImage?: string;
|
|
7
|
+
customStyle?: {
|
|
8
|
+
mark?: React.CSSProperties;
|
|
9
|
+
coin?: React.CSSProperties;
|
|
10
|
+
gem?: React.CSSProperties;
|
|
11
|
+
base?: React.CSSProperties;
|
|
12
|
+
correct?: React.CSSProperties;
|
|
13
|
+
span?: React.CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
i18nParams?: Record<string, string | number>;
|
|
16
|
+
position?: 'top' | 'center';
|
|
17
|
+
}
|
|
18
|
+
export declare const createToast: (pattern: string, options?: IToastOptions) => Promise<void>;
|
|
@@ -3,9 +3,10 @@ interface DrawerProps {
|
|
|
3
3
|
children: ComponentChildren;
|
|
4
4
|
isOpen?: boolean;
|
|
5
5
|
onClose?: () => void;
|
|
6
|
-
height?: string | number;
|
|
7
6
|
className?: string;
|
|
7
|
+
placement?: 'top' | 'end' | 'bottom' | 'start' | 'center';
|
|
8
8
|
backdropColor?: string;
|
|
9
|
+
preventCloseOnBackdropClick?: boolean;
|
|
9
10
|
}
|
|
10
11
|
interface DrawerRef {
|
|
11
12
|
show: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
interface TransProps {
|
|
3
|
+
children: string;
|
|
4
|
+
values?: Record<string, preact.ComponentChildren>;
|
|
5
|
+
style?: preact.JSX.CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
export declare function Trans({ children, values, style }: TransProps): h.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './patterns/mark';
|
|
2
|
+
import './patterns/coin';
|
|
3
|
+
import './patterns/i18n-text';
|
|
4
|
+
import './patterns/i18n-trans';
|
|
5
|
+
import './patterns/success';
|
|
6
|
+
import './patterns/error';
|
|
7
|
+
import './patterns/correct';
|
|
8
|
+
export declare const processPattern: (pattern: string, options?: {
|
|
9
|
+
coinImage?: string;
|
|
10
|
+
i18nParams?: Record<string, string | number>;
|
|
11
|
+
customStyle?: {
|
|
12
|
+
mark?: React.CSSProperties;
|
|
13
|
+
coin?: React.CSSProperties;
|
|
14
|
+
base?: React.CSSProperties;
|
|
15
|
+
correct?: React.CSSProperties;
|
|
16
|
+
span?: React.CSSProperties;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}) => string | preact.VNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* registerLanguageHandler is global function to register language handler.
|
|
3
|
+
* @param handler a function that returns the original language string.
|
|
4
|
+
*/
|
|
5
|
+
export declare const registerLanguageHandler: (handler: () => string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* getDetectedLanguage is global function to get detected and normalized language.
|
|
8
|
+
* @returns normalized language code (e.g. "en", "zh", "zh-Hant"), default to "en" if not registered or error occurs.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getDetectedLanguage: () => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import createCache from '@emotion/cache';
|
|
2
|
+
declare class SingletonIframeManager {
|
|
3
|
+
private zIndex;
|
|
4
|
+
private pointerEvents;
|
|
5
|
+
private persistentIframe;
|
|
6
|
+
iframeEmotionCache: ReturnType<typeof createCache> | null;
|
|
7
|
+
iframeLoadPromise: Promise<void> | null;
|
|
8
|
+
private iframeLoadResolver;
|
|
9
|
+
private removeGlobalTransformSync;
|
|
10
|
+
private referenceCount;
|
|
11
|
+
constructor(zIndex: number, pointerEvents: string);
|
|
12
|
+
private create;
|
|
13
|
+
acquire(): Promise<{
|
|
14
|
+
iframe: HTMLIFrameElement;
|
|
15
|
+
emotionCache: NonNullable<ReturnType<typeof createCache>>;
|
|
16
|
+
}>;
|
|
17
|
+
release(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const modalIframeManager: SingletonIframeManager;
|
|
20
|
+
export declare const toastIframeManager: SingletonIframeManager;
|
|
21
|
+
export {};
|