svelte-intlayer 9.5.0 → 9.5.1

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.
@@ -26,7 +26,7 @@ import type { LocalesValues, ProviderVariant } from '@intlayer/types/module_augm
26
26
  * ```
27
27
  */
28
28
  export declare const setupIntlayer: (initialLocale?: LocalesValues, initialVariant?: ProviderVariant) => {
29
- readonly locale: any;
29
+ readonly locale: "id" | "cy" | "hr" | "th" | "tr" | "tt" | "mi" | "mn" | "ms" | "af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "ga" | "ga-IE" | "gd" | "gd-GB" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id-ID" | "is" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi-NZ" | "mk" | "mk-MK" | "mn-MN" | "mr" | "mr-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "ml" | "ml-IN" | "no" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ro-MD" | "rm" | "rm-CH" | "ru" | "ru-RU" | "ru-MD" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "hsb" | "hsb-DE" | "dsb" | "dsb-DE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr-TR" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "ve" | "ve-ZA" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "my" | "my-MM" | "km" | "km-KH" | "lo" | "lo-LA" | "yo" | "yo-NG" | "yi" | "yi-001" | "am" | "am-ET" | "ne" | "ne-NP" | "si" | "si-LK" | "sr-Cyrl" | "sr-RS" | "en-IN" | "en-SG" | "en-HK" | "en-NG" | "en-PK" | "en-MY" | "en-BW" | "en-KE" | "en-TZ" | "en-GH" | "en-UG" | "es-CU" | "es-US" | "pt-GW" | "pt-MZ" | "pt-ST" | "pt-CV" | "pt-TL" | "pt-MO" | "zh-TW" | "ar-MR" | "ar-PS" | "ar-SD" | "ar-DJ" | "ar-SO" | "ar-TD" | "ar-KM" | "mg-MG" | (string & {});
30
30
  setLocale: (newLocale: LocalesValues) => void;
31
31
  readonly variant: ProviderVariant | undefined;
32
32
  setVariant: (newVariant: ProviderVariant | undefined) => void;
@@ -3,6 +3,7 @@ import { derived } from 'svelte/store';
3
3
  import { getIntlayerContext } from './intlayerContext';
4
4
  import { intlayerStore } from './intlayerStore';
5
5
  import { setLocaleInStorage } from './useLocaleStorage';
6
+ const { defaultLocale, locales: availableLocales } = internationalization ?? {};
6
7
  /**
7
8
  * Svelte hook to manage the current locale and related functions.
8
9
  *
@@ -25,7 +26,6 @@ import { setLocaleInStorage } from './useLocaleStorage';
25
26
  */
26
27
  export const useLocale = ({ isCookieEnabled, onLocaleChange, } = {}) => {
27
28
  const context = getIntlayerContext();
28
- const { defaultLocale, locales: availableLocales } = internationalization ?? {};
29
29
  if (context) {
30
30
  // Use context if available
31
31
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-intlayer",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "description": "Easily internationalize i18n your Svelte applications with type-safe multilingual content management.",
5
5
  "keywords": [
6
6
  "intlayer",
@@ -82,11 +82,11 @@
82
82
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
83
83
  },
84
84
  "dependencies": {
85
- "@intlayer/api": "9.5.0",
86
- "@intlayer/config": "9.5.0",
87
- "@intlayer/core": "9.5.0",
88
- "@intlayer/editor": "9.5.0",
89
- "@intlayer/types": "9.5.0"
85
+ "@intlayer/api": "9.5.1",
86
+ "@intlayer/config": "9.5.1",
87
+ "@intlayer/core": "9.5.1",
88
+ "@intlayer/editor": "9.5.1",
89
+ "@intlayer/types": "9.5.1"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@sveltejs/adapter-auto": "7.0.1",
@@ -108,7 +108,7 @@
108
108
  "svelte": ">=5.0.0"
109
109
  },
110
110
  "optionalDependencies": {
111
- "@intlayer/analytics": "9.5.0"
111
+ "@intlayer/analytics": "9.5.1"
112
112
  },
113
113
  "engines": {
114
114
  "node": ">=14.18"