angular-intlayer 9.0.0-canary.3 → 9.0.0-canary.4

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.
Files changed (34) hide show
  1. package/dist/cjs/client/index.cjs +3 -1
  2. package/dist/cjs/client/usePathname.cjs +53 -0
  3. package/dist/cjs/client/usePathname.cjs.map +1 -0
  4. package/dist/cjs/index.cjs +3 -1
  5. package/dist/esm/client/index.mjs +2 -1
  6. package/dist/esm/client/usePathname.mjs +51 -0
  7. package/dist/esm/client/usePathname.mjs.map +1 -0
  8. package/dist/esm/esbuild/plugin.mjs +2 -2
  9. package/dist/esm/index.mjs +2 -1
  10. package/dist/types/client/index.d.ts +2 -1
  11. package/dist/types/client/useLocaleStorage.d.ts +5 -5
  12. package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
  13. package/dist/types/client/usePathname.d.ts +36 -0
  14. package/dist/types/client/usePathname.d.ts.map +1 -0
  15. package/dist/types/format/useCompact.d.ts +2 -2
  16. package/dist/types/format/useCompact.d.ts.map +1 -1
  17. package/dist/types/format/useCurrency.d.ts +2 -2
  18. package/dist/types/format/useCurrency.d.ts.map +1 -1
  19. package/dist/types/format/useDate.d.ts +2 -2
  20. package/dist/types/format/useDate.d.ts.map +1 -1
  21. package/dist/types/format/useList.d.ts +2 -2
  22. package/dist/types/format/useList.d.ts.map +1 -1
  23. package/dist/types/format/useNumber.d.ts +2 -2
  24. package/dist/types/format/useNumber.d.ts.map +1 -1
  25. package/dist/types/format/usePercentage.d.ts +2 -2
  26. package/dist/types/format/usePercentage.d.ts.map +1 -1
  27. package/dist/types/format/useRelativeTime.d.ts +2 -2
  28. package/dist/types/format/useRelativeTime.d.ts.map +1 -1
  29. package/dist/types/format/useUnit.d.ts +2 -2
  30. package/dist/types/format/useUnit.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +2 -1
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/intlayer/dist/types/index.d.ts +4 -0
  34. package/package.json +10 -10
@@ -7,6 +7,7 @@ const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
7
7
  const require_client_useDictionaryDynamic = require('./useDictionaryDynamic.cjs');
8
8
  const require_client_useIntlayer = require('./useIntlayer.cjs');
9
9
  const require_client_useLocale = require('./useLocale.cjs');
10
+ const require_client_usePathname = require('./usePathname.cjs');
10
11
 
11
12
  exports.INTLAYER_TOKEN = require_client_intlayerToken.INTLAYER_TOKEN;
12
13
  exports.IntlayerProvider = require_client_intlayerToken.IntlayerProvider;
@@ -19,4 +20,5 @@ exports.useDictionaryAsync = require_client_useDictionaryAsync.useDictionaryAsyn
19
20
  exports.useDictionaryDynamic = require_client_useDictionaryDynamic.useDictionaryDynamic;
20
21
  exports.useIntlayer = require_client_useIntlayer.useIntlayer;
21
22
  exports.useLoadDynamic = require_client_useLoadDynamic.useLoadDynamic;
