use-intl 2.17.4 → 2.17.5

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.
Files changed (484) hide show
  1. package/dist/_virtual/use-intl.esm.js +102 -0
  2. package/dist/_virtual/use-intl.esm.js.map +1 -0
  3. package/dist/core/AbstractIntlMessages.d.ts +9 -10
  4. package/dist/core/DateTimeFormatOptions.d.ts +73 -75
  5. package/dist/core/Formats.d.ts +8 -11
  6. package/dist/core/IntlConfig.d.ts +54 -60
  7. package/dist/core/IntlError.d.ts +13 -15
  8. package/dist/core/NumberFormatOptions.d.ts +2 -2
  9. package/dist/core/TimeZone.d.ts +2 -3
  10. package/dist/core/TranslationValues.d.ts +5 -7
  11. package/dist/core/convertFormatsToIntlMessageFormat.d.ts +11 -16
  12. package/dist/core/createBaseTranslator.d.ts +26 -32
  13. package/dist/core/createFormatter.d.ts +19 -21
  14. package/dist/core/createIntl.d.ts +7 -15
  15. package/dist/core/createTranslator.d.ts +48 -57
  16. package/dist/core/createTranslatorImpl.d.ts +14 -25
  17. package/dist/core/defaults.d.ts +11 -14
  18. package/dist/core/index.d.ts +9 -17
  19. package/dist/core/resolveNamespace.d.ts +5 -7
  20. package/dist/core/use-intl.esm.js +33 -0
  21. package/dist/core/use-intl.esm.js.map +1 -0
  22. package/dist/core/use-intl.esm10.js +32 -0
  23. package/dist/core/use-intl.esm10.js.map +1 -0
  24. package/dist/core/use-intl.esm2.js +37 -0
  25. package/dist/core/use-intl.esm2.js.map +1 -0
  26. package/dist/core/use-intl.esm3.js +138 -0
  27. package/dist/core/use-intl.esm3.js.map +1 -0
  28. package/dist/core/use-intl.esm4.js +14 -0
  29. package/dist/core/use-intl.esm4.js.map +1 -0
  30. package/dist/core/use-intl.esm5.js +53 -0
  31. package/dist/core/use-intl.esm5.js.map +1 -0
  32. package/dist/core/use-intl.esm6.js +15 -0
  33. package/dist/core/use-intl.esm6.js.map +1 -0
  34. package/dist/core/use-intl.esm7.js +191 -0
  35. package/dist/core/use-intl.esm7.js.map +1 -0
  36. package/dist/core/use-intl.esm8.js +10 -0
  37. package/dist/core/use-intl.esm8.js.map +1 -0
  38. package/dist/core/use-intl.esm9.js +28 -0
  39. package/dist/core/use-intl.esm9.js.map +1 -0
  40. package/dist/core/utils/MessageKeys.d.ts +5 -7
  41. package/dist/core/utils/NamespaceKeys.d.ts +5 -7
  42. package/dist/core/utils/NestedKeyOf.d.ts +4 -5
  43. package/dist/core/utils/NestedValueOf.d.ts +2 -3
  44. package/dist/core/validateMessages.d.ts +3 -6
  45. package/dist/index.d.ts +2 -25
  46. package/dist/index.js +8 -2
  47. package/dist/react/IntlContext.d.ts +4 -13
  48. package/dist/react/IntlProvider.d.ts +7 -16
  49. package/dist/react/getInitializedConfig.d.ts +13 -24
  50. package/dist/react/index.d.ts +8 -21
  51. package/dist/react/use-intl.esm.js +16 -0
  52. package/dist/react/use-intl.esm.js.map +1 -0
  53. package/dist/react/use-intl.esm10.js +29 -0
  54. package/dist/react/use-intl.esm10.js.map +1 -0
  55. package/dist/react/use-intl.esm11.js +13 -0
  56. package/dist/react/use-intl.esm11.js.map +1 -0
  57. package/dist/react/use-intl.esm12.js +43 -0
  58. package/dist/react/use-intl.esm12.js.map +1 -0
  59. package/dist/react/use-intl.esm2.js +26 -0
  60. package/dist/react/use-intl.esm2.js.map +1 -0
  61. package/dist/react/use-intl.esm3.js +8 -0
  62. package/dist/react/use-intl.esm3.js.map +1 -0
  63. package/dist/react/{useNow.d.mts → use-intl.esm4.js} +42 -21
  64. package/dist/react/use-intl.esm4.js.map +1 -0
  65. package/dist/react/use-intl.esm5.js +8 -0
  66. package/dist/react/use-intl.esm5.js.map +1 -0
  67. package/dist/react/use-intl.esm6.js +8 -0
  68. package/dist/react/use-intl.esm6.js.map +1 -0
  69. package/dist/react/use-intl.esm7.js +24 -0
  70. package/dist/react/use-intl.esm7.js.map +1 -0
  71. package/dist/react/use-intl.esm8.js +30 -0
  72. package/dist/react/use-intl.esm8.js.map +1 -0
  73. package/dist/react/use-intl.esm9.js +6 -0
  74. package/dist/react/use-intl.esm9.js.map +1 -0
  75. package/dist/react/useFormatter.d.ts +6 -12
  76. package/dist/react/useIntl.d.ts +6 -12
  77. package/dist/react/useIntlContext.d.ts +1 -13
  78. package/dist/react/useLocale.d.ts +1 -3
  79. package/dist/react/useMessages.d.ts +1 -5
  80. package/dist/react/useNow.d.ts +23 -24
  81. package/dist/react/useTimeZone.d.ts +1 -5
  82. package/dist/react/useTranslations.d.ts +44 -50
  83. package/dist/react/useTranslationsImpl.d.ts +8 -16
  84. package/dist/src/core/AbstractIntlMessages.d.ts +1 -2
  85. package/dist/src/core/AbstractIntlMessages.js +1 -1
  86. package/dist/src/core/AbstractIntlMessages.js.map +1 -1
  87. package/dist/src/core/DateTimeFormatOptions.d.ts +2 -4
  88. package/dist/src/core/DateTimeFormatOptions.js +2 -1
  89. package/dist/src/core/DateTimeFormatOptions.js.map +1 -1
  90. package/dist/src/core/Formats.d.ts +3 -6
  91. package/dist/src/core/Formats.js +1 -1
  92. package/dist/src/core/Formats.js.map +1 -1
  93. package/dist/src/core/IntlConfig.d.ts +6 -12
  94. package/dist/src/core/IntlConfig.js +1 -1
  95. package/dist/src/core/IntlConfig.js.map +1 -1
  96. package/dist/src/core/IntlError.d.ts +2 -4
  97. package/dist/src/core/IntlError.js +22 -1
  98. package/dist/src/core/IntlError.js.map +1 -1
  99. package/dist/src/core/NumberFormatOptions.d.ts +2 -2
  100. package/dist/src/core/NumberFormatOptions.js +1 -1
  101. package/dist/src/core/NumberFormatOptions.js.map +1 -1
  102. package/dist/src/core/TimeZone.d.ts +1 -2
  103. package/dist/src/core/TimeZone.js +1 -1
  104. package/dist/src/core/TimeZone.js.map +1 -1
  105. package/dist/src/core/TranslationValues.d.ts +3 -5
  106. package/dist/src/core/TranslationValues.js +1 -1
  107. package/dist/src/core/TranslationValues.js.map +1 -1
  108. package/dist/src/core/convertFormatsToIntlMessageFormat.d.ts +4 -9
  109. package/dist/src/core/convertFormatsToIntlMessageFormat.js +30 -1
  110. package/dist/src/core/convertFormatsToIntlMessageFormat.js.map +1 -1
  111. package/dist/src/core/createBaseTranslator.d.ts +11 -17
  112. package/dist/src/core/createBaseTranslator.js +205 -1
  113. package/dist/src/core/createBaseTranslator.js.map +1 -1
  114. package/dist/src/core/createFormatter.d.ts +7 -9
  115. package/dist/src/core/createFormatter.js +128 -1
  116. package/dist/src/core/createFormatter.js.map +1 -1
  117. package/dist/src/core/createIntl.d.ts +4 -12
  118. package/dist/src/core/createIntl.js +10 -1
  119. package/dist/src/core/createIntl.js.map +1 -1
  120. package/dist/src/core/createTranslator.d.ts +9 -18
  121. package/dist/src/core/createTranslator.js +23 -1
  122. package/dist/src/core/createTranslator.js.map +1 -1
  123. package/dist/src/core/createTranslatorImpl.d.ts +9 -20
  124. package/dist/src/core/createTranslatorImpl.js +42 -1
  125. package/dist/src/core/createTranslatorImpl.js.map +1 -1
  126. package/dist/src/core/defaults.d.ts +3 -6
  127. package/dist/src/core/defaults.js +10 -1
  128. package/dist/src/core/defaults.js.map +1 -1
  129. package/dist/src/core/index.d.ts +9 -17
  130. package/dist/src/core/index.js +5 -1
  131. package/dist/src/core/index.js.map +1 -1
  132. package/dist/src/core/resolveNamespace.d.ts +1 -3
  133. package/dist/src/core/resolveNamespace.js +9 -1
  134. package/dist/src/core/resolveNamespace.js.map +1 -1
  135. package/dist/src/core/utils/MessageKeys.d.ts +2 -4
  136. package/dist/src/core/utils/MessageKeys.js +1 -1
  137. package/dist/src/core/utils/MessageKeys.js.map +1 -1
  138. package/dist/src/core/utils/NamespaceKeys.d.ts +2 -4
  139. package/dist/src/core/utils/NamespaceKeys.js +1 -1
  140. package/dist/src/core/utils/NamespaceKeys.js.map +1 -1
  141. package/dist/src/core/utils/NestedKeyOf.d.ts +1 -2
  142. package/dist/src/core/utils/NestedKeyOf.js +1 -1
  143. package/dist/src/core/utils/NestedKeyOf.js.map +1 -1
  144. package/dist/src/core/utils/NestedValueOf.d.ts +1 -2
  145. package/dist/src/core/utils/NestedValueOf.js +1 -1
  146. package/dist/src/core/utils/NestedValueOf.js.map +1 -1
  147. package/dist/src/core/validateMessages.d.ts +3 -6
  148. package/dist/src/core/validateMessages.js +25 -3
  149. package/dist/src/core/validateMessages.js.map +1 -1
  150. package/dist/src/index.d.ts +2 -25
  151. package/dist/src/index.js +2 -1
  152. package/dist/src/index.js.map +1 -1
  153. package/dist/src/react/IntlContext.d.ts +4 -13
  154. package/dist/src/react/IntlContext.js +3 -1
  155. package/dist/src/react/IntlContext.js.map +1 -1
  156. package/dist/src/react/IntlProvider.d.ts +3 -12
  157. package/dist/src/react/IntlProvider.js +6 -1
  158. package/dist/src/react/IntlProvider.js.map +1 -1
  159. package/dist/src/react/getInitializedConfig.d.ts +5 -16
  160. package/dist/src/react/getInitializedConfig.js +20 -1
  161. package/dist/src/react/getInitializedConfig.js.map +1 -1
  162. package/dist/src/react/index.d.ts +8 -21
  163. package/dist/src/react/index.js +9 -1
  164. package/dist/src/react/index.js.map +1 -1
  165. package/dist/src/react/useFormatter.d.ts +3 -9
  166. package/dist/src/react/useFormatter.js +13 -1
  167. package/dist/src/react/useFormatter.js.map +1 -1
  168. package/dist/src/react/useIntl.d.ts +3 -9
  169. package/dist/src/react/useIntl.js +19 -1
  170. package/dist/src/react/useIntl.js.map +1 -1
  171. package/dist/src/react/useIntlContext.d.ts +1 -13
  172. package/dist/src/react/useIntlContext.js +11 -1
  173. package/dist/src/react/useIntlContext.js.map +1 -1
  174. package/dist/src/react/useLocale.d.ts +1 -3
  175. package/dist/src/react/useLocale.js +4 -1
  176. package/dist/src/react/useLocale.js.map +1 -1
  177. package/dist/src/react/useMessages.d.ts +1 -5
  178. package/dist/src/react/useMessages.js +4 -1
  179. package/dist/src/react/useMessages.js.map +1 -1
  180. package/dist/src/react/useNow.d.ts +2 -3
  181. package/dist/src/react/useNow.js +39 -1
  182. package/dist/src/react/useNow.js.map +1 -1
  183. package/dist/src/react/useTimeZone.d.ts +1 -5
  184. package/dist/src/react/useTimeZone.js +4 -1
  185. package/dist/src/react/useTimeZone.js.map +1 -1
  186. package/dist/src/react/useTranslations.d.ts +7 -13
  187. package/dist/src/react/useTranslations.js +20 -1
  188. package/dist/src/react/useTranslations.js.map +1 -1
  189. package/dist/src/react/useTranslationsImpl.d.ts +6 -14
  190. package/dist/src/react/useTranslationsImpl.js +34 -1
  191. package/dist/src/react/useTranslationsImpl.js.map +1 -1
  192. package/dist/use-intl.cjs.development.js +821 -0
  193. package/dist/use-intl.cjs.development.js.map +1 -0
  194. package/dist/use-intl.cjs.production.min.js +2 -0
  195. package/dist/use-intl.cjs.production.min.js.map +1 -0
  196. package/dist/use-intl.esm.js +13 -0
  197. package/dist/use-intl.esm.js.map +1 -0
  198. package/package.json +21 -6
  199. package/dist/core/AbstractIntlMessages.d.mts +0 -10
  200. package/dist/core/AbstractIntlMessages.js +0 -2
  201. package/dist/core/AbstractIntlMessages.js.map +0 -1
  202. package/dist/core/AbstractIntlMessages.mjs +0 -1
  203. package/dist/core/AbstractIntlMessages.mjs.map +0 -1
  204. package/dist/core/DateTimeFormatOptions.d.mts +0 -75
  205. package/dist/core/DateTimeFormatOptions.js +0 -2
  206. package/dist/core/DateTimeFormatOptions.js.map +0 -1
  207. package/dist/core/DateTimeFormatOptions.mjs +0 -1
  208. package/dist/core/DateTimeFormatOptions.mjs.map +0 -1
  209. package/dist/core/Formats.d.mts +0 -11
  210. package/dist/core/Formats.js +0 -2
  211. package/dist/core/Formats.js.map +0 -1
  212. package/dist/core/Formats.mjs +0 -1
  213. package/dist/core/Formats.mjs.map +0 -1
  214. package/dist/core/IntlConfig.d.mts +0 -60
  215. package/dist/core/IntlConfig.js +0 -2
  216. package/dist/core/IntlConfig.js.map +0 -1
  217. package/dist/core/IntlConfig.mjs +0 -1
  218. package/dist/core/IntlConfig.mjs.map +0 -1
  219. package/dist/core/IntlError.d.mts +0 -15
  220. package/dist/core/IntlError.js +0 -2
  221. package/dist/core/IntlError.js.map +0 -1
  222. package/dist/core/IntlError.mjs +0 -2
  223. package/dist/core/IntlError.mjs.map +0 -1
  224. package/dist/core/NumberFormatOptions.d.mts +0 -2
  225. package/dist/core/NumberFormatOptions.js +0 -2
  226. package/dist/core/NumberFormatOptions.js.map +0 -1
  227. package/dist/core/NumberFormatOptions.mjs +0 -2
  228. package/dist/core/NumberFormatOptions.mjs.map +0 -1
  229. package/dist/core/TimeZone.d.mts +0 -3
  230. package/dist/core/TimeZone.js +0 -2
  231. package/dist/core/TimeZone.js.map +0 -1
  232. package/dist/core/TimeZone.mjs +0 -1
  233. package/dist/core/TimeZone.mjs.map +0 -1
  234. package/dist/core/TranslationValues.d.mts +0 -7
  235. package/dist/core/TranslationValues.js +0 -2
  236. package/dist/core/TranslationValues.js.map +0 -1
  237. package/dist/core/TranslationValues.mjs +0 -1
  238. package/dist/core/TranslationValues.mjs.map +0 -1
  239. package/dist/core/convertFormatsToIntlMessageFormat.d.mts +0 -16
  240. package/dist/core/convertFormatsToIntlMessageFormat.js +0 -2
  241. package/dist/core/convertFormatsToIntlMessageFormat.js.map +0 -1
  242. package/dist/core/convertFormatsToIntlMessageFormat.mjs +0 -2
  243. package/dist/core/convertFormatsToIntlMessageFormat.mjs.map +0 -1
  244. package/dist/core/createBaseTranslator.d.mts +0 -32
  245. package/dist/core/createBaseTranslator.js +0 -2
  246. package/dist/core/createBaseTranslator.js.map +0 -1
  247. package/dist/core/createBaseTranslator.mjs +0 -2
  248. package/dist/core/createBaseTranslator.mjs.map +0 -1
  249. package/dist/core/createFormatter.d.mts +0 -21
  250. package/dist/core/createFormatter.js +0 -2
  251. package/dist/core/createFormatter.js.map +0 -1
  252. package/dist/core/createFormatter.mjs +0 -2
  253. package/dist/core/createFormatter.mjs.map +0 -1
  254. package/dist/core/createIntl.d.mts +0 -15
  255. package/dist/core/createIntl.js +0 -2
  256. package/dist/core/createIntl.js.map +0 -1
  257. package/dist/core/createIntl.mjs +0 -2
  258. package/dist/core/createIntl.mjs.map +0 -1
  259. package/dist/core/createTranslator.d.mts +0 -57
  260. package/dist/core/createTranslator.js +0 -2
  261. package/dist/core/createTranslator.js.map +0 -1
  262. package/dist/core/createTranslator.mjs +0 -2
  263. package/dist/core/createTranslator.mjs.map +0 -1
  264. package/dist/core/createTranslatorImpl.d.mts +0 -25
  265. package/dist/core/createTranslatorImpl.js +0 -2
  266. package/dist/core/createTranslatorImpl.js.map +0 -1
  267. package/dist/core/createTranslatorImpl.mjs +0 -2
  268. package/dist/core/createTranslatorImpl.mjs.map +0 -1
  269. package/dist/core/defaults.d.mts +0 -14
  270. package/dist/core/defaults.js +0 -2
  271. package/dist/core/defaults.js.map +0 -1
  272. package/dist/core/defaults.mjs +0 -2
  273. package/dist/core/defaults.mjs.map +0 -1
  274. package/dist/core/index.d.mts +0 -17
  275. package/dist/core/index.js +0 -2
  276. package/dist/core/index.js.map +0 -1
  277. package/dist/core/index.mjs +0 -2
  278. package/dist/core/index.mjs.map +0 -1
  279. package/dist/core/resolveNamespace.d.mts +0 -7
  280. package/dist/core/resolveNamespace.js +0 -2
  281. package/dist/core/resolveNamespace.js.map +0 -1
  282. package/dist/core/resolveNamespace.mjs +0 -2
  283. package/dist/core/resolveNamespace.mjs.map +0 -1
  284. package/dist/core/utils/MessageKeys.d.mts +0 -7
  285. package/dist/core/utils/MessageKeys.js +0 -2
  286. package/dist/core/utils/MessageKeys.js.map +0 -1
  287. package/dist/core/utils/MessageKeys.mjs +0 -1
  288. package/dist/core/utils/MessageKeys.mjs.map +0 -1
  289. package/dist/core/utils/NamespaceKeys.d.mts +0 -7
  290. package/dist/core/utils/NamespaceKeys.js +0 -2
  291. package/dist/core/utils/NamespaceKeys.js.map +0 -1
  292. package/dist/core/utils/NamespaceKeys.mjs +0 -1
  293. package/dist/core/utils/NamespaceKeys.mjs.map +0 -1
  294. package/dist/core/utils/NestedKeyOf.d.mts +0 -5
  295. package/dist/core/utils/NestedKeyOf.js +0 -2
  296. package/dist/core/utils/NestedKeyOf.js.map +0 -1
  297. package/dist/core/utils/NestedKeyOf.mjs +0 -1
  298. package/dist/core/utils/NestedKeyOf.mjs.map +0 -1
  299. package/dist/core/utils/NestedValueOf.d.mts +0 -3
  300. package/dist/core/utils/NestedValueOf.js +0 -2
  301. package/dist/core/utils/NestedValueOf.js.map +0 -1
  302. package/dist/core/utils/NestedValueOf.mjs +0 -1
  303. package/dist/core/utils/NestedValueOf.mjs.map +0 -1
  304. package/dist/core/validateMessages.d.mts +0 -6
  305. package/dist/core/validateMessages.js +0 -34
  306. package/dist/core/validateMessages.js.map +0 -1
  307. package/dist/core/validateMessages.mjs +0 -34
  308. package/dist/core/validateMessages.mjs.map +0 -1
  309. package/dist/index.d.mts +0 -25
  310. package/dist/index.js.map +0 -1
  311. package/dist/index.mjs +0 -2
  312. package/dist/index.mjs.map +0 -1
  313. package/dist/react/IntlContext.d.mts +0 -13
  314. package/dist/react/IntlContext.js +0 -2
  315. package/dist/react/IntlContext.js.map +0 -1
  316. package/dist/react/IntlContext.mjs +0 -2
  317. package/dist/react/IntlContext.mjs.map +0 -1
  318. package/dist/react/IntlProvider.d.mts +0 -16
  319. package/dist/react/IntlProvider.js +0 -2
  320. package/dist/react/IntlProvider.js.map +0 -1
  321. package/dist/react/IntlProvider.mjs +0 -2
  322. package/dist/react/IntlProvider.mjs.map +0 -1
  323. package/dist/react/getInitializedConfig.d.mts +0 -24
  324. package/dist/react/getInitializedConfig.js +0 -2
  325. package/dist/react/getInitializedConfig.js.map +0 -1
  326. package/dist/react/getInitializedConfig.mjs +0 -2
  327. package/dist/react/getInitializedConfig.mjs.map +0 -1
  328. package/dist/react/index.d.mts +0 -21
  329. package/dist/react/index.js +0 -2
  330. package/dist/react/index.js.map +0 -1
  331. package/dist/react/index.mjs +0 -2
  332. package/dist/react/index.mjs.map +0 -1
  333. package/dist/react/useFormatter.d.mts +0 -12
  334. package/dist/react/useFormatter.js +0 -2
  335. package/dist/react/useFormatter.js.map +0 -1
  336. package/dist/react/useFormatter.mjs +0 -2
  337. package/dist/react/useFormatter.mjs.map +0 -1
  338. package/dist/react/useIntl.d.mts +0 -12
  339. package/dist/react/useIntl.js +0 -2
  340. package/dist/react/useIntl.js.map +0 -1
  341. package/dist/react/useIntl.mjs +0 -2
  342. package/dist/react/useIntl.mjs.map +0 -1
  343. package/dist/react/useIntlContext.d.mts +0 -13
  344. package/dist/react/useIntlContext.js +0 -2
  345. package/dist/react/useIntlContext.js.map +0 -1
  346. package/dist/react/useIntlContext.mjs +0 -2
  347. package/dist/react/useIntlContext.mjs.map +0 -1
  348. package/dist/react/useLocale.d.mts +0 -3
  349. package/dist/react/useLocale.js +0 -2
  350. package/dist/react/useLocale.js.map +0 -1
  351. package/dist/react/useLocale.mjs +0 -2
  352. package/dist/react/useLocale.mjs.map +0 -1
  353. package/dist/react/useMessages.d.mts +0 -5
  354. package/dist/react/useMessages.js +0 -2
  355. package/dist/react/useMessages.js.map +0 -1
  356. package/dist/react/useMessages.mjs +0 -2
  357. package/dist/react/useMessages.mjs.map +0 -1
  358. package/dist/react/useNow.js +0 -2
  359. package/dist/react/useNow.js.map +0 -1
  360. package/dist/react/useNow.mjs +0 -2
  361. package/dist/react/useNow.mjs.map +0 -1
  362. package/dist/react/useTimeZone.d.mts +0 -5
  363. package/dist/react/useTimeZone.js +0 -2
  364. package/dist/react/useTimeZone.js.map +0 -1
  365. package/dist/react/useTimeZone.mjs +0 -2
  366. package/dist/react/useTimeZone.mjs.map +0 -1
  367. package/dist/react/useTranslations.d.mts +0 -50
  368. package/dist/react/useTranslations.js +0 -2
  369. package/dist/react/useTranslations.js.map +0 -1
  370. package/dist/react/useTranslations.mjs +0 -2
  371. package/dist/react/useTranslations.mjs.map +0 -1
  372. package/dist/react/useTranslationsImpl.d.mts +0 -16
  373. package/dist/react/useTranslationsImpl.js +0 -2
  374. package/dist/react/useTranslationsImpl.js.map +0 -1
  375. package/dist/react/useTranslationsImpl.mjs +0 -2
  376. package/dist/react/useTranslationsImpl.mjs.map +0 -1
  377. package/dist/src/core/AbstractIntlMessages.d.mts +0 -10
  378. package/dist/src/core/AbstractIntlMessages.mjs +0 -1
  379. package/dist/src/core/AbstractIntlMessages.mjs.map +0 -1
  380. package/dist/src/core/DateTimeFormatOptions.d.mts +0 -75
  381. package/dist/src/core/DateTimeFormatOptions.mjs +0 -1
  382. package/dist/src/core/DateTimeFormatOptions.mjs.map +0 -1
  383. package/dist/src/core/Formats.d.mts +0 -11
  384. package/dist/src/core/Formats.mjs +0 -1
  385. package/dist/src/core/Formats.mjs.map +0 -1
  386. package/dist/src/core/IntlConfig.d.mts +0 -60
  387. package/dist/src/core/IntlConfig.mjs +0 -1
  388. package/dist/src/core/IntlConfig.mjs.map +0 -1
  389. package/dist/src/core/IntlError.d.mts +0 -15
  390. package/dist/src/core/IntlError.mjs +0 -2
  391. package/dist/src/core/IntlError.mjs.map +0 -1
  392. package/dist/src/core/NumberFormatOptions.d.mts +0 -2
  393. package/dist/src/core/NumberFormatOptions.mjs +0 -2
  394. package/dist/src/core/NumberFormatOptions.mjs.map +0 -1
  395. package/dist/src/core/TimeZone.d.mts +0 -3
  396. package/dist/src/core/TimeZone.mjs +0 -1
  397. package/dist/src/core/TimeZone.mjs.map +0 -1
  398. package/dist/src/core/TranslationValues.d.mts +0 -7
  399. package/dist/src/core/TranslationValues.mjs +0 -1
  400. package/dist/src/core/TranslationValues.mjs.map +0 -1
  401. package/dist/src/core/convertFormatsToIntlMessageFormat.d.mts +0 -16
  402. package/dist/src/core/convertFormatsToIntlMessageFormat.mjs +0 -2
  403. package/dist/src/core/convertFormatsToIntlMessageFormat.mjs.map +0 -1
  404. package/dist/src/core/createBaseTranslator.d.mts +0 -32
  405. package/dist/src/core/createBaseTranslator.mjs +0 -2
  406. package/dist/src/core/createBaseTranslator.mjs.map +0 -1
  407. package/dist/src/core/createFormatter.d.mts +0 -21
  408. package/dist/src/core/createFormatter.mjs +0 -2
  409. package/dist/src/core/createFormatter.mjs.map +0 -1
  410. package/dist/src/core/createIntl.d.mts +0 -15
  411. package/dist/src/core/createIntl.mjs +0 -2
  412. package/dist/src/core/createIntl.mjs.map +0 -1
  413. package/dist/src/core/createTranslator.d.mts +0 -57
  414. package/dist/src/core/createTranslator.mjs +0 -2
  415. package/dist/src/core/createTranslator.mjs.map +0 -1
  416. package/dist/src/core/createTranslatorImpl.d.mts +0 -25
  417. package/dist/src/core/createTranslatorImpl.mjs +0 -2
  418. package/dist/src/core/createTranslatorImpl.mjs.map +0 -1
  419. package/dist/src/core/defaults.d.mts +0 -14
  420. package/dist/src/core/defaults.mjs +0 -2
  421. package/dist/src/core/defaults.mjs.map +0 -1
  422. package/dist/src/core/index.d.mts +0 -17
  423. package/dist/src/core/index.mjs +0 -2
  424. package/dist/src/core/index.mjs.map +0 -1
  425. package/dist/src/core/resolveNamespace.d.mts +0 -7
  426. package/dist/src/core/resolveNamespace.mjs +0 -2
  427. package/dist/src/core/resolveNamespace.mjs.map +0 -1
  428. package/dist/src/core/utils/MessageKeys.d.mts +0 -7
  429. package/dist/src/core/utils/MessageKeys.mjs +0 -1
  430. package/dist/src/core/utils/MessageKeys.mjs.map +0 -1
  431. package/dist/src/core/utils/NamespaceKeys.d.mts +0 -7
  432. package/dist/src/core/utils/NamespaceKeys.mjs +0 -1
  433. package/dist/src/core/utils/NamespaceKeys.mjs.map +0 -1
  434. package/dist/src/core/utils/NestedKeyOf.d.mts +0 -5
  435. package/dist/src/core/utils/NestedKeyOf.mjs +0 -1
  436. package/dist/src/core/utils/NestedKeyOf.mjs.map +0 -1
  437. package/dist/src/core/utils/NestedValueOf.d.mts +0 -3
  438. package/dist/src/core/utils/NestedValueOf.mjs +0 -1
  439. package/dist/src/core/utils/NestedValueOf.mjs.map +0 -1
  440. package/dist/src/core/validateMessages.d.mts +0 -6
  441. package/dist/src/core/validateMessages.mjs +0 -34
  442. package/dist/src/core/validateMessages.mjs.map +0 -1
  443. package/dist/src/index.d.mts +0 -25
  444. package/dist/src/index.mjs +0 -2
  445. package/dist/src/index.mjs.map +0 -1
  446. package/dist/src/react/IntlContext.d.mts +0 -13
  447. package/dist/src/react/IntlContext.mjs +0 -2
  448. package/dist/src/react/IntlContext.mjs.map +0 -1
  449. package/dist/src/react/IntlProvider.d.mts +0 -16
  450. package/dist/src/react/IntlProvider.mjs +0 -2
  451. package/dist/src/react/IntlProvider.mjs.map +0 -1
  452. package/dist/src/react/getInitializedConfig.d.mts +0 -24
  453. package/dist/src/react/getInitializedConfig.mjs +0 -2
  454. package/dist/src/react/getInitializedConfig.mjs.map +0 -1
  455. package/dist/src/react/index.d.mts +0 -21
  456. package/dist/src/react/index.mjs +0 -2
  457. package/dist/src/react/index.mjs.map +0 -1
  458. package/dist/src/react/useFormatter.d.mts +0 -12
  459. package/dist/src/react/useFormatter.mjs +0 -2
  460. package/dist/src/react/useFormatter.mjs.map +0 -1
  461. package/dist/src/react/useIntl.d.mts +0 -12
  462. package/dist/src/react/useIntl.mjs +0 -2
  463. package/dist/src/react/useIntl.mjs.map +0 -1
  464. package/dist/src/react/useIntlContext.d.mts +0 -13
  465. package/dist/src/react/useIntlContext.mjs +0 -2
  466. package/dist/src/react/useIntlContext.mjs.map +0 -1
  467. package/dist/src/react/useLocale.d.mts +0 -3
  468. package/dist/src/react/useLocale.mjs +0 -2
  469. package/dist/src/react/useLocale.mjs.map +0 -1
  470. package/dist/src/react/useMessages.d.mts +0 -5
  471. package/dist/src/react/useMessages.mjs +0 -2
  472. package/dist/src/react/useMessages.mjs.map +0 -1
  473. package/dist/src/react/useNow.d.mts +0 -24
  474. package/dist/src/react/useNow.mjs +0 -2
  475. package/dist/src/react/useNow.mjs.map +0 -1
  476. package/dist/src/react/useTimeZone.d.mts +0 -5
  477. package/dist/src/react/useTimeZone.mjs +0 -2
  478. package/dist/src/react/useTimeZone.mjs.map +0 -1
  479. package/dist/src/react/useTranslations.d.mts +0 -50
  480. package/dist/src/react/useTranslations.mjs +0 -2
  481. package/dist/src/react/useTranslations.mjs.map +0 -1
  482. package/dist/src/react/useTranslationsImpl.d.mts +0 -16
  483. package/dist/src/react/useTranslationsImpl.mjs +0 -2
  484. package/dist/src/react/useTranslationsImpl.mjs.map +0 -1
