@react-aria/i18n 3.12.16 → 3.13.0

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 (81) hide show
  1. package/dist/import.mjs +9 -11
  2. package/dist/main.js +19 -21
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +9 -11
  5. package/dist/module.js.map +1 -1
  6. package/dist/{useMessageFormatter.main.js → private/useMessageFormatter.cjs} +15 -15
  7. package/dist/{useMessageFormatter.main.js.map → private/useMessageFormatter.cjs.map} +1 -1
  8. package/dist/private/useMessageFormatter.js +43 -0
  9. package/dist/{useMessageFormatter.module.js.map → private/useMessageFormatter.js.map} +1 -1
  10. package/dist/types/src/index.d.ts +15 -0
  11. package/dist/types/src/server.d.ts +1 -0
  12. package/dist/types/src/useMessageFormatter.d.ts +11 -0
  13. package/package.json +15 -21
  14. package/server/index.js +4 -72
  15. package/server/index.js.map +1 -1
  16. package/server/index.mjs +3 -67
  17. package/server/index.mjs.map +1 -1
  18. package/src/index.ts +11 -13
  19. package/src/server.ts +1 -0
  20. package/src/useMessageFormatter.ts +1 -1
  21. package/dist/context.main.js +0 -72
  22. package/dist/context.main.js.map +0 -1
  23. package/dist/context.mjs +0 -62
  24. package/dist/context.module.js +0 -62
  25. package/dist/context.module.js.map +0 -1
  26. package/dist/types.d.ts +0 -95
  27. package/dist/types.d.ts.map +0 -1
  28. package/dist/useCollator.main.js +0 -31
  29. package/dist/useCollator.main.js.map +0 -1
  30. package/dist/useCollator.mjs +0 -26
  31. package/dist/useCollator.module.js +0 -26
  32. package/dist/useCollator.module.js.map +0 -1
  33. package/dist/useDateFormatter.main.js +0 -47
  34. package/dist/useDateFormatter.main.js.map +0 -1
  35. package/dist/useDateFormatter.mjs +0 -42
  36. package/dist/useDateFormatter.module.js +0 -42
  37. package/dist/useDateFormatter.module.js.map +0 -1
  38. package/dist/useDefaultLocale.main.js +0 -70
  39. package/dist/useDefaultLocale.main.js.map +0 -1
  40. package/dist/useDefaultLocale.mjs +0 -65
  41. package/dist/useDefaultLocale.module.js +0 -65
  42. package/dist/useDefaultLocale.module.js.map +0 -1
  43. package/dist/useFilter.main.js +0 -72
  44. package/dist/useFilter.main.js.map +0 -1
  45. package/dist/useFilter.mjs +0 -67
  46. package/dist/useFilter.module.js +0 -67
  47. package/dist/useFilter.module.js.map +0 -1
  48. package/dist/useListFormatter.main.js +0 -31
  49. package/dist/useListFormatter.main.js.map +0 -1
  50. package/dist/useListFormatter.mjs +0 -26
  51. package/dist/useListFormatter.module.js +0 -26
  52. package/dist/useListFormatter.module.js.map +0 -1
  53. package/dist/useLocalizedStringFormatter.main.js +0 -47
  54. package/dist/useLocalizedStringFormatter.main.js.map +0 -1
  55. package/dist/useLocalizedStringFormatter.mjs +0 -41
  56. package/dist/useLocalizedStringFormatter.module.js +0 -41
  57. package/dist/useLocalizedStringFormatter.module.js.map +0 -1
  58. package/dist/useMessageFormatter.mjs +0 -43
  59. package/dist/useMessageFormatter.module.js +0 -43
  60. package/dist/useNumberFormatter.main.js +0 -33
  61. package/dist/useNumberFormatter.main.js.map +0 -1
  62. package/dist/useNumberFormatter.mjs +0 -28
  63. package/dist/useNumberFormatter.module.js +0 -28
  64. package/dist/useNumberFormatter.module.js.map +0 -1
  65. package/dist/utils.main.js +0 -70
  66. package/dist/utils.main.js.map +0 -1
  67. package/dist/utils.mjs +0 -65
  68. package/dist/utils.module.js +0 -65
  69. package/dist/utils.module.js.map +0 -1
  70. package/src/context.tsx +0 -87
  71. package/src/main.js +0 -6
  72. package/src/module.js +0 -6
  73. package/src/server.tsx +0 -99
  74. package/src/useCollator.ts +0 -33
  75. package/src/useDateFormatter.ts +0 -52
  76. package/src/useDefaultLocale.ts +0 -91
  77. package/src/useFilter.ts +0 -83
  78. package/src/useListFormatter.tsx +0 -24
  79. package/src/useLocalizedStringFormatter.ts +0 -44
  80. package/src/useNumberFormatter.ts +0 -25
  81. package/src/utils.ts +0 -43
package/dist/import.mjs CHANGED
@@ -1,12 +1,11 @@
1
- import {I18nProvider as $18f2051aff69b9bf$export$a54013f0d02a8f82, useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7} from "./context.mjs";
2
- import {useMessageFormatter as $321bc95feeb923dd$export$ec23bf898b1eed85} from "./useMessageFormatter.mjs";
3
- import {useLocalizedStringDictionary as $fca6afa0e843324b$export$87b761675e8eaa10, useLocalizedStringFormatter as $fca6afa0e843324b$export$f12b703ca79dfbb1} from "./useLocalizedStringFormatter.mjs";
4
- import {useListFormatter as $33bf17300c498528$export$a2f47a3d2973640} from "./useListFormatter.mjs";
5
- import {useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79} from "./useDateFormatter.mjs";
6
- import {useNumberFormatter as $a916eb452884faea$export$b7a616150fdb9f44} from "./useNumberFormatter.mjs";
7
- import {useCollator as $325a3faab7a68acd$export$a16aca283550c30d} from "./useCollator.mjs";
8
- import {useFilter as $bb77f239b46e8c72$export$3274cf84b703fff} from "./useFilter.mjs";
9
- import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.mjs";
1
+ import {useMessageFormatter as $345fc832e5b22baa$export$ec23bf898b1eed85} from "./private/useMessageFormatter.js";
2
+ import {I18nProvider as $1697a7ad3db7b79f$re_export$I18nProvider, useLocale as $1697a7ad3db7b79f$re_export$useLocale, isRTL as $1697a7ad3db7b79f$re_export$isRTL} from "react-aria/I18nProvider";
3
+ import {useLocalizedStringFormatter as $1697a7ad3db7b79f$re_export$useLocalizedStringFormatter, useLocalizedStringDictionary as $1697a7ad3db7b79f$re_export$useLocalizedStringDictionary} from "react-aria/useLocalizedStringFormatter";
4
+ import {useListFormatter as $1697a7ad3db7b79f$re_export$useListFormatter} from "react-aria/useListFormatter";
5
+ import {useDateFormatter as $1697a7ad3db7b79f$re_export$useDateFormatter} from "react-aria/useDateFormatter";
6
+ import {useNumberFormatter as $1697a7ad3db7b79f$re_export$useNumberFormatter} from "react-aria/useNumberFormatter";
7
+ import {useCollator as $1697a7ad3db7b79f$re_export$useCollator} from "react-aria/useCollator";
8
+ import {useFilter as $1697a7ad3db7b79f$re_export$useFilter} from "react-aria/useFilter";
10
9
 