22
- exports.useLocale = require_client_useLocale.useLocale;
23
+ exports.useLocale = require_client_useLocale.useLocale;
24
+ exports.usePathname = require_client_usePathname.usePathname;
@@ -0,0 +1,53 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _angular_core = require("@angular/core");
4
+ let _intlayer_core_localization = require("@intlayer/core/localization");
5
+
6
+ //#region src/client/usePathname.ts
7
+ /**
8
+ * Angular hook that returns a signal containing the current pathname with
9
+ * the locale segment removed.
10
+ *
11
+ * Reacts to browser back/forward navigation via the `popstate` event.
12
+ * Uses `DestroyRef` to clean up the event listener when the component is destroyed.
13
+ * Falls back to an empty string during server-side rendering.
14
+ *
15
+ * @returns A signal containing the current pathname without the locale prefix.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { Component } from '@angular/core';
20
+ * import { usePathname } from 'angular-intlayer';
21
+ *
22
+ * @Component({
23
+ * standalone: true,
24
+ * selector: 'app-nav-item',
25
+ * template: `
26
+ * <a [class.active]="pathname() === '/dashboard'" href="/dashboard">
27
+ * Dashboard
28
+ * </a>
29
+ * `,
30
+ * })
31
+ * export class NavItem {
32
+ * readonly pathname = usePathname();
33
+ * }
34
+ * ```
35
+ */
36
+ const usePathname = () => {
37
+ const destroyRef = (0, _angular_core.inject)(_angular_core.DestroyRef);
38
+ const rawPathname = (0, _angular_core.signal)(typeof window !== "undefined" ? window.location.pathname : "");
39
+ if (typeof window !== "undefined") {
40
+ const handleLocationChange = () => {
41
+ rawPathname.set(window.location.pathname);
42
+ };
43
+ window.addEventListener("popstate", handleLocationChange);
44
+ destroyRef.onDestroy(() => {
45
+ window.removeEventListener("popstate", handleLocationChange);
46
+ });
47
+ }
48
+ return (0, _angular_core.computed)(() => (0, _intlayer_core_localization.getPathWithoutLocale)(rawPathname()));
49
+ };
50
+
51
+ //#endregion
52
+ exports.usePathname = usePathname;
53
+ //# sourceMappingURL=usePathname.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePathname.cjs","names":["DestroyRef"],"sources":["../../../src/client/usePathname.ts"],"sourcesContent":["import {\n computed,\n DestroyRef,\n inject,\n type Signal,\n signal,\n} from '@angular/core';\nimport { getPathWithoutLocale } from '@intlayer/core/localization';\n\n/**\n * Angular hook that returns a signal containing the current pathname with\n * the locale segment removed.\n *\n * Reacts to browser back/forward navigation via the `popstate` event.\n * Uses `DestroyRef` to clean up the event listener when the component is destroyed.\n * Falls back to an empty string during server-side rendering.\n *\n * @returns A signal containing the current pathname without the locale prefix.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { usePathname } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-nav-item',\n * template: `\n * <a [class.active]=\"pathname() === '/dashboard'\" href=\"/dashboard\">\n * Dashboard\n * </a>\n * `,\n * })\n * export class NavItem {\n * readonly pathname = usePathname();\n * }\n * ```\n */\nexport const usePathname = (): Signal<string> => {\n const destroyRef = inject(DestroyRef);\n\n const rawPathname = signal<string>(\n typeof window !== 'undefined' ? window.location.pathname : ''\n );\n\n if (typeof window !== 'undefined') {\n const handleLocationChange = (): void => {\n rawPathname.set(window.location.pathname);\n };\n\n window.addEventListener('popstate', handleLocationChange);\n\n destroyRef.onDestroy(() => {\n window.removeEventListener('popstate', handleLocationChange);\n });\n }\n\n return computed(() => getPathWithoutLocale(rawPathname()));\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,oBAAoC;CAC/C,MAAM,uCAAoBA,yBAAW;CAErC,MAAM,wCACJ,OAAO,WAAW,cAAc,OAAO,SAAS,WAAW,GAC5D;AAED,KAAI,OAAO,WAAW,aAAa;EACjC,MAAM,6BAAmC;AACvC,eAAY,IAAI,OAAO,SAAS,SAAS;;AAG3C,SAAO,iBAAiB,YAAY,qBAAqB;AAEzD,aAAW,gBAAgB;AACzB,UAAO,oBAAoB,YAAY,qBAAqB;IAC5D;;AAGJ,gGAA2C,aAAa,CAAC,CAAC"}
@@ -10,6 +10,7 @@ const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
10
10
  const require_client_useDictionaryDynamic = require('./client/useDictionaryDynamic.cjs');
11
11
  const require_client_useIntlayer = require('./client/useIntlayer.cjs');
12
12
  const require_client_useLocale = require('./client/useLocale.cjs');
13
+ const require_client_usePathname = require('./client/usePathname.cjs');
13
14
  const require_UI_IntlayerNode_component = require('./UI/IntlayerNode.component.cjs');
14
15
 
15
16
  exports.INTLAYER_TOKEN = require_client_intlayerToken.INTLAYER_TOKEN;