@@ -0,0 +1,102 @@
1
+ function _extends() {
2
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
3
+ for (var i = 1; i < arguments.length; i++) {
4
+ var source = arguments[i];
5
+ for (var key in source) {
6
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7
+ target[key] = source[key];
8
+ }
9
+ }
10
+ }
11
+ return target;
12
+ };
13
+ return _extends.apply(this, arguments);
14
+ }
15
+ function _inheritsLoose(subClass, superClass) {
16
+ subClass.prototype = Object.create(superClass.prototype);
17
+ subClass.prototype.constructor = subClass;
18
+ _setPrototypeOf(subClass, superClass);
19
+ }
20
+ function _getPrototypeOf(o) {
21
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
22
+ return o.__proto__ || Object.getPrototypeOf(o);
23
+ };
24
+ return _getPrototypeOf(o);
25
+ }
26
+ function _setPrototypeOf(o, p) {
27
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
28
+ o.__proto__ = p;
29
+ return o;
30
+ };
31
+ return _setPrototypeOf(o, p);
32
+ }
33
+ function _isNativeReflectConstruct() {
34
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
35
+ if (Reflect.construct.sham) return false;
36
+ if (typeof Proxy === "function") return true;
37
+ try {
38
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
39
+ return true;
40
+ } catch (e) {
41
+ return false;
42
+ }
43
+ }
44
+ function _construct(Parent, args, Class) {
45
+ if (_isNativeReflectConstruct()) {
46
+ _construct = Reflect.construct.bind();
47
+ } else {
48
+ _construct = function _construct(Parent, args, Class) {
49
+ var a = [null];
50
+ a.push.apply(a, args);
51
+ var Constructor = Function.bind.apply(Parent, a);
52
+ var instance = new Constructor();
53
+ if (Class) _setPrototypeOf(instance, Class.prototype);
54
+ return instance;
55
+ };
56
+ }
57
+ return _construct.apply(null, arguments);
58
+ }
59
+ function _isNativeFunction(fn) {
60
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
61
+ }
62
+ function _wrapNativeSuper(Class) {
63
+ var _cache = typeof Map === "function" ? new Map() : undefined;
64
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
65
+ if (Class === null || !_isNativeFunction(Class)) return Class;
66
+ if (typeof Class !== "function") {
67
+ throw new TypeError("Super expression must either be null or a function");
68
+ }
69
+ if (typeof _cache !== "undefined") {
70
+ if (_cache.has(Class)) return _cache.get(Class);
71
+ _cache.set(Class, Wrapper);
72
+ }
73
+ function Wrapper() {
74
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
75
+ }
76
+ Wrapper.prototype = Object.create(Class.prototype, {
77
+ constructor: {
78
+ value: Wrapper,
79
+ enumerable: false,
80
+ writable: true,
81
+ configurable: true
82
+ }
83
+ });
84
+ return _setPrototypeOf(Wrapper, Class);
85
+ };
86
+ return _wrapNativeSuper(Class);
87
+ }
88
+ function _objectWithoutPropertiesLoose(source, excluded) {
89
+ if (source == null) return {};
90
+ var target = {};
91
+ var sourceKeys = Object.keys(source);
92
+ var key, i;
93
+ for (i = 0; i < sourceKeys.length; i++) {
94
+ key = sourceKeys[i];
95
+ if (excluded.indexOf(key) >= 0) continue;
96
+ target[key] = source[key];
97
+ }
98
+ return target;
99
+ }
100
+
101
+ export { _construct as construct, _extends as extends, _getPrototypeOf as getPrototypeOf, _inheritsLoose as inheritsLoose, _isNativeFunction as isNativeFunction, _isNativeReflectConstruct as isNativeReflectConstruct, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _setPrototypeOf as setPrototypeOf, _wrapNativeSuper as wrapNativeSuper };
102
+ //# sourceMappingURL=use-intl.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-intl.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,9 @@
1
- /** A generic type that describes the shape of messages.
2
- *
3
- * Optionally `IntlMessages` can be provided to get type safety for message
4
- * namespaces and keys. See https://next-intl-docs.vercel.app/docs/usage/typescript
5
- */
6
- type AbstractIntlMessages = {
7
- [id: string]: AbstractIntlMessages | string;
8
- };
9
-
10
- export { AbstractIntlMessages as default };
1
+ /** A generic type that describes the shape of messages.
2
+ *
3
+ * Optionally `IntlMessages` can be provided to get type safety for message
4
+ * namespaces and keys. See https://next-intl-docs.vercel.app/docs/usage/typescript
5
+ */
6
+ type AbstractIntlMessages = {
7
+ [id: string]: AbstractIntlMessages | string;
8
+ };
9
+ export default AbstractIntlMessages;
@@ -1,75 +1,73 @@
1
- import TimeZone from './TimeZone.js';
2
-
3
- /**
4
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
5
- */
6
- type DateTimeFormatOptions = Intl.DateTimeFormatOptions & {
7
- /**
8
- * Examples:
9
- * - numeric: "2021"
10
- * - 2-digit: "21"
11
- */
12
- year?: 'numeric' | '2-digit';
13
- /** Examples:
14
- * - numeric: "3"
15
- * - 2-digit: "03"
16
- * - long: "March"
17
- * - short: "Mar"
18
- * - narrow: "M"
19
- */
20
- month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
21
- /** Examples:
22
- * - numeric: "2"
23
- * - 2-digit: "02"
24
- */
25
- day?: 'numeric' | '2-digit';
26
- /** Examples:
27
- * - numeric: "2"
28
- * - 2-digit: "02"
29
- */
30
- hour?: 'numeric' | '2-digit';
31
- /** Examples:
32
- * - numeric: "2"
33
- * - 2-digit: "02"
34
- */
35
- minute?: 'numeric' | '2-digit';
36
- /** Examples:
37
- * - numeric: "2"
38
- * - 2-digit: "02"
39
- */
40
- second?: 'numeric' | '2-digit';
41
- /** Examples:
42
- * - long: "Thursday"
43
- * - short: "Thu"
44
- * - narrow: "T"
45
- */
46
- weekday?: 'long' | 'short' | 'narrow';
47
- /** Examples:
48
- * - long: "Anno Domini"
49
- * - short: "AD", narrow "A"
50
- */
51
- era?: 'long' | 'short' | 'narrow';
52
- /** If this is set to `true`, a 12-hour am/pm format is used. Otherwise a 24-hour time.
53
- *
54
- */
55
- hour12?: boolean;
56
- /** Examples:
57
- * - long: "Pacific Daylight Time"
58
- * - short: "PDT"
59
- */
60
- timeZoneName?: 'long' | 'short';
61
- /**
62
- * One of the [database names from the TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
63
- */
64
- timeZone?: TimeZone;
65
- localeMatcher?: 'best fit' | 'lookup';
66
- formatMatcher?: 'best fit' | 'basic';
67
- dateStyle?: 'full' | 'long' | 'medium' | 'short';
68
- timeStyle?: 'full' | 'long' | 'medium' | 'short';
69
- calendar?: 'buddhist' | 'chinese' | 'coptic' | 'ethiopia' | 'ethiopic' | 'gregory' | 'hebrew' | 'indian' | 'islamic' | 'iso8601' | 'japanese' | 'persian' | 'roc';
70
- dayPeriod?: 'narrow' | 'short' | 'long';
71
- numberingSystem?: 'arab' | 'arabext' | 'bali' | 'beng' | 'deva' | 'fullwide' | 'gujr' | 'guru' | 'hanidec' | 'khmr' | 'knda' | 'laoo' | 'latn' | 'limb' | 'mlym' | 'mong' | 'mymr' | 'orya' | 'tamldec' | 'telu' | 'thai' | 'tibt';
72
- hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
73
- };
74
-
75
- export { DateTimeFormatOptions as default };
1
+ import TimeZone from './TimeZone';
2
+ /**
3
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
4
+ */
5
+ type DateTimeFormatOptions = Intl.DateTimeFormatOptions & {
6
+ /**
7
+ * Examples:
8
+ * - numeric: "2021"
9
+ * - 2-digit: "21"
10
+ */
11
+ year?: 'numeric' | '2-digit';
12
+ /** Examples:
13
+ * - numeric: "3"
14
+ * - 2-digit: "03"
15
+ * - long: "March"
16
+ * - short: "Mar"
17
+ * - narrow: "M"
18
+ */
19
+ month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
20
+ /** Examples:
21
+ * - numeric: "2"
22
+ * - 2-digit: "02"
23
+ */
24
+ day?: 'numeric' | '2-digit';
25
+ /** Examples:
26
+ * - numeric: "2"
27
+ * - 2-digit: "02"
28
+ */
29
+ hour?: 'numeric' | '2-digit';
30
+ /** Examples:
31
+ * - numeric: "2"
32
+ * - 2-digit: "02"
33
+ */
34
+ minute?: 'numeric' | '2-digit';
35
+ /** Examples:
36
+ * - numeric: "2"
37
+ * - 2-digit: "02"
38
+ */
39
+ second?: 'numeric' | '2-digit';
40
+ /** Examples:
41
+ * - long: "Thursday"
42
+ * - short: "Thu"
43
+ * - narrow: "T"
44
+ */
45
+ weekday?: 'long' | 'short' | 'narrow';
46
+ /** Examples:
47
+ * - long: "Anno Domini"
48
+ * - short: "AD", narrow "A"
49
+ */
50
+ era?: 'long' | 'short' | 'narrow';
51
+ /** If this is set to `true`, a 12-hour am/pm format is used. Otherwise a 24-hour time.
52
+ *
53
+ */
54
+ hour12?: boolean;
55
+ /** Examples:
56
+ * - long: "Pacific Daylight Time"
57
+ * - short: "PDT"
58
+ */
59
+ timeZoneName?: 'long' | 'short';
60
+ /**
61
+ * One of the [database names from the TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
62
+ */
63
+ timeZone?: TimeZone;
64
+ localeMatcher?: 'best fit' | 'lookup';
65
+ formatMatcher?: 'best fit' | 'basic';
66
+ dateStyle?: 'full' | 'long' | 'medium' | 'short';
67
+ timeStyle?: 'full' | 'long' | 'medium' | 'short';
68
+ calendar?: 'buddhist' | 'chinese' | 'coptic' | 'ethiopia' | 'ethiopic' | 'gregory' | 'hebrew' | 'indian' | 'islamic' | 'iso8601' | 'japanese' | 'persian' | 'roc';
69
+ dayPeriod?: 'narrow' | 'short' | 'long';
70
+ numberingSystem?: 'arab' | 'arabext' | 'bali' | 'beng' | 'deva' | 'fullwide' | 'gujr' | 'guru' | 'hanidec' | 'khmr' | 'knda' | 'laoo' | 'latn' | 'limb' | 'mlym' | 'mong' | 'mymr' | 'orya' | 'tamldec' | 'telu' | 'thai' | 'tibt';
71
+ hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
72
+ };
73
+ export default DateTimeFormatOptions;
@@ -1,11 +1,8 @@
1
- import DateTimeFormatOptions from './DateTimeFormatOptions.js';
2
- import { NumberFormatOptions } from '@formatjs/ecma402-abstract/types/number';
3
- import './TimeZone.js';
4
-
5
- type Formats = {
6
- number: Record<string, NumberFormatOptions>;
7
- dateTime: Record<string, DateTimeFormatOptions>;
8
- list: Record<string, Intl.ListFormatOptions>;
9
- };
10
-
11
- export { Formats as default };
1
+ import DateTimeFormatOptions from './DateTimeFormatOptions';
2
+ import NumberFormatOptions from './NumberFormatOptions';
3
+ type Formats = {
4
+ number: Record<string, NumberFormatOptions>;
5
+ dateTime: Record<string, DateTimeFormatOptions>;
6
+ list: Record<string, Intl.ListFormatOptions>;
7
+ };
8
+ export default Formats;
@@ -1,60 +1,54 @@
1
- import Formats from './Formats.js';
2
- import IntlError from './IntlError.js';
3
- import TimeZone from './TimeZone.js';
4
- import AbstractIntlMessages from './AbstractIntlMessages.js';
5
- import { RichTranslationValues } from './TranslationValues.js';
6
- import './DateTimeFormatOptions.js';
7
- import '@formatjs/ecma402-abstract/types/number';
8
- import 'react';
9
-
10
- /**
11
- * Should be used for entry points that configure the library.
12
- */
13
- type IntlConfig<Messages = AbstractIntlMessages> = {
14
- /** A valid Unicode locale tag (e.g. "en" or "en-GB"). */
15
- locale: string;
16
- /** Global formats can be provided to achieve consistent
17
- * formatting across components. */
18
- formats?: Partial<Formats>;
19
- /** A time zone as defined in [the tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) which will be applied when formatting dates and times. If this is absent, the user time zone will be used. You can override this by supplying an explicit time zone to `formatDateTime`. */
20
- timeZone?: TimeZone;
21
- /** This callback will be invoked when an error is encountered during
22
- * resolving a message or formatting it. This defaults to `console.error` to
23
- * keep your app running. You can customize the handling by taking
24
- * `error.code` into account. */
25
- onError?(error: IntlError): void;
26
- /** Will be called when a message couldn't be resolved or formatting it led to
27
- * an error. This defaults to `${namespace}.${key}` You can use this to
28
- * customize what will be rendered in this case. */
29
- getMessageFallback?(info: {
30
- error: IntlError;
31
- key: string;
32
- namespace?: string;
33
- }): string;
34
- /**
35
- * Providing this value will have two effects:
36
- * 1. It will be used as the default for the `now` argument of
37
- * `useIntl().formatRelativeTime` if no explicit value is provided.
38
- * 2. It will be returned as a static value from the `useNow` hook. Note
39
- * however that when `updateInterval` is configured on the `useNow` hook,
40
- * the global `now` value will only be used for the initial render, but
41
- * afterwards the current date will be returned continuously.
42
- */
43
- now?: Date;
44
- /** All messages that will be available. */
45
- messages?: Messages;
46
- /** Global default values for translation values and rich text elements.
47
- * Can be used for consistent usage or styling of rich text elements.
48
- * Defaults will be overidden by locally provided values. */
49
- defaultTranslationValues?: RichTranslationValues;
50
- };
51
- /**
52
- * A stricter set of the configuration that should be used internally
53
- * once defaults are assigned to `IntlConfiguration`.
54
- */
55
- type InitializedIntlConfig<Messages = AbstractIntlMessages> = IntlConfig<Messages> & {
56
- onError: NonNullable<IntlConfig<Messages>['onError']>;
57
- getMessageFallback: NonNullable<IntlConfig<Messages>['getMessageFallback']>;
58
- };
59
-
60
- export { InitializedIntlConfig, IntlConfig as default };
1
+ import Formats from './Formats';
2
+ import IntlError from './IntlError';
3
+ import TimeZone from './TimeZone';
4
+ import { AbstractIntlMessages, RichTranslationValues } from '.';
5
+ /**
6
+ * Should be used for entry points that configure the library.
7
+ */
8
+ type IntlConfig<Messages = AbstractIntlMessages> = {
9
+ /** A valid Unicode locale tag (e.g. "en" or "en-GB"). */
10
+ locale: string;
11
+ /** Global formats can be provided to achieve consistent
12
+ * formatting across components. */
13
+ formats?: Partial<Formats>;
14
+ /** A time zone as defined in [the tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) which will be applied when formatting dates and times. If this is absent, the user time zone will be used. You can override this by supplying an explicit time zone to `formatDateTime`. */
15
+ timeZone?: TimeZone;
16
+ /** This callback will be invoked when an error is encountered during
17
+ * resolving a message or formatting it. This defaults to `console.error` to
18
+ * keep your app running. You can customize the handling by taking
19
+ * `error.code` into account. */
20
+ onError?(error: IntlError): void;
21
+ /** Will be called when a message couldn't be resolved or formatting it led to
22
+ * an error. This defaults to `${namespace}.${key}` You can use this to
23
+ * customize what will be rendered in this case. */
24
+ getMessageFallback?(info: {
25
+ error: IntlError;
26
+ key: string;
27
+ namespace?: string;
28
+ }): string;
29
+ /**
30
+ * Providing this value will have two effects:
31
+ * 1. It will be used as the default for the `now` argument of
32
+ * `useIntl().formatRelativeTime` if no explicit value is provided.
33
+ * 2. It will be returned as a static value from the `useNow` hook. Note
34
+ * however that when `updateInterval` is configured on the `useNow` hook,
35
+ * the global `now` value will only be used for the initial render, but
36
+ * afterwards the current date will be returned continuously.
37
+ */
38
+ now?: Date;
39
+ /** All messages that will be available. */
40
+ messages?: Messages;
41
+ /** Global default values for translation values and rich text elements.
42
+ * Can be used for consistent usage or styling of rich text elements.
43
+ * Defaults will be overidden by locally provided values. */
44
+ defaultTranslationValues?: RichTranslationValues;
45
+ };
46
+ /**
47
+ * A stricter set of the configuration that should be used internally
48
+ * once defaults are assigned to `IntlConfiguration`.
49
+ */
50
+ export type InitializedIntlConfig<Messages = AbstractIntlMessages> = IntlConfig<Messages> & {
51
+ onError: NonNullable<IntlConfig<Messages>['onError']>;
52
+ getMessageFallback: NonNullable<IntlConfig<Messages>['getMessageFallback']>;
53
+ };
54
+ export default IntlConfig;
@@ -1,15 +1,13 @@
1
- declare enum IntlErrorCode {
2
- MISSING_MESSAGE = "MISSING_MESSAGE",
3
- MISSING_FORMAT = "MISSING_FORMAT",
4
- INSUFFICIENT_PATH = "INSUFFICIENT_PATH",
5
- INVALID_MESSAGE = "INVALID_MESSAGE",
6
- INVALID_KEY = "INVALID_KEY",
7
- FORMATTING_ERROR = "FORMATTING_ERROR"
8
- }
9
- declare class IntlError extends Error {
10
- readonly code: IntlErrorCode;
11
- readonly originalMessage: string | undefined;
12
- constructor(code: IntlErrorCode, originalMessage?: string);
13
- }
14
-
15
- export { IntlErrorCode, IntlError as default };
1
+ export declare enum IntlErrorCode {
2
+ MISSING_MESSAGE = "MISSING_MESSAGE",
3
+ MISSING_FORMAT = "MISSING_FORMAT",
4
+ INSUFFICIENT_PATH = "INSUFFICIENT_PATH",
5
+ INVALID_MESSAGE = "INVALID_MESSAGE",
6
+ INVALID_KEY = "INVALID_KEY",
7
+ FORMATTING_ERROR = "FORMATTING_ERROR"
8
+ }
9
+ export default class IntlError extends Error {
10
+ readonly code: IntlErrorCode;
11
+ readonly originalMessage: string | undefined;
12
+ constructor(code: IntlErrorCode, originalMessage?: string);
13
+ }
@@ -1,2 +1,2 @@
1
- import { NumberFormatOptions } from '@formatjs/ecma402-abstract/types/number';
2
- export { NumberFormatOptions as default } from '@formatjs/ecma402-abstract/types/number';
1
+ import type { NumberFormatOptions } from '@formatjs/ecma402-abstract/types/number';
2
+ export default NumberFormatOptions;
@@ -1,3 +1,2 @@
1
- type TimeZone = 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Costa_Rica' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Fort_Nelson' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Colombo' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Riyadh' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faroe' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Wake' | 'Pacific/Wallis' | 'UTC' | 'W-SU' | 'WET' | 'Zulu' | (string & {});
2
-
3
- export { TimeZone as default };
1
+ type TimeZone = 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Costa_Rica' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Fort_Nelson' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Colombo' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Riyadh' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faroe' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Wake' | 'Pacific/Wallis' | 'UTC' | 'W-SU' | 'WET' | 'Zulu' | (string & {});
2
+ export default TimeZone;
@@ -1,7 +1,5 @@
1
- import { ReactNode } from 'react';
2
-
3
- type TranslationValue = string | number | boolean | Date | null | undefined;
4
- type TranslationValues = Record<string, TranslationValue>;
5
- type RichTranslationValues = Record<string, TranslationValue | ((chunks: ReactNode) => ReactNode)>;
6
-
7
- export { RichTranslationValues, TranslationValue, TranslationValues as default };
1
+ import { ReactNode } from 'react';
2
+ export type TranslationValue = string | number | boolean | Date | null | undefined;
3
+ type TranslationValues = Record<string, TranslationValue>;
4
+ export type RichTranslationValues = Record<string, TranslationValue | ((chunks: ReactNode) => ReactNode)>;
5
+ export default TranslationValues;
@@ -1,16 +1,11 @@
1
- import { Formats as Formats$1 } from 'intl-messageformat';
2
- import Formats from './Formats.js';
3
- import TimeZone from './TimeZone.js';
4
- import './DateTimeFormatOptions.js';
5
- import '@formatjs/ecma402-abstract/types/number';
6
-
7
- /**
8
- * `intl-messageformat` uses separate keys for `date` and `time`, but there's
9
- * only one native API: `Intl.DateTimeFormat`. Additionally you might want to
10
- * include both a time and a date in a value, therefore the separation doesn't
11
- * seem so useful. We offer a single `dateTime` namespace instead, but we have
12
- * to convert the format before `intl-messageformat` can be used.
13
- */
14
- declare function convertFormatsToIntlMessageFormat(formats: Partial<Formats>, timeZone?: TimeZone): Partial<Formats$1>;
15
-
16
- export { convertFormatsToIntlMessageFormat as default };
1
+ import { Formats as IntlFormats } from 'intl-messageformat';
2
+ import Formats from './Formats';
3
+ import TimeZone from './TimeZone';
4
+ /**
5
+ * `intl-messageformat` uses separate keys for `date` and `time`, but there's
6
+ * only one native API: `Intl.DateTimeFormat`. Additionally you might want to
7
+ * include both a time and a date in a value, therefore the separation doesn't
8
+ * seem so useful. We offer a single `dateTime` namespace instead, but we have
9
+ * to convert the format before `intl-messageformat` can be used.
10
+ */
11
+ export default function convertFormatsToIntlMessageFormat(formats: Partial<Formats>, timeZone?: TimeZone): Partial<IntlFormats>;