@react-aria/i18n 3.12.7 → 3.12.8

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.
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,kDAAc,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAgB;AAKhD,SAAS,0CAAa,KAAwB;IACnD,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IACzB,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IAEnC,IAAI,QAAgB,CAAA,GAAA,sCAAI,EAAE,OAAO,CAAC;QAChC,IAAI,CAAC,QACH,OAAO;QAGT,OAAO;oBACL;YACA,WAAW,CAAA,GAAA,+BAAI,EAAE,UAAU,QAAQ;QACrC;IACF,GAAG;QAAC;QAAe;KAAO;IAE1B,qBACE,0DAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAKO,SAAS;IACd,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IACnC,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE;IACzB,OAAO,WAAW;AACpB","sources":["packages/@react-aria/i18n/src/context.tsx"],"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 {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps) {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = React.useMemo(() => {\n if (!locale) {\n return defaultLocale;\n }\n\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n }, [defaultLocale, locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n"],"names":[],"version":3,"file":"context.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,kDAAc,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAgB;AAKhD,SAAS,0CAAa,KAAwB;IACnD,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IACzB,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IAEnC,IAAI,QAAgB,CAAA,GAAA,sCAAI,EAAE,OAAO,CAAC;QAChC,IAAI,CAAC,QACH,OAAO;QAGT,OAAO;oBACL;YACA,WAAW,CAAA,GAAA,+BAAI,EAAE,UAAU,QAAQ;QACrC;IACF,GAAG;QAAC;QAAe;KAAO;IAE1B,qBACE,0DAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAKO,SAAS;IACd,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IACnC,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE;IACzB,OAAO,WAAW;AACpB","sources":["packages/@react-aria/i18n/src/context.tsx"],"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 {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): ReactNode {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = React.useMemo(() => {\n if (!locale) {\n return defaultLocale;\n }\n\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n }, [defaultLocale, locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n"],"names":[],"version":3,"file":"context.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,kDAAc,CAAA,GAAA,YAAI,EAAE,aAAa,CAAgB;AAKhD,SAAS,0CAAa,KAAwB;IACnD,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IACzB,IAAI,gBAAgB,CAAA,GAAA,yCAAe;IAEnC,IAAI,QAAgB,CAAA,GAAA,YAAI,EAAE,OAAO,CAAC;QAChC,IAAI,CAAC,QACH,OAAO;QAGT,OAAO;oBACL;YACA,WAAW,CAAA,GAAA,yCAAI,EAAE,UAAU,QAAQ;QACrC;IACF,GAAG;QAAC;QAAe;KAAO;IAE1B,qBACE,gCAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAKO,SAAS;IACd,IAAI,gBAAgB,CAAA,GAAA,yCAAe;IACnC,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE;IACzB,OAAO,WAAW;AACpB","sources":["packages/@react-aria/i18n/src/context.tsx"],"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 {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps) {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = React.useMemo(() => {\n if (!locale) {\n return defaultLocale;\n }\n\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n }, [defaultLocale, locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n"],"names":[],"version":3,"file":"context.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,kDAAc,CAAA,GAAA,YAAI,EAAE,aAAa,CAAgB;AAKhD,SAAS,0CAAa,KAAwB;IACnD,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IACzB,IAAI,gBAAgB,CAAA,GAAA,yCAAe;IAEnC,IAAI,QAAgB,CAAA,GAAA,YAAI,EAAE,OAAO,CAAC;QAChC,IAAI,CAAC,QACH,OAAO;QAGT,OAAO;oBACL;YACA,WAAW,CAAA,GAAA,yCAAI,EAAE,UAAU,QAAQ;QACrC;IACF,GAAG;QAAC;QAAe;KAAO;IAE1B,qBACE,gCAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAKO,SAAS;IACd,IAAI,gBAAgB,CAAA,GAAA,yCAAe;IACnC,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE;IACzB,OAAO,WAAW;AACpB","sources":["packages/@react-aria/i18n/src/context.tsx"],"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 {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): ReactNode {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = React.useMemo(() => {\n if (!locale) {\n return defaultLocale;\n }\n\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n }, [defaultLocale, locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n"],"names":[],"version":3,"file":"context.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Direction } from "@react-types/shared";
2
- import React, { ReactNode } from "react";
2
+ import { ReactNode } from "react";
3
3
  import { LocalizedStrings } from "@internationalized/message";
4
4
  import { LocalizedString, LocalizedStringDictionary, LocalizedStringFormatter, LocalizedStrings as _LocalizedStrings1 } from "@internationalized/string";
5
5
  import { DateFormatter } from "@internationalized/date";
@@ -19,7 +19,7 @@ export interface I18nProviderProps {
19
19
  /**
20
20
  * Provides the locale for the application to all child components.
21
21
  */
22
- export function I18nProvider(props: I18nProviderProps): React.JSX.Element;
22
+ export function I18nProvider(props: I18nProviderProps): ReactNode;
23
23
  /**
24
24
  * Returns the current locale and layout direction.
25
25
  */
@@ -1 +1 @@
1
- {"mappings":";;;;;;ACiBA;IACE,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,EAAE,SAAS,CAAA;CACrB;ACND;IACE,oDAAoD;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAID;;GAEG;AACH,6BAA6B,KAAK,EAAE,iBAAiB,qBAoBpD;AAED;;GAEG;AACH,6BAA6B,MAAM,CAIlC;ACzCD,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,KAAK,MAAM,CAAC;AAatF;;;;;GAKG;AACH,oCAAoC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAK5E;ACbD;;GAEG;AACH,6CAA6C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAElM;AAED;;;;GAIG;AACH,4CAA4C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAIhM;AC5BD;;;;GAIG;AACH,iCAAiC,OAAO,GAAE,KAAK,iBAAsB,GAAG,KAAK,UAAU,CAGtF;ACND,qCAAsC,SAAQ,IAAI,CAAC,qBAAqB;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,iCAAiC,OAAO,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAK9E;ACfD;;;;GAIG;AACH,mCAAmC,OAAO,GAAE,mBAAwB,GAAG,KAAK,YAAY,CAGvF;ACRD;;;;GAIG;AACH,4BAA4B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,KAAK,QAAQ,CAWzE;ACjBD;IACE,8DAA8D;IAC9D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACvD,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACrD,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CACrD;AAED;;;GAGG;AACH,0BAA0B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,MAAM,CAsDhE;AC5DD,YAAY,EAAC,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;AAGxE,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAEjE,YAAY,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC","sources":["packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/utils.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDefaultLocale.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/context.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useMessageFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useLocalizedStringFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useListFormatter.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDateFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useNumberFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useCollator.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useFilter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/index.ts","packages/@react-aria/i18n/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"/*\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';\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":"types.d.ts.map"}
1
+ {"mappings":";;;;;;ACiBA;IACE,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,EAAE,SAAS,CAAA;CACrB;ACND;IACE,oDAAoD;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAID;;GAEG;AACH,6BAA6B,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAoBhE;AAED;;GAEG;AACH,6BAA6B,MAAM,CAIlC;ACzCD,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,KAAK,MAAM,CAAC;AAatF;;;;;GAKG;AACH,oCAAoC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAK5E;ACbD;;GAEG;AACH,6CAA6C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAElM;AAED;;;;GAIG;AACH,4CAA4C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAIhM;AC5BD;;;;GAIG;AACH,iCAAiC,OAAO,GAAE,KAAK,iBAAsB,GAAG,KAAK,UAAU,CAGtF;ACND,qCAAsC,SAAQ,IAAI,CAAC,qBAAqB;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,iCAAiC,OAAO,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAK9E;ACfD;;;;GAIG;AACH,mCAAmC,OAAO,GAAE,mBAAwB,GAAG,KAAK,YAAY,CAGvF;ACRD;;;;GAIG;AACH,4BAA4B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,KAAK,QAAQ,CAWzE;ACjBD;IACE,8DAA8D;IAC9D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACvD,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACrD,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CACrD;AAED;;;GAGG;AACH,0BAA0B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,MAAM,CAsDhE;AC5DD,YAAY,EAAC,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;AAGxE,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAEjE,YAAY,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC","sources":["packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/utils.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDefaultLocale.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/context.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useMessageFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useLocalizedStringFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useListFormatter.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDateFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useNumberFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useCollator.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useFilter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/index.ts","packages/@react-aria/i18n/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"/*\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';\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":"types.d.ts.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED,8CAA8C;AAC9C,MAAM,oCAAc,IAAI,IAAI;IAAC;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;CAAO;AAC5G,MAAM,kCAAY,IAAI,IAAI;IAAC;IAAM;IAAM;IAAO;IAAO;IAAO;IAAO;IAAM;IAAM;IAAO;IAAM;IAAM;IAAO;IAAO;IAAO;IAAM;IAAM;IAAM;IAAM;CAAK;AAK7I,SAAS,0CAAM,YAAoB;IACxC,kFAAkF;IAClF,IAAI,KAAK,MAAM,EAAE;QACf,IAAI,SAAS,IAAI,KAAK,MAAM,CAAC,cAAc,QAAQ;QAEnD,6DAA6D;QAC7D,6GAA6G;QAC7G,2GAA2G;QAC3G,IAAI,WAAW,OAAO,OAAO,WAAW,KAAK,aAAa,OAAO,WAAW,KAAK,OAAO,QAAQ;QAChG,IAAI,UACF,OAAO,SAAS,SAAS,KAAK;QAGhC,oCAAoC;QACpC,uGAAuG;QACvG,IAAI,OAAO,MAAM,EACf,OAAO,kCAAY,GAAG,CAAC,OAAO,MAAM;IAExC;IAEA,gEAAgE;IAChE,IAAI,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,EAAE;IACrC,OAAO,gCAAU,GAAG,CAAC;AACvB","sources":["packages/@react-aria/i18n/src/utils.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\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) {\n return textInfo.direction === 'rtl';\n }\n\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) {\n return RTL_SCRIPTS.has(locale.script);\n }\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n"],"names":[],"version":3,"file":"utils.main.js.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED,8CAA8C;AAC9C,MAAM,oCAAc,IAAI,IAAI;IAAC;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;CAAO;AAC5G,MAAM,kCAAY,IAAI,IAAI;IAAC;IAAM;IAAM;IAAO;IAAO;IAAO;IAAO;IAAM;IAAM;IAAO;IAAM;IAAM;IAAO;IAAO;IAAO;IAAM;IAAM;IAAM;IAAM;CAAK;AAK7I,SAAS,0CAAM,YAAoB;IACxC,kFAAkF;IAClF,IAAI,KAAK,MAAM,EAAE;QACf,IAAI,SAAS,IAAI,KAAK,MAAM,CAAC,cAAc,QAAQ;QAEnD,6DAA6D;QAC7D,6GAA6G;QAC7G,2GAA2G;QAC3G,IAAI,WAAW,OAAO,OAAO,WAAW,KAAK,aAAa,OAAO,WAAW,KAAK,OAAO,QAAQ;QAChG,IAAI,UACF,OAAO,SAAS,SAAS,KAAK;QAGhC,oCAAoC;QACpC,uGAAuG;QACvG,IAAI,OAAO,MAAM,EACf,OAAO,kCAAY,GAAG,CAAC,OAAO,MAAM;IAExC;IAEA,gEAAgE;IAChE,IAAI,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,EAAE;IACrC,OAAO,gCAAU,GAAG,CAAC;AACvB","sources":["packages/@react-aria/i18n/src/utils.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\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string): boolean {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) {\n return textInfo.direction === 'rtl';\n }\n\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) {\n return RTL_SCRIPTS.has(locale.script);\n }\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n"],"names":[],"version":3,"file":"utils.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":"AAAA;;;;;;;;;;CAUC,GAED,8CAA8C;AAC9C,MAAM,oCAAc,IAAI,IAAI;IAAC;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;CAAO;AAC5G,MAAM,kCAAY,IAAI,IAAI;IAAC;IAAM;IAAM;IAAO;IAAO;IAAO;IAAO;IAAM;IAAM;IAAO;IAAM;IAAM;IAAO;IAAO;IAAO;IAAM;IAAM;IAAM;IAAM;CAAK;AAK7I,SAAS,0CAAM,YAAoB;IACxC,kFAAkF;IAClF,IAAI,KAAK,MAAM,EAAE;QACf,IAAI,SAAS,IAAI,KAAK,MAAM,CAAC,cAAc,QAAQ;QAEnD,6DAA6D;QAC7D,6GAA6G;QAC7G,2GAA2G;QAC3G,IAAI,WAAW,OAAO,OAAO,WAAW,KAAK,aAAa,OAAO,WAAW,KAAK,OAAO,QAAQ;QAChG,IAAI,UACF,OAAO,SAAS,SAAS,KAAK;QAGhC,oCAAoC;QACpC,uGAAuG;QACvG,IAAI,OAAO,MAAM,EACf,OAAO,kCAAY,GAAG,CAAC,OAAO,MAAM;IAExC;IAEA,gEAAgE;IAChE,IAAI,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,EAAE;IACrC,OAAO,gCAAU,GAAG,CAAC;AACvB","sources":["packages/@react-aria/i18n/src/utils.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\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) {\n return textInfo.direction === 'rtl';\n }\n\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) {\n return RTL_SCRIPTS.has(locale.script);\n }\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
1
+ {"mappings":"AAAA;;;;;;;;;;CAUC,GAED,8CAA8C;AAC9C,MAAM,oCAAc,IAAI,IAAI;IAAC;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;IAAQ;CAAO;AAC5G,MAAM,kCAAY,IAAI,IAAI;IAAC;IAAM;IAAM;IAAO;IAAO;IAAO;IAAO;IAAM;IAAM;IAAO;IAAM;IAAM;IAAO;IAAO;IAAO;IAAM;IAAM;IAAM;IAAM;CAAK;AAK7I,SAAS,0CAAM,YAAoB;IACxC,kFAAkF;IAClF,IAAI,KAAK,MAAM,EAAE;QACf,IAAI,SAAS,IAAI,KAAK,MAAM,CAAC,cAAc,QAAQ;QAEnD,6DAA6D;QAC7D,6GAA6G;QAC7G,2GAA2G;QAC3G,IAAI,WAAW,OAAO,OAAO,WAAW,KAAK,aAAa,OAAO,WAAW,KAAK,OAAO,QAAQ;QAChG,IAAI,UACF,OAAO,SAAS,SAAS,KAAK;QAGhC,oCAAoC;QACpC,uGAAuG;QACvG,IAAI,OAAO,MAAM,EACf,OAAO,kCAAY,GAAG,CAAC,OAAO,MAAM;IAExC;IAEA,gEAAgE;IAChE,IAAI,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,EAAE;IACrC,OAAO,gCAAU,GAAG,CAAC;AACvB","sources":["packages/@react-aria/i18n/src/utils.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\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string): boolean {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) {\n return textInfo.direction === 'rtl';\n }\n\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) {\n return RTL_SCRIPTS.has(locale.script);\n }\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/i18n",
3
- "version": "3.12.7",
3
+ "version": "3.12.8",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -47,13 +47,13 @@
47
47
  "url": "https://github.com/adobe/react-spectrum"
48
48
  },
49
49
  "dependencies": {
50
- "@internationalized/date": "^3.7.0",
51
- "@internationalized/message": "^3.1.6",
52
- "@internationalized/number": "^3.6.0",
53
- "@internationalized/string": "^3.2.5",
54
- "@react-aria/ssr": "^3.9.7",
55
- "@react-aria/utils": "^3.28.1",
56
- "@react-types/shared": "^3.28.0",
50
+ "@internationalized/date": "^3.8.0",
51
+ "@internationalized/message": "^3.1.7",
52
+ "@internationalized/number": "^3.6.1",
53
+ "@internationalized/string": "^3.2.6",
54
+ "@react-aria/ssr": "^3.9.8",
55
+ "@react-aria/utils": "^3.28.2",
56
+ "@react-types/shared": "^3.29.0",
57
57
  "@swc/helpers": "^0.5.0"
58
58
  },
59
59
  "peerDependencies": {
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "9c4ebbc0c1972cc880febc29de995ca58caa3ba4"
66
+ "gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
67
67
  }
@@ -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 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) {\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) {\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":";;;;;;;;;;;;;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, {ReactNode} 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): ReactNode | 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 +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 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) {\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) {\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":";;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, {ReactNode} 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): ReactNode | 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"}
package/src/context.tsx CHANGED
@@ -26,7 +26,7 @@ const I18nContext = React.createContext<Locale | null>(null);
26
26
  /**
27
27
  * Provides the locale for the application to all child components.
28
28
  */
29
- export function I18nProvider(props: I18nProviderProps) {
29
+ export function I18nProvider(props: I18nProviderProps): ReactNode {
30
30
  let {locale, children} = props;
31
31
  let defaultLocale = useDefaultLocale();
32
32
 
package/src/server.tsx CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import type {LocalizedString} from '@internationalized/string';
14
- import React from 'react';
14
+ import React, {ReactNode} from 'react';
15
15
 
16
16
  type PackageLocalizedStrings = {
17
17
  [packageName: string]: Record<string, LocalizedString>
@@ -27,7 +27,7 @@ interface PackageLocalizationProviderProps {
27
27
  * A PackageLocalizationProvider can be rendered on the server to inject the localized strings
28
28
  * needed by the client into the initial HTML.
29
29
  */
30
- export function PackageLocalizationProvider(props: PackageLocalizationProviderProps) {
30
+ export function PackageLocalizationProvider(props: PackageLocalizationProviderProps): ReactNode | null {
31
31
  if (typeof document !== 'undefined') {
32
32
  console.log('PackageLocalizationProvider should only be rendered on the server.');
33
33
  return null;
@@ -42,7 +42,7 @@ export function PackageLocalizationProvider(props: PackageLocalizationProviderPr
42
42
  /**
43
43
  * Returns the content for an inline `<script>` tag to inject localized strings into initial HTML.
44
44
  */
45
- export function getPackageLocalizationScript(locale: string, strings: PackageLocalizedStrings) {
45
+ export function getPackageLocalizationScript(locale: string, strings: PackageLocalizedStrings): string {
46
46
  return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${serialize(strings)}}`;
47
47
  }
48
48
 
package/src/utils.ts CHANGED
@@ -17,7 +17,7 @@ const RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', '
17
17
  /**
18
18
  * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.
19
19
  */
20
- export function isRTL(localeString: string) {
20
+ export function isRTL(localeString: string): boolean {
21
21
  // If the Intl.Locale API is available, use it to get the locale's text direction.
22
22
  if (Intl.Locale) {
23
23
  let locale = new Intl.Locale(localeString).maximize();