solid-translate 1.1.0 → 1.2.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 +161 -6
- package/dist/chunk-2BKJUY37.js +82 -0
- package/dist/cli.js +351 -163
- package/dist/index.d.ts +33 -5
- package/dist/index.js +65 -9
- package/dist/index.js.map +1 -1
- package/dist/translate-M737VQHG.js +10 -0
- package/dist/vite.js +262 -113
- package/dist/vite.js.map +1 -1
- package/package.json +6 -2
- package/virtual.d.ts +45 -0
package/virtual.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient types for the solid-translate virtual modules.
|
|
3
|
+
*
|
|
4
|
+
* Add to your project via a triple-slash reference:
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* /// <reference types="solid-translate/virtual" />
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* or in `tsconfig.json`:
|
|
11
|
+
*
|
|
12
|
+
* ```json
|
|
13
|
+
* { "compilerOptions": { "types": ["solid-translate/virtual"] } }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
declare module "virtual:solid-translate" {
|
|
18
|
+
/** All translations keyed by locale code (eager — inlined at build time) */
|
|
19
|
+
const translations: Record<string, Record<string, string>>;
|
|
20
|
+
export default translations;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "virtual:solid-translate/lazy" {
|
|
24
|
+
/** Source locale code */
|
|
25
|
+
export const sourceLocale: string;
|
|
26
|
+
/** All available locale codes (source + targets) */
|
|
27
|
+
export const locales: string[];
|
|
28
|
+
/** Per-locale dictionary loaders (each is its own code-split chunk) */
|
|
29
|
+
export const loaders: Record<
|
|
30
|
+
string,
|
|
31
|
+
() => Promise<Record<string, string>>
|
|
32
|
+
>;
|
|
33
|
+
const manifest: {
|
|
34
|
+
sourceLocale: string;
|
|
35
|
+
locales: string[];
|
|
36
|
+
loaders: Record<string, () => Promise<Record<string, string>>>;
|
|
37
|
+
};
|
|
38
|
+
export default manifest;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare module "virtual:solid-translate/locale/*" {
|
|
42
|
+
/** A single locale's translation dictionary */
|
|
43
|
+
const dictionary: Record<string, string>;
|
|
44
|
+
export default dictionary;
|
|
45
|
+
}
|