@weglot/translate-react 0.2.1 → 0.3.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 +118 -12
- package/build/metadata/manager.cjs +18 -5
- package/build/metadata/manager.mjs +17 -5
- package/build/metadata/manager.mjs.map +1 -1
- package/build/plugin/next-compiler-loader.cjs +1 -4
- package/build/plugin/next-compiler-loader.mjs +2 -5
- package/build/plugin/next-compiler-loader.mjs.map +1 -1
- package/build/plugin/next-traces.cjs +38 -0
- package/build/plugin/next-traces.mjs +36 -0
- package/build/plugin/next-traces.mjs.map +1 -0
- package/build/plugin/next.cjs +43 -12
- package/build/plugin/next.d.cts.map +1 -1
- package/build/plugin/next.d.mts.map +1 -1
- package/build/plugin/next.mjs +41 -13
- package/build/plugin/next.mjs.map +1 -1
- package/build/plugin/transform/index.cjs +17 -3
- package/build/plugin/transform/index.mjs +17 -3
- package/build/plugin/transform/index.mjs.map +1 -1
- package/build/plugin/transform/msg.cjs +66 -0
- package/build/plugin/transform/msg.mjs +64 -0
- package/build/plugin/transform/msg.mjs.map +1 -0
- package/build/plugin/transform/process-file.cjs +18 -7
- package/build/plugin/transform/process-file.mjs +18 -7
- package/build/plugin/transform/process-file.mjs.map +1 -1
- package/build/plugin/transform/utils.cjs +1 -0
- package/build/plugin/transform/utils.mjs +1 -1
- package/build/plugin/transform/utils.mjs.map +1 -1
- package/build/plugin/unplugin.cjs +6 -7
- package/build/plugin/unplugin.d.cts.map +1 -1
- package/build/plugin/unplugin.d.mts.map +1 -1
- package/build/plugin/unplugin.mjs +7 -8
- package/build/plugin/unplugin.mjs.map +1 -1
- package/build/react/client/index.cjs +2 -0
- package/build/react/client/index.d.cts +2 -1
- package/build/react/client/index.d.mts +2 -1
- package/build/react/client/index.mjs +2 -1
- package/build/react/client/useTranslation.cjs +14 -2
- package/build/react/client/useTranslation.d.cts +0 -35
- package/build/react/client/useTranslation.d.cts.map +1 -1
- package/build/react/client/useTranslation.d.mts +0 -35
- package/build/react/client/useTranslation.d.mts.map +1 -1
- package/build/react/client/useTranslation.mjs +15 -3
- package/build/react/client/useTranslation.mjs.map +1 -1
- package/build/react/server/ServerWeglotProvider.d.cts +2 -2
- package/build/react/server/ServerWeglotProvider.d.mts +2 -2
- package/build/react/server/index.cjs +2 -0
- package/build/react/server/index.d.cts +2 -1
- package/build/react/server/index.d.mts +2 -1
- package/build/react/server/index.mjs +2 -1
- package/build/react/server/useTranslation.cjs +6 -4
- package/build/react/server/useTranslation.d.cts.map +1 -1
- package/build/react/server/useTranslation.d.mts.map +1 -1
- package/build/react/server/useTranslation.mjs +6 -4
- package/build/react/server/useTranslation.mjs.map +1 -1
- package/build/react/server-only/index.cjs +5 -3
- package/build/react/server-only/index.d.cts +2 -3
- package/build/react/server-only/index.d.cts.map +1 -1
- package/build/react/server-only/index.d.mts +2 -3
- package/build/react/server-only/index.d.mts.map +1 -1
- package/build/react/server-only/index.mjs +5 -3
- package/build/react/server-only/index.mjs.map +1 -1
- package/build/react/server-only/translations.cjs +21 -1
- package/build/react/server-only/translations.mjs +22 -2
- package/build/react/server-only/translations.mjs.map +1 -1
- package/build/react/shared/LocaleSwitcher.d.mts +2 -2
- package/build/react/shared/WeglotContext.cjs +18 -2
- package/build/react/shared/WeglotContext.d.cts +1 -0
- package/build/react/shared/WeglotContext.d.cts.map +1 -1
- package/build/react/shared/WeglotContext.d.mts +2 -0
- package/build/react/shared/WeglotContext.d.mts.map +1 -1
- package/build/react/shared/WeglotContext.mjs +18 -2
- package/build/react/shared/WeglotContext.mjs.map +1 -1
- package/build/react/shared/WeglotProvider.cjs +4 -0
- package/build/react/shared/WeglotProvider.d.cts +2 -2
- package/build/react/shared/WeglotProvider.d.cts.map +1 -1
- package/build/react/shared/WeglotProvider.d.mts +2 -2
- package/build/react/shared/WeglotProvider.d.mts.map +1 -1
- package/build/react/shared/WeglotProvider.mjs +4 -0
- package/build/react/shared/WeglotProvider.mjs.map +1 -1
- package/build/react/shared/msg.cjs +50 -0
- package/build/react/shared/msg.d.cts +26 -0
- package/build/react/shared/msg.d.cts.map +1 -0
- package/build/react/shared/msg.d.mts +26 -0
- package/build/react/shared/msg.d.mts.map +1 -0
- package/build/react/shared/msg.mjs +47 -0
- package/build/react/shared/msg.mjs.map +1 -0
- package/build/react/types.d.cts +7 -3
- package/build/react/types.d.cts.map +1 -1
- package/build/react/types.d.mts +7 -3
- package/build/react/types.d.mts.map +1 -1
- package/build/runtime/lru-cache.cjs +38 -0
- package/build/runtime/lru-cache.mjs +38 -0
- package/build/runtime/lru-cache.mjs.map +1 -0
- package/build/runtime/translate-dynamic.cjs +71 -17
- package/build/runtime/translate-dynamic.d.cts +2 -0
- package/build/runtime/translate-dynamic.d.cts.map +1 -1
- package/build/runtime/translate-dynamic.d.mts +2 -0
- package/build/runtime/translate-dynamic.d.mts.map +1 -1
- package/build/runtime/translate-dynamic.mjs +71 -17
- package/build/runtime/translate-dynamic.mjs.map +1 -1
- package/build/translators/weglot/api-client.cjs +4 -1
- package/build/translators/weglot/api-client.mjs +4 -1
- package/build/translators/weglot/api-client.mjs.map +1 -1
- package/build/types.d.cts +7 -1
- package/build/types.d.cts.map +1 -1
- package/build/types.d.mts +7 -1
- package/build/types.d.mts.map +1 -1
- package/build/utils/package-version.cjs +12 -0
- package/build/utils/package-version.mjs +12 -0
- package/build/utils/package-version.mjs.map +1 -0
- package/package.json +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weglot/translate-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Automatic Weglot translation for React and Next.js apps, detected from your JSX at build time",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -190,9 +190,10 @@
|
|
|
190
190
|
"scripts": {
|
|
191
191
|
"dev": "tsdown --watch",
|
|
192
192
|
"build": "pnpm typecheck && tsdown",
|
|
193
|
-
"typecheck": "tsc --noEmit",
|
|
193
|
+
"typecheck": "tsc --noEmit && tsc -p e2e/tsconfig.json",
|
|
194
194
|
"clean": "rm -rf build",
|
|
195
195
|
"test": "vitest --run",
|
|
196
|
+
"test:e2e": "vitest --run --config vitest.e2e.config.ts",
|
|
196
197
|
"sync-definitions": "node scripts/sync-definitions.ts",
|
|
197
198
|
"check-definitions": "node scripts/sync-definitions.ts --check",
|
|
198
199
|
"test:watch": "vitest -w",
|
|
@@ -232,6 +233,7 @@
|
|
|
232
233
|
"@types/react-dom": "19.2.3",
|
|
233
234
|
"jsdom": "30.0.1",
|
|
234
235
|
"next": "16.2.9",
|
|
236
|
+
"playwright": "1.64.1",
|
|
235
237
|
"tsdown": "0.18.2",
|
|
236
238
|
"typescript": "5.9.3",
|
|
237
239
|
"vitest": "4.1.0"
|