preact-intlayer 9.3.3 → 9.4.0-canary.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.
package/README.md CHANGED
@@ -327,4 +327,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
327
327
 
328
328
  If you like Intlayer, give us a ⭐ on GitHub. It helps others discover the project! [See why GitHub Stars matter](https://github.com/aymericzip/intlayer/blob/main/CONTRIBUTING.md#why-github-stars-matter-).
329
329
 
330
- [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.com/#aymericzip/intlayer&Date)
330
+ [![Star History Chart](https://star-history.dera.page/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.dera.page/#aymericzip/intlayer&Date)
@@ -1,4 +1,3 @@
1
- import { LocalesValues as LocalesValues$1 } from "../intlayer/dist/types/index.js";
2
1
  import { useTranslation } from "./useTraduction.js";
3
2
  import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
3
  //#region src/client/useContent.d.ts
@@ -6,7 +5,7 @@ import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
6
5
  * On the client side, hook to get the translation content based on the locale
7
6
  */
8
7
  declare const useContent: <Content>(languageContent: StrictModeLocaleMap<Content>) => {
9
- locale: LocalesValues$1;
8
+ locale: import("@intlayer/types").LocalesValues;
10
9
  content: Content;
11
10
  t: typeof useTranslation;
12
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useContent.d.ts","names":[],"sources":["../../../src/client/useContent.ts"],"mappings":";;;;;;;cAOa,aAAc,SAAO,iBACf,oBAAoB;UAApB"}
1
+ {"version":3,"file":"useContent.d.ts","names":[],"sources":["../../../src/client/useContent.ts"],"mappings":";;;;;;cAOa,aAAc,SAAO,iBACf,oBAAoB"}
@@ -1,13 +1,12 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/client/useLocaleBase.d.ts
3
2
  /**
4
3
  * On the client side, hook to get the current locale and all related fields
5
4
  */
6
5
  declare const useLocaleBase: () => {
7
- locale: LocalesValues;
6
+ locale: import("@intlayer/types").LocalesValues;
8
7
  defaultLocale: any;
9
8
  availableLocales: any;
10
- setLocale: (newLocale: LocalesValues) => void;
9
+ setLocale: (newLocale: import("@intlayer/types").LocalesValues) => void;
11
10
  };
12
11
  //#endregion
13
12
  export { useLocaleBase };
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;;cASa;UAAA;;;yBAAA"}
1
+ {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;cASa"}
@@ -1,16 +1,15 @@
1
- import { Locale } from "../intlayer/dist/types/index.js";
2
1
  import { LocalesValues } from "@intlayer/types/module_augmentation";
3
2
  //#region src/client/useLocaleStorage.d.ts
4
3
  /**
5
4
  * Get the locale cookie
6
5
  */
7
- declare const localeInStorage: Locale;
6
+ declare const localeInStorage: import("@intlayer/types").Locale;
8
7
  /**
9
8
  * @deprecated Use localeInStorage instead
10
9
  *
11
10
  * Get the locale cookie
12
11
  */
13
- declare const localeCookie: Locale;
12
+ declare const localeCookie: import("@intlayer/types").Locale;
14
13
  /**
15
14
  * Set the locale cookie
16
15
  */
@@ -25,7 +24,7 @@ declare const setLocaleCookie: typeof setLocaleInStorage;
25
24
  * Hook that provides the locale storage and a function to set it
26
25
  */
27
26
  declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
28
- getLocale: () => Locale;
27
+ getLocale: () => import("@intlayer/types").Locale;
29
28
  setLocale: (locale: LocalesValues) => void;
30
29
  };
31
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;cAYa,iBAAA;;;;;;cAMA,cAAA;;;;cAKA,qBAAkB,QACrB,eAAa;;;;;;cAaV,wBAAe;;;;cAKf,mBAAgB;mBAAhB;sBAAA;;;;;;;;;cAiBA,wBAAe"}
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;cAYa,2CAAe;;;;;;cAMf,wCAAY;;;;cAKZ,qBAAkB,QACrB,eAAa;;;;;;cAaV,wBAAe;;;;cAKf,mBAAgB;;sBAAhB;;;;;;;;;cAiBA,wBAAe"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useCompact.d.ts
3
2
  /**
4
3
  * React client hook that provides a compact number formatter
@@ -11,7 +10,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
11
10
  * ```
12
11
  */
13
12
  declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
14
- locale?: LocalesValues;
13
+ locale?: import("@intlayer/types").LocalesValues;
15
14
  }) => string;
16
15
  //#endregion
17
16
  export { useCompact };
@@ -1 +1 @@
1
- {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;;;;;;;;;cAca,mBAAU,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;;;;;;;;cAca,mBAAU,wBAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useCurrency.d.ts
3
2
  /**
4
3
  * React client hook that provides a currency formatter
@@ -25,7 +24,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
25
24
  * ```
26
25
  */
27
26
  declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
28
- locale?: LocalesValues;
27
+ locale?: import("@intlayer/types").LocalesValues;
29
28
  }) => string;
30
29
  //#endregion
31
30
  export { useCurrency };
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cA4Ba,oBAAW,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;cA4Ba,oBAAW,wBAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useList.d.ts
3
2
  /**
4
3
  * React client hook that provides a list formatter
@@ -26,7 +25,7 @@ declare const useList: () => (values: (string | number)[], options?: {
26
25
  type?: 'conjunction' | 'disjunction' | 'unit';
27
26
  style?: 'long' | 'short' | 'narrow';
28
27
  } & {
29
- locale?: LocalesValues;
28
+ locale?: import("@intlayer/types").LocalesValues;
30
29
  }) => string;
31
30
  //#endregion
32
31
  export { useList };
@@ -1 +1 @@
1
- {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cAyBa,gBAAO,6BAAA;;;;;WAAP"}
1
+ {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;cAyBa,gBAAO,6BAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useNumber.d.ts
3
2
  /**
4
3
  * React client hook that provides a localized number formatter.
@@ -23,7 +22,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
23
22
  * A number formatting function bound to the active locale.
24
23
  */
25
24
  declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
26
- locale?: LocalesValues;
25
+ locale?: import("@intlayer/types").LocalesValues;
27
26
  }) => string;