@@ -37,4 +38,5 @@ exports.useDictionaryAsync = require_client_useDictionaryAsync.useDictionaryAsyn
37
38
  exports.useDictionaryDynamic = require_client_useDictionaryDynamic.useDictionaryDynamic;
38
39
  exports.useIntlayer = require_client_useIntlayer.useIntlayer;
39
40
  exports.useLoadDynamic = require_client_useLoadDynamic.useLoadDynamic;
40
- exports.useLocale = require_client_useLocale.useLocale;
41
+ exports.useLocale = require_client_useLocale.useLocale;
42
+ exports.usePathname = require_client_usePathname.usePathname;
@@ -6,5 +6,6 @@ import { useLoadDynamic } from "./useLoadDynamic.mjs";
6
6
  import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
7
7
  import { isUpdatableNode, useIntlayer } from "./useIntlayer.mjs";
8
8
  import { useLocale } from "./useLocale.mjs";
9
+ import { usePathname } from "./usePathname.mjs";
9
10
 
10
- export { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient, installIntlayer, isUpdatableNode, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale };
11
+ export { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient, installIntlayer, isUpdatableNode, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale, usePathname };
@@ -0,0 +1,51 @@
1
+ import { DestroyRef, computed, inject, signal } from "@angular/core";
2
+ import { getPathWithoutLocale } from "@intlayer/core/localization";
3
+
4
+ //#region src/client/usePathname.ts
5
+ /**
6
+ * Angular hook that returns a signal containing the current pathname with
7
+ * the locale segment removed.
8
+ *
9
+ * Reacts to browser back/forward navigation via the `popstate` event.
10
+ * Uses `DestroyRef` to clean up the event listener when the component is destroyed.
11
+ * Falls back to an empty string during server-side rendering.
12
+ *
13
+ * @returns A signal containing the current pathname without the locale prefix.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { Component } from '@angular/core';
18
+ * import { usePathname } from 'angular-intlayer';
19
+ *
20
+ * @Component({
21
+ * standalone: true,
22
+ * selector: 'app-nav-item',
23
+ * template: `
24
+ * <a [class.active]="pathname() === '/dashboard'" href="/dashboard">
25
+ * Dashboard
26
+ * </a>
27
+ * `,
28
+ * })
29
+ * export class NavItem {
30
+ * readonly pathname = usePathname();
31
+ * }
32
+ * ```
33
+ */
34
+ const usePathname = () => {
35
+ const destroyRef = inject(DestroyRef);
36
+ const rawPathname = signal(typeof window !== "undefined" ? window.location.pathname : "");
37
+ if (typeof window !== "undefined") {
38
+ const handleLocationChange = () => {
39
+ rawPathname.set(window.location.pathname);
40
+ };
41
+ window.addEventListener("popstate", handleLocationChange);
42
+ destroyRef.onDestroy(() => {
43
+ window.removeEventListener("popstate", handleLocationChange);
44
+ });
45
+ }
46
+ return computed(() => getPathWithoutLocale(rawPathname()));
47
+ };
48
+
49
+ //#endregion
50
+ export { usePathname };
51
+ //# sourceMappingURL=usePathname.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePathname.mjs","names":[],"sources":["../../../src/client/usePathname.ts"],"sourcesContent":["import {\n computed,\n DestroyRef,\n inject,\n type Signal,\n signal,\n} from '@angular/core';\nimport { getPathWithoutLocale } from '@intlayer/core/localization';\n\n/**\n * Angular hook that returns a signal containing the current pathname with\n * the locale segment removed.\n *\n * Reacts to browser back/forward navigation via the `popstate` event.\n * Uses `DestroyRef` to clean up the event listener when the component is destroyed.\n * Falls back to an empty string during server-side rendering.\n *\n * @returns A signal containing the current pathname without the locale prefix.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { usePathname } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-nav-item',\n * template: `\n * <a [class.active]=\"pathname() === '/dashboard'\" href=\"/dashboard\">\n * Dashboard\n * </a>\n * `,\n * })\n * export class NavItem {\n * readonly pathname = usePathname();\n * }\n * ```\n */\nexport const usePathname = (): Signal<string> => {\n const destroyRef = inject(DestroyRef);\n\n const rawPathname = signal<string>(\n typeof window !== 'undefined' ? window.location.pathname : ''\n );\n\n if (typeof window !== 'undefined') {\n const handleLocationChange = (): void => {\n rawPathname.set(window.location.pathname);\n };\n\n window.addEventListener('popstate', handleLocationChange);\n\n destroyRef.onDestroy(() => {\n window.removeEventListener('popstate', handleLocationChange);\n });\n }\n\n return computed(() => getPathWithoutLocale(rawPathname()));\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,oBAAoC;CAC/C,MAAM,aAAa,OAAO,WAAW;CAErC,MAAM,cAAc,OAClB,OAAO,WAAW,cAAc,OAAO,SAAS,WAAW,GAC5D;AAED,KAAI,OAAO,WAAW,aAAa;EACjC,MAAM,6BAAmC;AACvC,eAAY,IAAI,OAAO,SAAS,SAAS;;AAG3C,SAAO,iBAAiB,YAAY,qBAAqB;AAEzD,aAAW,gBAAgB;AACzB,UAAO,oBAAoB,YAAY,qBAAqB;IAC5D;;AAGJ,QAAO,eAAe,qBAAqB,aAAa,CAAC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { join } from "node:path";
2
+ import { getConfiguration } from "@intlayer/config/node";
3
+ import { getAlias, getUnusedNodeTypesAsync } from "@intlayer/config/utils";
2
4
  import { prepareIntlayer } from "@intlayer/chokidar/build";
