solid-intlayer 7.0.8 → 7.0.9-canary.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.
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
<p align="center" style="margin-top:15px;">
|
|
21
21
|
<a href="https://www.npmjs.com/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/v/intlayer?style=for-the-badge&labelColor=FFFFFF&color=000000&logoColor=FFFFFF" alt="npm version" height="24"/></a>
|
|
22
22
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub Stars" height="24"/></a>
|
|
23
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="monthly downloads" height="24"/></a>
|
|
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" alt="license"/></a>
|
|
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" alt="last commit"/>
|
|
23
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="monthly downloads" height="24"/></a>
|
|
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
|
+
<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
27
|
</p>
|
|
28
28
|
|
|
@@ -60,7 +60,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
60
60
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
|
|
61
61
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
|
|
62
62
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
|
|
63
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations,
|
|
63
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
|
|
64
64
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, and react-intl. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) |
|
|
65
65
|
|
|
66
66
|
---
|
|
@@ -171,8 +171,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
171
171
|
<details open>
|
|
172
172
|
<summary style="font-size:16px; font-weight:bold;">🌐 Environment</summary>
|
|
173
173
|
<ul>
|
|
174
|
-
<li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js
|
|
174
|
+
<li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js 16</a>
|
|
175
175
|
<ul>
|
|
176
|
+
<li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
|
|
176
177
|
<li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
|
|
177
178
|
<li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
|
|
178
179
|
</ul>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@intlayer/config/built"),e=require("solid-js"),c=()=>Math.random().toString(36).slice(2),{editor:t}=s,r=e.createContext({postMessage:()=>null,allowedOrigins:[t?.applicationURL,t?.editorURL,t?.cmsURL],senderId:""}),a=o=>{const n=c(),i=e.createMemo(()=>({postMessage:o.postMessage,allowedOrigins:o.allowedOrigins,senderId:n}));return e.createComponent(r.Provider,{get value(){return i()},get children(){return o.children}})},u=()=>e.useContext(r);exports.CommunicatorProvider=a;exports.useCommunicator=u;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const t = Math.random() * 16 | 0;
|
|
5
|
-
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
6
|
-
}), {
|
|
1
|
+
import i from "@intlayer/config/built";
|
|
2
|
+
import { createContext as s, useContext as a, createMemo as c, createComponent as d } from "solid-js";
|
|
3
|
+
const m = () => Math.random().toString(36).slice(2), {
|
|
7
4
|
editor: o
|
|
8
|
-
} =
|
|
5
|
+
} = i, t = s({
|
|
9
6
|
postMessage: () => null,
|
|
10
7
|
allowedOrigins: [o?.applicationURL, o?.editorURL, o?.cmsURL],
|
|
11
8
|
senderId: ""
|
|
12
|
-
}),
|
|
13
|
-
const
|
|
9
|
+
}), g = (e) => {
|
|
10
|
+
const n = m(), r = c(() => ({
|
|
14
11
|
postMessage: e.postMessage,
|
|
15
12
|
allowedOrigins: e.allowedOrigins,
|
|
16
|
-
senderId:
|
|
13
|
+
senderId: n
|
|
17
14
|
}));
|
|
18
|
-
return
|
|
15
|
+
return d(t.Provider, {
|
|
19
16
|
get value() {
|
|
20
17
|
return r();
|
|
21
18
|
},
|
|
@@ -23,8 +20,8 @@ const d = () => "xxxx-xxxx-xxxx-yxxx".replace(/[xy]/g, (e) => {
|
|
|
23
20
|
return e.children;
|
|
24
21
|
}
|
|
25
22
|
});
|
|
26
|
-
},
|
|
23
|
+
}, C = () => a(t);
|
|
27
24
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
g as CommunicatorProvider,
|
|
26
|
+
C as useCommunicator
|
|
30
27
|
};
|
|
@@ -3,7 +3,7 @@ import { StrictModeLocaleMap } from '@intlayer/types';
|
|
|
3
3
|
* On the client side, hook to get the translation content based on the locale
|
|
4
4
|
*/
|
|
5
5
|
export declare const useContent: <Content>(languageContent: StrictModeLocaleMap<Content>) => {
|
|
6
|
-
locale: import('
|
|
6
|
+
locale: import('intlayer').Locale;
|
|
7
7
|
content: Content;
|
|
8
8
|
t: <Content_1 = string>(languageContent: StrictModeLocaleMap<Content_1>) => Content_1;
|
|
9
9
|
};
|
|
@@ -2,13 +2,13 @@ import { LocalesValues } from '@intlayer/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Get the locale cookie
|
|
4
4
|
*/
|
|
5
|
-
export declare const localeInStorage: import('
|
|
5
|
+
export declare const localeInStorage: import('intlayer').Locale | undefined;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated Use localeInStorage instead
|
|
8
8
|
*
|
|
9
9
|
* Get the locale cookie
|
|
10
10
|
*/
|
|
11
|
-
export declare const localeCookie: import('
|
|
11
|
+
export declare const localeCookie: import('intlayer').Locale | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Set the locale cookie
|
|
14
14
|
*/
|
|
@@ -23,7 +23,7 @@ export declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?:
|
|
|
23
23
|
* Hook that provides the locale storage and a function to set it
|
|
24
24
|
*/
|
|
25
25
|
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => import('solid-js').Accessor<{
|
|
26
|
-
getLocale: () => import('
|
|
26
|
+
getLocale: () => import('intlayer').Locale;
|
|
27
27
|
setLocale: (locale: LocalesValues) => void;
|
|
28
28
|
}>;
|
|
29
29
|
/**
|
|
@@ -34,6 +34,6 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => import('so
|
|
|
34
34
|
* Hook that provides the locale cookie and a function to set it
|
|
35
35
|
*/
|
|
36
36
|
export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
37
|
-
localeCookie: import('
|
|
37
|
+
localeCookie: import('intlayer').Locale;
|
|
38
38
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
39
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-intlayer",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.9-canary.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Solid applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -65,44 +65,47 @@
|
|
|
65
65
|
"lint": "biome lint .",
|
|
66
66
|
"lint:fix": "biome lint --write .",
|
|
67
67
|
"prepublish": "cp -f ../../README.md ./README.md",
|
|
68
|
+
"publish": "bun publish --access public || true",
|
|
69
|
+
"publish:canary": "bun publish --tag canary --access public || true",
|
|
70
|
+
"publish:latest": "bun publish --tag latest --access public || true",
|
|
68
71
|
"test": "vitest run",
|
|
69
72
|
"test:watch": "vitest",
|
|
70
73
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
71
74
|
},
|
|
72
75
|
"dependencies": {
|
|
73
|
-
"@intlayer/api": "7.0.
|
|
74
|
-
"@intlayer/config": "7.0.
|
|
75
|
-
"@intlayer/core": "7.0.
|
|
76
|
-
"@intlayer/editor": "7.0.
|
|
77
|
-
"@intlayer/types": "7.0.
|
|
76
|
+
"@intlayer/api": "7.0.9-canary.2",
|
|
77
|
+
"@intlayer/config": "7.0.9-canary.2",
|
|
78
|
+
"@intlayer/core": "7.0.9-canary.2",
|
|
79
|
+
"@intlayer/editor": "7.0.9-canary.2",
|
|
80
|
+
"@intlayer/types": "7.0.9-canary.2",
|
|
78
81
|
"js-cookie": "3.0.5"
|
|
79
82
|
},
|
|
80
83
|
"devDependencies": {
|
|
81
|
-
"@intlayer/unmerged-dictionaries-entry": "7.0.
|
|
84
|
+
"@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
|
|
82
85
|
"@solidjs/testing-library": "0.8.10",
|
|
83
|
-
"@testing-library/jest-dom": "6.
|
|
86
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
84
87
|
"@testing-library/user-event": "14.6.1",
|
|
85
88
|
"@types/js-cookie": "3.0.6",
|
|
86
|
-
"@types/node": "24.10.
|
|
87
|
-
"@utils/ts-config": "
|
|
88
|
-
"@utils/ts-config-types": "
|
|
89
|
-
"@utils/tsdown-config": "
|
|
89
|
+
"@types/node": "24.10.1",
|
|
90
|
+
"@utils/ts-config": "1.0.4",
|
|
91
|
+
"@utils/ts-config-types": "1.0.4",
|
|
92
|
+
"@utils/tsdown-config": "1.0.4",
|
|
90
93
|
"jsdom": "26.1.0",
|
|
91
94
|
"rimraf": "6.1.0",
|
|
92
|
-
"tsdown": "0.16.
|
|
95
|
+
"tsdown": "0.16.4",
|
|
93
96
|
"typescript": "5.9.3",
|
|
94
97
|
"vite": "7.2.0",
|
|
95
98
|
"vite-plugin-dts": "4.5.4",
|
|
96
99
|
"vite-plugin-solid": "2.11.6",
|
|
97
|
-
"vitest": "4.0.
|
|
100
|
+
"vitest": "4.0.8"
|
|
98
101
|
},
|
|
99
102
|
"peerDependencies": {
|
|
100
|
-
"@intlayer/api": "7.0.
|
|
101
|
-
"@intlayer/config": "7.0.
|
|
102
|
-
"@intlayer/core": "7.0.
|
|
103
|
-
"@intlayer/editor": "7.0.
|
|
104
|
-
"@intlayer/types": "7.0.
|
|
105
|
-
"@intlayer/unmerged-dictionaries-entry": "7.0.
|
|
103
|
+
"@intlayer/api": "7.0.9-canary.2",
|
|
104
|
+
"@intlayer/config": "7.0.9-canary.2",
|
|
105
|
+
"@intlayer/core": "7.0.9-canary.2",
|
|
106
|
+
"@intlayer/editor": "7.0.9-canary.2",
|
|
107
|
+
"@intlayer/types": "7.0.9-canary.2",
|
|
108
|
+
"@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
|
|
106
109
|
"solid-js": ">=1.0.0"
|
|
107
110
|
},
|
|
108
111
|
"engines": {
|