preact-intlayer 7.3.1 → 7.3.2-canary.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.
package/README.md CHANGED
@@ -24,8 +24,6 @@
24
24
  <a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="license"/></a>
25
25
  <a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="last commit"/>
26
26
  </a>
27
- <a href="https://bountyhub.dev/bounties?repo=intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/badge/Bounties-on%20BountyHub-yellow?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="Bounties on BountyHub"/>
28
- </a>
29
27
  </p>
30
28
 
31
29
  ![Watch the video](https://github.com/aymericzip/intlayer/blob/main/docs/assets/demo_video.gif)
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types10 from "@intlayer/types";
1
+ import * as _intlayer_types18 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/useCompact.d.ts
4
4
 
@@ -13,7 +13,7 @@ import * as _intlayer_types10 from "@intlayer/types";
13
13
  * ```
14
14
  */
15
15
  declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
16
- locale?: _intlayer_types10.LocalesValues;
16
+ locale?: _intlayer_types18.LocalesValues;
17
17
  }) => string;
18
18
  //#endregion
19
19
  export { useCompact };
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types13 from "@intlayer/types";
1
+ import * as _intlayer_types14 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/useCurrency.d.ts
4
4
 
@@ -27,7 +27,7 @@ import * as _intlayer_types13 from "@intlayer/types";
27
27
  * ```
28
28
  */
29
29
  declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
30
- locale?: _intlayer_types13.LocalesValues;
30
+ locale?: _intlayer_types14.LocalesValues;
31
31
  }) => string;
32
32
  //#endregion
33
33
  export { useCurrency };
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types11 from "@intlayer/types";
1
+ import * as _intlayer_types16 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/useList.d.ts
4
4
 