3
5
  import { logConfigDetails } from "@intlayer/chokidar/cli";
4
6
  import { watch } from "@intlayer/chokidar/watcher";
5
7
  import { formatNodeTypeToEnvVar, getConfigEnvVars } from "@intlayer/config/envVars";
6
8
  import { getAppLogger } from "@intlayer/config/logger";
7
- import { getConfiguration } from "@intlayer/config/node";
8
- import { getAlias, getUnusedNodeTypesAsync } from "@intlayer/config/utils";
9
9
  import { getDictionaries } from "@intlayer/dictionaries-entry";
10
10
 
11
11
  //#region src/esbuild/plugin.ts
@@ -9,6 +9,7 @@ import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
9
9
  import { useDictionaryDynamic } from "./client/useDictionaryDynamic.mjs";
10
10
  import { isUpdatableNode, useIntlayer } from "./client/useIntlayer.mjs";
11
11
  import { useLocale } from "./client/useLocale.mjs";
12
+ import { usePathname } from "./client/usePathname.mjs";
12
13
  import { IntlayerNodeComponent } from "./UI/IntlayerNode.component.mjs";
13
14
 
14
- export { INTLAYER_TOKEN, IntlayerNodeComponent, IntlayerProvider, createIntlayerClient, getDictionary, getIntlayer, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale };
15
+ export { INTLAYER_TOKEN, IntlayerNodeComponent, IntlayerProvider, createIntlayerClient, getDictionary, getIntlayer, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale, usePathname };
@@ -6,4 +6,5 @@ import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
6
6
  import { isUpdatableNode, useIntlayer } from "./useIntlayer.js";
7
7
  import { useLoadDynamic } from "./useLoadDynamic.js";
8
8
  import { UseLocaleProps, UseLocaleResult, useLocale } from "./useLocale.js";
9
- export { INTLAYER_TOKEN, IntlayerProvider, UseLocaleProps, UseLocaleResult, createIntlayerClient, installIntlayer, isUpdatableNode, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale };
9
+ import { usePathname } from "./usePathname.js";
10
+ export { INTLAYER_TOKEN, IntlayerProvider, UseLocaleProps, UseLocaleResult, createIntlayerClient, installIntlayer, isUpdatableNode, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale, usePathname };
@@ -1,5 +1,5 @@
1
+ import { Locale } from "../intlayer/dist/types/index.js";
1
2
  import { LocalesValues } from "@intlayer/types/module_augmentation";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/client/useLocaleStorage.d.ts
5
5
  /**
@@ -8,13 +8,13 @@ import * as _$_intlayer_types0 from "@intlayer/types";
8
8
  /**
9
9
  * Get the locale cookie
10
10
  */
11
- declare const localeInStorage: _$_intlayer_types0.Locale;
11
+ declare const localeInStorage: Locale;
12
12
  /**
13
13
  * @deprecated Use localeInStorage instead
14
14
  *
15
15
  * Get the locale cookie
16
16
  */