28
27
  //#endregion
29
28
  export { useNumber };
@@ -1 +1 @@
1
- {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;cA0Ba,kBAAS,wBAAA,SAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cA0Ba,kBAAS,wBAAA,SAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/usePercentage.d.ts
3
2
  /**
4
3
  * React hook to provide a percentage formatter function
@@ -19,7 +18,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
19
18
  * A function that formats numbers or numeric strings into localized percentages.
20
19
  */
21
20
  declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
22
- locale?: LocalesValues;
21
+ locale?: import("@intlayer/types").LocalesValues;
23
22
  }) => string;
24
23
  //#endregion
25
24
  export { usePercentage };
@@ -1 +1 @@
1
- {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAsBa,sBAAa,wBAAA,SAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAsBa,sBAAa,wBAAA,SAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useRelativeTime.d.ts
3
2
  /**
4
3
  * Client-side React hook for accessing a localized relative time formatter.
@@ -19,7 +18,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
19
18
  * bound to the current client locale.
20
19
  */
21
20
  declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
22
- locale?: LocalesValues;
21
+ locale?: import("@intlayer/types").LocalesValues;
23
22
  unit?: Intl.RelativeTimeFormatUnit;
24
23
  }) => string;
25
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAsBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAsBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/format/useUnit.d.ts
3
2
  /**
4
3
  * React hook that provides a unit formatting function
@@ -18,7 +17,7 @@ import { LocalesValues } from "../intlayer/dist/types/index.js";
18
17
  * @returns {Function} A unit formatting function that accepts a value and optional formatting options.
19
18
  */
20
19
  declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
21
- locale?: LocalesValues;
20
+ locale?: import("@intlayer/types").LocalesValues;
22
21
  }) => string;
23
22
  //#endregion
24
23
  export { useUnit };
@@ -1 +1 @@
1
- {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAqBa,gBAAO,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;cAqBa,gBAAO,wBAAA,UAAA,KAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "preact-intlayer",
3
- "version": "9.3.3",
3
+ "version": "9.4.0-canary.0",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Preact applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -100,12 +100,12 @@
100
100
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
101
101
  },
102
102
  "dependencies": {
103
- "@intlayer/api": "9.3.2",
104
- "@intlayer/config": "9.3.3",
105
- "@intlayer/core": "9.3.3",
106
- "@intlayer/editor": "9.3.3",
107
- "@intlayer/engine": "9.3.2",
108
- "@intlayer/types": "9.3.3"
103
+ "@intlayer/api": "9.4.0-canary.0",
104
+ "@intlayer/config": "9.4.0-canary.0",
105
+ "@intlayer/core": "9.4.0-canary.0",
106
+ "@intlayer/editor": "9.4.0-canary.0",
107
+ "@intlayer/engine": "9.4.0-canary.0",
108
+ "@intlayer/types": "9.4.0-canary.0"
109
109
  },
110
110
  "devDependencies": {
111
111
  "@types/node": "26.2.0",
@@ -122,7 +122,7 @@
122
122
  "preact": ">=8.0.0"
123
123
  },
124
124
  "optionalDependencies": {
125
- "@intlayer/analytics": "9.3.3"
125
+ "@intlayer/analytics": "9.4.0-canary.0"
126
126
  },
127
127
  "engines": {
128
128
  "node": ">=14.18"
@@ -1,14 +0,0 @@
1
- import "@intlayer/core/interpreter";
2
- import { LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
3
- import { Locale as Locale$1 } from "@intlayer/types/allLocales";
4
- import "@intlayer/core/transpiler";
5
- import { Dictionary } from "@intlayer/types/dictionary";
6
- import "@intlayer/types/config";
7
- import "@intlayer/types/locales";
8
- import "@intlayer/config/built";
9
- import "@intlayer/core/file";
10
- import "@intlayer/core/formatters";
11
- import "@intlayer/core/localization";
12
- import "@intlayer/core/markdown";
13
- import "@intlayer/core/utils";
14
- export type { Locale$1 as Locale, LocalesValues$1 as LocalesValues };