@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
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TxRef } from "../../../shared/driver/types.js";
|
|
2
|
+
import { WithdrawalQuotePayload } from "../driver/payloads.js";
|
|
3
|
+
import { WithdrawPreparation } from "../driver/types.js";
|
|
2
4
|
import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
3
5
|
|
|
4
6
|
//#region src/flows/withdraw/orchestrator/types.d.ts
|
|
@@ -22,22 +24,24 @@ interface WithdrawalFormSnapshot {
|
|
|
22
24
|
receiveChainId: number;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
|
-
* State machine state for the orchestrated withdraw dialog. Per-state discriminated `ctx`
|
|
26
|
-
* what data is available
|
|
27
|
-
* unrepresentable.
|
|
27
|
+
* State machine state for the orchestrated withdraw dialog. Per-state discriminated `ctx`
|
|
28
|
+
* narrows what data is available.
|
|
28
29
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
30
|
+
* **Host-paced lifecycle** (different from the old wagmi-signed model): the kit stays in
|
|
31
|
+
* `submitting` until the host's `onSubmit` callback calls one of the controller's actions
|
|
32
|
+
* (`beginProcessing`, `fail`, `succeed`). `inProgress` accepts an optional `tx` — the host may
|
|
33
|
+
* move the user into processing before a broadcast tx hash exists; the kit polls
|
|
34
|
+
* `gateway/{owner}` and best-matches the relevant settlement (destination tuple + amount +
|
|
35
|
+
* submit-time window) until the host supplies a tx hash via `setTxHash`. `success` / `error`
|
|
36
|
+
* similarly accept optional `tx` since the host may declare a terminal verdict directly.
|
|
31
37
|
*/
|
|
32
38
|
type WithdrawState = {
|
|
33
39
|
name: "closed";
|
|
34
40
|
} | {
|
|
35
41
|
name: "form";
|
|
36
42
|
/**
|
|
37
|
-
* Optional notice rendered inline near the submit footer.
|
|
38
|
-
*
|
|
39
|
-
* recipient + amount + receive selection) with `notice = "Signature declined…"` so they
|
|
40
|
-
* can retry without losing context. Cleared on the next SUBMIT or CLOSE.
|
|
43
|
+
* Optional notice rendered inline near the submit footer. Cleared on the next SUBMIT
|
|
44
|
+
* or CLOSE.
|
|
41
45
|
*/
|
|
42
46
|
ctx?: {
|
|
43
47
|
notice?: string;
|
|
@@ -50,24 +54,28 @@ type WithdrawState = {
|
|
|
50
54
|
} | {
|
|
51
55
|
name: "inProgress";
|
|
52
56
|
ctx: {
|
|
53
|
-
input: WithdrawalFormSnapshot;
|
|
54
|
-
|
|
57
|
+
input: WithdrawalFormSnapshot; /** Unix-ms timestamp the host moved the FSM into processing (drives best-match windowing). */
|
|
58
|
+
submittedAt: number;
|
|
59
|
+
/**
|
|
60
|
+
* Source-chain broadcast hash, when the host has surfaced one via
|
|
61
|
+
* `actions.setTxHash`. Absent while the kit relies on the best-match heuristic.
|
|
62
|
+
*/
|
|
63
|
+
tx?: TxRef;
|
|
55
64
|
};
|
|
56
65
|
} | {
|
|
57
66
|
name: "success";
|
|
58
67
|
ctx: {
|
|
59
68
|
input: WithdrawalFormSnapshot;
|
|
60
|
-
tx
|
|
69
|
+
tx?: TxRef;
|
|
61
70
|
};
|
|
62
71
|
} | {
|
|
63
72
|
name: "error";
|
|
64
73
|
ctx: {
|
|
65
74
|
/**
|
|
66
75
|
* Form snapshot captured at submit time. Set when error follows a submit attempt;
|
|
67
|
-
* absent when the error path was reached without a known prior submit
|
|
68
|
-
* unreachable in V2 — kept optional so resume-style entries can re-use the slot).
|
|
76
|
+
* absent when the error path was reached without a known prior submit.
|
|
69
77
|
*/
|
|
70
|
-
input?: WithdrawalFormSnapshot; /** Optional non-settlement failure (quote / submission rejection). */
|
|
78
|
+
input?: WithdrawalFormSnapshot; /** Optional non-settlement failure (quote / submission rejection, host-supplied failure). */
|
|
71
79
|
failure?: FailureInfo; /** Source-chain broadcast tx hash when the error followed a successful broadcast. */
|
|
72
80
|
tx?: TxRef;
|
|
73
81
|
};
|
|
@@ -79,6 +87,16 @@ type WithdrawState = {
|
|
|
79
87
|
type WithdrawStateName = WithdrawState["name"];
|
|
80
88
|
/**
|
|
81
89
|
* Reducer event union. Strict discriminated; no stringly-typed transitions.
|
|
90
|
+
*
|
|
91
|
+
* The host-paced lifecycle splits the old `SUBMIT_CONFIRMED { tx }` event into three pieces so
|
|
92
|
+
* the host can move the user forward at whichever step their backend actually completes:
|
|
93
|
+
*
|
|
94
|
+
* - `BEGIN_PROCESSING { tx?, submittedAt }` — host accepted the request; move to inProgress with
|
|
95
|
+
* or without a tx hash.
|
|
96
|
+
* - `SET_TX_HASH { tx }` — host surfaced a broadcast hash later; upgrade best-match polling to
|
|
97
|
+
* tx-anchored.
|
|
98
|
+
* - `MARK_SUCCEEDED` / `MARK_FAILED { failure? }` — host short-circuits to a terminal verdict
|
|
99
|
+
* (e.g. their own settlement verification ran independently of Stridge's poll).
|
|
82
100
|
*/
|
|
83
101
|
type WithdrawEvent = {
|
|
84
102
|
type: "OPEN";
|
|
@@ -88,12 +106,22 @@ type WithdrawEvent = {
|
|
|
88
106
|
type: "SUBMIT";
|
|
89
107
|
input: WithdrawalFormSnapshot;
|
|
90
108
|
} | {
|
|
91
|
-
type: "
|
|
109
|
+
type: "BEGIN_PROCESSING";
|
|
110
|
+
submittedAt: number;
|
|
111
|
+
tx?: TxRef;
|
|
112
|
+
} | {
|
|
113
|
+
type: "SET_TX_HASH";
|
|
92
114
|
tx: TxRef;
|
|
115
|
+
submittedAt: number;
|
|
93
116
|
} | {
|
|
94
117
|
type: "SUBMIT_FAILED";
|
|
95
118
|
failure: FailureInfo;
|
|
96
119
|
input: WithdrawalFormSnapshot;
|
|
120
|
+
} | {
|
|
121
|
+
type: "MARK_SUCCEEDED";
|
|
122
|
+
} | {
|
|
123
|
+
type: "MARK_FAILED";
|
|
124
|
+
failure?: FailureInfo;
|
|
97
125
|
} | {
|
|
98
126
|
type: "SETTLEMENT_SUCCEEDED";
|
|
99
127
|
} | {
|
|
@@ -101,15 +129,7 @@ type WithdrawEvent = {
|
|
|
101
129
|
failure?: FailureInfo;
|
|
102
130
|
} | {
|
|
103
131
|
type: "RESET";
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Drops the inline notice on the `form` state. Dispatched by the form widget when the user
|
|
107
|
-
* starts editing again after a wallet-rejection landed them back on `form{notice}`. Mirror of
|
|
108
|
-
* deposit's `regenerating → ready` transition (where the notice clears as a side-effect of
|
|
109
|
-
* the next quote resolving) — withdraw's form has no FSM-driven phase to ride on, so the
|
|
110
|
-
* widget signals it explicitly.
|
|
111
|
-
*/
|
|
112
|
-
| {
|
|
132
|
+
} | {
|
|
113
133
|
type: "CLEAR_NOTICE";
|
|
114
134
|
};
|
|
115
135
|
/**
|
|
@@ -134,9 +154,10 @@ interface WithdrawController {
|
|
|
134
154
|
*/
|
|
135
155
|
interface WithdrawActions {
|
|
136
156
|
/**
|
|
137
|
-
* Submits the withdrawal
|
|
138
|
-
*
|
|
139
|
-
* the
|
|
157
|
+
* Submits the withdrawal. Dispatches `SUBMIT` synchronously (so the form flips to the
|
|
158
|
+
* loading-button state) and then fires the host's `<WithdrawDialog onSubmit>` callback with
|
|
159
|
+
* the prepared UDA target + a `WithdrawSubmitActions` handle. The kit stays in `submitting`
|
|
160
|
+
* until the host calls one of those actions (`beginProcessing`, `fail`, `succeed`).
|
|
140
161
|
*/
|
|
141
162
|
submit(input: WithdrawalFormSnapshot): void;
|
|
142
163
|
/** Close the dialog. Idempotent. */
|
|
@@ -147,10 +168,64 @@ interface WithdrawActions {
|
|
|
147
168
|
*/
|
|
148
169
|
reset(): void;
|
|
149
170
|
/**
|
|
150
|
-
* Clear the form's inline notice
|
|
151
|
-
* No-op when there's no notice or the FSM isn't on `form`.
|
|
171
|
+
* Clear the form's inline notice. No-op when there's no notice or the FSM isn't on `form`.
|
|
152
172
|
*/
|
|
153
173
|
clearNotice(): void;
|
|
154
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Payload the kit hands to the host's `<WithdrawDialog onSubmit>` callback. Carries everything
|
|
177
|
+
* the host needs to broadcast the source-chain transfer to the UDA (or to validate the request
|
|
178
|
+
* server-side before broadcasting / queueing).
|
|
179
|
+
*/
|
|
180
|
+
interface WithdrawSubmitInput {
|
|
181
|
+
/** What the user picked on the form (recipient, amount, receive token + chain). */
|
|
182
|
+
form: WithdrawalFormSnapshot;
|
|
183
|
+
/** Where the host should send brand-currency funds to trigger the bridge. */
|
|
184
|
+
depositTarget: WithdrawPreparation["depositTarget"];
|
|
185
|
+
/** Stridge correlation slot — useful for backend logs / cross-system traces. */
|
|
186
|
+
correlation: WithdrawPreparation["correlation"];
|
|
187
|
+
/** Active quote payload at submit time, when one is available. */
|
|
188
|
+
quote?: WithdrawalQuotePayload;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Imperative handles the host's `onSubmit` callback receives. Each action advances the kit's
|
|
192
|
+
* FSM at the point the host's backend reaches the matching state. All actions are optional —
|
|
193
|
+
* the host calls only what fits their flow (e.g. backend pre-validates and accepts ⇒
|
|
194
|
+
* `beginProcessing()`; later the broadcast lands ⇒ `setTxHash({ hash })`; settlement watching
|
|
195
|
+
* via Stridge takes over from there). The kit also exposes a `signal` for cancellation when
|
|
196
|
+
* the user closes the dialog mid-submit.
|
|
197
|
+
*/
|
|
198
|
+
interface WithdrawSubmitActions {
|
|
199
|
+
/**
|
|
200
|
+
* Move the FSM into `inProgress`. Pass `tx` if a broadcast hash already exists at this point;
|
|
201
|
+
* otherwise omit — the kit polls `gateway/{owner}` with a best-match heuristic until you
|
|
202
|
+
* call {@link setTxHash}. Idempotent — calling more than once is a no-op.
|
|
203
|
+
*/
|
|
204
|
+
beginProcessing(tx?: TxRef): void;
|
|
205
|
+
/**
|
|
206
|
+
* Surface a broadcast hash mid-processing. Upgrades the watcher from best-match to
|
|
207
|
+
* tx-anchored. Legal from `inProgress` or `submitting` (auto-promotes to `inProgress`).
|
|
208
|
+
*/
|
|
209
|
+
setTxHash(tx: TxRef): void;
|
|
210
|
+
/**
|
|
211
|
+
* Mark the withdraw failed. Legal from `submitting` (pre-broadcast rejection) and
|
|
212
|
+
* `inProgress` (post-broadcast failure). The optional `failure` carries a localized
|
|
213
|
+
* reason + machine code for analytics; omit when the host has nothing meaningful to
|
|
214
|
+
* report and just needs to terminate the flow.
|
|
215
|
+
*/
|
|
216
|
+
fail(failure?: FailureInfo): void;
|
|
217
|
+
/**
|
|
218
|
+
* Mark the withdraw succeeded directly. Useful when the host runs their own settlement
|
|
219
|
+
* verification independently of Stridge's poll. Legal from `submitting` and `inProgress`.
|
|
220
|
+
*/
|
|
221
|
+
succeed(): void;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Host-supplied callback fired when the user submits the withdrawal form. The kit hands the
|
|
225
|
+
* callback the resolved {@link WithdrawSubmitInput} plus a {@link WithdrawSubmitActions} handle
|
|
226
|
+
* the host calls to advance the FSM. The kit does NOT await the callback's promise — the host
|
|
227
|
+
* is in control of pacing via the actions. The `signal` aborts when the user closes the dialog.
|
|
228
|
+
*/
|
|
229
|
+
type WithdrawSubmitCallback = (input: WithdrawSubmitInput, actions: WithdrawSubmitActions, signal: AbortSignal) => void | Promise<void>;
|
|
155
230
|
//#endregion
|
|
156
|
-
export { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, WithdrawStateName, WithdrawalFormSnapshot };
|
|
231
|
+
export { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, WithdrawStateName, WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput, WithdrawalFormSnapshot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{isValidAddressForChainType as e}from"../../../../shared/chains/index.js";import{useKitI18n as t}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawBindingsValue as r}from"../../bindings/WithdrawBindings.js";import"../../bindings/index.js";import{useWithdrawDriverInstance as i,useWithdrawSnapshot as ee}from"../../driver/context.js";import{useWithdrawActions as te,useWithdrawEffectiveState as ne}from"../../orchestrator/controller.js";import{formatTokenAmount as re}from"../../../../shared/format/formatTokenAmount.js";import{parseAmountInputValue as ie}from"../../../../shared/ui/AmountInput/utils.js";import"../../../../shared/ui/AmountInput/index.js";import{toAssetDescriptor as a}from"../../../../shared/widgets/asset-descriptor.js";import{useQuoteCountdown as ae}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{WithdrawForm as o}from"./compound/WithdrawForm.js";import"./compound/index.js";import{useWithdrawDialogEvents as oe}from"../../dialog/WithdrawDialogEventsContext.js";import{resolveSubmitLabel as se}from"./validation.js";import{useCallback as s,useEffect as c,useMemo as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as ce}from"react/jsx-runtime";function p({events:p}){let m=ee(),h=i(),g=ne(),_=te(),{i18n:le,_:v}=n(),ue=oe(),de=l(()=>({...ue,...p??{}}),[ue,p]),y=u(de);y.current=de;let{balance:b,suggestedRecipient:fe}=r(),[x,pe]=d(``),[me,he]=d(``),S=g.name===`submitting`,C=g.name===`form`?g.ctx?.notice:void 0,ge=u(C);ge.current=C;let w=m.withdrawableBalances.status===`ready`||m.withdrawableBalances.status===`stale`?m.withdrawableBalances.payload[0]:void 0,T=l(()=>a(w)??{symbol:`USDC`},[w]),_e=l(()=>a(w?{symbol:w.networkName,eip155Id:w.eip155Id,isNative:!0,logoUrl:w.chainLogoUrl}:void 0)??{symbol:`BSC`},[w]),E=typeof b==`number`?b:typeof b==`object`?b.amount:void 0,ve=w?.symbol??T.symbol,D=E??w?.amount.value,ye=E===void 0?w?.symbol:ve,O=D!==void 0&&ye!==void 0?{amount:E===void 0?w?.amount.formatted??re(D,le):re(E,le),symbol:ye}:void 0,k=m.receiveOptions.status===`ready`||m.receiveOptions.status===`stale`?m.receiveOptions.payload:[],A=w?.eip155Id?Number(w.eip155Id):void 0,j=w?.symbol??T.symbol,M=l(()=>{let e=new Map;for(let t of k)for(let n of t.tokens){let r=n.symbol.toUpperCase(),i=e.get(r);i?i.push({chain:t,token:n}):e.set(r,[{chain:t,token:n}])}return e},[k]),N=l(()=>{if(M.size===0)return;let e=j.toUpperCase();return M.has(e)?e:M.keys().next().value},[M,j]),P=s(e=>{let t=M.get(e);if(!(!t||t.length===0))return(A===void 0?void 0:t.find(e=>e.chain.eip155Id===A))??t[0]},[M,A]),[F,I]=d(void 0),[L,R]=d(void 0);c(()=>{if(L||!N)return;let e=P(N);e&&(I(e.chain),R(e.token))},[N,P,L]);let z=s(()=>{ge.current&&_.clearNotice()},[_]),be=s(e=>{z(),pe(e),y.current.onRecipientChanged?.(e)},[z]),B=t().locale,V=s(e=>{z(),he(e);let t=ie(e,B);y.current.onAmountChanged?.({raw:e,numeric:t})},[z,B]),xe=s(e=>{z();let t=e.symbol.toUpperCase(),n=M.get(t)?.find(e=>e.chain.eip155Id===F?.eip155Id)??P(t);n&&(I(n.chain),R(n.token),y.current.onReceiveTokenChanged?.(n.token),n.chain.eip155Id!==F?.eip155Id&&y.current.onReceiveChainChanged?.(n.chain))},[z,M,P,F?.eip155Id]),Se=s(e=>{z(),I(e);let t=L?.symbol.toUpperCase(),n=(t?e.tokens.find(e=>e.symbol.toUpperCase()===t):void 0)??e.tokens[0];n&&R(n),y.current.onReceiveChainChanged?.(e),n&&n.symbol!==L?.symbol&&y.current.onReceiveTokenChanged?.(n)},[z,L?.symbol]),H=ie(me,B),U=H!==null&&H>0,Ce=x.trim(),we=Ce.length>0,Te=F?.chainType??`unknown`,W=e(Ce,Te),G=F!==void 0&&L!==void 0,K=U&&D!==void 0&&H>D,[q,Ee]=d(null),J=(m.quote.status===`ready`||m.quote.status===`stale`)&&we&&U&&G&&q!==null&&q.recipient===x&&q.amount===H&&q.receiveChainId===F.eip155Id&&q.receiveSymbol===L.symbol?m.quote.payload:void 0,De=l(()=>M.size===0?[T]:[...M.values()].map(e=>{let t=e[0];return a({symbol:t.token.symbol,eip155Id:t.chain.eip155Id,address:t.token.address,isNative:t.token.isNative,logoUrl:t.token.assetLogoUrl})??{symbol:t.token.symbol}}),[M,T]),Oe=l(()=>{let e=L?.symbol.toUpperCase(),t=e?M.get(e):void 0;return(t?t.map(e=>e.chain):k).map(e=>a({symbol:e.networkName,eip155Id:e.eip155Id,isNative:!0,logoUrl:e.chainLogoUrl})??{symbol:e.networkName})},[L?.symbol,M,k]),ke=L?a({symbol:L.symbol,eip155Id:F?.eip155Id,address:L.address,isNative:L.isNative,logoUrl:L.assetLogoUrl}):T,Ae=F?a({symbol:F.networkName,eip155Id:F.eip155Id,isNative:!0,logoUrl:F.chainLogoUrl}):_e,je=l(()=>{if(J?.breakdown)return{route:J.breakdown.selectedRoute?.label,networkCost:J.breakdown.networkCost?.formatted,priceImpact:J.breakdown.priceImpact?.formatted}},[J]),Me=l(()=>{if(U)return J?.receiveAmountUsd?J.receiveAmountUsd.formatted:`$${H.toFixed(2)}`},[H,U,J]),Ne=J&&U?J.receiveAmount.formatted:void 0,Pe=J?.receiveAmountUsd?.formatted,Y=W&&U&&!K&&G&&J===void 0&&m.quote.status!==`error`,X=W&&U&&!K&&G&&J!==void 0,Fe=ae({expiresAt:J?.expiresAt,enabled:X}),Ie=X&&J?J.quoteTotalSeconds:void 0,[Z,Q]=d(!1);c(()=>{Q(!1)},[x,H,F?.eip155Id,L?.symbol,g.name]),c(()=>{if(!X||!J||g.name!==`form`||Z)return;let e=Math.max(0,J.expiresAt-Date.now()),t=setTimeout(()=>{Q(!0)},e);return()=>clearTimeout(t)},[X,J,g.name,Z]),c(()=>{if(!Z||g.name!==`form`||A===void 0||!F||!L||!W||!U||K)return;let e=new AbortController,t={recipient:x,amount:H??0,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n={sourceAssetSymbol:j,sourceChainId:A,amount:H??0,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};return y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Ee(t)}).catch(()=>{}).finally(()=>{e.signal.aborted||Q(!1)}),()=>e.abort()},[Z,h,x,H,W,U,K,A,j,F,L,g.name]);let $=!W||!U||K||!G||Y||Z,Le=se({enterRecipientAddress:v({id:`nr03QI`,message:`Enter Recipient Address`}),enterValidRecipientAddress:v({id:`GZPxmc`,message:`Enter Valid Recipient Address`}),enterAmount:v({id:`yH9V_J`,message:`Enter Amount`}),insufficientBalance:v({id:`N2DUxS`,message:`Insufficient Balance`}),regeneratingQuote:v({id:`Ly6geA`,message:`Regenerating quote…`}),estimatingQuote:v({id:`Uevt3L`,message:`Estimating quote`})},{isRecipientFilled:we,isRecipientValid:W,isAmountValid:U,exceedsBalance:K,quoteEstimating:Y,quoteRegenerating:Z}),Re=u(null);c(()=>{if(Re.current?.abort(),!W||!U||K||!G||g.name!==`form`||A===void 0)return;let e=new AbortController;Re.current=e;let t={recipient:x,amount:H,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n=setTimeout(()=>{let n={sourceAssetSymbol:j,sourceChainId:A,amount:H,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Ee(t)}).catch(()=>{})},400);return()=>{clearTimeout(n),e.abort()}},[h,x,H,W,U,K,G,A,j,F?.eip155Id,L?.symbol,g.name]);let ze=s(()=>{O&&V(O.amount)},[O,V]),Be=s(()=>{S||$||A===void 0||!F||!L||_.submit({sourceAssetSymbol:j,sourceChainId:A,amount:H??0,recipientAddress:x,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id})},[_,H,A,j,F,L,x,$,S]),Ve=s(e=>{let t=k.find(t=>String(t.eip155Id)===String(e.chainId));t&&Se(t)},[Se,k]),He=s(e=>{let t=e.symbol.toUpperCase(),n=M.get(t);!n||n.length===0||xe((n.find(e=>e.chain.eip155Id===F?.eip155Id)??n[0]).token)},[xe,M,F?.eip155Id]);return g.name!==`form`&&g.name!==`submitting`?null:ce(o,{recipientAddress:x,onRecipientChange:be,recipientChainType:Te,...fe?{suggestedRecipient:fe}:{},amount:me,onAmountChange:V,onAmountMax:ze,sourceAsset:T,sourceChain:_e,receiveAsset:ke,receiveChain:Ae,receiveAssetOptions:De,onReceiveAssetChange:He,receiveChainOptions:Oe,onReceiveChainChange:Ve,balance:O,amountUsd:Me,receiveAmount:Ne,receiveAmountUsd:Pe,breakdown:je,quoteEstimating:Y,quoteRegenerating:Z,...Fe===void 0?{}:{quoteSeconds:Fe},...Ie===void 0?{}:{quoteTotalSeconds:Ie},submitting:S,submitDisabled:$,submitLabel:Le,...C?{notice:C}:{},onSubmit:Be,children:[f(o.Header,{}),ce(o.Body,{children:[f(o.RecipientField,{}),f(o.AmountField,{}),f(o.ReceiveSelectors,{}),f(o.BreakdownCard,{})]}),f(o.Footer,{})]})}export{p as WithdrawForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,recipientChainType:c=`evm`,suggestedRecipient:l,amount:u=``,onAmountChange:d,onAmountMax:f,sourceAsset:y,sourceChain:b,receiveAsset:x,receiveChain:S,receiveAssetOptions:C,onReceiveAssetChange:w,receiveChainOptions:T,onReceiveChainChange:E,balance:D,amountUsd:O,receiveAmount:k,receiveAmountUsd:A,breakdown:j,quoteEstimating:M=!1,quoteRegenerating:N=!1,quoteSeconds:P,quoteTotalSeconds:F,submitting:I=!1,submitDisabled:L=!1,submitLabel:R,notice:z,onSubmit:B,defaultBreakdownOpen:V=!1,breakdownOpen:H,onBreakdownOpenChange:U,children:W}=e,[G,K]=h(V),q=H!==void 0,J=q?H:G,Y=p(e=>{q||K(e),U?.(e)},[q,U]),X=x??y,Z=S??b;return g(r,{value:m(()=>({recipientAddress:o,onRecipientChange:s??v,recipientChainType:c,suggestedRecipient:l,amount:u,onAmountChange:d??v,onAmountMax:f,sourceAsset:y,sourceChain:b,receiveAsset:X,receiveChain:Z,receiveAssetOptions:C,onReceiveAssetChange:w,receiveChainOptions:T,onReceiveChainChange:E,balance:D,amountUsd:O,receiveAmount:k,receiveAmountUsd:A,breakdown:j,quoteEstimating:M,quoteRegenerating:N,quoteSeconds:P,quoteTotalSeconds:F,submitting:I,submitDisabled:L,submitLabel:R,notice:z,onSubmit:B,breakdownOpen:J,onBreakdownOpenChange:Y}),[o,s,c,l,u,d,f,y,b,X,Z,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,J,Y]),children:g(t.Provider,{children:g(n,{"data-stridge-slot":i.root,..._.props(a.root),children:W})})})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return g(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:g(y,{...o,children:a})})}(function(e){e.Header=u,e.Body=s,e.RecipientField=f,e.AmountField=o,e.ReceiveSelectors=d,e.BreakdownCard=c,e.Footer=l,e.Dialog=b})(y||={});export{y as WithdrawForm};
|
|
@@ -2,17 +2,19 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
2
2
|
|
|
3
3
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Recipient address field — label + auto-growing textarea + trailing
|
|
5
|
+
* Recipient address field — label + auto-growing textarea + trailing prefill chip.
|
|
6
6
|
*
|
|
7
7
|
* The textarea wraps long hex addresses up to `maxBlockSize`, then scrolls. Single-line semantics
|
|
8
8
|
* are kept by stripping any `\r\n` in `onChange` — no `onKeyDown` Enter-blocker, since that would
|
|
9
9
|
* also swallow IME composition keys for CJK input. The stripping handler lives here (not in
|
|
10
10
|
* `InputGroup.Textarea`) so the kit primitive stays neutral on the single-vs-multi-line decision.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
* input.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The chip is host-controlled via `suggestedRecipient` on `<WithdrawDialog>` (or the compound
|
|
13
|
+
* root prop). Clicking it fills the input. Hidden entirely when no suggestion is supplied. The
|
|
14
|
+
* chip's `aria-label` reads off the host-supplied `label` so screen readers describe which
|
|
15
|
+
* address is being prefilled; the visible text shows the truncated address so sighted users
|
|
16
|
+
* see "this is mine" recognition. The kit no longer auto-derives this from `wagmi.address` —
|
|
17
|
+
* that misled users on embedded-wallet integrations.
|
|
16
18
|
*/
|
|
17
19
|
declare function WithdrawFormRecipientField(): _$react_jsx_runtime0.JSX.Element;
|
|
18
20
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=f.recipientChainType===`tron`?m({id:`9XIJb8`,message:`T…`}):m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{suggestedRecipient:v,onRecipientChange:y}=f,b=v?.address,x=v?.label?.trim()||m({id:`BhQhbU`,message:`Use suggested recipient address`}),S=s(e=>{y(e.target.value.replace(/[\r\n]+/g,``))},[y]),C=s(()=>{b&&y(b)},[b,y]),w=b?p(b):``;return u(t,{"data-stridge-slot":a.recipientField,children:[l(t.Label,{htmlFor:_,children:g}),u(r,{children:[l(r.Textarea,{id:_,"data-stridge-slot":a.recipientInput,rows:1,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,placeholder:h,value:f.recipientAddress,onChange:S,...d.props(o.recipientInputMono)}),b?l(r.Addon,{align:`inline-end`,children:u(`button`,{type:`button`,"data-stridge-slot":a.recipientPill,onClick:C,"aria-label":x,...d.props(o.pillBase,o.pillInteractive,o.recipientPill),children:[l(n,{size:`sm`,alt:m({id:`sb9Y58`,message:`Wallet`})}),l(`span`,{...d.props(o.recipientPillText),children:w})]})}):null]})]})}function p(e){return e.length<=10?e:`${e.slice(0,4)}…${e.slice(-4)}`}export{f as WithdrawFormRecipientField};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ChainType } from "../../../../../shared/chains/index.js";
|
|
1
2
|
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
3
|
import { AssetDescriptor } from "../../../../../shared/widgets/asset-descriptor.js";
|
|
4
|
+
import { WithdrawSuggestedRecipient } from "../../../bindings/WithdrawBindings.js";
|
|
3
5
|
import { ComponentProps, ReactNode } from "react";
|
|
4
6
|
|
|
5
7
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/types.d.ts
|
|
@@ -38,12 +40,20 @@ interface WithdrawFormProps {
|
|
|
38
40
|
/** Fired when the user types into the recipient field. */
|
|
39
41
|
onRecipientChange?: (next: string) => void;
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* the pill renders as a static decorative chip.
|
|
43
|
+
* Chain family of the selected receive chain. Drives the recipient field's placeholder
|
|
44
|
+
* (`0x…` for EVM, `T…` for Tron) so the hint matches the address shape the user must enter.
|
|
45
|
+
* Defaults to `"evm"` when omitted — the historical behavior before non-EVM receive chains.
|
|
45
46
|
*/
|
|
46
|
-
|
|
47
|
+
recipientChainType?: ChainType;
|
|
48
|
+
/**
|
|
49
|
+
* Host-supplied recipient suggestion surfaced as a prefill chip on
|
|
50
|
+
* {@link WithdrawForm.RecipientField}. Clicking the chip fills the recipient input via
|
|
51
|
+
* {@link WithdrawFormProps.onRecipientChange}. The chip's accessible name reads off
|
|
52
|
+
* `suggestedRecipient.label` so the user knows which address they are filling with. When
|
|
53
|
+
* omitted, no chip renders. See {@link WithdrawSuggestedRecipient} for the rationale —
|
|
54
|
+
* the kit no longer auto-derives this from `wagmi.address`.
|
|
55
|
+
*/
|
|
56
|
+
suggestedRecipient?: WithdrawSuggestedRecipient;
|
|
47
57
|
/** Current amount-field value, in display units, as a string (controlled). */
|
|
48
58
|
amount?: string;
|
|
49
59
|
/** Fired when the user types into the amount field. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e
|
|
1
|
+
function e(e,t){if(!t.isRecipientFilled)return e.enterRecipientAddress;if(!t.isRecipientValid)return e.enterValidRecipientAddress;if(!t.isAmountValid)return e.enterAmount;if(t.exceedsBalance)return e.insufficientBalance;if(t.quoteRegenerating)return e.regeneratingQuote;if(t.quoteEstimating)return e.estimatingQuote}export{e as resolveSubmitLabel};
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SUPPORTED_LOCALES, SupportedLocale } from "../shared/i18n/locales.js";
|
|
2
|
+
import { KitTranslatableKey } from "./locales/source-keys.js";
|
|
3
|
+
import { KitI18nConfig, KitLocale, KitMessages, createKitI18n, defineMessages } from "../shared/i18n/createKitI18n.js";
|
|
2
4
|
import { getLocaleDirection } from "../shared/i18n/getLocaleDirection.js";
|
|
3
5
|
import { KitI18nProvider } from "../shared/i18n/KitI18nProvider.js";
|
|
4
|
-
import { SUPPORTED_LOCALES, SupportedLocale } from "../shared/i18n/locales.js";
|
|
5
6
|
import { KitTransProps, Trans } from "../shared/i18n/Trans.js";
|
|
6
7
|
import { useKitI18n } from "../shared/i18n/useKitI18n.js";
|
|
7
|
-
import { useLingui } from "../shared/i18n/useLingui.js";
|
|
8
|
+
import { KitLinguiContextValue, useLingui } from "../shared/i18n/useLingui.js";
|
|
8
9
|
import { useT } from "../shared/i18n/useT.js";
|
|
9
|
-
export { type
|
|
10
|
+
export { type KitI18nConfig, KitI18nProvider, type KitLinguiContextValue, type KitLocale, type KitMessages, type KitTransProps, type KitTranslatableKey, SUPPORTED_LOCALES, type SupportedLocale, Trans, createKitI18n, defineMessages, getLocaleDirection, useKitI18n, useLingui, useT };
|
package/dist/i18n/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createKitI18n as e}from"../shared/i18n/createKitI18n.js";import{getLocaleDirection as
|
|
1
|
+
import{createKitI18n as e,defineMessages as t}from"../shared/i18n/createKitI18n.js";import{getLocaleDirection as n}from"../shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"../shared/i18n/KitI18nProvider.js";import{SUPPORTED_LOCALES as i}from"../shared/i18n/locales.js";import{useKitI18n as a}from"../shared/i18n/useKitI18n.js";import{Trans as o}from"../shared/i18n/Trans.js";import{useLingui as s}from"../shared/i18n/useLingui.js";import{useT as c}from"../shared/i18n/useT.js";export{r as KitI18nProvider,i as SUPPORTED_LOCALES,o as Trans,e as createKitI18n,t as defineMessages,n as getLocaleDirection,a as useKitI18n,s as useLingui,c as useT};
|
package/dist/i18n/locales/ar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["اتصل بمحفظة للمتابعة"],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"9JHY2T":["تمت إضافة أموال إيداعك إلى حسابك."],"9XIJb8":["T…"],"9cCjMJ":["إيداع الحد الأقصى من الرصيد"],"< 1 min":["< دقيقة"],"AO44G_":["عرض الإيصال"],"AOPSKq":["إيداع ",["0"]],"AWtGgd":["احصل على المساعدة"],"AeXO77":["حساب"],"AeZIvT":["ستستلم"],"AikETk":["الحد الأدنى ",["minDeposit"]],"BhQhbU":["استخدم عنوان المستلم المقترح"],"CK1KXz":["الأقصى"],"Ck1xL4":["ترسل"],"D79cZK":["فوري"],"DPfwMq":["تم"],"Dd7jP5":["تواجه مشكلات؟"],"DoS2vD":["إخفاء التفاصيل التقنية"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["الوجهة"],"G-SK3q":["واجهت الواجهة خطأً غير متوقع وتعذَّر إكمال العرض. حاول مرة أخرى، أو أغلق هذا الحوار وأعد المحاولة من التطبيق."],"GX8GKD":["الأصول"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["تمت الإضافة إلى ",["captionSuffix"]],"GwkmPx":["تبديل المبلغ المعروض"],"HfPDJV":["إغلاق — سنُشعرك"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["تمت إضافة أموال إيداعك إلى ",["brand"],"."],"KDw4GX":["حاول مرة أخرى"],"KGoAE6":["تلقائي · ",["value"]],"KTNWsg":["فشل السحب"],"KuqCAK":["~ 2 دقيقة"],"LEbOpR":["مزيد من التفاصيل"],"Ly6geA":["جاري إعادة احتساب عرض السعر…"],"MZ_nQf":["عنوان المستلم"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["ستُضاف أموال إيداعك إلى حسابك."],"Oi8TiZ":["عرض التقدم"],"OsyKSt":["سحب"],"P9fBwv":["Stack"],"PiH3UR":["تم النسخ!"],"Q12Rrs":["معاملة الإيداع"],"QU2cIs":["لديك أسئلة؟"],"Rxjdjn":["لم يكتمل الإيداع"],"SOVBoe":["نسخ عنوان الإيداع"],"SZRUQ4":["أقصى انزلاق سعري"],"Sjplg3":["عرض في المستكشف"],"SlfejT":["Error"],"TG4WOd":["ستُضاف أموال إيداعك إلى ",["brand"],"."],"TT0aVH":["تم إرسال الطلب"],"Uevt3L":["جاري تقدير العرض"],"UqHbdz":["إغلاق إشعار الإيداع قيد التنفيذ"],"V1fa9u":["عرض المزيد"],"VAZUpd":["فشل الطلب"],"WkRH60":["الحد الأدنى ",["0"]],"Wqz0SO":["رصيد منخفض"],"Z1WbO6":["الأموال آمنة على شبكة المصدر — تواصل مع الدعم للاسترجاع."],"ZqugiS":["الرصيد: ",["0"]," ",["1"]],"_girqu":["نجح السحب"],"_kXBrK":["إجمالي الوقت"],"a2WllD":["العملة المستلمة"],"aiEUrg":["إظهار التفاصيل التقنية"],"bOZXx5":["تحديث الطلب"],"bZnukT":["تكلفة الشبكة"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["تطبَّق الشروط"],"cHPbBJ":["تعذَّر على الجسر تمويل معاملة الوجهة (نفد رصيد الغاز)."],"cxR5Qy":["معاملة التسوية"],"e3xU5E":["تم استلام الإيداع"],"fKSGnu":["الحد الأدنى للمبلغ المطلوب على هذه الشبكة لتغطية رسوم الشبكة والتوجيه."],"fWsBTs":["حدث خطأ. حاول مرة أخرى."],"flMR3h":["تم سحب أموالك بنجاح."],"g2UNkE":["مشغل بواسطة"],"gfh8CC":["الشبكات"],"hKMHs1":["الفرق بين الناتج المتوقع للمسار وسعر السوق الأوسط الأساسي."],"he3ygx":["نسخ"],"hehnjM":["المبلغ"],"i-4Fbp":["فشل الإيداع"],"i-EgW-":["التكلفة التقديرية لبث هذه المعاملة على سلسلة الوجهة."],"iH8pgl":["رجوع"],"junZX6":["تم استلام الإيداع وجاري المعالجة…"],"kH6wUX":["تأثير السعر"],"kR8ayx":["بالنقر على تأكيد الإيداع، فإنك توافق على <0>الشروط</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["إيداع"],"kjrq_8":["مزيد من المعلومات"],"lOEm_1":["تم تنفيذ الطلب"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["مسار السيولة المختار المستخدم لتسوية هذا السحب."],"mgLWEL":["تراجعت معاملة الوجهة على السلسلة."],"mvYQx_":["تم الاكتشاف"],"njn4bC":["أكِّد المعاملة في محفظتك"],"nr03QI":["أدخل عنوان المستلم"],"nwtY4N":["حدث خطأ"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["إيداع ",["symbol"]],"oW1G8i":["تم إيداع أموالك بنجاح."],"ob8R_m":["حاول مرة أخرى أو تواصل معنا إذا استمرت المشكلة."],"ogD_nm":["إيداع إلى ",["0"]],"olEUh2":["ناجح"],"pCzTTC":["عنوان الإيداع الخاص بك"],"q32Nt8":["اكتمل السحب"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["تأكيد الإيداع"],"qtoOYG":["بدون حد"],"rT8e1f":["المسار"],"rZdp61":["معاملة الإكمال"],"sSiLKx":["شبكة الاستلام"],"sb9Y58":["محفظة"],"sbwbC0":["طريقة الدفع"],"uPo3PQ":["عرض أقل"],"vrnnn9":["جاري المعالجة"],"w-2VR9":["جاري السحب…"],"wdxz7K":["المصدر"],"xDAtGP":["Message"],"xGVfLh":["متابعة"],"yH9V_J":["أدخل المبلغ"],"yrvWai":["معاملة المصدر"],"yxnt3y":["حالة التنفيذ"],"yy2rkt":["0x…"],"yz7wBu":["إغلاق"],"zYD5xm":["جاري الإضافة"],"zbtijb":["إيداع ",["0"]," إلى ",["1"]],"znqB4T":["رصيد غير كافٍ"],"{hours} hr":[["hours"]," ساعة"],"{minutes} min":[["minutes"]," دقيقة"],"{n}h":[["n"],"س"],"{n}m":[["n"],"د"],"{n}s":[["n"],"ث"]}`);export{e as messages};
|
package/dist/i18n/locales/es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9XIJb8":["T…"],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"HfPDJV":["Cerrar — te notificaremos"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["Tu depósito se acreditó a ",["brand"],"."],"KDw4GX":["Reintentar"],"KGoAE6":["Auto · ",["value"]],"KTNWsg":["El retiro falló"],"KuqCAK":["~ 2 min"],"LEbOpR":["Más detalles"],"Ly6geA":["Regenerando cotización…"],"MZ_nQf":["Dirección del destinatario"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["Tu depósito se acreditará en tu cuenta."],"Oi8TiZ":["Ver progreso"],"OsyKSt":["Retirar"],"P9fBwv":["Stack"],"PiH3UR":["¡Copiado!"],"Q12Rrs":["Tx depósito"],"QU2cIs":["¿Tienes preguntas?"],"Rxjdjn":["El depósito no se completó"],"SOVBoe":["Copiar dirección de depósito"],"SZRUQ4":["Deslizamiento máximo"],"Sjplg3":["Ver en el explorador"],"SlfejT":["Error"],"TG4WOd":["Tu depósito se acreditará a ",["brand"],"."],"TT0aVH":["Orden enviada"],"Uevt3L":["Estimando cotización"],"UqHbdz":["Descartar aviso de depósito pendiente"],"V1fa9u":["Ver más"],"VAZUpd":["Orden fallida"],"WkRH60":["Mín ",["0"]],"Wqz0SO":["Saldo bajo"],"Z1WbO6":["Los fondos están seguros en la red de origen — contacta a soporte para recuperarlos."],"ZqugiS":["Saldo: ",["0"]," ",["1"]],"_girqu":["Retiro exitoso"],"_kXBrK":["Tiempo total"],"a2WllD":["Token a recibir"],"aiEUrg":["Mostrar detalles técnicos"],"bOZXx5":["Actualizar orden"],"bZnukT":["Costo de red"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["Aplican términos"],"cHPbBJ":["El puente no pudo financiar la transacción de destino (presupuesto de gas agotado)."],"cxR5Qy":["Tx liquidación"],"e3xU5E":["Depósito recibido"],"fKSGnu":["Cantidad mínima requerida para que esta red cubra las tarifas y el enrutamiento."],"fWsBTs":["Algo salió mal. Vuelve a intentarlo."],"flMR3h":["Tus fondos fueron retirados con éxito."],"g2UNkE":["Con tecnología de"],"gfh8CC":["Redes"],"hKMHs1":["Diferencia entre el resultado esperado de la ruta y el precio medio de mercado subyacente."],"he3ygx":["Copiar"],"hehnjM":["Monto"],"i-4Fbp":["Depósito fallido"],"i-EgW-":["El costo estimado para emitir esta transacción en la red de destino."],"iH8pgl":["Atrás"],"junZX6":["Depósito recibido y procesando…"],"kH6wUX":["Impacto en precio"],"kR8ayx":["Al hacer clic en Confirmar depósito, aceptas nuestros <0>términos</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["Depositar"],"kjrq_8":["Más información"],"lOEm_1":["Orden completada"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["La ruta de liquidez seleccionada para liquidar este retiro."],"mgLWEL":["La transacción del tramo de destino se revirtió en cadena."],"mvYQx_":["Detectado"],"njn4bC":["Confirma la transacción en tu billetera"],"nr03QI":["Ingresa la dirección del destinatario"],"nwtY4N":["Algo salió mal"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["Depositar ",["symbol"]],"oW1G8i":["Tus fondos se depositaron correctamente."],"ob8R_m":["Inténtalo nuevamente o contáctanos si el problema persiste."],"ogD_nm":["Depositar a ",["0"]],"olEUh2":["Exitoso"],"pCzTTC":["Tu dirección de depósito"],"q32Nt8":["Retiro completado"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["Confirmar depósito"],"qtoOYG":["Sin límite"],"rT8e1f":["Ruta"],"rZdp61":["Tx finalización"],"sSiLKx":["Red a recibir"],"sb9Y58":["Billetera"],"sbwbC0":["Método de pago"],"uPo3PQ":["Ver menos"],"vrnnn9":["Procesando"],"w-2VR9":["Retiro en curso…"],"wdxz7K":["Origen"],"xDAtGP":["Message"],"xGVfLh":["Continuar"],"yH9V_J":["Ingresa el monto"],"yrvWai":["Tx origen"],"yxnt3y":["Estado de ejecución"],"yy2rkt":["0x…"],"yz7wBu":["Cerrar"],"zYD5xm":["Acreditando"],"zbtijb":["Depositar ",["0"]," a ",["1"]],"znqB4T":["Saldo insuficiente"],"{hours} hr":[["hours"]," h"],"{minutes} min":[["minutes"]," min"],"{n}h":[["n"],"h"],"{n}m":[["n"],"m"],"{n}s":[["n"],"s"]}`);export{e as messages};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/shared/i18n/locales/source-keys.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Auto-generated by `scripts/codegen-source-keys.mjs` from `en.po`. Do not edit by hand —
|
|
4
|
+
* re-run `pnpm --filter @stridge/kit run i18n:compile` after changing translatable strings.
|
|
5
|
+
*
|
|
6
|
+
* String literal union of every English source the kit uses in `<Trans>` / `t` macros. Acts
|
|
7
|
+
* as the typed contract for {@link defineMessages}: callers get autocomplete on every key the
|
|
8
|
+
* kit translates, and unknown keys fail at compile time via excess-property checks.
|
|
9
|
+
*/
|
|
10
|
+
type KitTranslatableKey = "0x…" | "< 1 min" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "Close — we'll notify you" | "Completion tx" | "Confirm Deposit" | "Confirm transaction in your wallet" | "Connect a wallet to continue" | "Continue" | "Copied!" | "Copy" | "Copy deposit address" | "Couldn't load deposit options" | "Credited to {captionSuffix}" | "Crediting" | "Deposit" | "Deposit completed" | "Deposit didn't complete" | "Deposit failed" | "Deposit max balance" | "Deposit received" | "Deposit received and processing…" | "Deposit successful" | "Deposit to {0}" | "Deposit tx" | "Deposit {0}" | "Deposit {0} to {1}" | "Deposit {symbol}" | "Destination" | "Detected" | "Difference between the route's expected output and the underlying market mid-price." | "Dismiss pending deposit notice" | "Done" | "Enter Amount" | "Enter Recipient Address" | "Enter Valid Recipient Address" | "Error" | "Estimated time" | "Estimating gas…" | "Estimating quote" | "Experiencing problems?" | "Failed" | "Failed to submit deposit." | "Failed to submit withdrawal." | "Fill status" | "Funds are safe on the source chain — contact support to recover." | "Get help" | "Have questions?" | "Hide technical details" | "In transit" | "Instant" | "Insufficient Balance" | "Insufficient balance" | "Low Balance" | "Max" | "Max slippage" | "Message" | "Min {0}" | "Min {minDeposit}" | "More about {0}" | "More details" | "More information" | "Network cost" | "No limit" | "Order failed" | "Order filled" | "Order submitted" | "Payment Method" | "Please try again or contact us if the issue persists." | "Powered by" | "Price impact" | "Processing" | "Processing time: {resolvedProcessingTime}" | "Receive chain" | "Receive token" | "Recipient address" | "Regenerating quote…" | "Route" | "See less" | "See more" | "Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer." | "Settlement tx" | "Show technical details" | "Signature declined. Please try again." | "Something went wrong" | "Something went wrong. Please try again." | "Source" | "Source tx" | "Stack" | "Successful" | "Swap displayed amount" | "Technical details" | "Terms apply" | "The bridge could not fund the destination transaction (gas budget exhausted)." | "The deposit driver failed to load gateway configuration." | "The destination-leg transaction reverted on-chain." | "The estimated cost to broadcast this transaction on the destination chain." | "The kit hit an unexpected error and could not finish rendering. Try again, or close this dialog and retry from the host." | "The minimum amount required for this chain to cover network fees and routing." | "The route's expected output drifted while your transaction was pending." | "The selected liquidity route used to settle this withdrawal." | "Toggle technical details" | "Tokens" | "Total time" | "Transaction breakdown" | "Transfer Crypto" | "Try again" | "T…" | "Update order" | "Use suggested recipient address" | "View details" | "View on Explorer" | "View progress" | "View receipt" | "Wallet" | "We can't reach the gateway right now" | "Withdraw" | "Withdrawal complete" | "Withdrawal failed" | "Withdrawal failed." | "Withdrawal in progress…" | "Withdrawal successful" | "Withdrawal tx" | "You receive" | "You send" | "You will receive" | "Your deposit address" | "Your deposit has been credited to your account." | "Your deposit has been credited to {brand}." | "Your deposit will be credited to your account." | "Your deposit will be credited to {brand}." | "Your funds were successfully deposited." | "Your funds were successfully withdrawn." | "{0, plural, one {# second} other {# seconds}} left on quote" | "{formattedMin} minimum deposit" | "{hours} hr" | "{minutes} min" | "{n}h" | "{n}m" | "{n}s" | "~ 2 min";
|
|
11
|
+
//#endregion
|
|
12
|
+
export { KitTranslatableKey };
|
|
File without changes
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -19,9 +19,10 @@ import { OkxIcon } from "../shared/icons/exchanges/OkxIcon.js";
|
|
|
19
19
|
import { RobinhoodIcon } from "../shared/icons/exchanges/RobinhoodIcon.js";
|
|
20
20
|
import { InfoIcon } from "../shared/icons/InfoIcon.js";
|
|
21
21
|
import { LoaderIcon } from "../shared/icons/LoaderIcon.js";
|
|
22
|
+
import { LogoIcon } from "../shared/icons/LogoIcon.js";
|
|
22
23
|
import { MailIcon } from "../shared/icons/MailIcon.js";
|
|
23
24
|
import { PackageIcon } from "../shared/icons/PackageIcon.js";
|
|
24
25
|
import { QrCodeIcon } from "../shared/icons/QrCodeIcon.js";
|
|
25
26
|
import { WalletIcon } from "../shared/icons/WalletIcon.js";
|
|
26
27
|
import { XIcon } from "../shared/icons/XIcon.js";
|
|
27
|
-
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
|
28
|
+
export { AlertIcon, ArrowDownIcon, ArrowRightIcon, ArrowRightLeftIcon, BinanceIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleArrowUpIcon, CircleHelpIcon, ClockIcon, CoinbaseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, KrakenIcon, LoaderIcon, LogoIcon, MailIcon, OkxIcon, PackageIcon, QrCodeIcon, RobinhoodIcon, WalletIcon, XIcon };
|
package/dist/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{
|
|
1
|
+
import{AlertIcon as e}from"../shared/icons/AlertIcon.js";import{ArrowDownIcon as t}from"../shared/icons/ArrowDownIcon.js";import{ArrowRightIcon as n}from"../shared/icons/ArrowRightIcon.js";import{ArrowRightLeftIcon as r}from"../shared/icons/ArrowRightLeftIcon.js";import{CheckIcon as i}from"../shared/icons/CheckIcon.js";import{ChevronDownIcon as a}from"../shared/icons/ChevronDownIcon.js";import{ChevronLeftIcon as o}from"../shared/icons/ChevronLeftIcon.js";import{ChevronRightIcon as s}from"../shared/icons/ChevronRightIcon.js";import{ChevronUpIcon as c}from"../shared/icons/ChevronUpIcon.js";import{CircleArrowUpIcon as l}from"../shared/icons/CircleArrowUpIcon.js";import{CircleHelpIcon as u}from"../shared/icons/CircleHelpIcon.js";import{ClockIcon as d}from"../shared/icons/ClockIcon.js";import{CopyIcon as f}from"../shared/icons/CopyIcon.js";import{ExternalLinkIcon as p}from"../shared/icons/ExternalLinkIcon.js";import{BinanceIcon as m}from"../shared/icons/exchanges/BinanceIcon.js";import{CoinbaseIcon as h}from"../shared/icons/exchanges/CoinbaseIcon.js";import{KrakenIcon as g}from"../shared/icons/exchanges/KrakenIcon.js";import{OkxIcon as _}from"../shared/icons/exchanges/OkxIcon.js";import{RobinhoodIcon as v}from"../shared/icons/exchanges/RobinhoodIcon.js";import"../shared/icons/exchanges/index.js";import{InfoIcon as y}from"../shared/icons/InfoIcon.js";import{LoaderIcon as b}from"../shared/icons/LoaderIcon.js";import{LogoIcon as x}from"../shared/icons/LogoIcon.js";import{MailIcon as S}from"../shared/icons/MailIcon.js";import{PackageIcon as C}from"../shared/icons/PackageIcon.js";import{QrCodeIcon as w}from"../shared/icons/QrCodeIcon.js";import{WalletIcon as T}from"../shared/icons/WalletIcon.js";import{XIcon as E}from"../shared/icons/XIcon.js";export{e as AlertIcon,t as ArrowDownIcon,n as ArrowRightIcon,r as ArrowRightLeftIcon,m as BinanceIcon,i as CheckIcon,a as ChevronDownIcon,o as ChevronLeftIcon,s as ChevronRightIcon,c as ChevronUpIcon,l as CircleArrowUpIcon,u as CircleHelpIcon,d as ClockIcon,h as CoinbaseIcon,f as CopyIcon,p as ExternalLinkIcon,y as InfoIcon,g as KrakenIcon,b as LoaderIcon,x as LogoIcon,S as MailIcon,_ as OkxIcon,C as PackageIcon,w as QrCodeIcon,v as RobinhoodIcon,T as WalletIcon,E as XIcon};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { TxRef } from "./shared/driver/types.js";
|
|
2
2
|
import { DepositSnapshot } from "./flows/deposit/driver/types.js";
|
|
3
3
|
import { useDepositSnapshot } from "./flows/deposit/driver/context.js";
|
|
4
|
+
import { ChainInput, ChainSlug, ChainType, chains, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType } from "./shared/chains/index.js";
|
|
4
5
|
import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
|
|
5
6
|
import { useWithdrawSnapshot } from "./flows/withdraw/driver/context.js";
|
|
6
7
|
import { useKitConfig } from "./scope/context.js";
|
|
7
8
|
import { KitPortalScope } from "./scope/KitPortalScope.js";
|
|
9
|
+
import { IntercomMerchantContext } from "./shared/support/useIntercomMerchantContext.js";
|
|
10
|
+
import { SupportConfig, SupportOpenContext } from "./shared/support/types.js";
|
|
8
11
|
import { createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, resolveStorageAdapter } from "./storage/adapters.js";
|
|
9
12
|
import { createKitStorage } from "./storage/createKitStorage.js";
|
|
10
13
|
import { DEFAULT_KIT_STORAGE_NAMESPACE, KitStorageProvider, useKitStorage, useKitStorageValue } from "./storage/context.js";
|
|
11
14
|
import { StridgeEnvironment } from "./drivers/stridge/types.js";
|
|
12
15
|
import { FailureInfo } from "./shared/orchestrator/types.js";
|
|
13
16
|
import { DepositActions, DepositController, DepositMethod, DepositState, DepositStateName, OpenInput } from "./flows/deposit/orchestrator/types.js";
|
|
14
|
-
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
15
|
-
import {
|
|
17
|
+
import { WithdrawActions, WithdrawController, WithdrawState, WithdrawStateName, WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput, WithdrawalFormSnapshot } from "./flows/withdraw/orchestrator/types.js";
|
|
18
|
+
import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient, useWithdrawBindings } from "./flows/withdraw/bindings/WithdrawBindings.js";
|
|
16
19
|
import { ChainLogoMeta } from "./shared/utils/logos/chains.js";
|
|
17
20
|
import { ChainLogoInput, TokenLogoInput } from "./shared/utils/logos/types.js";
|
|
18
21
|
import { LogosNamespace, logos } from "./shared/utils/logos/api.js";
|
|
@@ -22,5 +25,5 @@ import { useDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
|
|
|
22
25
|
import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
|
|
23
26
|
import { useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
|
|
24
27
|
import { useOptionalStridge, useStridge } from "./stridge/StridgeContext.js";
|
|
25
|
-
import { StridgeAppearance, StridgeAsset, StridgeDepositFlowConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
26
|
-
export { type BannerAckBucket, type ChainInput, type ChainLogoInput, type ChainLogoMeta, type ChainSlug, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositFlowConfig, type StridgeEnvironment, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, chains, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, logos, resolveStorageAdapter, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalStridge, useStridge, useWithdraw, useWithdrawSnapshot, useWithdrawState };
|
|
28
|
+
import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
29
|
+
export { type BannerAckBucket, type ChainInput, type ChainLogoInput, type ChainLogoMeta, type ChainSlug, type ChainType, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeEnvironment, type StridgeFlowOwner, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, chains, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalStridge, useStridge, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
|