solid-intlayer 7.0.9-canary.0 → 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
|
@@ -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.9-canary.
|
|
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.9-canary.
|
|
74
|
-
"@intlayer/config": "7.0.9-canary.
|
|
75
|
-
"@intlayer/core": "7.0.9-canary.
|
|
76
|
-
"@intlayer/editor": "7.0.9-canary.
|
|
77
|
-
"@intlayer/types": "7.0.9-canary.
|
|
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.9-canary.
|
|
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.9-canary.
|
|
101
|
-
"@intlayer/config": "7.0.9-canary.
|
|
102
|
-
"@intlayer/core": "7.0.9-canary.
|
|
103
|
-
"@intlayer/editor": "7.0.9-canary.
|
|
104
|
-
"@intlayer/types": "7.0.9-canary.
|
|
105
|
-
"@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.
|
|
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": {
|