@tanqory/theme-kit 2.0.0-alpha.17 → 2.0.0-alpha.19
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 +4 -1
- package/dist/abi/canvas-live.d.ts +7 -2
- package/dist/abi/canvas-live.js +8 -3
- package/dist/abi/cart.d.ts +5 -4
- package/dist/abi/cart.js +14 -5
- package/dist/abi/convert.d.ts +18 -2
- package/dist/abi/convert.js +56 -4
- package/dist/abi/data-api.js +4 -0
- package/dist/abi/page-data.d.ts +11 -3
- package/dist/abi/page-data.js +71 -3
- package/dist/abi/wire.d.ts +8 -0
- package/dist/abi/wire.js +32 -2
- package/dist/build.d.ts +7 -2
- package/dist/build.js +96 -5
- package/dist/chunks.d.ts +23 -0
- package/dist/chunks.js +41 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +16 -2
- package/dist/headless/hooks.js +5 -1
- package/dist/headless/index.d.ts +8 -1
- package/dist/headless/index.js +11 -1
- package/dist/headless/lazy-component.d.ts +72 -0
- package/dist/headless/lazy-component.js +225 -0
- package/dist/headless/lazy-section.d.ts +38 -0
- package/dist/headless/lazy-section.js +97 -0
- package/dist/headless/model.d.ts +73 -0
- package/dist/headless/model.js +115 -0
- package/dist/headless/money.d.ts +1 -9
- package/dist/headless/money.js +24 -22
- package/dist/headless/page.d.ts +2 -0
- package/dist/headless/primitives/storefront.js +2 -1
- package/dist/headless/strings.js +8 -0
- package/dist/headless/tanqory-money.generated.d.ts +493 -0
- package/dist/headless/tanqory-money.generated.js +507 -0
- package/dist/headless/theme.d.ts +13 -3
- package/dist/headless/theme.js +12 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/runtime/data/StoreProvider.js +10 -3
- package/dist/runtime/data/to-ui.d.ts +12 -7
- package/dist/runtime/data/to-ui.js +48 -16
- package/dist/runtime/kit/cart.d.ts +10 -3
- package/dist/runtime/kit/contract/content.d.ts +14 -0
- package/dist/runtime/kit/contract/content.js +13 -0
- package/dist/runtime/kit/contract/field-types.d.ts +26 -3
- package/dist/runtime/kit/contract/field-types.js +11 -1
- package/dist/runtime/kit/contract/validate.d.ts +2 -0
- package/dist/runtime/kit/contract/validate.js +49 -9
- package/dist/runtime/kit/data.d.ts +12 -0
- package/dist/runtime/kit/data.js +36 -22
- package/dist/runtime/kit/dynamic-source.d.ts +12 -0
- package/dist/runtime/kit/dynamic-source.js +17 -0
- package/dist/runtime/kit/storefront.d.ts +14 -1
- package/dist/runtime/kit/types.d.ts +8 -0
- package/dist/runtime/render/SectionRenderer.js +44 -11
- package/dist/runtime/render/resolved.d.ts +47 -0
- package/dist/runtime/render/resolved.js +80 -0
- package/dist/runtime/render/section-actions.d.ts +2 -1
- package/dist/runtime/render/section-actions.js +4 -1
- package/dist/runtime/render/starter.js +19 -4
- package/dist/runtime/seo/head.d.ts +1 -1
- package/dist/runtime/shell/PageShell.js +6 -1
- package/dist/runtime/shell/RuntimeBridge.d.ts +4 -0
- package/dist/runtime/shell/RuntimeBridge.js +37 -6
- package/dist/runtime/slots.d.ts +1 -1
- package/dist/sdk/font-hooks.d.ts +7 -0
- package/dist/sdk/font-hooks.js +21 -0
- package/dist/sdk/fonts.d.ts +144 -0
- package/dist/sdk/fonts.js +241 -0
- package/dist/sdk/index.d.ts +7 -1
- package/dist/sdk/index.js +11 -1
- package/dist/sdk/motion-hooks.d.ts +23 -0
- package/dist/sdk/motion-hooks.js +46 -0
- package/dist/sdk/motion.d.ts +78 -0
- package/dist/sdk/motion.js +292 -0
- package/dist/sdk/runtime-context.d.ts +32 -4
- package/dist/sdk/schema.d.ts +47 -4
- package/dist/sdk/schema.js +47 -0
- package/dist/sdk/store-lookup.d.ts +5 -0
- package/dist/sdk/store-lookup.js +19 -0
- package/dist/sdk/store.d.ts +15 -0
- package/dist/sdk/sx.d.ts +5 -0
- package/dist/sdk/sx.js +7 -2
- package/dist/sdk/theme.d.ts +21 -0
- package/dist/sdk/theme.js +17 -0
- package/dist/sdk/types.d.ts +36 -4
- package/dist/server.d.ts +5 -4
- package/dist/server.js +76 -20
- package/dist/vite-chunks.d.ts +10 -0
- package/dist/vite-chunks.js +44 -0
- package/docs/headless-api.md +33 -3
- package/package.json +10 -18
|
@@ -12,7 +12,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
12
12
|
* <AccountSlot /> <iframe data-tq-slot="account">: the platform's account area (customer route)
|
|
13
13
|
*/
|
|
14
14
|
import { useId, useState } from 'react';
|
|
15
|
-
|
|
15
|
+
// The defining module, not the runtime/kit barrel (it pulls react-dom/server into a client bundle; see hooks.ts).
|
|
16
|
+
import { useData } from '../../runtime/kit/data.js';
|
|
16
17
|
import { useServerRender } from '../../sdk/server-render.js';
|
|
17
18
|
import { useConsent, useCustomer, useLocalization, usePredictiveSearch, useSearch } from '../hooks.js';
|
|
18
19
|
import { useTranslate } from '../i18n.js';
|
package/dist/headless/strings.js
CHANGED
|
@@ -22,6 +22,10 @@ export const KIT_STRINGS = {
|
|
|
22
22
|
'cart.checkout': 'Check out',
|
|
23
23
|
'cart.remove': 'Remove',
|
|
24
24
|
'cart.increase': 'Increase quantity',
|
|
25
|
+
'media.view3d': 'View in 3D',
|
|
26
|
+
'media.loading3d': 'Loading the 3D model…',
|
|
27
|
+
'media.model3dUnavailable': 'The 3D model cannot be shown here.',
|
|
28
|
+
'media.viewInYourSpace': 'View in your space',
|
|
25
29
|
'cart.decrease': 'Decrease quantity',
|
|
26
30
|
'cart.quantity': 'Quantity',
|
|
27
31
|
'cart.subtotal': 'Subtotal',
|
|
@@ -113,6 +117,10 @@ export const KIT_STRINGS = {
|
|
|
113
117
|
'cart.checkout': 'ชำระเงิน',
|
|
114
118
|
'cart.remove': 'นำออก',
|
|
115
119
|
'cart.increase': 'เพิ่มจำนวน',
|
|
120
|
+
'media.view3d': 'ดูแบบ 3 มิติ',
|
|
121
|
+
'media.loading3d': 'กำลังโหลดโมเดล 3 มิติ…',
|
|
122
|
+
'media.model3dUnavailable': 'แสดงโมเดล 3 มิติที่นี่ไม่ได้',
|
|
123
|
+
'media.viewInYourSpace': 'ดูในพื้นที่ของคุณ',
|
|
116
124
|
'cart.decrease': 'ลดจำนวน',
|
|
117
125
|
'cart.quantity': 'จำนวน',
|
|
118
126
|
'cart.subtotal': 'ยอดรวมย่อย',
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tanqory/money: the one currency table and the one money arithmetic of the platform (docs/STANDARDS.md API-6).
|
|
3
|
+
*
|
|
4
|
+
* - Digits per currency are ISO 4217's minor units, from the maintenance agency's list one (SIX, published
|
|
5
|
+
* 2026-09-17, ISO_4217 below). Nothing else decides how many digits an amount has: not Intl (CLDR's display digits
|
|
6
|
+
* differ for IQD, LBP, RSD, AFN, ...), not a provider's list.
|
|
7
|
+
* - A payment provider that counts some currency in another exponent (Stripe sends ISK as two decimals "00") is a
|
|
8
|
+
* documented entry of PROVIDER_UNITS here, with its source, and is only used at that provider's boundary.
|
|
9
|
+
* - Amounts are decimal strings ("12.34", "1200", "1.250") or integer minor units at a provider boundary. The
|
|
10
|
+
* arithmetic here is exact (BigInt scaled integers), never a JS number: a JSON number is an IEEE 754 binary64
|
|
11
|
+
* (RFC 8259 §6), and 0.1 + 0.2 is not 0.3 in it.
|
|
12
|
+
* - Rounding is half up (away from zero at the half, as Prisma.Decimal ROUND_HALF_UP and DATABASE_STANDARD 3.5's
|
|
13
|
+
* roundMoney) unless the caller names another mode.
|
|
14
|
+
*
|
|
15
|
+
* Zero dependencies; runs on Node, Workers, browsers and Next. The api keeps Prisma.Decimal for its own arithmetic
|
|
16
|
+
* (API-6 allows a decimal type) and takes its digits and provider units from here.
|
|
17
|
+
*/
|
|
18
|
+
/** Where the table comes from. Re-check against list one when SIX publishes a new one (amendments are rare). */
|
|
19
|
+
declare const ISO_4217: Readonly<{
|
|
20
|
+
source: "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml";
|
|
21
|
+
published: "2026-09-17";
|
|
22
|
+
read: "2026-11-19";
|
|
23
|
+
}>;
|
|
24
|
+
/** List one's codes with no minor unit ("N.A."): funds, metals, the test and "no currency" codes. Not prices. */
|
|
25
|
+
declare const NO_MINOR_UNIT: readonly string[];
|
|
26
|
+
/** Every ISO 4217 currency with a minor unit, and its digits. */
|
|
27
|
+
declare const CURRENCY_DIGITS: any;
|
|
28
|
+
/** The currency's ISO 4217 minor unit: JPY 0, USD 2, KWD 3, CLF 4. An unknown code, or one with none, is 2. */
|
|
29
|
+
declare function currencyDigits(code: any): any;
|
|
30
|
+
/** True for a list-one code that is a currency with a minor unit (a price can be in it). */
|
|
31
|
+
declare function isCurrencyCode(code: any): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Display only: the currencies a price is shown in whole units although ISO 4217 gives them 2 digits. The amount keeps
|
|
34
|
+
* its ISO digits everywhere it is computed, stored, charged or sent; only formatting for a reader drops the fraction.
|
|
35
|
+
* Source: CLDR common/supplemental/supplementalData.xml <currencyData> (unicode-org/cldr main, read 2026-11-19):
|
|
36
|
+
* HUF digits="0", IDR digits="0", TWD cashDigits="0" (TWD digits="2"). The list is these three on purpose: the other
|
|
37
|
+
* currencies CLDR shows with fewer digits than ISO (IQD 0, LBP 0, ...) are shown in ISO's digits, so a shopper sees the
|
|
38
|
+
* amount they are charged.
|
|
39
|
+
*/
|
|
40
|
+
declare const DISPLAY_WHOLE_UNITS: readonly string[];
|
|
41
|
+
/** The fraction digits a price is shown with: 0 for DISPLAY_WHOLE_UNITS, else currencyDigits (JPY 0, USD 2, KWD 3). */
|
|
42
|
+
declare function displayDigits(code: any): any;
|
|
43
|
+
/**
|
|
44
|
+
* The amount as a reader sees it, exact: rounded half up to displayDigits ("1234.5" JPY "1235", KWD "1234.500", IDR
|
|
45
|
+
* "1235"); grouping and the symbol are the formatter's. Throws InvalidAmountError when the amount is not a decimal.
|
|
46
|
+
*/
|
|
47
|
+
declare function displayAmount(amount: any, code: any): any;
|
|
48
|
+
declare const PROVIDER_UNITS: Readonly<{
|
|
49
|
+
stripe: Readonly<{
|
|
50
|
+
ISK: Readonly<{
|
|
51
|
+
exponent: any;
|
|
52
|
+
precision: any;
|
|
53
|
+
}>;
|
|
54
|
+
UGX: Readonly<{
|
|
55
|
+
exponent: any;
|
|
56
|
+
precision: any;
|
|
57
|
+
}>;
|
|
58
|
+
'*': Readonly<{
|
|
59
|
+
exponent: any;
|
|
60
|
+
precision: any;
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
stripe_payout: Readonly<{
|
|
64
|
+
ISK: Readonly<{
|
|
65
|
+
exponent: any;
|
|
66
|
+
precision: any;
|
|
67
|
+
}>;
|
|
68
|
+
UGX: Readonly<{
|
|
69
|
+
exponent: any;
|
|
70
|
+
precision: any;
|
|
71
|
+
}>;
|
|
72
|
+
HUF: Readonly<{
|
|
73
|
+
exponent: any;
|
|
74
|
+
precision: any;
|
|
75
|
+
}>;
|
|
76
|
+
TWD: Readonly<{
|
|
77
|
+
exponent: any;
|
|
78
|
+
precision: any;
|
|
79
|
+
}>;
|
|
80
|
+
'*': Readonly<{
|
|
81
|
+
exponent: any;
|
|
82
|
+
precision: any;
|
|
83
|
+
}>;
|
|
84
|
+
}>;
|
|
85
|
+
paypal: Readonly<{
|
|
86
|
+
'*': Readonly<{
|
|
87
|
+
exponent: any;
|
|
88
|
+
precision: any;
|
|
89
|
+
}>;
|
|
90
|
+
HUF: Readonly<{
|
|
91
|
+
exponent: any;
|
|
92
|
+
precision: any;
|
|
93
|
+
}>;
|
|
94
|
+
JPY: Readonly<{
|
|
95
|
+
exponent: any;
|
|
96
|
+
precision: any;
|
|
97
|
+
}>;
|
|
98
|
+
TWD: Readonly<{
|
|
99
|
+
exponent: any;
|
|
100
|
+
precision: any;
|
|
101
|
+
}>;
|
|
102
|
+
}>;
|
|
103
|
+
omise: Readonly<{
|
|
104
|
+
'*': Readonly<{
|
|
105
|
+
exponent: any;
|
|
106
|
+
precision: any;
|
|
107
|
+
}>;
|
|
108
|
+
JPY: Readonly<{
|
|
109
|
+
exponent: any;
|
|
110
|
+
precision: any;
|
|
111
|
+
}>;
|
|
112
|
+
}>;
|
|
113
|
+
aba_payway: Readonly<{
|
|
114
|
+
KHR: Readonly<{
|
|
115
|
+
exponent: any;
|
|
116
|
+
precision: any;
|
|
117
|
+
}>;
|
|
118
|
+
}>;
|
|
119
|
+
barion: Readonly<{
|
|
120
|
+
HUF: Readonly<{
|
|
121
|
+
exponent: any;
|
|
122
|
+
precision: any;
|
|
123
|
+
}>;
|
|
124
|
+
}>;
|
|
125
|
+
checkout_com: Readonly<{
|
|
126
|
+
CLP: Readonly<{
|
|
127
|
+
exponent: any;
|
|
128
|
+
precision: any;
|
|
129
|
+
}>;
|
|
130
|
+
}>;
|
|
131
|
+
newebpay: Readonly<{
|
|
132
|
+
TWD: Readonly<{
|
|
133
|
+
exponent: any;
|
|
134
|
+
precision: any;
|
|
135
|
+
}>;
|
|
136
|
+
}>;
|
|
137
|
+
tappay: Readonly<{
|
|
138
|
+
TWD: Readonly<{
|
|
139
|
+
exponent: any;
|
|
140
|
+
precision: any;
|
|
141
|
+
}>;
|
|
142
|
+
}>;
|
|
143
|
+
nicepay: Readonly<{
|
|
144
|
+
IDR: Readonly<{
|
|
145
|
+
exponent: any;
|
|
146
|
+
precision: any;
|
|
147
|
+
}>;
|
|
148
|
+
}>;
|
|
149
|
+
vnpay: Readonly<{
|
|
150
|
+
VND: Readonly<{
|
|
151
|
+
exponent: any;
|
|
152
|
+
precision: any;
|
|
153
|
+
}>;
|
|
154
|
+
}>;
|
|
155
|
+
midtrans: Readonly<{
|
|
156
|
+
IDR: Readonly<{
|
|
157
|
+
exponent: any;
|
|
158
|
+
precision: any;
|
|
159
|
+
}>;
|
|
160
|
+
}>;
|
|
161
|
+
tripay: Readonly<{
|
|
162
|
+
IDR: Readonly<{
|
|
163
|
+
exponent: any;
|
|
164
|
+
precision: any;
|
|
165
|
+
}>;
|
|
166
|
+
}>;
|
|
167
|
+
getnet: Readonly<{
|
|
168
|
+
CLP: Readonly<{
|
|
169
|
+
exponent: any;
|
|
170
|
+
precision: any;
|
|
171
|
+
}>;
|
|
172
|
+
}>;
|
|
173
|
+
}>;
|
|
174
|
+
/**
|
|
175
|
+
* The currencies a provider prices in, where its docs publish a closed list and its adapter refuses any other currency
|
|
176
|
+
* before a request (API-6: the list lives here beside PROVIDER_UNITS, never as a table in an adapter). Each entry names
|
|
177
|
+
* its source; the order is the docs' (an adapter's refusal lists them in it). Units stay ISO 4217's unless
|
|
178
|
+
* PROVIDER_UNITS says otherwise.
|
|
179
|
+
*/
|
|
180
|
+
declare const PROVIDER_CURRENCIES: Readonly<{
|
|
181
|
+
crypto_com_pay: readonly string[];
|
|
182
|
+
fastspring: readonly string[];
|
|
183
|
+
paddle: readonly string[];
|
|
184
|
+
upayments: readonly string[];
|
|
185
|
+
}>;
|
|
186
|
+
/** The currencies a provider of PROVIDER_CURRENCIES prices in, in its docs' order. */
|
|
187
|
+
declare function providerCurrencies(provider: any): any;
|
|
188
|
+
/** True when the provider prices in the currency (case- and space-insensitive). */
|
|
189
|
+
declare function providerTakes(provider: any, code: any): any;
|
|
190
|
+
/** The units a provider counts a currency in (ISO's when the provider has no entry for it). */
|
|
191
|
+
declare function providerUnits(provider: any, code: any): any;
|
|
192
|
+
declare class InvalidAmountError extends Error {
|
|
193
|
+
constructor(value: any);
|
|
194
|
+
}
|
|
195
|
+
declare class InexactAmountError extends Error {
|
|
196
|
+
constructor(amount: any, currency: any);
|
|
197
|
+
}
|
|
198
|
+
declare const ROUNDING_MODES: readonly string[];
|
|
199
|
+
/** The value as a decimal string with exactly `digits` decimals, rounded by `mode` (half_up). */
|
|
200
|
+
declare function toFixedDigits(value: any, digits: any, mode?: string): any;
|
|
201
|
+
/** The amount rounded to its currency's ISO 4217 digits: "12.35" (USD), "1235" (JPY), "1.235" (KWD). */
|
|
202
|
+
declare function roundMoney(amount: any, currency: any, mode?: string): any;
|
|
203
|
+
/** The exact value as the shortest decimal string ("1.5", "-0.25", "3"). */
|
|
204
|
+
declare function decimalText(value: any): any;
|
|
205
|
+
/** a + b, exact. */
|
|
206
|
+
declare function add(a: any, b: any): any;
|
|
207
|
+
/** a - b, exact. */
|
|
208
|
+
declare function sub(a: any, b: any): any;
|
|
209
|
+
/** a x b, exact (a quantity, a rate or a ratio as b). */
|
|
210
|
+
declare function mul(a: any, b: any): any;
|
|
211
|
+
/** The sum of a list, exact ("0" for none). */
|
|
212
|
+
declare function sum(values: any): string;
|
|
213
|
+
/** -1, 0 or 1 as a is below, equal to or above b. */
|
|
214
|
+
declare function compare(a: any, b: any): 1 | 0 | -1;
|
|
215
|
+
declare function isZero(a: any): boolean;
|
|
216
|
+
declare function negate(a: any): any;
|
|
217
|
+
/** a / b rounded to `digits` decimals by `mode` (half_up). b must not be 0. */
|
|
218
|
+
declare function div(a: any, b: any, digits: any, mode?: string): any;
|
|
219
|
+
/** `pct` percent of the amount, rounded to the currency's digits by `mode` (half_up): percentOf("19.99", "7", "USD") = "1.40". */
|
|
220
|
+
declare function percentOf(amount: any, pct: any, currency: any, mode?: string): any;
|
|
221
|
+
/**
|
|
222
|
+
* The amount split in proportion to `weights` (decimal strings or numbers >= 0), each part in the currency's digits,
|
|
223
|
+
* the parts summing exactly to the amount rounded to the currency (largest remainder; ties go to the earlier part).
|
|
224
|
+
*/
|
|
225
|
+
declare function allocate(amount: any, weights: any, currency: any): any;
|
|
226
|
+
/**
|
|
227
|
+
* The amount as the integer a provider is sent: rounded to the currency's precision for that provider (half up),
|
|
228
|
+
* times 10^exponent. ISO's digits when `opts.provider` is absent. Throws InexactAmountError when the result is not a
|
|
229
|
+
* safe integer, or when `opts.exact` and the amount had more digits than the precision (never charge a near amount).
|
|
230
|
+
*/
|
|
231
|
+
declare function toMinorUnits(amount: any, currency: any, opts?: {}): number;
|
|
232
|
+
/**
|
|
233
|
+
* A provider's integer amount back to a decimal string in the currency's ISO digits ("10.50", "1050", "1.050").
|
|
234
|
+
* Not an integer: InvalidAmountError. More digits than ISO has (a provider's sub-unit): kept exact, not rounded.
|
|
235
|
+
*/
|
|
236
|
+
declare function fromMinorUnits(minor: any, currency: any, opts?: {}): any;
|
|
237
|
+
/**
|
|
238
|
+
* The local currency of each country (ISO 3166-1 alpha-2 → ISO 4217), for every CountryCode value of the Admin API but
|
|
239
|
+
* ZZ ("unknown region", no currency). Used by the markets domain (a market's currency follows its countries;
|
|
240
|
+
* MarketRegionCountry.currency when a market sells in local currencies), by store creation and by platform billing.
|
|
241
|
+
* Not stated by any standard: a country whose own currency is not a CurrencyCode value (CU, KP, ZW) uses USD.
|
|
242
|
+
*/
|
|
243
|
+
declare const COUNTRY_CURRENCY: Readonly<{
|
|
244
|
+
AF: "AFN";
|
|
245
|
+
AX: "EUR";
|
|
246
|
+
AL: "ALL";
|
|
247
|
+
DZ: "DZD";
|
|
248
|
+
AD: "EUR";
|
|
249
|
+
AO: "AOA";
|
|
250
|
+
AI: "XCD";
|
|
251
|
+
AG: "XCD";
|
|
252
|
+
AR: "ARS";
|
|
253
|
+
AM: "AMD";
|
|
254
|
+
AW: "AWG";
|
|
255
|
+
AC: "SHP";
|
|
256
|
+
AU: "AUD";
|
|
257
|
+
AT: "EUR";
|
|
258
|
+
AZ: "AZN";
|
|
259
|
+
BS: "BSD";
|
|
260
|
+
BH: "BHD";
|
|
261
|
+
BD: "BDT";
|
|
262
|
+
BB: "BBD";
|
|
263
|
+
BY: "BYN";
|
|
264
|
+
BE: "EUR";
|
|
265
|
+
BZ: "BZD";
|
|
266
|
+
BJ: "XOF";
|
|
267
|
+
BM: "BMD";
|
|
268
|
+
BT: "BTN";
|
|
269
|
+
BO: "BOB";
|
|
270
|
+
BA: "BAM";
|
|
271
|
+
BW: "BWP";
|
|
272
|
+
BV: "NOK";
|
|
273
|
+
BR: "BRL";
|
|
274
|
+
IO: "USD";
|
|
275
|
+
BN: "BND";
|
|
276
|
+
BG: "EUR";
|
|
277
|
+
BF: "XOF";
|
|
278
|
+
BI: "BIF";
|
|
279
|
+
KH: "KHR";
|
|
280
|
+
CA: "CAD";
|
|
281
|
+
CV: "CVE";
|
|
282
|
+
BQ: "USD";
|
|
283
|
+
KY: "KYD";
|
|
284
|
+
CF: "XAF";
|
|
285
|
+
TD: "XAF";
|
|
286
|
+
CL: "CLP";
|
|
287
|
+
CN: "CNY";
|
|
288
|
+
CX: "AUD";
|
|
289
|
+
CC: "AUD";
|
|
290
|
+
CO: "COP";
|
|
291
|
+
KM: "KMF";
|
|
292
|
+
CG: "XAF";
|
|
293
|
+
CD: "CDF";
|
|
294
|
+
CK: "NZD";
|
|
295
|
+
CR: "CRC";
|
|
296
|
+
HR: "EUR";
|
|
297
|
+
CU: "USD";
|
|
298
|
+
CW: "XCG";
|
|
299
|
+
CY: "EUR";
|
|
300
|
+
CZ: "CZK";
|
|
301
|
+
CI: "XOF";
|
|
302
|
+
DK: "DKK";
|
|
303
|
+
DJ: "DJF";
|
|
304
|
+
DM: "XCD";
|
|
305
|
+
DO: "DOP";
|
|
306
|
+
EC: "USD";
|
|
307
|
+
EG: "EGP";
|
|
308
|
+
SV: "USD";
|
|
309
|
+
GQ: "XAF";
|
|
310
|
+
ER: "ERN";
|
|
311
|
+
EE: "EUR";
|
|
312
|
+
SZ: "SZL";
|
|
313
|
+
ET: "ETB";
|
|
314
|
+
FK: "FKP";
|
|
315
|
+
FO: "DKK";
|
|
316
|
+
FJ: "FJD";
|
|
317
|
+
FI: "EUR";
|
|
318
|
+
FR: "EUR";
|
|
319
|
+
GF: "EUR";
|
|
320
|
+
PF: "XPF";
|
|
321
|
+
TF: "EUR";
|
|
322
|
+
GA: "XAF";
|
|
323
|
+
GM: "GMD";
|
|
324
|
+
GE: "GEL";
|
|
325
|
+
DE: "EUR";
|
|
326
|
+
GH: "GHS";
|
|
327
|
+
GI: "GIP";
|
|
328
|
+
GR: "EUR";
|
|
329
|
+
GL: "DKK";
|
|
330
|
+
GD: "XCD";
|
|
331
|
+
GP: "EUR";
|
|
332
|
+
GT: "GTQ";
|
|
333
|
+
GG: "GBP";
|
|
334
|
+
GN: "GNF";
|
|
335
|
+
GW: "XOF";
|
|
336
|
+
GY: "GYD";
|
|
337
|
+
HT: "HTG";
|
|
338
|
+
HM: "AUD";
|
|
339
|
+
VA: "EUR";
|
|
340
|
+
HN: "HNL";
|
|
341
|
+
HK: "HKD";
|
|
342
|
+
HU: "HUF";
|
|
343
|
+
IS: "ISK";
|
|
344
|
+
IN: "INR";
|
|
345
|
+
ID: "IDR";
|
|
346
|
+
IR: "IRR";
|
|
347
|
+
IQ: "IQD";
|
|
348
|
+
IE: "EUR";
|
|
349
|
+
IM: "GBP";
|
|
350
|
+
IL: "ILS";
|
|
351
|
+
IT: "EUR";
|
|
352
|
+
JM: "JMD";
|
|
353
|
+
JP: "JPY";
|
|
354
|
+
JE: "GBP";
|
|
355
|
+
JO: "JOD";
|
|
356
|
+
KZ: "KZT";
|
|
357
|
+
KE: "KES";
|
|
358
|
+
KI: "AUD";
|
|
359
|
+
KP: "USD";
|
|
360
|
+
XK: "EUR";
|
|
361
|
+
KW: "KWD";
|
|
362
|
+
KG: "KGS";
|
|
363
|
+
LA: "LAK";
|
|
364
|
+
LV: "EUR";
|
|
365
|
+
LB: "LBP";
|
|
366
|
+
LS: "LSL";
|
|
367
|
+
LR: "LRD";
|
|
368
|
+
LY: "LYD";
|
|
369
|
+
LI: "CHF";
|
|
370
|
+
LT: "EUR";
|
|
371
|
+
LU: "EUR";
|
|
372
|
+
MO: "MOP";
|
|
373
|
+
MG: "MGA";
|
|
374
|
+
MW: "MWK";
|
|
375
|
+
MY: "MYR";
|
|
376
|
+
MV: "MVR";
|
|
377
|
+
ML: "XOF";
|
|
378
|
+
MT: "EUR";
|
|
379
|
+
MQ: "EUR";
|
|
380
|
+
MR: "MRU";
|
|
381
|
+
MU: "MUR";
|
|
382
|
+
YT: "EUR";
|
|
383
|
+
MX: "MXN";
|
|
384
|
+
MD: "MDL";
|
|
385
|
+
MC: "EUR";
|
|
386
|
+
MN: "MNT";
|
|
387
|
+
ME: "EUR";
|
|
388
|
+
MS: "XCD";
|
|
389
|
+
MA: "MAD";
|
|
390
|
+
MZ: "MZN";
|
|
391
|
+
MM: "MMK";
|
|
392
|
+
NA: "NAD";
|
|
393
|
+
NR: "AUD";
|
|
394
|
+
NP: "NPR";
|
|
395
|
+
NL: "EUR";
|
|
396
|
+
AN: "ANG";
|
|
397
|
+
NC: "XPF";
|
|
398
|
+
NZ: "NZD";
|
|
399
|
+
NI: "NIO";
|
|
400
|
+
NE: "XOF";
|
|
401
|
+
NG: "NGN";
|
|
402
|
+
NU: "NZD";
|
|
403
|
+
NF: "AUD";
|
|
404
|
+
MK: "MKD";
|
|
405
|
+
NO: "NOK";
|
|
406
|
+
OM: "OMR";
|
|
407
|
+
PK: "PKR";
|
|
408
|
+
PS: "ILS";
|
|
409
|
+
PA: "PAB";
|
|
410
|
+
PG: "PGK";
|
|
411
|
+
PY: "PYG";
|
|
412
|
+
PE: "PEN";
|
|
413
|
+
PH: "PHP";
|
|
414
|
+
PN: "NZD";
|
|
415
|
+
PL: "PLN";
|
|
416
|
+
PT: "EUR";
|
|
417
|
+
QA: "QAR";
|
|
418
|
+
CM: "XAF";
|
|
419
|
+
RE: "EUR";
|
|
420
|
+
RO: "RON";
|
|
421
|
+
RU: "RUB";
|
|
422
|
+
RW: "RWF";
|
|
423
|
+
BL: "EUR";
|
|
424
|
+
SH: "SHP";
|
|
425
|
+
KN: "XCD";
|
|
426
|
+
LC: "XCD";
|
|
427
|
+
MF: "EUR";
|
|
428
|
+
PM: "EUR";
|
|
429
|
+
WS: "WST";
|
|
430
|
+
SM: "EUR";
|
|
431
|
+
ST: "STN";
|
|
432
|
+
SA: "SAR";
|
|
433
|
+
SN: "XOF";
|
|
434
|
+
RS: "RSD";
|
|
435
|
+
SC: "SCR";
|
|
436
|
+
SL: "SLL";
|
|
437
|
+
SG: "SGD";
|
|
438
|
+
SX: "XCG";
|
|
439
|
+
SK: "EUR";
|
|
440
|
+
SI: "EUR";
|
|
441
|
+
SB: "SBD";
|
|
442
|
+
SO: "SOS";
|
|
443
|
+
ZA: "ZAR";
|
|
444
|
+
GS: "GBP";
|
|
445
|
+
KR: "KRW";
|
|
446
|
+
SS: "SSP";
|
|
447
|
+
ES: "EUR";
|
|
448
|
+
LK: "LKR";
|
|
449
|
+
VC: "XCD";
|
|
450
|
+
SD: "SDG";
|
|
451
|
+
SR: "SRD";
|
|
452
|
+
SJ: "NOK";
|
|
453
|
+
SE: "SEK";
|
|
454
|
+
CH: "CHF";
|
|
455
|
+
SY: "SYP";
|
|
456
|
+
TW: "TWD";
|
|
457
|
+
TJ: "TJS";
|
|
458
|
+
TZ: "TZS";
|
|
459
|
+
TH: "THB";
|
|
460
|
+
TL: "USD";
|
|
461
|
+
TG: "XOF";
|
|
462
|
+
TK: "NZD";
|
|
463
|
+
TO: "TOP";
|
|
464
|
+
TT: "TTD";
|
|
465
|
+
TA: "GBP";
|
|
466
|
+
TN: "TND";
|
|
467
|
+
TR: "TRY";
|
|
468
|
+
TM: "TMT";
|
|
469
|
+
TC: "USD";
|
|
470
|
+
TV: "AUD";
|
|
471
|
+
UG: "UGX";
|
|
472
|
+
UA: "UAH";
|
|
473
|
+
AE: "AED";
|
|
474
|
+
GB: "GBP";
|
|
475
|
+
US: "USD";
|
|
476
|
+
UM: "USD";
|
|
477
|
+
UY: "UYU";
|
|
478
|
+
UZ: "UZS";
|
|
479
|
+
VU: "VUV";
|
|
480
|
+
VE: "VES";
|
|
481
|
+
VN: "VND";
|
|
482
|
+
VG: "USD";
|
|
483
|
+
WF: "XPF";
|
|
484
|
+
EH: "MAD";
|
|
485
|
+
YE: "YER";
|
|
486
|
+
ZM: "ZMW";
|
|
487
|
+
ZW: "USD";
|
|
488
|
+
}>;
|
|
489
|
+
/** The local currency of a country code (upper case), or null for an unknown code or ZZ. */
|
|
490
|
+
declare function countryCurrency(code: any): any;
|
|
491
|
+
/** The distinct local currencies of a list of countries, in first-seen order; unknown codes are skipped. */
|
|
492
|
+
declare function countryCurrencies(codes: any): any[];
|
|
493
|
+
export { COUNTRY_CURRENCY, countryCurrency, countryCurrencies, ISO_4217, CURRENCY_DIGITS, NO_MINOR_UNIT, DISPLAY_WHOLE_UNITS, displayDigits, displayAmount, PROVIDER_UNITS, PROVIDER_CURRENCIES, ROUNDING_MODES, InvalidAmountError, InexactAmountError, currencyDigits, isCurrencyCode, providerUnits, providerCurrencies, providerTakes, toFixedDigits, roundMoney, decimalText, add, sub, mul, div, sum, compare, isZero, negate, percentOf, allocate, toMinorUnits, fromMinorUnits, };
|