@intlayer/use-intl 9.7.1 → 9.7.2

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.
@@ -1,6 +1,6 @@
1
1
  import { _useExtracted } from "./client/index.mjs";
2
- import { useDictionary } from "./useDictionary.mjs";
3
2
  import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
3
+ import { useDictionary } from "./useDictionary.mjs";
4
4
  import { useFormatter, useMessages, useNow, useTimeZone } from "./client/helpers.mjs";
5
5
  import { IntlProvider } from "./client/IntlProvider.mjs";
6
6
  import { useLocale } from "./client/useLocale.mjs";
@@ -1,2 +1,10 @@
1
+ /**
2
+ * Re-exports of use-intl's public types so that existing
3
+ * `import type { … } from 'use-intl'` statements keep resolving after the
4
+ * package is aliased to `@intlayer/use-intl`.
5
+ *
6
+ * These are type-only and erased at build time; the real definitions are
7
+ * pulled from the `use-intl` peer dependency.
8
+ */
1
9
  import { AbstractIntlMessages, AppConfig, DateTimeFormatOptions, Formats, ICUArgs, ICUTags, IntlConfig, Locale, MarkupTagsFunction, MarkupTranslationValues, MessageKeys, Messages, NamespaceKeys, NestedKeyOf, NestedValueOf, NumberFormatOptions, RelativeTimeFormatOptions, RichTagsFunction, RichTranslationValues, Timezone, TranslationValues } from "use-intl";
2
10
  export type { AbstractIntlMessages, AppConfig, DateTimeFormatOptions, Formats, ICUArgs, ICUTags, IntlConfig, Locale, MarkupTagsFunction, MarkupTranslationValues, MessageKeys, Messages, NamespaceKeys, NestedKeyOf, NestedValueOf, NumberFormatOptions, RelativeTimeFormatOptions, RichTagsFunction, RichTranslationValues, Timezone, TranslationValues };
@@ -1,9 +1,9 @@
1
- import { IntlProvider, IntlProviderProps } from "./client/IntlProvider.js";
2
- import { useFormatter, useMessages, useNow, useTimeZone } from "./client/helpers.js";
3
1
  import { _useExtracted } from "./client/index.js";
4
2
  import "./core/index.js";
5
- import { useDictionary } from "./useDictionary.js";
6
3
  import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
4
+ import { useDictionary } from "./useDictionary.js";
5
+ import { useFormatter, useMessages, useNow, useTimeZone } from "./client/helpers.js";
6
+ import { IntlProvider, IntlProviderProps } from "./client/IntlProvider.js";
7
7
  import { useLocale } from "./client/useLocale.js";
8
8
  import { useTranslations } from "./client/useTranslations.js";
9
9
  import { MarkupChunkRenderer, RichChunkRenderer, createDictionaryTranslator } from "./shared/namespaceTranslator.js";
@@ -1,8 +1,8 @@
1
1
  import { MarkupChunkRenderer, RichChunkRenderer } from "./namespaceTranslator.js";
2
2
  import { DictionaryKeys } from "@intlayer/types/module_augmentation";
3
- import { ReactNode } from "react";
4
3
  import { GetNestingResult } from "@intlayer/core/interpreter";
5
4
  import { ValidDotPathsFor } from "@intlayer/core/transpiler";