11
10
  /*
12
11
  * Copyright 2020 Adobe. All rights reserved.
@@ -28,6 +27,5 @@ import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.mjs";
28
27
 
29
28
 
30
29
 
31
-
32
- export {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale, $321bc95feeb923dd$export$ec23bf898b1eed85 as useMessageFormatter, $fca6afa0e843324b$export$f12b703ca79dfbb1 as useLocalizedStringFormatter, $fca6afa0e843324b$export$87b761675e8eaa10 as useLocalizedStringDictionary, $33bf17300c498528$export$a2f47a3d2973640 as useListFormatter, $896ba0a80a8f4d36$export$85fd5fdf27bacc79 as useDateFormatter, $a916eb452884faea$export$b7a616150fdb9f44 as useNumberFormatter, $325a3faab7a68acd$export$a16aca283550c30d as useCollator, $bb77f239b46e8c72$export$3274cf84b703fff as useFilter, $148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};
30
+ export {$1697a7ad3db7b79f$re_export$I18nProvider as I18nProvider, $1697a7ad3db7b79f$re_export$useLocale as useLocale, $1697a7ad3db7b79f$re_export$isRTL as isRTL, $345fc832e5b22baa$export$ec23bf898b1eed85 as useMessageFormatter, $1697a7ad3db7b79f$re_export$useLocalizedStringFormatter as useLocalizedStringFormatter, $1697a7ad3db7b79f$re_export$useLocalizedStringDictionary as useLocalizedStringDictionary, $1697a7ad3db7b79f$re_export$useListFormatter as useListFormatter, $1697a7ad3db7b79f$re_export$useDateFormatter as useDateFormatter, $1697a7ad3db7b79f$re_export$useNumberFormatter as useNumberFormatter, $1697a7ad3db7b79f$re_export$useCollator as useCollator, $1697a7ad3db7b79f$re_export$useFilter as useFilter};
33
31
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,29 +1,28 @@
1
- var $47fa5ec5ff482271$exports = require("./context.main.js");
2
- var $c376aa482226bf60$exports = require("./useMessageFormatter.main.js");
3
- var $fc53663969a3d00a$exports = require("./useLocalizedStringFormatter.main.js");
4
- var $cb6a3e7d490e97a4$exports = require("./useListFormatter.main.js");
5
- var $b80c530ff2e20243$exports = require("./useDateFormatter.main.js");
6
- var $fea93c5b7c90d9f4$exports = require("./useNumberFormatter.main.js");
7
- var $27a5ce66022270ad$exports = require("./useCollator.main.js");
8
- var $832d079b867c7223$exports = require("./useFilter.main.js");
9
- var $4d65847630a056a8$exports = require("./utils.main.js");
1
+ var $640f8936efd5afb8$exports = require("./private/useMessageFormatter.cjs");
2
+ var $hXxDt$reactariaI18nProvider = require("react-aria/I18nProvider");
3
+ var $hXxDt$reactariauseLocalizedStringFormatter = require("react-aria/useLocalizedStringFormatter");
4
+ var $hXxDt$reactariauseListFormatter = require("react-aria/useListFormatter");
5
+ var $hXxDt$reactariauseDateFormatter = require("react-aria/useDateFormatter");
6
+ var $hXxDt$reactariauseNumberFormatter = require("react-aria/useNumberFormatter");
7
+ var $hXxDt$reactariauseCollator = require("react-aria/useCollator");
8
+ var $hXxDt$reactariauseFilter = require("react-aria/useFilter");
10
9
 
11
10
 
12
11
  function $parcel$export(e, n, v, s) {
13
12
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
13
  }
15
14
 
16
- $parcel$export(module.exports, "I18nProvider", () => $47fa5ec5ff482271$exports.I18nProvider);
17
- $parcel$export(module.exports, "useLocale", () => $47fa5ec5ff482271$exports.useLocale);
18
- $parcel$export(module.exports, "useMessageFormatter", () => $c376aa482226bf60$exports.useMessageFormatter);
19
- $parcel$export(module.exports, "useLocalizedStringFormatter", () => $fc53663969a3d00a$exports.useLocalizedStringFormatter);
20
- $parcel$export(module.exports, "useLocalizedStringDictionary", () => $fc53663969a3d00a$exports.useLocalizedStringDictionary);
21
- $parcel$export(module.exports, "useListFormatter", () => $cb6a3e7d490e97a4$exports.useListFormatter);
22
- $parcel$export(module.exports, "useDateFormatter", () => $b80c530ff2e20243$exports.useDateFormatter);
23
- $parcel$export(module.exports, "useNumberFormatter", () => $fea93c5b7c90d9f4$exports.useNumberFormatter);
24
- $parcel$export(module.exports, "useCollator", () => $27a5ce66022270ad$exports.useCollator);
25
- $parcel$export(module.exports, "useFilter", () => $832d079b867c7223$exports.useFilter);
26
- $parcel$export(module.exports, "isRTL", () => $4d65847630a056a8$exports.isRTL);
15
+ $parcel$export(module.exports, "I18nProvider", function () { return $hXxDt$reactariaI18nProvider.I18nProvider; });
16
+ $parcel$export(module.exports, "useLocale", function () { return $hXxDt$reactariaI18nProvider.useLocale; });
17
+ $parcel$export(module.exports, "isRTL", function () { return $hXxDt$reactariaI18nProvider.isRTL; });
18
+ $parcel$export(module.exports, "useMessageFormatter", function () { return $640f8936efd5afb8$exports.useMessageFormatter; });
19
+ $parcel$export(module.exports, "useLocalizedStringFormatter", function () { return $hXxDt$reactariauseLocalizedStringFormatter.useLocalizedStringFormatter; });
20
+ $parcel$export(module.exports, "useLocalizedStringDictionary", function () { return $hXxDt$reactariauseLocalizedStringFormatter.useLocalizedStringDictionary; });
21
+ $parcel$export(module.exports, "useListFormatter", function () { return $hXxDt$reactariauseListFormatter.useListFormatter; });
22
+ $parcel$export(module.exports, "useDateFormatter", function () { return $hXxDt$reactariauseDateFormatter.useDateFormatter; });
23
+ $parcel$export(module.exports, "useNumberFormatter", function () { return $hXxDt$reactariauseNumberFormatter.useNumberFormatter; });
24
+ $parcel$export(module.exports, "useCollator", function () { return $hXxDt$reactariauseCollator.useCollator; });
25
+ $parcel$export(module.exports, "useFilter", function () { return $hXxDt$reactariauseFilter.useFilter; });
27
26
  /*
28
27
  * Copyright 2020 Adobe. All rights reserved.
29
28
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -44,5 +43,4 @@ $parcel$export(module.exports, "isRTL", () => $4d65847630a056a8$exports.isRTL);
44
43
 
45
44
 
46
45
 
47
-
48
46
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\nexport {isRTL} from './utils';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale, isRTL} from 'react-aria/I18nProvider';\n\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from 'react-aria/useLocalizedStringFormatter';\nexport {useListFormatter} from 'react-aria/useListFormatter';\nexport {useDateFormatter} from 'react-aria/useDateFormatter';\nexport {useNumberFormatter} from 'react-aria/useNumberFormatter';\nexport {useCollator} from 'react-aria/useCollator';\nexport {useFilter} from 'react-aria/useFilter';\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {I18nProviderProps, Locale} from 'react-aria/I18nProvider';\nexport type {DateFormatterOptions} from 'react-aria/useDateFormatter';\nexport type {Filter} from 'react-aria/useFilter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatter} from '@internationalized/date';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,12 +1,11 @@
1
- import {I18nProvider as $18f2051aff69b9bf$export$a54013f0d02a8f82, useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7} from "./context.module.js";
2
- import {useMessageFormatter as $321bc95feeb923dd$export$ec23bf898b1eed85} from "./useMessageFormatter.module.js";
3
- import {useLocalizedStringDictionary as $fca6afa0e843324b$export$87b761675e8eaa10, useLocalizedStringFormatter as $fca6afa0e843324b$export$f12b703ca79dfbb1} from "./useLocalizedStringFormatter.module.js";
4
- import {useListFormatter as $33bf17300c498528$export$a2f47a3d2973640} from "./useListFormatter.module.js";
5
- import {useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79} from "./useDateFormatter.module.js";
6
- import {useNumberFormatter as $a916eb452884faea$export$b7a616150fdb9f44} from "./useNumberFormatter.module.js";
7
- import {useCollator as $325a3faab7a68acd$export$a16aca283550c30d} from "./useCollator.module.js";
8
- import {useFilter as $bb77f239b46e8c72$export$3274cf84b703fff} from "./useFilter.module.js";
9
- import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.module.js";
1
+ import {useMessageFormatter as $345fc832e5b22baa$export$ec23bf898b1eed85} from "./private/useMessageFormatter.js";
2
+ import {I18nProvider as $1697a7ad3db7b79f$re_export$I18nProvider, useLocale as $1697a7ad3db7b79f$re_export$useLocale, isRTL as $1697a7ad3db7b79f$re_export$isRTL} from "react-aria/I18nProvider";
3
+ import {useLocalizedStringFormatter as $1697a7ad3db7b79f$re_export$useLocalizedStringFormatter, useLocalizedStringDictionary as $1697a7ad3db7b79f$re_export$useLocalizedStringDictionary} from "react-aria/useLocalizedStringFormatter";
4
+ import {useListFormatter as $1697a7ad3db7b79f$re_export$useListFormatter} from "react-aria/useListFormatter";
5
+ import {useDateFormatter as $1697a7ad3db7b79f$re_export$useDateFormatter} from "react-aria/useDateFormatter";
6
+ import {useNumberFormatter as $1697a7ad3db7b79f$re_export$useNumberFormatter} from "react-aria/useNumberFormatter";
7
+ import {useCollator as $1697a7ad3db7b79f$re_export$useCollator} from "react-aria/useCollator";
8
+ import {useFilter as $1697a7ad3db7b79f$re_export$useFilter} from "react-aria/useFilter";
10
9
 
11
10
  /*
12
11
  * Copyright 2020 Adobe. All rights reserved.
@@ -28,6 +27,5 @@ import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.module
28
27
 
29
28
 
30
29
 
31
-
32
- export {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale, $321bc95feeb923dd$export$ec23bf898b1eed85 as useMessageFormatter, $fca6afa0e843324b$export$f12b703ca79dfbb1 as useLocalizedStringFormatter, $fca6afa0e843324b$export$87b761675e8eaa10 as useLocalizedStringDictionary, $33bf17300c498528$export$a2f47a3d2973640 as useListFormatter, $896ba0a80a8f4d36$export$85fd5fdf27bacc79 as useDateFormatter, $a916eb452884faea$export$b7a616150fdb9f44 as useNumberFormatter, $325a3faab7a68acd$export$a16aca283550c30d as useCollator, $bb77f239b46e8c72$export$3274cf84b703fff as useFilter, $148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};
30
+ export {$1697a7ad3db7b79f$re_export$I18nProvider as I18nProvider, $1697a7ad3db7b79f$re_export$useLocale as useLocale, $1697a7ad3db7b79f$re_export$isRTL as isRTL, $345fc832e5b22baa$export$ec23bf898b1eed85 as useMessageFormatter, $1697a7ad3db7b79f$re_export$useLocalizedStringFormatter as useLocalizedStringFormatter, $1697a7ad3db7b79f$re_export$useLocalizedStringDictionary as useLocalizedStringDictionary, $1697a7ad3db7b79f$re_export$useListFormatter as useListFormatter, $1697a7ad3db7b79f$re_export$useDateFormatter as useDateFormatter, $1697a7ad3db7b79f$re_export$useNumberFormatter as useNumberFormatter, $1697a7ad3db7b79f$re_export$useCollator as useCollator, $1697a7ad3db7b79f$re_export$useFilter as useFilter};
33
31
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\nexport {isRTL} from './utils';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale, isRTL} from 'react-aria/I18nProvider';\n\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from 'react-aria/useLocalizedStringFormatter';\nexport {useListFormatter} from 'react-aria/useListFormatter';\nexport {useDateFormatter} from 'react-aria/useDateFormatter';\nexport {useNumberFormatter} from 'react-aria/useNumberFormatter';\nexport {useCollator} from 'react-aria/useCollator';\nexport {useFilter} from 'react-aria/useFilter';\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {I18nProviderProps, Locale} from 'react-aria/I18nProvider';\nexport type {DateFormatterOptions} from 'react-aria/useDateFormatter';\nexport type {Filter} from 'react-aria/useFilter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatter} from '@internationalized/date';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1,13 +1,13 @@
1
- var $47fa5ec5ff482271$exports = require("./context.main.js");
2
- var $8WbGG$internationalizedmessage = require("@internationalized/message");
3
- var $8WbGG$react = require("react");
1
+ var $gCv12$internationalizedmessage = require("@internationalized/message");
2
+ var $gCv12$react = require("react");
3
+ var $gCv12$reactariaI18nProvider = require("react-aria/I18nProvider");
4
4
 
5
5
 
6
6
  function $parcel$export(e, n, v, s) {
7
7
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
8
  }
9
9
 
10
- $parcel$export(module.exports, "useMessageFormatter", () => $c376aa482226bf60$export$ec23bf898b1eed85);
10
+ $parcel$export(module.exports, "useMessageFormatter", function () { return $640f8936efd5afb8$export$ec23bf898b1eed85; });
11
11
  /*
12
12
  * Copyright 2020 Adobe. All rights reserved.
13
13
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -21,28 +21,28 @@ $parcel$export(module.exports, "useMessageFormatter", () => $c376aa482226bf60$ex
21
21
  */