17
- declare const localeCookie: _$_intlayer_types0.Locale;
17
+ declare const localeCookie: Locale;
18
18
  /**
19
19
  * Set the locale cookie
20
20
  */
@@ -29,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
29
29
  * Hook that provides the locale storage and a function to set it
30
30
  */
31
31
  declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
32
- getLocale: () => _$_intlayer_types0.Locale;
32
+ getLocale: () => Locale;
33
33
  setLocale: (locale: LocalesValues) => void;
34
34
  };
35
35
  /**
@@ -40,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
40
40
  * Hook that provides the locale cookie and a function to set it
41
41
  */
42
42
  declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
43
- localeCookie: _$_intlayer_types0.Locale;
43
+ localeCookie: Locale;
44
44
  setLocaleCookie: (locale: LocalesValues) => void;
45
45
  };
46
46
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAAkE,kBAAA,CAAnD,MAAA;;AAM5B;;;;cAAa,YAAA,EAA8B,kBAAA,CAAlB,MAAA;AAKzB;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,kBAAA,CAAA,MAAA;sBAAA,aAAA;AAAA;;AAJJ;;;;;;cAaa,eAAA,GAAmB,eAAA;gBAO/B,kBAAA,CAAA,MAAA;4BAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAAkE,MAAA;;AAM/E;;;;cAAa,YAAA,EAA8B,MAAA;AAK3C;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,MAAA;sBAAA,aAAA;AAAA;;AAJJ;;;;;;cAaa,eAAA,GAAmB,eAAA;gBAO/B,MAAA;4BAAA,aAAA;AAAA"}
@@ -0,0 +1,36 @@
1
+ import { Signal } from "@angular/core";
2
+
3
+ //#region src/client/usePathname.d.ts
4
+ /**
5
+ * Angular hook that returns a signal containing the current pathname with
6
+ * the locale segment removed.
7
+ *
8
+ * Reacts to browser back/forward navigation via the `popstate` event.
9
+ * Uses `DestroyRef` to clean up the event listener when the component is destroyed.
10
+ * Falls back to an empty string during server-side rendering.
11
+ *
12
+ * @returns A signal containing the current pathname without the locale prefix.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { Component } from '@angular/core';
17
+ * import { usePathname } from 'angular-intlayer';
18
+ *
19
+ * @Component({
20
+ * standalone: true,
21
+ * selector: 'app-nav-item',
22
+ * template: `
23
+ * <a [class.active]="pathname() === '/dashboard'" href="/dashboard">
24
+ * Dashboard
25
+ * </a>
26
+ * `,
27
+ * })
28
+ * export class NavItem {
29
+ * readonly pathname = usePathname();
30
+ * }
31
+ * ```
32
+ */
33
+ declare const usePathname: () => Signal<string>;
34
+ //#endregion
35
+ export { usePathname };
36
+ //# sourceMappingURL=usePathname.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePathname.d.ts","names":[],"sources":["../../../src/client/usePathname.ts"],"mappings":";;;;;AAsCA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,QAAkB,MAAA"}
@@ -1,9 +1,9 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useCompact.d.ts
5
5
  declare const useCompact: () => _$_angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
6
- locale?: _$_intlayer_types0.LocalesValues;
6
+ locale?: LocalesValues;
7
7
  }) => string>;
8
8
  //#endregion
9
9
  export { useCompact };
@@ -1 +1 @@
1
- {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;cAIa,UAAA,yBAAU,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;cAIa,UAAA,yBAAU,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
@@ -1,9 +1,9 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useCurrency.d.ts
5
5
  declare const useCurrency: () => _$_angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
6
- locale?: _$_intlayer_types0.LocalesValues;
6
+ locale?: LocalesValues;
7
7
  }) => string>;
8
8
  //#endregion
9
9
  export { useCurrency };
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;cAIa,WAAA,yBAAW,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;cAIa,WAAA,yBAAW,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
@@ -1,5 +1,5 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
  import * as _$_intlayer_core_formatters0 from "@intlayer/core/formatters";
4
4
 
5
5
  //#region src/format/useDate.d.ts