@@ -24,7 +24,7 @@ import * as _intlayer_types11 from "@intlayer/types";
24
24
  * ```
25
25
  */
26
26
  declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
27
- locale?: _intlayer_types11.LocalesValues;
27
+ locale?: _intlayer_types16.LocalesValues;
28
28
  }) => string;
29
29
  //#endregion
30
30
  export { useList };
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types12 from "@intlayer/types";
1
+ import * as _intlayer_types17 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/useNumber.d.ts
4
4
 
@@ -25,7 +25,7 @@ import * as _intlayer_types12 from "@intlayer/types";
25
25
  * A number formatting function bound to the active locale.
26
26
  */
27
27
  declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
28
- locale?: _intlayer_types12.LocalesValues;
28
+ locale?: _intlayer_types17.LocalesValues;
29
29
  }) => string;
30
30
  //#endregion
31
31
  export { useNumber };
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types18 from "@intlayer/types";
1
+ import * as _intlayer_types13 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/usePercentage.d.ts
4
4
 
@@ -21,7 +21,7 @@ import * as _intlayer_types18 from "@intlayer/types";
21
21
  * A function that formats numbers or numeric strings into localized percentages.
22
22
  */
23
23
  declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
24
- locale?: _intlayer_types18.LocalesValues;
24
+ locale?: _intlayer_types13.LocalesValues;
25
25
  }) => string;
26
26
  //#endregion
27
27
  export { usePercentage };
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types1 from "@intlayer/types";
1
+ import * as _intlayer_types15 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/format/useRelativeTime.d.ts
4
4
 
@@ -21,7 +21,7 @@ import * as _intlayer_types1 from "@intlayer/types";
21
21
  * bound to the current client locale.
22
22
  */
23
23
  declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
24
- locale?: _intlayer_types1.LocalesValues;
24
+ locale?: _intlayer_types15.LocalesValues;
25
25
  unit?: Intl.RelativeTimeFormatUnit;
26
26
  }) => string;
27
27
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,gDAAe,6BAAA,gBAAA,IAAA,CAAA;WAAA,gBAAA,CAAA"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,gDAAe,6BAAA,gBAAA,IAAA,CAAA;WAAA,iBAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
2
2
  import * as _intlayer_core0 from "@intlayer/core";
3
- import * as _intlayer_types9 from "@intlayer/types";
3
+ import * as _intlayer_types6 from "@intlayer/types";
4
4
  import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
5
5
 
6
6
  //#region src/client/useDictionary.d.ts
@@ -9,7 +9,7 @@ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
9
9
  *
10
10
  * If the locale is not provided, it will use the locale from the client context
11
11
  */
12
- declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types9.Locale>;
12
+ declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types6.Locale>;
13
13
  //#endregion
14
14
  export { useDictionary };
15
15
  //# sourceMappingURL=useDictionary.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
2
2
  import * as _intlayer_core0 from "@intlayer/core";
3
- import * as _intlayer_types8 from "@intlayer/types";
3
+ import * as _intlayer_types5 from "@intlayer/types";
4
4
  import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
5
5
 
6
6
  //#region src/client/useDictionaryDynamic.d.ts
@@ -9,7 +9,7 @@ import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "
9
9
  *
10
10
  * If the locale is not provided, it will use the locale from the client context
11
11
  */
12
- declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types8.Locale>;
12
+ declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types5.Locale>;
13
13
  //#endregion
14
14
  export { useDictionaryDynamic };
15
15
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as _intlayer_types2 from "@intlayer/types";
1
+ import * as _intlayer_types7 from "@intlayer/types";
2
2
  import { LocalesValues } from "@intlayer/types";
3
3
 
4
4
  //#region src/client/useLocale.d.ts
@@ -14,8 +14,8 @@ declare const useLocale: ({
14
14
  onLocaleChange
15
15
  }?: useLocaleProps) => {
16
16
  locale: LocalesValues;
17
- defaultLocale: _intlayer_types2.Locale;
18
- availableLocales: _intlayer_types2.Locale[];
17
+ defaultLocale: _intlayer_types7.Locale;
18
+ availableLocales: _intlayer_types7.Locale[];
19
19
  setLocale: (locale: LocalesValues) => void;
20
20
  };
21
21
  //#endregion
@@ -1,14 +1,14 @@
1
- import * as _intlayer_types14 from "@intlayer/types";
1
+ import * as _intlayer_types1 from "@intlayer/types";
2
2
 
3
3
  //#region src/client/useLocaleBase.d.ts
4
4
  /**
5
5
  * On the client side, hook to get the current locale and all related fields
6
6
  */
7
7
  declare const useLocaleBase: () => {
8
- locale: _intlayer_types14.LocalesValues;
9
- defaultLocale: _intlayer_types14.Locale;
10
- availableLocales: _intlayer_types14.Locale[];
11
- setLocale: (newLocale: _intlayer_types14.LocalesValues) => void;
8
+ locale: _intlayer_types1.LocalesValues;
9
+ defaultLocale: _intlayer_types1.Locale;
10
+ availableLocales: _intlayer_types1.Locale[];
11
+ setLocale: (newLocale: _intlayer_types1.LocalesValues) => void;
12
12
  };
13
13
  //#endregion
14
14
  export { useLocaleBase };
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"sourcesContent":[],"mappings":";;;;;;AAYa,cAAA,aASZ,EAAA,GAAA,GAAA;EAAA,MAAA,EAAA,iBAAA,CAAA,aAAA"}
1
+ {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"sourcesContent":[],"mappings":";;;;;;AAYa,cAAA,aASZ,EAAA,GAAA,GAAA;EAAA,MAAA,EAAA,gBAAA,CAAA,aAAA"}
@@ -1,17 +1,17 @@
1
- import * as _intlayer_types4 from "@intlayer/types";
1
+ import * as _intlayer_types9 from "@intlayer/types";
2
2
  import { LocalesValues } from "@intlayer/types";
3
3
 
4
4
  //#region src/client/useLocaleStorage.d.ts
5
5
  /**
6
6
  * Get the locale cookie
7
7
  */
8
- declare const localeInStorage: _intlayer_types4.Locale;
8
+ declare const localeInStorage: _intlayer_types9.Locale;
9
9
  /**
10
10
  * @deprecated Use localeInStorage instead
11
11
  *
12
12
  * Get the locale cookie
13
13
  */
14
- declare const localeCookie: _intlayer_types4.Locale;
14
+ declare const localeCookie: _intlayer_types9.Locale;
15
15
  /**
16
16
  * Set the locale cookie
17
17
  */
@@ -26,7 +26,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
26
26
  * Hook that provides the locale storage and a function to set it
27
27
  */
28
28
  declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
29
- getLocale: () => _intlayer_types4.Locale;
29
+ getLocale: () => _intlayer_types9.Locale;
30
30
  setLocale: (locale: LocalesValues) => void;
31
31
  };
32
32
  /**
@@ -37,7 +37,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
37
37
  * Hook that provides the locale cookie and a function to set it
38
38
  */
39
39
  declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
40
- localeCookie: _intlayer_types4.Locale;
40
+ localeCookie: _intlayer_types9.Locale;
41
41
  setLocaleCookie: (locale: LocalesValues) => void;
42
42
  };
43
43
  //#endregion
@@ -1,12 +1,12 @@
1
1
  import { CrossFrameStateOptions } from "./useCrossFrameState.js";
2
2
  import { FC, PropsWithChildren } from "preact/compat";
3
- import * as preact_hooks5 from "preact/hooks";
3
+ import * as preact_hooks1 from "preact/hooks";
4
4
 
5
5
  //#region src/editor/EditorEnabledContext.d.ts
6
6
  type EditorEnabledStateProps = {
7
7
  enabled: boolean;
8
8
  };
9
- declare const useEditorEnabledState: (options?: CrossFrameStateOptions) => [boolean, preact_hooks5.Dispatch<preact_hooks5.StateUpdater<boolean>>, () => void];
9
+ declare const useEditorEnabledState: (options?: CrossFrameStateOptions) => [boolean, preact_hooks1.Dispatch<preact_hooks1.StateUpdater<boolean>>, () => void];
10
10
  declare const usePostEditorEnabledState: <S>(onEventTriggered?: (data: S) => void) => (data?: S) => void;
11
11
  declare const useGetEditorEnabledState: <S>(onEventTriggered?: (data: S) => void) => (data?: S) => void;
12
12
  declare const EditorEnabledProvider: FC<PropsWithChildren>;
@@ -1,9 +1,9 @@
1
1
  import { CrossFrameStateOptions } from "./useCrossFrameState.js";
2
- import * as preact_hooks1 from "preact/hooks";
2
+ import * as preact_hooks3 from "preact/hooks";
3
3
 
4
4
  //#region src/editor/useCrossURLPathState.d.ts
5
- declare const useCrossURLPathState: (initialState?: string, options?: CrossFrameStateOptions) => [string, preact_hooks1.Dispatch<preact_hooks1.StateUpdater<string>>, () => void];
6
- declare const useCrossURLPathSetter: (initialState?: string) => [string, preact_hooks1.Dispatch<preact_hooks1.StateUpdater<string>>, () => void];
5
+ declare const useCrossURLPathState: (initialState?: string, options?: CrossFrameStateOptions) => [string, preact_hooks3.Dispatch<preact_hooks3.StateUpdater<string>>, () => void];
6
+ declare const useCrossURLPathSetter: (initialState?: string) => [string, preact_hooks3.Dispatch<preact_hooks3.StateUpdater<string>>, () => void];
7
7
  //#endregion
8
8
  export { useCrossURLPathSetter, useCrossURLPathState };
9
9
  //# sourceMappingURL=useCrossURLPathState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAoBA;;AACiB,KADL,gBACK,CAAA,CAAA,CAAA,GADiB,CACjB,SAAA,MAAA,GAAA,MAAA,GAAb,YAAa,CAAA,CAAA,CAAA,GAAA,KAAA;;AAAD,cAIH,mBAJG,EAIkB,OAJlB;AAIhB;AA8BA;AAQA;AA6BY,KArCA,cAqCkB,CAAA,CAAA,CAAA,GArCE,CAqCF,SAAA;EAAM,KAAA,EAAA,GAAA;EACC,GAAA,EAAA,GAAA;CAAjC,GAlCA,iBAkCA,GAAA,KAAA;;AAIS,cAlCA,iBAkCsB,EAlCH,OAyF/B;AAED;;;AAEG,KAhES,kBAgEA,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kCA,GAAA,KAAA;;AAIS,cAlCA,iBAyFZ,EAzF+B,OAyF/B;AAED;;;AAEG,KAhES,kBAgEA,CAAA,CAAA,CAAA,GAhEwB,CAgExB,SAAA,MAAA,GA/DR,YA+DQ,CAAA,MAAA,EAAA;EAG0B,QAAA,EAlED,oBAkEC,CAAA,MAAA,CAAA;CAArB,CAAA,GAAA,KAAA;;AAAqC,cA9DzC,oBA8DyC,EA9DnB,OA8DmB;AAAlD,KALQ,YAKR,CAAA,CAAA,CAAA,GAL0B,CAK1B,SAAA;EAAY,QAAA,EAJJ,QAII,GAAA,MAAA;EAGH,CANV,QAAA,CAAS,QAAA,CA2BX,EAAA,KAAA,EAAA;EAKgB,QAAA,CAAA,EAAA,KAAA,EAAA;CACY,GA9BzB,YA8ByB,CA9BZ,oBA8BY,CA9BS,CA8BT,CAAA,EAAA;EAAf,QAAA,EA9BwC,oBA8BxC,CA9B6D,CA8B7D,CAAA;CACmB,CAAA,GAAA,KAAA;AAAjB,cA5BH,cA4BG,EA5Ba,OA4Bb;;;;AASJ,UAXK,wBAWkB,CAAG,CAAA,CAAA,CAAA;EAM1B,UAAA,EAhBE,cAgBkB,CAhBH,CAgBG,CAAA;EAEpB,YAAA,EAjBI,gBAiBJ,CAjBqB,CAiBrB,CAAA;EAAgB,QAAA,EAhBhB,YAgBgB,CAhBH,CAgBG,CAAA;;;;;;;KARhB,uBAAA,GAA0B;;;;;KAM1B,kCAEA,gBAAgB,mBACxB,uBAAyB,GAAG,yBAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "preact-intlayer",
3
- "version": "7.3.1",
3
+ "version": "7.3.2-canary.1",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Preact applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -67,6 +67,7 @@
67
67
  "./package.json"
68
68
  ],
69
69
  "scripts": {
70
+ "_prepublish": "cp -f ../../README.md ./README.md",
70
71
  "build": "tsdown --config tsdown.config.ts",
71
72
  "build:ci": "tsdown --config tsdown.config.ts",
72
73
  "clean": "rimraf ./dist .turbo",
@@ -75,7 +76,7 @@
75
76
  "format:fix": "biome format --write .",
76
77
  "lint": "biome lint .",
77
78
  "lint:fix": "biome lint --write .",
78
- "prepublish": "cp -f ../../README.md ./README.md",
79
+ "prepublish": "echo prepublish temporally disabled to avoid rewrite readme",
79
80
  "publish": "bun publish || true",
80
81
  "publish:canary": "bun publish --access public --tag canary || true",
81
82
  "publish:latest": "bun publish --access public --tag latest || true",
@@ -84,13 +85,13 @@
84
85
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
85
86
  },
86
87
  "dependencies": {
87
- "@intlayer/api": "7.3.1",
88
- "@intlayer/chokidar": "7.3.1",
89
- "@intlayer/config": "7.3.1",
90
- "@intlayer/core": "7.3.1",
91
- "@intlayer/editor": "7.3.1",
92
- "@intlayer/types": "7.3.1",
93
- "@intlayer/unmerged-dictionaries-entry": "7.3.1"
88
+ "@intlayer/api": "7.3.2-canary.1",
89
+ "@intlayer/chokidar": "7.3.2-canary.1",
90
+ "@intlayer/config": "7.3.2-canary.1",
91
+ "@intlayer/core": "7.3.2-canary.1",
92
+ "@intlayer/editor": "7.3.2-canary.1",
93
+ "@intlayer/types": "7.3.2-canary.1",
94
+ "@intlayer/unmerged-dictionaries-entry": "7.3.2-canary.1"
94
95
  },
95
96
  "devDependencies": {
96
97
  "@types/node": "24.10.1",
@@ -98,9 +99,9 @@
98
99
  "@utils/ts-config-types": "1.0.4",
99
100
  "@utils/tsdown-config": "1.0.4",
100
101
  "rimraf": "6.1.2",
101
- "tsdown": "0.16.6",
102
+ "tsdown": "0.16.8",
102
103
  "typescript": "5.9.3",
103
- "vitest": "4.0.13"
104
+ "vitest": "4.0.14"
104
105
  },
105
106
  "peerDependencies": {
106
107
  "preact": ">=8.0.0"