intor 1.0.39 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intor",
3
- "version": "1.0.39",
3
+ "version": "2.0.0",
4
4
  "description": "A modular and extensible i18n core designed for TypeScript and JavaScript projects. Intor enables custom translation logic with support for both frontend and backend environments, featuring runtime configuration, caching, adapters, and message loaders.",
5
5
  "author": "Yiming Liao",
6
6
  "license": "MIT",
@@ -45,13 +45,10 @@
45
45
  "import": "./dist/next/middleware/index.js",
46
46
  "require": "./dist/next/middleware/index.cjs"
47
47
  },
48
- "./next/provider": {
49
- "types": "./exports/next/provider/intor-provider.tsx",
50
- "import": "./exports/next/provider/intor-provider.tsx"
51
- },
52
- "./next/translate-handlers-provider": {
53
- "types": "./exports/next/provider/translate-handlers-provider.tsx",
54
- "import": "./exports/next/provider/translate-handlers-provider.tsx"
48
+ "./next/server": {
49
+ "types": "./dist/next/server/index.d.ts",
50
+ "import": "./dist/next/server/index.js",
51
+ "require": "./dist/next/server/index.cjs"
55
52
  }
56
53
  },
57
54
  "main": "./dist/index.cjs",
@@ -59,8 +56,8 @@
59
56
  "types": "./dist/index.d.ts",
60
57
  "files": [
61
58
  "dist",
62
- "exports/next/provider/intor-provider.tsx",
63
- "exports/next/provider/translate-handlers-provider.tsx",
59
+ "exports/next/provider/intor-provider.jsx",
60
+ "exports/next/provider/translate-handlers-provider.jsx",
64
61
  "README.md",
65
62
  "LICENSE"
66
63
  ],
@@ -74,9 +71,9 @@
74
71
  "prepublishOnly": "yarn build"
75
72
  },
76
73
  "dependencies": {
77
- "intor": "^1.0.36",
78
74
  "intor-translator": "^1.0.15",
79
- "logry": "^1.2.3",
75
+ "keyv": "^5.5.3",
76
+ "logry": "^2.0.1",
80
77
  "p-limit": "^6.2.0"
81
78
  },
82
79
  "devDependencies": {
@@ -1,25 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import {
5
- IntorConfigProvider,
6
- IntorLocaleProvider,
7
- IntorMessagesProvider,
8
- IntorTranslatorProvider,
9
- } from "../../../dist/next";
10
- import type { IntorProviderProps } from "../../../dist/next/index";
11
-
12
- export const IntorProvider = ({
13
- value: { config, pathname, initialLocale, messages },
14
- children,
15
- }: IntorProviderProps) => {
16
- return (
17
- <IntorConfigProvider value={{ config, pathname }}>
18
- <IntorMessagesProvider value={{ messages }}>
19
- <IntorLocaleProvider value={{ initialLocale }}>
20
- <IntorTranslatorProvider>{children}</IntorTranslatorProvider>
21
- </IntorLocaleProvider>
22
- </IntorMessagesProvider>
23
- </IntorConfigProvider>
24
- );
25
- };
@@ -1,19 +0,0 @@
1
- "use client";
2
-
3
- import { TranslateHandlersContext } from "../../../dist/next";
4
- import type { TranslateHandlersProviderProps } from "../../../dist/next";
5
- import * as React from "react";
6
-
7
- // Provider
8
- export const TranslateHandlersProvider = ({
9
- children,
10
- handlers,
11
- }: TranslateHandlersProviderProps) => {
12
- const value = handlers;
13
-
14
- return (
15
- <TranslateHandlersContext.Provider value={value}>
16
- {children}
17
- </TranslateHandlersContext.Provider>
18
- );
19
- };