@@ -7,7 +7,7 @@ import * as _$_intlayer_core_formatters0 from "@intlayer/core/formatters";
7
7
  * Angular client hook that provides a localized date/time formatter.
8
8
  */
9
9
  declare const useDate: () => _$_angular_core0.Signal<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
10
- locale?: _$_intlayer_types0.LocalesValues;
10
+ locale?: LocalesValues;
11
11
  }) | _$_intlayer_core_formatters0.DateTimePreset) => string>;
12
12
  //#endregion
13
13
  export { useDate };
@@ -1 +1 @@
1
- {"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;;;;cAOa,OAAA,yBAAO,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,OAAA,IAAA,IAAA,CAAA,qBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;;;;cAOa,OAAA,yBAAO,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,OAAA,IAAA,IAAA,CAAA,qBAAA;WAAA,aAAA;AAAA"}
@@ -1,5 +1,5 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useList.d.ts
5
5
  declare const useList: () => _$_angular_core0.Signal<(values: (string | number)[], options?: {
@@ -7,7 +7,7 @@ declare const useList: () => _$_angular_core0.Signal<(values: (string | number)[
7
7
  type?: "conjunction" | "disjunction" | "unit";
8
8
  style?: "long" | "short" | "narrow";
9
9
  } & {
10
- locale?: _$_intlayer_types0.LocalesValues;
10
+ locale?: LocalesValues;
11
11
  }) => string>;
12
12
  //#endregion
13
13
  export { useList };
@@ -1 +1 @@
1
- {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;cAIa,OAAA,QAWZ,gBAAA,CAXmB,MAAA,EAAA,MAAA,uBAAA,OAAA;;;;;WAWnB,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;cAIa,OAAA,QAWZ,gBAAA,CAXmB,MAAA,EAAA,MAAA,uBAAA,OAAA;;;;;WAWnB,aAAA;AAAA"}
@@ -1,12 +1,12 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useNumber.d.ts
5
5
  /**
6
6
  * Angular client hook that provides a localized number formatter.
7
7
  */
8
8
  declare const useNumber: () => _$_angular_core0.Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
9
- locale?: _$_intlayer_types0.LocalesValues;
9
+ locale?: LocalesValues;
10
10
  }) => string>;
11
11
  //#endregion
12
12
  export { useNumber };
@@ -1 +1 @@
1
- {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;cAOa,SAAA,yBAAS,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;cAOa,SAAA,yBAAS,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
@@ -1,9 +1,9 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/usePercentage.d.ts
5
5
  declare const usePercentage: () => _$_angular_core0.Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
6
- locale?: _$_intlayer_types0.LocalesValues;
6
+ locale?: LocalesValues;
7
7
  }) => string>;
8
8
  //#endregion
9
9
  export { usePercentage };
@@ -1 +1 @@
1
- {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;cAIa,aAAA,yBAAa,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;cAIa,aAAA,yBAAa,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
@@ -1,9 +1,9 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useRelativeTime.d.ts
5
5
  declare const useRelativeTime: () => _$_angular_core0.Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
6
- locale?: _$_intlayer_types0.LocalesValues;
6
+ locale?: LocalesValues;
7
7
  unit?: Intl.RelativeTimeFormatUnit;
8
8
  }) => string>;
9
9
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;cAIa,eAAA,yBAAe,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,EAAA,qBAAA,IAAA,EAAA,OAAA,GAAA,IAAA,CAAA,yBAAA;WAAA,kBAAA,CAAA,aAAA"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;cAIa,eAAA,yBAAe,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,EAAA,qBAAA,IAAA,EAAA,OAAA,GAAA,IAAA,CAAA,yBAAA;WAAA,aAAA"}
@@ -1,9 +1,9 @@
1
+ import { LocalesValues } from "../intlayer/dist/types/index.js";
1
2
  import * as _$_angular_core0 from "@angular/core";
2
- import * as _$_intlayer_types0 from "@intlayer/types";
3
3
 
4
4
  //#region src/format/useUnit.d.ts
5
5
  declare const useUnit: () => _$_angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
6
- locale?: _$_intlayer_types0.LocalesValues;
6
+ locale?: LocalesValues;
7
7
  }) => string>;
8
8
  //#endregion
9
9
  export { useUnit };
