svelte-intlayer 8.7.13 → 8.8.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.
@@ -26,7 +26,7 @@ type useLocaleProps = {
26
26
  export declare const useLocale: ({ isCookieEnabled, onLocaleChange, }?: useLocaleProps) => {
27
27
  locale: import("svelte/store").Readable<LocalesValues>;
28
28
  setLocale: (locale: LocalesValues) => void;
29
- defaultLocale: import("@intlayer/types/allLocales").Locale;
30
- availableLocales: import("@intlayer/types/allLocales").Locale[];
29
+ defaultLocale: import("@intlayer/types").Locale;
30
+ availableLocales: import("@intlayer/types").Locale[];
31
31
  };
32
32
  export {};
@@ -2,13 +2,13 @@ import type { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Get the locale cookie
4
4
  */
5
- export declare const localeInStorage: import("@intlayer/types/allLocales").Locale | undefined;
5
+ export declare const localeInStorage: import("@intlayer/types").Locale | undefined;
6
6
  /**
7
7
  * @deprecated Use localeInStorage instead
8
8
  *
9
9
  * Get the locale cookie
10
10
  */
11
- export declare const localeCookie: import("@intlayer/types/allLocales").Locale | undefined;
11
+ export declare const localeCookie: import("@intlayer/types").Locale | undefined;
12
12
  /**
13
13
  * Set the locale cookie
14
14
  */
@@ -1,3 +1,3 @@
1
1
  export declare const useCompact: () => import("svelte/store").Readable<(value: string | number, options?: (Intl.NumberFormatOptions & {
2
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
2
+ locale?: import("@intlayer/types").LocalesValues;
3
3
  }) | undefined) => string>;
@@ -1,3 +1,3 @@
1
1
  export declare const useCurrency: () => import("svelte/store").Readable<(value: string | number, options?: (Intl.NumberFormatOptions & {
2
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
2
+ locale?: import("@intlayer/types").LocalesValues;
3
3
  }) | undefined) => string>;
@@ -5,5 +5,5 @@
5
5
  * A store containing a date/time formatting function bound to the active locale.
6
6
  */
7
7
  export declare const useDate: () => import("svelte/store").Readable<(date: string | number | Date, options?: import("@intlayer/core/formatters").DateTimePreset | (Intl.DateTimeFormatOptions & {
8
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
8
+ locale?: import("@intlayer/types").LocalesValues;
9
9
  }) | undefined) => string>;
@@ -3,5 +3,5 @@ export declare const useList: () => import("svelte/store").Readable<(values: (st
3
3
  type?: "conjunction" | "disjunction" | "unit";
4
4
  style?: "long" | "short" | "narrow";
5
5
  } & {
6
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
6
+ locale?: import("@intlayer/types").LocalesValues;
7
7
  }) | undefined) => string>;
@@ -5,5 +5,5 @@
5
5
  * A store containing a number formatting function bound to the active locale.
6
6
  */
7
7
  export declare const useNumber: () => import("svelte/store").Readable<(value: string | number, args_1?: (Intl.NumberFormatOptions & {
8
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
8
+ locale?: import("@intlayer/types").LocalesValues;
9
9
  }) | undefined) => string>;
@@ -1,3 +1,3 @@
1
1
  export declare const usePercentage: () => import("svelte/store").Readable<(value: string | number, args_1?: (Intl.NumberFormatOptions & {
2
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
2
+ locale?: import("@intlayer/types").LocalesValues;
3
3
  }) | undefined) => string>;
@@ -1,4 +1,4 @@
1
1
  export declare const useRelativeTime: () => import("svelte/store").Readable<(from: string | number | Date, to?: string | number | Date | undefined, options?: (Intl.RelativeTimeFormatOptions & {
2
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
2
+ locale?: import("@intlayer/types").LocalesValues;
3
3
  unit?: Intl.RelativeTimeFormatUnit;
4
4
  }) | undefined) => string>;
@@ -1,3 +1,3 @@
1
1
  export declare const useUnit: () => import("svelte/store").Readable<(value: string | number, options?: (Intl.NumberFormatOptions & {
2
- locale?: import("@intlayer/types/module_augmentation").LocalesValues;
2
+ locale?: import("@intlayer/types").LocalesValues;
3
3
  }) | undefined) => string>;
package/dist/plugins.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { editor, internationalization } from '@intlayer/config/built';
2
- import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, nestedPlugin, translationPlugin, } from '@intlayer/core/interpreter';
2
+ import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, nestedPlugin, pluralPlugin, translationPlugin, } from '@intlayer/core/interpreter';
3
3
  import * as NodeTypes from '@intlayer/types/nodeType';
4
4
  import { default as ContentSelector } from './editor/ContentSelector.svelte';
5
5
  import { HTMLRenderer } from './html/index';
@@ -296,6 +296,7 @@ export const getPlugins = (locale, fallback = true) => {
296
296
  const plugins = [
297
297
  translationPlugin(locale ?? internationalization.defaultLocale, fallback ? internationalization.defaultLocale : undefined),
298
298
  enumerationPlugin,
299
+ pluralPlugin(locale ?? internationalization.defaultLocale),
299
300
  conditionPlugin,
300
301
  nestedPlugin(locale ?? internationalization.defaultLocale),
301
302
  filePlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-intlayer",
3
- "version": "8.7.13",
3
+ "version": "8.8.0",
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": "8.7.13",
86
- "@intlayer/config": "8.7.13",
87
- "@intlayer/core": "8.7.13",
88
- "@intlayer/editor": "8.7.13",
89
- "@intlayer/types": "8.7.13"
85
+ "@intlayer/api": "8.8.0",
86
+ "@intlayer/config": "8.8.0",
87
+ "@intlayer/core": "8.8.0",
88
+ "@intlayer/editor": "8.8.0",
89
+ "@intlayer/types": "8.8.0"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@sveltejs/adapter-auto": "7.0.1",