22
22
 
23
23
 
24
- const $c376aa482226bf60$var$cache = new WeakMap();
25
- function $c376aa482226bf60$var$getCachedDictionary(strings) {
26
- let dictionary = $c376aa482226bf60$var$cache.get(strings);
24
+ const $640f8936efd5afb8$var$cache = new WeakMap();
25
+ function $640f8936efd5afb8$var$getCachedDictionary(strings) {
26
+ let dictionary = $640f8936efd5afb8$var$cache.get(strings);
27
27
  if (!dictionary) {
28
- dictionary = new (0, $8WbGG$internationalizedmessage.MessageDictionary)(strings);
29
- $c376aa482226bf60$var$cache.set(strings, dictionary);
28
+ dictionary = new (0, $gCv12$internationalizedmessage.MessageDictionary)(strings);
29
+ $640f8936efd5afb8$var$cache.set(strings, dictionary);
30
30
  }
31
31
  return dictionary;
32
32
  }
33
- function $c376aa482226bf60$export$ec23bf898b1eed85(strings) {
34
- let { locale: locale } = (0, $47fa5ec5ff482271$exports.useLocale)();
35
- let dictionary = (0, $8WbGG$react.useMemo)(()=>$c376aa482226bf60$var$getCachedDictionary(strings), [
33
+ function $640f8936efd5afb8$export$ec23bf898b1eed85(strings) {
34
+ let { locale: locale } = (0, $gCv12$reactariaI18nProvider.useLocale)();
35
+ let dictionary = (0, $gCv12$react.useMemo)(()=>$640f8936efd5afb8$var$getCachedDictionary(strings), [
36
36
  strings
37
37
  ]);
38
- let formatter = (0, $8WbGG$react.useMemo)(()=>new (0, $8WbGG$internationalizedmessage.MessageFormatter)(locale, dictionary), [
38
+ let formatter = (0, $gCv12$react.useMemo)(()=>new (0, $gCv12$internationalizedmessage.MessageFormatter)(locale, dictionary), [
39
39
  locale,
40
40
  dictionary
41
41
  ]);
42
- return (0, $8WbGG$react.useCallback)((key, variables)=>formatter.format(key, variables), [
42
+ return (0, $gCv12$react.useCallback)((key, variables)=>formatter.format(key, variables), [
43
43
  formatter
44
44
  ]);
45
45
  }
46
46
 
47
47
 
48
- //# sourceMappingURL=useMessageFormatter.main.js.map
48
+ //# sourceMappingURL=useMessageFormatter.cjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAQD,MAAM,8BAAQ,IAAI;AAClB,SAAS,0CAAoB,OAAyB;IACpD,IAAI,aAAa,4BAAM,GAAG,CAAC;IAC3B,IAAI,CAAC,YAAY;QACf,aAAa,IAAI,CAAA,GAAA,iDAAgB,EAAE;QACnC,4BAAM,GAAG,CAAC,SAAS;IACrB;IAEA,OAAO;AACT;AAQO,SAAS,0CAAoB,OAAyB;IAC3D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,mCAAQ;IACvB,IAAI,aAAa,CAAA,GAAA,oBAAM,EAAE,IAAM,0CAAoB,UAAU;QAAC;KAAQ;IACtE,IAAI,YAAY,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,CAAA,GAAA,gDAAe,EAAE,QAAQ,aAAa;QAAC;QAAQ;KAAW;IAC5F,OAAO,CAAA,GAAA,wBAAU,EAAE,CAAC,KAAK,YAAc,UAAU,MAAM,CAAC,KAAK,YAAY;QAAC;KAAU;AACtF","sources":["packages/@react-aria/i18n/src/useMessageFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStrings, MessageDictionary, MessageFormatter} from '@internationalized/message';\nimport {useCallback, useMemo} from 'react';\nimport {useLocale} from './context';\n\nexport type FormatMessage = (key: string, variables?: {[key: string]: any}) => string;\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings) {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new MessageDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Handles formatting ICU Message strings to create localized strings for the current locale.\n * Automatically updates when the locale changes, and handles caching of messages for performance.\n * @param strings - A mapping of languages to strings by key.\n * @deprecated - use useLocalizedStringFormatter instead.\n */\nexport function useMessageFormatter(strings: LocalizedStrings): FormatMessage {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n let formatter = useMemo(() => new MessageFormatter(locale, dictionary), [locale, dictionary]);\n return useCallback((key, variables) => formatter.format(key, variables), [formatter]);\n}\n"],"names":[],"version":3,"file":"useMessageFormatter.main.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAQD,MAAM,8BAAQ,IAAI;AAClB,SAAS,0CAAoB,OAAyB;IACpD,IAAI,aAAa,4BAAM,GAAG,CAAC;IAC3B,IAAI,CAAC,YAAY;QACf,aAAa,IAAI,CAAA,GAAA,iDAAgB,EAAE;QACnC,4BAAM,GAAG,CAAC,SAAS;IACrB;IAEA,OAAO;AACT;AAQO,SAAS,0CAAoB,OAAyB;IAC3D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,aAAa,CAAA,GAAA,oBAAM,EAAE,IAAM,0CAAoB,UAAU;QAAC;KAAQ;IACtE,IAAI,YAAY,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,CAAA,GAAA,gDAAe,EAAE,QAAQ,aAAa;QAAC;QAAQ;KAAW;IAC5F,OAAO,CAAA,GAAA,wBAAU,EAAE,CAAC,KAAK,YAAc,UAAU,MAAM,CAAC,KAAK,YAAY;QAAC;KAAU;AACtF","sources":["packages/@react-aria/i18n/src/useMessageFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStrings, MessageDictionary, MessageFormatter} from '@internationalized/message';\nimport {useCallback, useMemo} from 'react';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport type FormatMessage = (key: string, variables?: {[key: string]: any}) => string;\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings) {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new MessageDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Handles formatting ICU Message strings to create localized strings for the current locale.\n * Automatically updates when the locale changes, and handles caching of messages for performance.\n * @param strings - A mapping of languages to strings by key.\n * @deprecated - use useLocalizedStringFormatter instead.\n */\nexport function useMessageFormatter(strings: LocalizedStrings): FormatMessage {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n let formatter = useMemo(() => new MessageFormatter(locale, dictionary), [locale, dictionary]);\n return useCallback((key, variables) => formatter.format(key, variables), [formatter]);\n}\n"],"names":[],"version":3,"file":"useMessageFormatter.cjs.map"}
@@ -0,0 +1,43 @@
1
+ import {MessageDictionary as $gt8dg$MessageDictionary, MessageFormatter as $gt8dg$MessageFormatter} from "@internationalized/message";
2
+ import {useMemo as $gt8dg$useMemo, useCallback as $gt8dg$useCallback} from "react";
3
+ import {useLocale as $gt8dg$useLocale} from "react-aria/I18nProvider";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */
16
+
17
+
18
+ const $345fc832e5b22baa$var$cache = new WeakMap();
19
+ function $345fc832e5b22baa$var$getCachedDictionary(strings) {
20
+ let dictionary = $345fc832e5b22baa$var$cache.get(strings);
21
+ if (!dictionary) {
22
+ dictionary = new (0, $gt8dg$MessageDictionary)(strings);
23
+ $345fc832e5b22baa$var$cache.set(strings, dictionary);
24
+ }
25
+ return dictionary;
26
+ }
27
+ function $345fc832e5b22baa$export$ec23bf898b1eed85(strings) {
28
+ let { locale: locale } = (0, $gt8dg$useLocale)();
29
+ let dictionary = (0, $gt8dg$useMemo)(()=>$345fc832e5b22baa$var$getCachedDictionary(strings), [
30
+ strings
31
+ ]);
32
+ let formatter = (0, $gt8dg$useMemo)(()=>new (0, $gt8dg$MessageFormatter)(locale, dictionary), [
33
+ locale,
34
+ dictionary
35
+ ]);
36
+ return (0, $gt8dg$useCallback)((key, variables)=>formatter.format(key, variables), [
37
+ formatter
38
+ ]);
39
+ }
40
+
41
+
42
+ export {$345fc832e5b22baa$export$ec23bf898b1eed85 as useMessageFormatter};
43
+ //# sourceMappingURL=useMessageFormatter.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAQD,MAAM,8BAAQ,IAAI;AAClB,SAAS,0CAAoB,OAAyB;IACpD,IAAI,aAAa,4BAAM,GAAG,CAAC;IAC3B,IAAI,CAAC,YAAY;QACf,aAAa,IAAI,CAAA,GAAA,wBAAgB,EAAE;QACnC,4BAAM,GAAG,CAAC,SAAS;IACrB;IAEA,OAAO;AACT;AAQO,SAAS,0CAAoB,OAAyB;IAC3D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,yCAAQ;IACvB,IAAI,aAAa,CAAA,GAAA,cAAM,EAAE,IAAM,0CAAoB,UAAU;QAAC;KAAQ;IACtE,IAAI,YAAY,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,CAAA,GAAA,uBAAe,EAAE,QAAQ,aAAa;QAAC;QAAQ;KAAW;IAC5F,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC,KAAK,YAAc,UAAU,MAAM,CAAC,KAAK,YAAY;QAAC;KAAU;AACtF","sources":["packages/@react-aria/i18n/src/useMessageFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStrings, MessageDictionary, MessageFormatter} from '@internationalized/message';\nimport {useCallback, useMemo} from 'react';\nimport {useLocale} from './context';\n\nexport type FormatMessage = (key: string, variables?: {[key: string]: any}) => string;\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings) {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new MessageDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Handles formatting ICU Message strings to create localized strings for the current locale.\n * Automatically updates when the locale changes, and handles caching of messages for performance.\n * @param strings - A mapping of languages to strings by key.\n * @deprecated - use useLocalizedStringFormatter instead.\n */\nexport function useMessageFormatter(strings: LocalizedStrings): FormatMessage {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n let formatter = useMemo(() => new MessageFormatter(locale, dictionary), [locale, dictionary]);\n return useCallback((key, variables) => formatter.format(key, variables), [formatter]);\n}\n"],"names":[],"version":3,"file":"useMessageFormatter.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAQD,MAAM,8BAAQ,IAAI;AAClB,SAAS,0CAAoB,OAAyB;IACpD,IAAI,aAAa,4BAAM,GAAG,CAAC;IAC3B,IAAI,CAAC,YAAY;QACf,aAAa,IAAI,CAAA,GAAA,wBAAgB,EAAE;QACnC,4BAAM,GAAG,CAAC,SAAS;IACrB;IAEA,OAAO;AACT;AAQO,SAAS,0CAAoB,OAAyB;IAC3D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,aAAa,CAAA,GAAA,cAAM,EAAE,IAAM,0CAAoB,UAAU;QAAC;KAAQ;IACtE,IAAI,YAAY,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,CAAA,GAAA,uBAAe,EAAE,QAAQ,aAAa;QAAC;QAAQ;KAAW;IAC5F,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC,KAAK,YAAc,UAAU,MAAM,CAAC,KAAK,YAAY;QAAC;KAAU;AACtF","sources":["packages/@react-aria/i18n/src/useMessageFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedStrings, MessageDictionary, MessageFormatter} from '@internationalized/message';\nimport {useCallback, useMemo} from 'react';\nimport {useLocale} from 'react-aria/I18nProvider';\n\nexport type FormatMessage = (key: string, variables?: {[key: string]: any}) => string;\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings) {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new MessageDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Handles formatting ICU Message strings to create localized strings for the current locale.\n * Automatically updates when the locale changes, and handles caching of messages for performance.\n * @param strings - A mapping of languages to strings by key.\n * @deprecated - use useLocalizedStringFormatter instead.\n */\nexport function useMessageFormatter(strings: LocalizedStrings): FormatMessage {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n let formatter = useMemo(() => new MessageFormatter(locale, dictionary), [locale, dictionary]);\n return useCallback((key, variables) => formatter.format(key, variables), [formatter]);\n}\n"],"names":[],"version":3,"file":"useMessageFormatter.js.map"}
@@ -0,0 +1,15 @@
1
+ export { I18nProvider, useLocale, isRTL } from 'react-aria/I18nProvider';
2
+ export { useMessageFormatter } from './useMessageFormatter';
3
+ export { useLocalizedStringFormatter, useLocalizedStringDictionary } from 'react-aria/useLocalizedStringFormatter';
4
+ export { useListFormatter } from 'react-aria/useListFormatter';
5
+ export { useDateFormatter } from 'react-aria/useDateFormatter';
6
+ export { useNumberFormatter } from 'react-aria/useNumberFormatter';
7
+ export { useCollator } from 'react-aria/useCollator';
8
+ export { useFilter } from 'react-aria/useFilter';
9
+ export type { FormatMessage } from './useMessageFormatter';
10
+ export type { I18nProviderProps, Locale } from 'react-aria/I18nProvider';
11
+ export type { DateFormatterOptions } from 'react-aria/useDateFormatter';
12
+ export type { Filter } from 'react-aria/useFilter';
13
+ export type { LocalizedStringFormatter } from '@internationalized/string';
14
+ export type { LocalizedStrings } from '@internationalized/message';
15
+ export type { DateFormatter } from '@internationalized/date';
@@ -0,0 +1 @@
1
+ export { PackageLocalizationProvider, getPackageLocalizationScript } from 'react-aria/private/i18n/server';
@@ -0,0 +1,11 @@
1
+ import { LocalizedStrings } from '@internationalized/message';
2
+ export type FormatMessage = (key: string, variables?: {
3
+ [key: string]: any;
4
+ }) => string;
5
+ /**
6
+ * Handles formatting ICU Message strings to create localized strings for the current locale.
7
+ * Automatically updates when the locale changes, and handles caching of messages for performance.
8
+ * @param strings - A mapping of languages to strings by key.
9
+ * @deprecated - use useLocalizedStringFormatter instead.
10
+ */
11
+ export declare function useMessageFormatter(strings: LocalizedStrings): FormatMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/i18n",
3
- "version": "3.12.16",
3
+ "version": "3.13.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -8,34 +8,31 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "source": "./src/index.ts",
11
- "types": [
12
- "./dist/types.d.ts",
13
- "./src/index.ts"
14
- ],
11
+ "types": "./dist/types/src/index.d.ts",
15
12
  "import": "./dist/import.mjs",
16
13
  "require": "./dist/main.js"
17
14
  },
18
15
  "./server": {
19
- "source": "./src/server.tsx",
16
+ "source": "./src/server.ts",
20
17
  "import": "./server/index.mjs",
21
18
  "require": "./server/index.js"
22
- }
19
+ },
20
+ "./package.json": "./package.json"
23
21
  },
24
22
  "server-module": "server/index.mjs",
25
23
  "server-main": "server/index.js",
26
- "types": "dist/types.d.ts",
24
+ "types": "dist/types/src/index.d.ts",
27
25
  "source": "src/index.ts",
28
26
  "targets": {
29
- "main": {},
30
- "module": {},
27
+ "types": false,
31
28
  "server-module": {
32
- "source": "src/server.tsx",
29
+ "source": "src/server.ts",
33
30
  "outputFormat": "esmodule",
34
31
  "isLibrary": true,
35
32
  "includeNodeModules": false
36
33
  },
37
34
  "server-main": {
38
- "source": "src/server.tsx",
35
+ "source": "src/server.ts",
39
36
  "outputFormat": "commonjs",
40
37
  "isLibrary": true,
41
38
  "includeNodeModules": false
@@ -52,14 +49,11 @@
52
49
  "url": "https://github.com/adobe/react-spectrum"
53
50
  },
54
51
  "dependencies": {
55
- "@internationalized/date": "^3.12.0",
56
- "@internationalized/message": "^3.1.8",
57
- "@internationalized/number": "^3.6.5",
58
- "@internationalized/string": "^3.2.7",
59
- "@react-aria/ssr": "^3.9.10",
60
- "@react-aria/utils": "^3.33.1",
61
- "@react-types/shared": "^3.33.1",
62
- "@swc/helpers": "^0.5.0"
52
+ "@internationalized/date": "^3.12.1",
53
+ "@internationalized/message": "^3.1.9",
54
+ "@internationalized/string": "^3.2.8",
55
+ "@swc/helpers": "^0.5.0",
56
+ "react-aria": "3.48.0"
63
57
  },
64
58
  "peerDependencies": {
65
59
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
@@ -68,5 +62,5 @@
68
62
  "publishConfig": {
69
63
  "access": "public"
70
64
  },
71
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
65
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
72
66
  }
package/server/index.js CHANGED
@@ -1,81 +1,13 @@
1
- var $kg1kr$react = require("react");
1
+ var $3bMwm$reactariaprivatei18nserver = require("react-aria/private/i18n/server");
2
2
 
3
3
 
4
- function $parcel$interopDefault(a) {
5
- return a && a.__esModule ? a.default : a;
6
- }
7
-
8
4
  function $parcel$export(e, n, v, s) {
9
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
10
6
  }
11
7
 
12
- $parcel$export(module.exports, "PackageLocalizationProvider", () => $417d44b6975b2ee7$export$9ec1fc026a5460ba);
13
- $parcel$export(module.exports, "getPackageLocalizationScript", () => $417d44b6975b2ee7$export$fe9518edbbdc73da);
14
- /*
15
- * Copyright 2023 Adobe. All rights reserved.
16
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
17
- * you may not use this file except in compliance with the License. You may obtain a copy
18
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
19
- *
20
- * Unless required by applicable law or agreed to in writing, software distributed under
21
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
22
- * OF ANY KIND, either express or implied. See the License for the specific language
23
- * governing permissions and limitations under the License.
24
- */
25
- function $417d44b6975b2ee7$export$9ec1fc026a5460ba(props) {
26
- if (typeof document !== 'undefined') {
27
- console.log('PackageLocalizationProvider should only be rendered on the server.');
28
- return null;
29
- }
30
- let { nonce: nonce, locale: locale, strings: strings } = props;
31
- // suppressHydrationWarning is necessary because the browser
32
- // remove the nonce parameter from the DOM before hydration
33
- return /*#__PURE__*/ (0, ($parcel$interopDefault($kg1kr$react))).createElement("script", {
34
- nonce: typeof window === 'undefined' ? nonce : '',
35
- suppressHydrationWarning: true,
36
- dangerouslySetInnerHTML: {
37
- __html: $417d44b6975b2ee7$export$fe9518edbbdc73da(locale, strings)
38
- }
39
- });
40
- }
41
- function $417d44b6975b2ee7$export$fe9518edbbdc73da(locale, strings) {
42
- return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${$417d44b6975b2ee7$var$serialize(strings)}}`;
43
- }
44
- const $417d44b6975b2ee7$var$cache = new WeakMap();
45
- function $417d44b6975b2ee7$var$serialize(strings) {
46
- let cached = $417d44b6975b2ee7$var$cache.get(strings);
47
- if (cached) return cached;
48
- // Find common strings between packages and hoist them into variables.
49
- let seen = new Set();
50
- let common = new Map();
51
- for(let pkg in strings)for(let key in strings[pkg]){
52
- let v = strings[pkg][key];
53
- let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
54
- if (seen.has(s) && !common.has(s)) {
55
- let name = String.fromCharCode(common.size > 25 ? common.size + 97 : common.size + 65);
56
- common.set(s, name);
57
- }
58
- seen.add(s);
59
- }
60
- let res = '';
61
- if (common.size > 0) res += 'let ';
62
- for (let [string, name] of common)res += `${name}=${string},`;
63
- if (common.size > 0) res = res.slice(0, -1) + ';';
64
- res += "window[Symbol.for('react-aria.i18n.strings')]={";
65
- for(let pkg in strings){
66
- res += `'${pkg}':{`;
67
- for(let key in strings[pkg]){
68
- let v = strings[pkg][key];
69
- let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
70
- if (common.has(s)) s = common.get(s);
71
- res += `${/[ ()]/.test(key) ? JSON.stringify(key) : key}:${s},`;
72
- }
73
- res = res.slice(0, -1) + '},';
74
- }
75
- res = res.slice(0, -1) + '};';
76
- $417d44b6975b2ee7$var$cache.set(strings, res);
77
- return res;
78
- }
8
+ $parcel$export(module.exports, "PackageLocalizationProvider", function () { return $3bMwm$reactariaprivatei18nserver.PackageLocalizationProvider; });
9
+ $parcel$export(module.exports, "getPackageLocalizationScript", function () { return $3bMwm$reactariaprivatei18nserver.getPackageLocalizationScript; });
10
+
79
11
 
80
12
 
81
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAmBM,SAAS,0CAA4B,KAAuC;IACjF,IAAI,OAAO,aAAa,aAAa;QACnC,QAAQ,GAAG,CAAC;QACZ,OAAO;IACT;IAEA,IAAI,SAAC,KAAK,UAAE,MAAM,WAAE,OAAO,EAAC,GAAG;IAC/B,4DAA4D;IAC5D,2DAA2D;IAC3D,qBAAO,0DAAC;QAAO,OAAO,OAAO,WAAW,cAAc,QAAQ;QAAI,0BAAA;QAAyB,yBAAyB;YAAC,QAAQ,0CAA6B,QAAQ;QAAQ;;AAC5K;AAKO,SAAS,0CAA6B,MAAc,EAAE,OAAgC;IAC3F,OAAO,CAAC,6CAA6C,EAAE,KAAK,SAAS,CAAC,QAAQ,EAAE,EAAE,gCAAU,SAAS,CAAC,CAAC;AACzG;AAEA,MAAM,8BAAQ,IAAI;AAElB,SAAS,gCAAU,OAAgC;IACjD,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,QACF,OAAO;IAGT,sEAAsE;IACtE,IAAI,OAAO,IAAI;IACf,IAAI,SAAS,IAAI;IACjB,IAAK,IAAI,OAAO,QACd,IAAK,IAAI,OAAO,OAAO,CAAC,IAAI,CAAE;QAC5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI;QACzB,IAAI,IAAI,OAAO,MAAM,WAAW,KAAK,SAAS,CAAC,KAAK,EAAE,QAAQ;QAC9D,IAAI,KAAK,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,IAAI;YACjC,IAAI,OAAO,OAAO,YAAY,CAAC,OAAO,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG;YACnF,OAAO,GAAG,CAAC,GAAG;QAChB;QACA,KAAK,GAAG,CAAC;IACX;IAGF,IAAI,MAAM;IACV,IAAI,OAAO,IAAI,GAAG,GAChB,OAAO;IAET,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,OACzB,OAAO,GAAG,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IAE7B,IAAI,OAAO,IAAI,GAAG,GAChB,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IAG3B,OAAO;IACP,IAAK,IAAI,OAAO,QAAS;QACvB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC;QACnB,IAAK,IAAI,OAAO,OAAO,CAAC,IAAI,CAAE;YAC5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI;YACzB,IAAI,IAAI,OAAO,MAAM,WAAW,KAAK,SAAS,CAAC,KAAK,EAAE,QAAQ;YAC9D,IAAI,OAAO,GAAG,CAAC,IACb,IAAI,OAAO,GAAG,CAAC;YAEjB,OAAO,GAAG,QAAQ,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACjE;QACA,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IAC3B;IACA,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IACzB,4BAAM,GAAG,CAAC,SAAS;IACnB,OAAO;AACT","sources":["packages/@react-aria/i18n/src/server.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedString} from '@internationalized/string';\nimport React, {JSX} from 'react';\n\ntype PackageLocalizedStrings = {\n [packageName: string]: Record<string, LocalizedString>\n};\n\ninterface PackageLocalizationProviderProps {\n locale: string,\n strings: PackageLocalizedStrings,\n nonce?: string\n}\n\n/**\n * A PackageLocalizationProvider can be rendered on the server to inject the localized strings\n * needed by the client into the initial HTML.\n */\nexport function PackageLocalizationProvider(props: PackageLocalizationProviderProps): JSX.Element | null {\n if (typeof document !== 'undefined') {\n console.log('PackageLocalizationProvider should only be rendered on the server.');\n return null;\n }\n\n let {nonce, locale, strings} = props;\n // suppressHydrationWarning is necessary because the browser\n // remove the nonce parameter from the DOM before hydration\n return <script nonce={typeof window === 'undefined' ? nonce : ''} suppressHydrationWarning dangerouslySetInnerHTML={{__html: getPackageLocalizationScript(locale, strings)}} />;\n}\n\n/**\n * Returns the content for an inline `<script>` tag to inject localized strings into initial HTML.\n */\nexport function getPackageLocalizationScript(locale: string, strings: PackageLocalizedStrings): string {\n return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${serialize(strings)}}`;\n}\n\nconst cache = new WeakMap<PackageLocalizedStrings, string>();\n\nfunction serialize(strings: PackageLocalizedStrings): string {\n let cached = cache.get(strings);\n if (cached) {\n return cached;\n }\n\n // Find common strings between packages and hoist them into variables.\n let seen = new Set();\n let common = new Map();\n for (let pkg in strings) {\n for (let key in strings[pkg]) {\n let v = strings[pkg][key];\n let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();\n if (seen.has(s) && !common.has(s)) {\n let name = String.fromCharCode(common.size > 25 ? common.size + 97 : common.size + 65);\n common.set(s, name);\n }\n seen.add(s);\n }\n }\n\n let res = '';\n if (common.size > 0) {\n res += 'let ';\n }\n for (let [string, name] of common) {\n res += `${name}=${string},`;\n }\n if (common.size > 0) {\n res = res.slice(0, -1) + ';';\n }\n\n res += \"window[Symbol.for('react-aria.i18n.strings')]={\";\n for (let pkg in strings) {\n res += `'${pkg}':{`;\n for (let key in strings[pkg]) {\n let v = strings[pkg][key];\n let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();\n if (common.has(s)) {\n s = common.get(s);\n }\n res += `${/[ ()]/.test(key) ? JSON.stringify(key) : key}:${s},`;\n }\n res = res.slice(0, -1) + '},';\n }\n res = res.slice(0, -1) + '};';\n cache.set(strings, res);\n return res;\n}\n"],"names":[],"version":3,"file":"index.js.map"}
1
+ {"mappings":"","sources":["packages/@react-aria/i18n/src/server.ts"],"sourcesContent":["export {PackageLocalizationProvider, getPackageLocalizationScript} from 'react-aria/private/i18n/server';\n"],"names":[],"version":3,"file":"index.js.map"}
package/server/index.mjs CHANGED
@@ -1,71 +1,7 @@
1
- import $7cMCw$react from "react";
1
+ import {PackageLocalizationProvider as $bbeb5d05325e5e0f$re_export$PackageLocalizationProvider, getPackageLocalizationScript as $bbeb5d05325e5e0f$re_export$getPackageLocalizationScript} from "react-aria/private/i18n/server";
2
2
 
3
- /*
4
- * Copyright 2023 Adobe. All rights reserved.
5
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License. You may obtain a copy
7
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software distributed under
10
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
- * OF ANY KIND, either express or implied. See the License for the specific language
12
- * governing permissions and limitations under the License.
13
- */
14
- function $f4fda66de26cefb3$export$9ec1fc026a5460ba(props) {
15
- if (typeof document !== 'undefined') {
16
- console.log('PackageLocalizationProvider should only be rendered on the server.');
17
- return null;
18
- }
19
- let { nonce: nonce, locale: locale, strings: strings } = props;
20
- // suppressHydrationWarning is necessary because the browser
21
- // remove the nonce parameter from the DOM before hydration
22
- return /*#__PURE__*/ (0, $7cMCw$react).createElement("script", {
23
- nonce: typeof window === 'undefined' ? nonce : '',
24
- suppressHydrationWarning: true,
25
- dangerouslySetInnerHTML: {
26
- __html: $f4fda66de26cefb3$export$fe9518edbbdc73da(locale, strings)
27
- }
28
- });
29
- }
30
- function $f4fda66de26cefb3$export$fe9518edbbdc73da(locale, strings) {
31
- return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${$f4fda66de26cefb3$var$serialize(strings)}}`;
32
- }
33
- const $f4fda66de26cefb3$var$cache = new WeakMap();
34
- function $f4fda66de26cefb3$var$serialize(strings) {
35
- let cached = $f4fda66de26cefb3$var$cache.get(strings);
36
- if (cached) return cached;
37
- // Find common strings between packages and hoist them into variables.
38
- let seen = new Set();
39
- let common = new Map();
40
- for(let pkg in strings)for(let key in strings[pkg]){
41
- let v = strings[pkg][key];
42
- let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
43
- if (seen.has(s) && !common.has(s)) {
44
- let name = String.fromCharCode(common.size > 25 ? common.size + 97 : common.size + 65);
45
- common.set(s, name);
46
- }
47
- seen.add(s);
48
- }
49
- let res = '';
50
- if (common.size > 0) res += 'let ';
51
- for (let [string, name] of common)res += `${name}=${string},`;
52
- if (common.size > 0) res = res.slice(0, -1) + ';';
53
- res += "window[Symbol.for('react-aria.i18n.strings')]={";
54
- for(let pkg in strings){
55
- res += `'${pkg}':{`;
56
- for(let key in strings[pkg]){
57
- let v = strings[pkg][key];
58
- let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
59
- if (common.has(s)) s = common.get(s);
60
- res += `${/[ ()]/.test(key) ? JSON.stringify(key) : key}:${s},`;
61
- }
62
- res = res.slice(0, -1) + '},';
63
- }
64
- res = res.slice(0, -1) + '};';
65
- $f4fda66de26cefb3$var$cache.set(strings, res);
66
- return res;
67
- }
68
3
 
69
4
 
70
- export {$f4fda66de26cefb3$export$9ec1fc026a5460ba as PackageLocalizationProvider, $f4fda66de26cefb3$export$fe9518edbbdc73da as getPackageLocalizationScript};
5
+
6
+ export {$bbeb5d05325e5e0f$re_export$PackageLocalizationProvider as PackageLocalizationProvider, $bbeb5d05325e5e0f$re_export$getPackageLocalizationScript as getPackageLocalizationScript};
71
7
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;CAUC;AAmBM,SAAS,0CAA4B,KAAuC;IACjF,IAAI,OAAO,aAAa,aAAa;QACnC,QAAQ,GAAG,CAAC;QACZ,OAAO;IACT;IAEA,IAAI,SAAC,KAAK,UAAE,MAAM,WAAE,OAAO,EAAC,GAAG;IAC/B,4DAA4D;IAC5D,2DAA2D;IAC3D,qBAAO,gCAAC;QAAO,OAAO,OAAO,WAAW,cAAc,QAAQ;QAAI,0BAAA;QAAyB,yBAAyB;YAAC,QAAQ,0CAA6B,QAAQ;QAAQ;;AAC5K;AAKO,SAAS,0CAA6B,MAAc,EAAE,OAAgC;IAC3F,OAAO,CAAC,6CAA6C,EAAE,KAAK,SAAS,CAAC,QAAQ,EAAE,EAAE,gCAAU,SAAS,CAAC,CAAC;AACzG;AAEA,MAAM,8BAAQ,IAAI;AAElB,SAAS,gCAAU,OAAgC;IACjD,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,QACF,OAAO;IAGT,sEAAsE;IACtE,IAAI,OAAO,IAAI;IACf,IAAI,SAAS,IAAI;IACjB,IAAK,IAAI,OAAO,QACd,IAAK,IAAI,OAAO,OAAO,CAAC,IAAI,CAAE;QAC5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI;QACzB,IAAI,IAAI,OAAO,MAAM,WAAW,KAAK,SAAS,CAAC,KAAK,EAAE,QAAQ;QAC9D,IAAI,KAAK,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,IAAI;YACjC,IAAI,OAAO,OAAO,YAAY,CAAC,OAAO,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG;YACnF,OAAO,GAAG,CAAC,GAAG;QAChB;QACA,KAAK,GAAG,CAAC;IACX;IAGF,IAAI,MAAM;IACV,IAAI,OAAO,IAAI,GAAG,GAChB,OAAO;IAET,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,OACzB,OAAO,GAAG,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IAE7B,IAAI,OAAO,IAAI,GAAG,GAChB,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IAG3B,OAAO;IACP,IAAK,IAAI,OAAO,QAAS;QACvB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC;QACnB,IAAK,IAAI,OAAO,OAAO,CAAC,IAAI,CAAE;YAC5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI;YACzB,IAAI,IAAI,OAAO,MAAM,WAAW,KAAK,SAAS,CAAC,KAAK,EAAE,QAAQ;YAC9D,IAAI,OAAO,GAAG,CAAC,IACb,IAAI,OAAO,GAAG,CAAC;YAEjB,OAAO,GAAG,QAAQ,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACjE;QACA,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IAC3B;IACA,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM;IACzB,4BAAM,GAAG,CAAC,SAAS;IACnB,OAAO;AACT","sources":["packages/@react-aria/i18n/src/server.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedString} from '@internationalized/string';\nimport React, {JSX} from 'react';\n\ntype PackageLocalizedStrings = {\n [packageName: string]: Record<string, LocalizedString>\n};\n\ninterface PackageLocalizationProviderProps {\n locale: string,\n strings: PackageLocalizedStrings,\n nonce?: string\n}\n\n/**\n * A PackageLocalizationProvider can be rendered on the server to inject the localized strings\n * needed by the client into the initial HTML.\n */\nexport function PackageLocalizationProvider(props: PackageLocalizationProviderProps): JSX.Element | null {\n if (typeof document !== 'undefined') {\n console.log('PackageLocalizationProvider should only be rendered on the server.');\n return null;\n }\n\n let {nonce, locale, strings} = props;\n // suppressHydrationWarning is necessary because the browser\n // remove the nonce parameter from the DOM before hydration\n return <script nonce={typeof window === 'undefined' ? nonce : ''} suppressHydrationWarning dangerouslySetInnerHTML={{__html: getPackageLocalizationScript(locale, strings)}} />;\n}\n\n/**\n * Returns the content for an inline `<script>` tag to inject localized strings into initial HTML.\n */\nexport function getPackageLocalizationScript(locale: string, strings: PackageLocalizedStrings): string {\n return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${serialize(strings)}}`;\n}\n\nconst cache = new WeakMap<PackageLocalizedStrings, string>();\n\nfunction serialize(strings: PackageLocalizedStrings): string {\n let cached = cache.get(strings);\n if (cached) {\n return cached;\n }\n\n // Find common strings between packages and hoist them into variables.\n let seen = new Set();\n let common = new Map();\n for (let pkg in strings) {\n for (let key in strings[pkg]) {\n let v = strings[pkg][key];\n let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();\n if (seen.has(s) && !common.has(s)) {\n let name = String.fromCharCode(common.size > 25 ? common.size + 97 : common.size + 65);\n common.set(s, name);\n }\n seen.add(s);\n }\n }\n\n let res = '';\n if (common.size > 0) {\n res += 'let ';\n }\n for (let [string, name] of common) {\n res += `${name}=${string},`;\n }\n if (common.size > 0) {\n res = res.slice(0, -1) + ';';\n }\n\n res += \"window[Symbol.for('react-aria.i18n.strings')]={\";\n for (let pkg in strings) {\n res += `'${pkg}':{`;\n for (let key in strings[pkg]) {\n let v = strings[pkg][key];\n let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();\n if (common.has(s)) {\n s = common.get(s);\n }\n res += `${/[ ()]/.test(key) ? JSON.stringify(key) : key}:${s},`;\n }\n res = res.slice(0, -1) + '},';\n }\n res = res.slice(0, -1) + '};';\n cache.set(strings, res);\n return res;\n}\n"],"names":[],"version":3,"file":"index.mjs.map"}
1
+ {"mappings":"","sources":["packages/@react-aria/i18n/src/server.ts"],"sourcesContent":["export {PackageLocalizationProvider, getPackageLocalizationScript} from 'react-aria/private/i18n/server';\n"],"names":[],"version":3,"file":"index.mjs.map"}