@@ -1 +1 @@
1
- {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;cAIa,OAAA,yBAAO,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,kBAAA,CAAA,aAAA;AAAA"}
1
+ {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;cAIa,OAAA,yBAAO,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
@@ -8,6 +8,7 @@ import { useDictionaryDynamic } from "./client/useDictionaryDynamic.js";
8
8
  import { isUpdatableNode, useIntlayer } from "./client/useIntlayer.js";
9
9
  import { useLoadDynamic } from "./client/useLoadDynamic.js";
10
10
  import { UseLocaleProps, UseLocaleResult, useLocale } from "./client/useLocale.js";
11
+ import { usePathname } from "./client/usePathname.js";
11
12
  import { getDictionary } from "./getDictionary.js";
12
13
  import { getIntlayer } from "./getIntlayer.js";
13
14
  import { LocalesValues } from "@intlayer/types/module_augmentation";
@@ -17,5 +18,5 @@ declare module '@intlayer/core/interpreter' {
17
18
  interface IInterpreterPlugin<T, S, L extends LocalesValues> extends IInterpreterPluginAngular<T, S, L> {}
18
19
  }
19
20
  //#endregion
20
- export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, INTLAYER_TOKEN, InsertionPluginCond, IntlayerNode, IntlayerNodeComponent, IntlayerNodeCond, IntlayerProvider, MarkdownCond, MarkdownStringCond, UseLocaleProps, UseLocaleResult, createIntlayerClient, getDictionary, getIntlayer, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale };
21
+ export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, INTLAYER_TOKEN, InsertionPluginCond, IntlayerNode, IntlayerNodeComponent, IntlayerNodeCond, IntlayerProvider, MarkdownCond, MarkdownStringCond, UseLocaleProps, UseLocaleResult, createIntlayerClient, getDictionary, getIntlayer, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale, usePathname };
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;YAIY,kBAAA,iBAAmC,aAAA,UACnC,yBAAA,CAA0B,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;YAIY,kBAAA,iBAAmC,aAAA,UACnC,yBAAA,CAA0B,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA"}
@@ -0,0 +1,4 @@
1
+ import { LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
2
+ import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { Locale } from "@intlayer/types/allLocales";
4
+ export { type Locale, type LocalesValues$1 as LocalesValues };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-intlayer",
3
- "version": "9.0.0-canary.3",
3
+ "version": "9.0.0-canary.4",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -118,23 +118,23 @@
118
118
  "dependencies": {
119
119
  "@babel/plugin-syntax-import-attributes": "7.28.6",
120
120
  "@babel/preset-env": "7.29.2",
121
- "@intlayer/chokidar": "9.0.0-canary.3",
122
- "@intlayer/config": "9.0.0-canary.3",
123
- "@intlayer/core": "9.0.0-canary.3",
124
- "@intlayer/dictionaries-entry": "9.0.0-canary.3",
125
- "@intlayer/editor": "9.0.0-canary.3",
126
- "@intlayer/types": "9.0.0-canary.3",
127
- "@intlayer/webpack": "9.0.0-canary.3",
121
+ "@intlayer/chokidar": "9.0.0-canary.4",
122
+ "@intlayer/config": "9.0.0-canary.4",
123
+ "@intlayer/core": "9.0.0-canary.4",
124
+ "@intlayer/dictionaries-entry": "9.0.0-canary.4",
125
+ "@intlayer/editor": "9.0.0-canary.4",
126
+ "@intlayer/types": "9.0.0-canary.4",
127
+ "@intlayer/webpack": "9.0.0-canary.4",
128
128
  "babel-loader": "10.1.1",
129
129
  "defu": "6.1.7"
130
130
  },
131
131
  "devDependencies": {
132
- "@types/node": "25.9.3",
132
+ "@types/node": "25.9.4",
133
133
  "@types/webpack": "5.28.5",
134
134
  "@utils/ts-config": "1.0.4",
135
135
  "@utils/ts-config-types": "1.0.4",
136
136
  "@utils/tsdown-config": "1.0.4",
137
- "esbuild": "0.28.0",
137
+ "esbuild": "0.28.1",
138
138
  "rimraf": "6.1.3",
139
139
  "tsdown": "0.21.10",
140
140
  "typescript": "6.0.3",