5
+ import { ReactNode } from "react";
6
6
  /**
7
7
  * The interpreter-resolved content type at dot-path `P` of dictionary `N` —
8
8
  * the same type strength as the base `useIntlayer` hook.
@@ -1,6 +1,6 @@
1
1
  import { ScopedTranslateFunction, TranslateFunction } from "./shared/translateFunctionTypes.js";
2
- import { DictionaryKeys } from "@intlayer/types/module_augmentation";
3
2
  import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryKeys } from "@intlayer/types/module_augmentation";
4
4
  /**
5
5
  * Overload set for {@link useDictionary}: without a prefix the translator is
6
6
  * typed against the dictionary's dot-paths; with a prefix the keys are
@@ -1,6 +1,6 @@
1
1
  import { ScopedTranslateFunction, TranslateFunction } from "./shared/translateFunctionTypes.js";
2
- import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
3
2
  import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
4
  /**
5
5
  * Overload set for {@link useDictionaryDynamic}: without a prefix the
6
6
  * translator is typed against the dictionary's dot-paths; with a prefix the
package/package.json CHANGED
@@ -1,24 +1,20 @@
1
1
  {
2
2
  "name": "@intlayer/use-intl",
3
- "version": "9.7.1",
3
+ "version": "9.7.2",
4
4
  "private": false,
5
5
  "description": "use-intl API adapter for intlayer — useTranslations, useLocale, useFormatter, IntlProvider, createTranslator backed by react-intlayer",
6
6
  "keywords": [
7
+ "adapter",
8
+ "compatibility",
9
+ "i18n",
7
10
  "intlayer",
8
- "use-intl",
9
11
  "react",
10
- "i18n",
11
- "adapter",
12
- "compatibility"
12
+ "use-intl"
13
13
  ],
14
14
  "homepage": "https://intlayer.org",
15
15
  "bugs": {
16
16
  "url": "https://github.com/aymericzip/intlayer/issues"
17
17
  },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/aymericzip/intlayer.git"
21
- },
22
18
  "license": "Apache-2.0",
23
19
  "author": {
24
20
  "name": "Aymeric PINEAU",
@@ -31,7 +27,31 @@
31
27
  "url": "https://github.com/aymericzip"
32
28
  }
33
29
  ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/aymericzip/intlayer.git"
33
+ },
34
+ "files": [
35
+ "./dist",
36
+ "./package.json"
37
+ ],
34
38
  "sideEffects": false,
39
+ "main": "dist/esm/index.mjs",
40
+ "module": "dist/esm/index.mjs",
41
+ "types": "dist/types/index.d.ts",
42
+ "typesVersions": {
43
+ "*": {
44
+ "core": [
45
+ "./dist/types/core/index.d.ts"
46
+ ],
47
+ "react": [
48
+ "./dist/types/client/index.d.ts"
49
+ ],
50
+ "plugin": [
51
+ "./dist/types/plugin/index.d.ts"
52
+ ]
53
+ }
54
+ },
35
55
  "exports": {
36
56
  ".": {
37
57
  "types": "./dist/types/index.d.ts",
@@ -51,35 +71,15 @@
51
71
  },
52
72
  "./package.json": "./package.json"
53
73
  },
54
- "main": "dist/esm/index.mjs",
55
- "module": "dist/esm/index.mjs",
56
- "types": "dist/types/index.d.ts",
57
- "typesVersions": {
58
- "*": {
59
- "core": [
60
- "./dist/types/core/index.d.ts"
61
- ],
62
- "react": [
63
- "./dist/types/client/index.d.ts"
64
- ],
65
- "plugin": [
66
- "./dist/types/plugin/index.d.ts"
67
- ]
68
- }
69
- },
70
- "files": [
71
- "./dist",
72
- "./package.json"
73
- ],
74
74
  "scripts": {
75
75
  "build": "bun --bun tsdown --config tsdown.config.ts",
76
76
  "build:ci": "bun --bun tsdown --config tsdown.config.ts",
77
77
  "clean": "bun --bun rimraf ./dist .turbo",
78
78
  "dev": "bun --bun tsdown --config tsdown.config.ts --watch",
79
- "format": "bun --bun biome format . --check",
80
- "format:fix": "bun --bun biome format --write .",
81
- "lint": "bun --bun biome lint .",
82
- "lint:fix": "bun --bun biome lint --write .",
79
+ "format": "oxfmt --check .",
80
+ "format:fix": "oxfmt .",
81
+ "lint": "oxlint .",
82
+ "lint:fix": "oxlint --fix .",
83
83
  "prepublish": "cp -f ../../README.md ./README.md",
84
84
  "publish": "bun publish || true",
85
85
  "publish:canary": "bun publish --access public --tag canary || true",
@@ -90,13 +90,13 @@
90
90
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
91
91
  },
92
92
  "dependencies": {
93
- "@intlayer/config": "9.7.1",
94
- "@intlayer/core": "9.7.1",
95
- "@intlayer/dictionaries-entry": "9.7.1",
96
- "@intlayer/engine": "9.7.1",
97
- "@intlayer/types": "9.7.1",
98
- "react-intlayer": "9.7.1",
99
- "vite-intlayer": "9.7.1"
93
+ "@intlayer/config": "9.7.2",
94
+ "@intlayer/core": "9.7.2",
95
+ "@intlayer/dictionaries-entry": "9.7.2",
96
+ "@intlayer/engine": "9.7.2",
97
+ "@intlayer/types": "9.7.2",
98
+ "react-intlayer": "9.7.2",
99
+ "vite-intlayer": "9.7.2"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@types/node": "^26",
@@ -104,11 +104,11 @@
104
104
  "@utils/ts-config": "1.0.4",
105
105
  "@utils/ts-config-types": "1.0.4",
106
106
  "@utils/tsdown-config": "1.0.4",
107
- "rimraf": "6.1.3",
108
- "tsdown": "0.23.4",
107
+ "rimraf": "6.1.4",
108
+ "tsdown": "0.23.7",
109
109
  "typescript": "7.0.2",
110
110
  "use-intl": "4.14.9",
111
- "vite": "8.3.5",
111
+ "vite": "8.3.7",
112
112
  "vitest": "5.1.0"
113
113
  },
114
114
  "peerDependencies": {