@avail-project/widgets 0.0.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/README.md +34 -0
- package/dist/common/components/ErrorBoundary.d.ts +44 -0
- package/dist/common/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/common/components/ErrorBoundary.js +65 -0
- package/dist/common/hooks/useDebouncedCallback.d.ts +13 -0
- package/dist/common/hooks/useDebouncedCallback.d.ts.map +1 -0
- package/dist/common/hooks/useDebouncedCallback.js +42 -0
- package/dist/common/hooks/useDebouncedValue.d.ts +5 -0
- package/dist/common/hooks/useDebouncedValue.d.ts.map +1 -0
- package/dist/common/hooks/useDebouncedValue.js +15 -0
- package/dist/common/hooks/useInterval.d.ts +11 -0
- package/dist/common/hooks/useInterval.d.ts.map +1 -0
- package/dist/common/hooks/useInterval.js +25 -0
- package/dist/common/hooks/useLatest.d.ts +12 -0
- package/dist/common/hooks/useLatest.d.ts.map +1 -0
- package/dist/common/hooks/useLatest.js +19 -0
- package/dist/common/hooks/useNexusError.d.ts +20 -0
- package/dist/common/hooks/useNexusError.d.ts.map +1 -0
- package/dist/common/hooks/useNexusError.js +120 -0
- package/dist/common/hooks/usePolling.d.ts +7 -0
- package/dist/common/hooks/usePolling.d.ts.map +1 -0
- package/dist/common/hooks/usePolling.js +29 -0
- package/dist/common/hooks/useStableCallback.d.ts +6 -0
- package/dist/common/hooks/useStableCallback.d.ts.map +1 -0
- package/dist/common/hooks/useStableCallback.js +13 -0
- package/dist/common/hooks/useStopwatch.d.ts +17 -0
- package/dist/common/hooks/useStopwatch.d.ts.map +1 -0
- package/dist/common/hooks/useStopwatch.js +44 -0
- package/dist/common/hooks/useTransactionExecution.d.ts +62 -0
- package/dist/common/hooks/useTransactionExecution.d.ts.map +1 -0
- package/dist/common/hooks/useTransactionExecution.js +273 -0
- package/dist/common/hooks/useTransactionFlow.d.ts +71 -0
- package/dist/common/hooks/useTransactionFlow.d.ts.map +1 -0
- package/dist/common/hooks/useTransactionFlow.js +435 -0
- package/dist/common/index.d.ts +17 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +16 -0
- package/dist/common/tx/steps.d.ts +19 -0
- package/dist/common/tx/steps.d.ts.map +1 -0
- package/dist/common/tx/steps.js +89 -0
- package/dist/common/tx/types.d.ts +11 -0
- package/dist/common/tx/types.d.ts.map +1 -0
- package/dist/common/tx/types.js +19 -0
- package/dist/common/tx/useTransactionSteps.d.ts +21 -0
- package/dist/common/tx/useTransactionSteps.d.ts.map +1 -0
- package/dist/common/tx/useTransactionSteps.js +40 -0
- package/dist/common/types/transaction-flow.d.ts +48 -0
- package/dist/common/types/transaction-flow.d.ts.map +1 -0
- package/dist/common/types/transaction-flow.js +2 -0
- package/dist/common/utils/constant.d.ts +99 -0
- package/dist/common/utils/constant.d.ts.map +1 -0
- package/dist/common/utils/constant.js +370 -0
- package/dist/common/utils/token-pricing.d.ts +33 -0
- package/dist/common/utils/token-pricing.d.ts.map +1 -0
- package/dist/common/utils/token-pricing.js +255 -0
- package/dist/common/utils/transaction-flow.d.ts +35 -0
- package/dist/common/utils/transaction-flow.d.ts.map +1 -0
- package/dist/common/utils/transaction-flow.js +65 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/lib/utils.d.ts +4 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +8 -0
- package/dist/nexus/NexusProvider.d.ts +50 -0
- package/dist/nexus/NexusProvider.d.ts.map +1 -0
- package/dist/nexus/NexusProvider.js +572 -0
- package/dist/nexus-widget/components/address-identicon.d.ts +5 -0
- package/dist/nexus-widget/components/address-identicon.d.ts.map +1 -0
- package/dist/nexus-widget/components/address-identicon.js +39 -0
- package/dist/nexus-widget/components/amount-input-unified.d.ts +18 -0
- package/dist/nexus-widget/components/amount-input-unified.d.ts.map +1 -0
- package/dist/nexus-widget/components/amount-input-unified.js +88 -0
- package/dist/nexus-widget/components/deposit-idle-form.d.ts +29 -0
- package/dist/nexus-widget/components/deposit-idle-form.d.ts.map +1 -0
- package/dist/nexus-widget/components/deposit-idle-form.js +506 -0
- package/dist/nexus-widget/components/nexus-widget-progress-screen.d.ts +36 -0
- package/dist/nexus-widget/components/nexus-widget-progress-screen.d.ts.map +1 -0
- package/dist/nexus-widget/components/nexus-widget-progress-screen.js +737 -0
- package/dist/nexus-widget/components/pay-using-selector.d.ts +9 -0
- package/dist/nexus-widget/components/pay-using-selector.d.ts.map +1 -0
- package/dist/nexus-widget/components/pay-using-selector.js +37 -0
- package/dist/nexus-widget/components/pay-with-sources.d.ts +11 -0
- package/dist/nexus-widget/components/pay-with-sources.d.ts.map +1 -0
- package/dist/nexus-widget/components/pay-with-sources.js +266 -0
- package/dist/nexus-widget/components/receive-asset-selector.d.ts +28 -0
- package/dist/nexus-widget/components/receive-asset-selector.d.ts.map +1 -0
- package/dist/nexus-widget/components/receive-asset-selector.js +1178 -0
- package/dist/nexus-widget/components/recipient-input.d.ts +10 -0
- package/dist/nexus-widget/components/recipient-input.d.ts.map +1 -0
- package/dist/nexus-widget/components/recipient-input.js +44 -0
- package/dist/nexus-widget/components/send-idle-form.d.ts +29 -0
- package/dist/nexus-widget/components/send-idle-form.d.ts.map +1 -0
- package/dist/nexus-widget/components/send-idle-form.js +548 -0
- package/dist/nexus-widget/components/status-alerts.d.ts +7 -0
- package/dist/nexus-widget/components/status-alerts.d.ts.map +1 -0
- package/dist/nexus-widget/components/status-alerts.js +17 -0
- package/dist/nexus-widget/components/swap-asset-selector.d.ts +74 -0
- package/dist/nexus-widget/components/swap-asset-selector.d.ts.map +1 -0
- package/dist/nexus-widget/components/swap-asset-selector.js +1910 -0
- package/dist/nexus-widget/components/swap-idle-form.d.ts +29 -0
- package/dist/nexus-widget/components/swap-idle-form.d.ts.map +1 -0
- package/dist/nexus-widget/components/swap-idle-form.js +1289 -0
- package/dist/nexus-widget/components/swap-intent-preview.d.ts +95 -0
- package/dist/nexus-widget/components/swap-intent-preview.d.ts.map +1 -0
- package/dist/nexus-widget/components/swap-intent-preview.js +1050 -0
- package/dist/nexus-widget/nexus-widget.d.ts +4 -0
- package/dist/nexus-widget/nexus-widget.d.ts.map +1 -0
- package/dist/nexus-widget/nexus-widget.js +7819 -0
- package/dist/nexus-widget/sdk-types.d.ts +13 -0
- package/dist/nexus-widget/sdk-types.d.ts.map +1 -0
- package/dist/nexus-widget/sdk-types.js +1 -0
- package/dist/nexus-widget/theme.d.ts +156 -0
- package/dist/nexus-widget/theme.d.ts.map +1 -0
- package/dist/nexus-widget/theme.js +159 -0
- package/dist/nexus-widget/types.d.ts +141 -0
- package/dist/nexus-widget/types.d.ts.map +1 -0
- package/dist/nexus-widget/types.js +1 -0
- package/dist/nexus-widget/utils/citrea-tokens.d.ts +82 -0
- package/dist/nexus-widget/utils/citrea-tokens.d.ts.map +1 -0
- package/dist/nexus-widget/utils/citrea-tokens.js +136 -0
- package/dist/nexus-widget/utils/deposit-source-selection.d.ts +55 -0
- package/dist/nexus-widget/utils/deposit-source-selection.d.ts.map +1 -0
- package/dist/nexus-widget/utils/deposit-source-selection.js +219 -0
- package/dist/swaps/components/stacked-token-icons.d.ts +15 -0
- package/dist/swaps/components/stacked-token-icons.d.ts.map +1 -0
- package/dist/swaps/components/stacked-token-icons.js +38 -0
- package/dist/swaps/components/step-flow.d.ts +32 -0
- package/dist/swaps/components/step-flow.d.ts.map +1 -0
- package/dist/swaps/components/step-flow.js +54 -0
- package/dist/swaps/components/token-icon.d.ts +11 -0
- package/dist/swaps/components/token-icon.d.ts.map +1 -0
- package/dist/swaps/components/token-icon.js +16 -0
- package/dist/swaps/components/transaction-progress.d.ts +43 -0
- package/dist/swaps/components/transaction-progress.d.ts.map +1 -0
- package/dist/swaps/components/transaction-progress.js +94 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +34 -0
- package/dist/ui/dialog.d.ts +17 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +47 -0
- package/package.json +60 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type BridgeStepType = {
|
|
2
|
+
completed?: boolean;
|
|
3
|
+
type: string;
|
|
4
|
+
typeID: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
export type SwapStepType = {
|
|
8
|
+
completed?: boolean;
|
|
9
|
+
type: string;
|
|
10
|
+
typeID: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=sdk-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../.build-src/nexus-widget/sdk-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export declare const NEXUS_WIDGET_DEFAULT_PRIMARY_COLOR: "rgb(0, 107, 244)";
|
|
2
|
+
export declare const nexusWidgetTheme: {
|
|
3
|
+
readonly colors: {
|
|
4
|
+
readonly ink: {
|
|
5
|
+
readonly 900: "#161615";
|
|
6
|
+
readonly 800: "#1F1F1F";
|
|
7
|
+
readonly 600: "#5B5B5A";
|
|
8
|
+
readonly 500: "#848483";
|
|
9
|
+
readonly 400: "#8E8E89";
|
|
10
|
+
readonly 300: "#C9C9C5";
|
|
11
|
+
};
|
|
12
|
+
readonly blue: {
|
|
13
|
+
readonly 700: "var(--foreground-brand)";
|
|
14
|
+
readonly 500: "var(--foreground-brand)";
|
|
15
|
+
readonly 100: "#EAF1FF";
|
|
16
|
+
readonly 50: "#E5EEFF";
|
|
17
|
+
readonly tab: "#F0F3F9";
|
|
18
|
+
};
|
|
19
|
+
readonly surfaceScale: {
|
|
20
|
+
readonly default: "#FFFFFE";
|
|
21
|
+
readonly soft: "#FAFAFC";
|
|
22
|
+
readonly cool: "#F6F6F6";
|
|
23
|
+
readonly border: "#ECECEA";
|
|
24
|
+
readonly border2: "#E8E8E7";
|
|
25
|
+
};
|
|
26
|
+
readonly status: {
|
|
27
|
+
readonly success: "#1BC57A";
|
|
28
|
+
readonly successBg: "rgba(27, 197, 122, 0.18)";
|
|
29
|
+
};
|
|
30
|
+
readonly background: "#FFFFFE";
|
|
31
|
+
readonly border: "#E8E8E7";
|
|
32
|
+
readonly divider: "#ECECEA";
|
|
33
|
+
readonly icon: "#5B5B5A";
|
|
34
|
+
readonly muted: "#8E8E89";
|
|
35
|
+
readonly primary: "var(--foreground-brand)";
|
|
36
|
+
readonly primaryText: "var(--foreground-brand)";
|
|
37
|
+
readonly segmented: "#F0F3F9";
|
|
38
|
+
readonly surface: "#FFFFFE";
|
|
39
|
+
readonly surfaceCool: "#F6F6F6";
|
|
40
|
+
readonly surfaceInset: "#FAFAFC";
|
|
41
|
+
readonly text: "#1F1F1F";
|
|
42
|
+
readonly textEmpty: "#C9C9C5";
|
|
43
|
+
readonly textStrong: "#161615";
|
|
44
|
+
readonly textSubtle: "#848483";
|
|
45
|
+
};
|
|
46
|
+
readonly fonts: {
|
|
47
|
+
readonly display: "\"Delight-Medium\", \"Delight\", system-ui, sans-serif";
|
|
48
|
+
readonly mono: "\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace";
|
|
49
|
+
readonly sans: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
50
|
+
};
|
|
51
|
+
readonly typography: {
|
|
52
|
+
readonly displayXl: {
|
|
53
|
+
readonly fontFamily: "\"Delight-Medium\", \"Delight\", system-ui, sans-serif";
|
|
54
|
+
readonly fontSize: "31px";
|
|
55
|
+
readonly fontWeight: 500;
|
|
56
|
+
readonly letterSpacing: "0";
|
|
57
|
+
readonly lineHeight: "36px";
|
|
58
|
+
};
|
|
59
|
+
readonly displayLg: {
|
|
60
|
+
readonly fontFamily: "\"Delight-Medium\", \"Delight\", system-ui, sans-serif";
|
|
61
|
+
readonly fontSize: "22px";
|
|
62
|
+
readonly fontWeight: 500;
|
|
63
|
+
readonly letterSpacing: "0";
|
|
64
|
+
readonly lineHeight: "26px";
|
|
65
|
+
};
|
|
66
|
+
readonly headingPanel: {
|
|
67
|
+
readonly fontFamily: "\"Delight-Medium\", \"Delight\", system-ui, sans-serif";
|
|
68
|
+
readonly fontSize: "17px";
|
|
69
|
+
readonly fontWeight: 500;
|
|
70
|
+
readonly letterSpacing: "0";
|
|
71
|
+
readonly lineHeight: "21px";
|
|
72
|
+
};
|
|
73
|
+
readonly bodyLg: {
|
|
74
|
+
readonly fontFamily: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
75
|
+
readonly fontSize: "14px";
|
|
76
|
+
readonly fontWeight: 400;
|
|
77
|
+
readonly letterSpacing: "0";
|
|
78
|
+
readonly lineHeight: "17px";
|
|
79
|
+
};
|
|
80
|
+
readonly bodyMd: {
|
|
81
|
+
readonly fontFamily: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
82
|
+
readonly fontSize: "14px";
|
|
83
|
+
readonly fontWeight: 400;
|
|
84
|
+
readonly letterSpacing: "0";
|
|
85
|
+
readonly lineHeight: "20px";
|
|
86
|
+
};
|
|
87
|
+
readonly bodySm: {
|
|
88
|
+
readonly fontFamily: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
89
|
+
readonly fontSize: "13px";
|
|
90
|
+
readonly fontWeight: 400;
|
|
91
|
+
readonly letterSpacing: "0";
|
|
92
|
+
readonly lineHeight: "17px";
|
|
93
|
+
};
|
|
94
|
+
readonly labelCap: {
|
|
95
|
+
readonly fontFamily: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
96
|
+
readonly fontSize: "11px";
|
|
97
|
+
readonly fontWeight: 500;
|
|
98
|
+
readonly letterSpacing: "0.08em";
|
|
99
|
+
readonly lineHeight: "14px";
|
|
100
|
+
readonly textTransform: "uppercase";
|
|
101
|
+
};
|
|
102
|
+
readonly caption: {
|
|
103
|
+
readonly fontFamily: "\"Geist\", var(--font-geist-sans), system-ui, sans-serif";
|
|
104
|
+
readonly fontSize: "11px";
|
|
105
|
+
readonly fontWeight: 400;
|
|
106
|
+
readonly letterSpacing: "0";
|
|
107
|
+
readonly lineHeight: "15px";
|
|
108
|
+
};
|
|
109
|
+
readonly code: {
|
|
110
|
+
readonly fontFamily: "\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace";
|
|
111
|
+
readonly fontSize: "11px";
|
|
112
|
+
readonly fontWeight: 400;
|
|
113
|
+
readonly letterSpacing: "0";
|
|
114
|
+
readonly lineHeight: "14px";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly radius: {
|
|
118
|
+
readonly modal: "16px";
|
|
119
|
+
readonly panel: "9px";
|
|
120
|
+
readonly primaryButton: "10px";
|
|
121
|
+
readonly segmented: "7px";
|
|
122
|
+
readonly segmentedItem: "5px";
|
|
123
|
+
readonly tokenPill: "999px";
|
|
124
|
+
readonly iconButton: "999px";
|
|
125
|
+
};
|
|
126
|
+
readonly shadows: {
|
|
127
|
+
readonly card: "#3C286433 0px 0px 3px, #3C28640A 0px 1px 4px";
|
|
128
|
+
readonly control: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 6px";
|
|
129
|
+
readonly iconButton: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 4px";
|
|
130
|
+
readonly inset: "#3C28640F 0px 1px 2px inset";
|
|
131
|
+
readonly primaryButton: "#FFFFFF12 0px 1px 0px inset, #0000001F 0px 1px 2px, #14141E24 0px 4px 10px";
|
|
132
|
+
readonly root: "#FFFFFFE6 0px 1px 0px inset, #FFFFFF8C 0px 0px 0px 9px, #11346A0A 0px 2px 4px, #0078F721 0px 9px 18px, #1571FE1F 0px 22px 42px";
|
|
133
|
+
readonly segmentedActive: "#FFFFFFE6 0px 1px 0px inset, #3C286414 0px 1px 2px, #3C28640F 0px 2px 6px";
|
|
134
|
+
readonly sheet: "#0000001F 0px -4px 20px";
|
|
135
|
+
readonly tokenPill: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 8px";
|
|
136
|
+
readonly tooltip: "0 8px 24px rgba(22,22,21,0.12)";
|
|
137
|
+
};
|
|
138
|
+
readonly primitives: {
|
|
139
|
+
readonly badge: {
|
|
140
|
+
readonly backgroundColor: "#EAF1FF";
|
|
141
|
+
readonly color: "var(--foreground-brand)";
|
|
142
|
+
};
|
|
143
|
+
readonly iconButton: {
|
|
144
|
+
readonly backgroundColor: "#FFFFFE";
|
|
145
|
+
readonly borderColor: "#0000000F";
|
|
146
|
+
readonly boxShadow: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 4px";
|
|
147
|
+
readonly size: "29px";
|
|
148
|
+
};
|
|
149
|
+
readonly tokenPill: {
|
|
150
|
+
readonly backgroundColor: "#FFFFFE";
|
|
151
|
+
readonly borderColor: "#0000000A";
|
|
152
|
+
readonly boxShadow: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 8px";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../.build-src/nexus-widget/theme.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kCAAkC,EAAG,kBAA2B,CAAC;AAuB9E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuInB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
const ink = {
|
|
2
|
+
900: "#161615",
|
|
3
|
+
800: "#1F1F1F",
|
|
4
|
+
600: "#5B5B5A",
|
|
5
|
+
500: "#848483",
|
|
6
|
+
400: "#8E8E89",
|
|
7
|
+
300: "#C9C9C5",
|
|
8
|
+
};
|
|
9
|
+
export const NEXUS_WIDGET_DEFAULT_PRIMARY_COLOR = "rgb(0, 107, 244)";
|
|
10
|
+
const blue = {
|
|
11
|
+
700: "var(--foreground-brand)",
|
|
12
|
+
500: "var(--foreground-brand)",
|
|
13
|
+
100: "#EAF1FF",
|
|
14
|
+
50: "#E5EEFF",
|
|
15
|
+
tab: "#F0F3F9",
|
|
16
|
+
};
|
|
17
|
+
const surface = {
|
|
18
|
+
default: "#FFFFFE",
|
|
19
|
+
soft: "#FAFAFC",
|
|
20
|
+
cool: "#F6F6F6",
|
|
21
|
+
border: "#ECECEA",
|
|
22
|
+
border2: "#E8E8E7",
|
|
23
|
+
};
|
|
24
|
+
const status = {
|
|
25
|
+
success: "#1BC57A",
|
|
26
|
+
successBg: "rgba(27, 197, 122, 0.18)",
|
|
27
|
+
};
|
|
28
|
+
export const nexusWidgetTheme = {
|
|
29
|
+
colors: {
|
|
30
|
+
ink,
|
|
31
|
+
blue,
|
|
32
|
+
surfaceScale: surface,
|
|
33
|
+
status,
|
|
34
|
+
background: surface.default,
|
|
35
|
+
border: surface.border2,
|
|
36
|
+
divider: surface.border,
|
|
37
|
+
icon: ink[600],
|
|
38
|
+
muted: ink[400],
|
|
39
|
+
primary: blue[700],
|
|
40
|
+
primaryText: blue[500],
|
|
41
|
+
segmented: blue.tab,
|
|
42
|
+
surface: surface.default,
|
|
43
|
+
surfaceCool: surface.cool,
|
|
44
|
+
surfaceInset: surface.soft,
|
|
45
|
+
text: ink[800],
|
|
46
|
+
textEmpty: ink[300],
|
|
47
|
+
textStrong: ink[900],
|
|
48
|
+
textSubtle: ink[500],
|
|
49
|
+
},
|
|
50
|
+
fonts: {
|
|
51
|
+
display: '"Delight-Medium", "Delight", system-ui, sans-serif',
|
|
52
|
+
mono: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
53
|
+
sans: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
54
|
+
},
|
|
55
|
+
typography: {
|
|
56
|
+
displayXl: {
|
|
57
|
+
fontFamily: '"Delight-Medium", "Delight", system-ui, sans-serif',
|
|
58
|
+
fontSize: "31px",
|
|
59
|
+
fontWeight: 500,
|
|
60
|
+
letterSpacing: "0",
|
|
61
|
+
lineHeight: "36px",
|
|
62
|
+
},
|
|
63
|
+
displayLg: {
|
|
64
|
+
fontFamily: '"Delight-Medium", "Delight", system-ui, sans-serif',
|
|
65
|
+
fontSize: "22px",
|
|
66
|
+
fontWeight: 500,
|
|
67
|
+
letterSpacing: "0",
|
|
68
|
+
lineHeight: "26px",
|
|
69
|
+
},
|
|
70
|
+
headingPanel: {
|
|
71
|
+
fontFamily: '"Delight-Medium", "Delight", system-ui, sans-serif',
|
|
72
|
+
fontSize: "17px",
|
|
73
|
+
fontWeight: 500,
|
|
74
|
+
letterSpacing: "0",
|
|
75
|
+
lineHeight: "21px",
|
|
76
|
+
},
|
|
77
|
+
bodyLg: {
|
|
78
|
+
fontFamily: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
79
|
+
fontSize: "14px",
|
|
80
|
+
fontWeight: 400,
|
|
81
|
+
letterSpacing: "0",
|
|
82
|
+
lineHeight: "17px",
|
|
83
|
+
},
|
|
84
|
+
bodyMd: {
|
|
85
|
+
fontFamily: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
86
|
+
fontSize: "14px",
|
|
87
|
+
fontWeight: 400,
|
|
88
|
+
letterSpacing: "0",
|
|
89
|
+
lineHeight: "20px",
|
|
90
|
+
},
|
|
91
|
+
bodySm: {
|
|
92
|
+
fontFamily: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
93
|
+
fontSize: "13px",
|
|
94
|
+
fontWeight: 400,
|
|
95
|
+
letterSpacing: "0",
|
|
96
|
+
lineHeight: "17px",
|
|
97
|
+
},
|
|
98
|
+
labelCap: {
|
|
99
|
+
fontFamily: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
100
|
+
fontSize: "11px",
|
|
101
|
+
fontWeight: 500,
|
|
102
|
+
letterSpacing: "0.08em",
|
|
103
|
+
lineHeight: "14px",
|
|
104
|
+
textTransform: "uppercase",
|
|
105
|
+
},
|
|
106
|
+
caption: {
|
|
107
|
+
fontFamily: '"Geist", var(--font-geist-sans), system-ui, sans-serif',
|
|
108
|
+
fontSize: "11px",
|
|
109
|
+
fontWeight: 400,
|
|
110
|
+
letterSpacing: "0",
|
|
111
|
+
lineHeight: "15px",
|
|
112
|
+
},
|
|
113
|
+
code: {
|
|
114
|
+
fontFamily: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
115
|
+
fontSize: "11px",
|
|
116
|
+
fontWeight: 400,
|
|
117
|
+
letterSpacing: "0",
|
|
118
|
+
lineHeight: "14px",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
radius: {
|
|
122
|
+
modal: "16px",
|
|
123
|
+
panel: "9px",
|
|
124
|
+
primaryButton: "10px",
|
|
125
|
+
segmented: "7px",
|
|
126
|
+
segmentedItem: "5px",
|
|
127
|
+
tokenPill: "999px",
|
|
128
|
+
iconButton: "999px",
|
|
129
|
+
},
|
|
130
|
+
shadows: {
|
|
131
|
+
card: "#3C286433 0px 0px 3px, #3C28640A 0px 1px 4px",
|
|
132
|
+
control: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 6px",
|
|
133
|
+
iconButton: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 4px",
|
|
134
|
+
inset: "#3C28640F 0px 1px 2px inset",
|
|
135
|
+
primaryButton: "#FFFFFF12 0px 1px 0px inset, #0000001F 0px 1px 2px, #14141E24 0px 4px 10px",
|
|
136
|
+
root: "#FFFFFFE6 0px 1px 0px inset, #FFFFFF8C 0px 0px 0px 9px, #11346A0A 0px 2px 4px, #0078F721 0px 9px 18px, #1571FE1F 0px 22px 42px",
|
|
137
|
+
segmentedActive: "#FFFFFFE6 0px 1px 0px inset, #3C286414 0px 1px 2px, #3C28640F 0px 2px 6px",
|
|
138
|
+
sheet: "#0000001F 0px -4px 20px",
|
|
139
|
+
tokenPill: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 8px",
|
|
140
|
+
tooltip: "0 8px 24px rgba(22,22,21,0.12)",
|
|
141
|
+
},
|
|
142
|
+
primitives: {
|
|
143
|
+
badge: {
|
|
144
|
+
backgroundColor: blue[100],
|
|
145
|
+
color: blue[500],
|
|
146
|
+
},
|
|
147
|
+
iconButton: {
|
|
148
|
+
backgroundColor: surface.default,
|
|
149
|
+
borderColor: "#0000000F",
|
|
150
|
+
boxShadow: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 4px",
|
|
151
|
+
size: "29px",
|
|
152
|
+
},
|
|
153
|
+
tokenPill: {
|
|
154
|
+
backgroundColor: surface.default,
|
|
155
|
+
borderColor: "#0000000A",
|
|
156
|
+
boxShadow: "#3C28640F 0px 1px 2px, #3C28640A 0px 2px 8px",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
export type NexusWidgetMode = "swap" | "send" | "deposit";
|
|
3
|
+
export type NexusWidgetNumericString = string;
|
|
4
|
+
export type NexusWidgetUrlString = `http://${string}` | `https://${string}`;
|
|
5
|
+
/** Exact In: user specifies the "from" amount. Exact Out: user specifies the "to" amount. */
|
|
6
|
+
export type SwapType = "exactIn" | "exactOut";
|
|
7
|
+
export type DepositExecuteConfig = {
|
|
8
|
+
to: Address;
|
|
9
|
+
value?: bigint;
|
|
10
|
+
data?: `0x${string}`;
|
|
11
|
+
gas?: bigint;
|
|
12
|
+
tokenApproval?: {
|
|
13
|
+
toTokenAddress: Address;
|
|
14
|
+
amount: bigint;
|
|
15
|
+
spender: Address;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export interface NexusWidgetDepositOpportunityConfig {
|
|
19
|
+
apy?: string;
|
|
20
|
+
chainId: number;
|
|
21
|
+
depositTargetLogo?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
estimatedTime?: string;
|
|
24
|
+
executeDeposit: (tokenSymbol: string, tokenAddress: Address, amount: bigint, chainId: number, user: Address) => DepositExecuteConfig;
|
|
25
|
+
explorerUrl?: string;
|
|
26
|
+
gasTokenSymbol?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
logo?: string;
|
|
29
|
+
/** Optional labels used by Nexus Widget history/progress copy. */
|
|
30
|
+
protocol?: string;
|
|
31
|
+
subtitle?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
tokenAddress: Address;
|
|
34
|
+
tokenDecimals: number;
|
|
35
|
+
tokenLogo?: string;
|
|
36
|
+
tokenSymbol: string;
|
|
37
|
+
}
|
|
38
|
+
export type NexusWidgetDepositOpportunityMetadata = Omit<NexusWidgetDepositOpportunityConfig, "executeDeposit">;
|
|
39
|
+
export interface NexusWidgetRuntimePrefill {
|
|
40
|
+
amount?: string;
|
|
41
|
+
chain?: number;
|
|
42
|
+
destination?: {
|
|
43
|
+
chain: number;
|
|
44
|
+
decimals?: number;
|
|
45
|
+
logo?: string;
|
|
46
|
+
symbol?: string;
|
|
47
|
+
token: Address;
|
|
48
|
+
};
|
|
49
|
+
recipient?: Address;
|
|
50
|
+
source?: {
|
|
51
|
+
chain: number;
|
|
52
|
+
decimals?: number;
|
|
53
|
+
logo?: string;
|
|
54
|
+
symbol?: string;
|
|
55
|
+
token: Address;
|
|
56
|
+
};
|
|
57
|
+
token?: Address;
|
|
58
|
+
}
|
|
59
|
+
export interface NexusWidgetDestinationToken {
|
|
60
|
+
address: Address;
|
|
61
|
+
decimals: number;
|
|
62
|
+
logo?: NexusWidgetUrlString | string;
|
|
63
|
+
symbol: string;
|
|
64
|
+
}
|
|
65
|
+
export interface NexusWidgetPrefillToken extends NexusWidgetDestinationToken {
|
|
66
|
+
chain: number;
|
|
67
|
+
}
|
|
68
|
+
export type NexusWidgetDestinationTokenList = [
|
|
69
|
+
NexusWidgetDestinationToken,
|
|
70
|
+
...NexusWidgetDestinationToken[]
|
|
71
|
+
];
|
|
72
|
+
export interface NexusWidgetConfiguredDestination {
|
|
73
|
+
chain?: number;
|
|
74
|
+
tokens?: NexusWidgetDestinationTokenList;
|
|
75
|
+
}
|
|
76
|
+
export interface NexusWidgetDepositDestination {
|
|
77
|
+
chain: number;
|
|
78
|
+
tokens: NexusWidgetDestinationTokenList;
|
|
79
|
+
}
|
|
80
|
+
export type NexusWidgetDestination = NexusWidgetConfiguredDestination | NexusWidgetDepositDestination;
|
|
81
|
+
export interface NexusWidgetAmountPrefill {
|
|
82
|
+
amount?: NexusWidgetNumericString;
|
|
83
|
+
}
|
|
84
|
+
export interface NexusWidgetTokenPrefill {
|
|
85
|
+
token?: NexusWidgetPrefillToken;
|
|
86
|
+
}
|
|
87
|
+
export type NexusWidgetSendPrefill = NexusWidgetAmountPrefill & NexusWidgetTokenPrefill;
|
|
88
|
+
export type NexusWidgetSwapPrefill = NexusWidgetTokenPrefill;
|
|
89
|
+
export interface NexusWidgetValidation {
|
|
90
|
+
maxAmount?: NexusWidgetNumericString;
|
|
91
|
+
minAmount?: NexusWidgetNumericString;
|
|
92
|
+
}
|
|
93
|
+
export interface NexusWidgetAppearance {
|
|
94
|
+
appName?: string;
|
|
95
|
+
appLogoURL?: NexusWidgetUrlString | string;
|
|
96
|
+
heading?: string;
|
|
97
|
+
primaryColor?: string;
|
|
98
|
+
mode?: "system" | "light" | "dark";
|
|
99
|
+
}
|
|
100
|
+
export interface NexusWidgetConfigBase {
|
|
101
|
+
appearance?: NexusWidgetAppearance;
|
|
102
|
+
}
|
|
103
|
+
export interface NexusWidgetDepositConfig extends NexusWidgetConfigBase {
|
|
104
|
+
depositAddress: Address;
|
|
105
|
+
destination: NexusWidgetDepositDestination;
|
|
106
|
+
executeDeposit: NexusWidgetDepositOpportunityConfig["executeDeposit"];
|
|
107
|
+
mode: "deposit";
|
|
108
|
+
prefill?: NexusWidgetAmountPrefill;
|
|
109
|
+
validation?: NexusWidgetValidation;
|
|
110
|
+
}
|
|
111
|
+
export interface NexusWidgetSendConfig extends NexusWidgetConfigBase {
|
|
112
|
+
destination?: NexusWidgetConfiguredDestination;
|
|
113
|
+
mode: "send";
|
|
114
|
+
prefill?: NexusWidgetSendPrefill;
|
|
115
|
+
recipientAddress?: Address;
|
|
116
|
+
validation?: NexusWidgetValidation;
|
|
117
|
+
}
|
|
118
|
+
export interface NexusWidgetSwapConfig extends NexusWidgetConfigBase {
|
|
119
|
+
destination?: NexusWidgetConfiguredDestination;
|
|
120
|
+
mode: "swap";
|
|
121
|
+
prefill?: NexusWidgetSwapPrefill;
|
|
122
|
+
recipientAddress?: Address;
|
|
123
|
+
}
|
|
124
|
+
export type NexusWidgetConfig = NexusWidgetDepositConfig | NexusWidgetSendConfig | NexusWidgetSwapConfig;
|
|
125
|
+
export interface NexusWidgetProps {
|
|
126
|
+
className?: string;
|
|
127
|
+
config: NexusWidgetConfig;
|
|
128
|
+
connectedAddress?: Address;
|
|
129
|
+
defaultOpen?: boolean;
|
|
130
|
+
embed?: boolean;
|
|
131
|
+
onClose?: () => void;
|
|
132
|
+
onComplete?: (explorerUrl?: string) => void;
|
|
133
|
+
onConnectClick?: () => void | Promise<void>;
|
|
134
|
+
onConnectWallet?: () => void | Promise<void>;
|
|
135
|
+
onError?: (message: string) => void;
|
|
136
|
+
onOpenChange?: (open: boolean) => void;
|
|
137
|
+
onReceiveAssetChange?: (asset: any) => void;
|
|
138
|
+
onStart?: () => void;
|
|
139
|
+
open?: boolean;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../.build-src/nexus-widget/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,oBAAoB,GAAG,UAAU,MAAM,EAAE,GAAG,WAAW,MAAM,EAAE,CAAC;AAE5E,6FAA6F;AAC7F,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE;QACd,cAAc,EAAE,OAAO,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,mCAAmC;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CACd,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAA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CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { SwapTokenOption } from "../components/swap-asset-selector";
|
|
2
|
+
export declare const CITREA_CHAIN_ID = 4114;
|
|
3
|
+
export declare const CITREA_STABLE_SYMBOLS: string[];
|
|
4
|
+
export declare const CITREA_LOCAL_TOKENS: readonly [{
|
|
5
|
+
readonly address: "0x0000000000000000000000000000000000000000";
|
|
6
|
+
readonly decimals: 18;
|
|
7
|
+
readonly logo: "https://assets.coingecko.com/coins/images/102172844/standard/cBTC.png";
|
|
8
|
+
readonly name: "Citrea Bitcoin";
|
|
9
|
+
readonly symbol: "cBTC";
|
|
10
|
+
readonly type: "NATIVE";
|
|
11
|
+
}, {
|
|
12
|
+
readonly address: "0x3100000000000000000000000000000000000006";
|
|
13
|
+
readonly decimals: 18;
|
|
14
|
+
readonly logo: "https://assets.coingecko.com/coins/images/102172843/standard/cBTC.png";
|
|
15
|
+
readonly name: "Wrapped Citrea Bitcoin";
|
|
16
|
+
readonly symbol: "wcBTC";
|
|
17
|
+
}, {
|
|
18
|
+
readonly address: "0x8D82c4E3c936C7B5724A382a9c5a4E6Eb7aB6d5D";
|
|
19
|
+
readonly decimals: 6;
|
|
20
|
+
readonly logo: "https://assets.coingecko.com/coins/images/71615/standard/ctUSD.png";
|
|
21
|
+
readonly name: "Citrea USD";
|
|
22
|
+
readonly symbol: "ctUSD";
|
|
23
|
+
readonly type: "STABLE";
|
|
24
|
+
}, {
|
|
25
|
+
readonly address: "0xE045e6c36cF77FAA2CfB54466D71A3aEF7bbE839";
|
|
26
|
+
readonly decimals: 6;
|
|
27
|
+
readonly logo: "https://assets.coingecko.com/coins/images/6319/standard/USDC.png";
|
|
28
|
+
readonly name: "Bridged USDC";
|
|
29
|
+
readonly symbol: "USDC.e";
|
|
30
|
+
readonly type: "STABLE";
|
|
31
|
+
}, {
|
|
32
|
+
readonly address: "0x0987D3720D38847ac6dBB9D025B9dE892a3CA35C";
|
|
33
|
+
readonly decimals: 18;
|
|
34
|
+
readonly logo: "https://assets.coingecko.com/coins/images/102172725/standard/JUSD_192x192_App_Icon.png";
|
|
35
|
+
readonly name: "Juice Dollar";
|
|
36
|
+
readonly symbol: "JUSD";
|
|
37
|
+
readonly type: "STABLE";
|
|
38
|
+
}, {
|
|
39
|
+
readonly address: "0x384157027B1CDEAc4e26e3709667BB28735379Bb";
|
|
40
|
+
readonly decimals: 8;
|
|
41
|
+
readonly logo: "https://assets.coingecko.com/coins/images/102172893/standard/syBTC.png";
|
|
42
|
+
readonly name: "Symbiosis BTC";
|
|
43
|
+
readonly symbol: "syBTC";
|
|
44
|
+
}, {
|
|
45
|
+
readonly address: "0x1b70ae756b1089cc5948e4f8a2AD498DF30E897d";
|
|
46
|
+
readonly decimals: 18;
|
|
47
|
+
readonly logo: "https://assets.coingecko.com/coins/images/102172892/standard/JuiceDollar_Coinlogo.png";
|
|
48
|
+
readonly name: "Savings Vault JUSD";
|
|
49
|
+
readonly symbol: "svJUSD";
|
|
50
|
+
readonly type: "STABLE";
|
|
51
|
+
}, {
|
|
52
|
+
readonly address: "0xAC8c1AEB584765DB16ac3e08D4736CFcE198589B";
|
|
53
|
+
readonly decimals: 18;
|
|
54
|
+
readonly logo: "https://assets.coingecko.com/coins/images/71672/large/GUSD.png";
|
|
55
|
+
readonly name: "Generic Dollar";
|
|
56
|
+
readonly symbol: "GUSD";
|
|
57
|
+
readonly type: "STABLE";
|
|
58
|
+
}, {
|
|
59
|
+
readonly address: "0xDF240DC08B0FdaD1d93b74d5048871232f6BEA3d";
|
|
60
|
+
readonly decimals: 8;
|
|
61
|
+
readonly logo: "https://coin-images.coingecko.com/coins/images/7598/large/WBTCLOGO.png";
|
|
62
|
+
readonly name: "Bridged Wrapped Bitcoin";
|
|
63
|
+
readonly symbol: "WBTC.e";
|
|
64
|
+
}, {
|
|
65
|
+
readonly address: "0x9f3096Bac87e7F03DC09b0B416eB0DF837304dc4";
|
|
66
|
+
readonly decimals: 6;
|
|
67
|
+
readonly logo: "https://coin-images.coingecko.com/coins/images/325/large/Tether.png";
|
|
68
|
+
readonly name: "Bridged USDT";
|
|
69
|
+
readonly symbol: "USDT.e";
|
|
70
|
+
readonly type: "STABLE";
|
|
71
|
+
}];
|
|
72
|
+
export declare const getCitreaChainMeta: () => {
|
|
73
|
+
logo: string;
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
export declare const getCitreaReceiveTokenOptions: () => SwapTokenOption[];
|
|
77
|
+
export declare const findCitreaReceiveToken: ({ address, chainId, symbol, }: {
|
|
78
|
+
address?: string;
|
|
79
|
+
chainId?: number;
|
|
80
|
+
symbol?: string;
|
|
81
|
+
}) => SwapTokenOption | undefined;
|
|
82
|
+
//# sourceMappingURL=citrea-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citrea-tokens.d.ts","sourceRoot":"","sources":["../../../.build-src/nexus-widget/utils/citrea-tokens.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,eAAO,MAAM,eAAe,OAAO,CAAC;AAUpC,eAAO,MAAM,qBAAqB,UAOjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EtB,CAAC;AASX,eAAO,MAAM,kBAAkB;;;CAM7B,CAAC;AAEH,eAAO,MAAM,4BAA4B,QAAO,eAAe,EAc9D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,+BAIpC;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,eAAe,GAAG,SAcrB,CAAC"}
|