@intlayer/svelte-compiler 9.4.3 → 9.5.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
CHANGED
|
@@ -69,8 +69,6 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
69
69
|
| <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, react-intl, vue-i18n. <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) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
|
|
70
70
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
|
|
71
71
|
|
|
72
|
-
---
|
|
73
|
-
|
|
74
72
|
## 📦 Installation
|
|
75
73
|
|
|
76
74
|
Start your journey with Intlayer today and experience a smoother, more powerful approach to internationalization.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* This module fills that gap by running a targeted regex over the raw source.
|
|
14
14
|
*/
|
|
15
15
|
/** Input descriptor for a single plain variable binding. */
|
|
16
|
-
type PlainVariableInfo = {
|
|
16
|
+
export type PlainVariableInfo = {
|
|
17
17
|
/** The local variable name in the script (`bm` in `const bm = useIntlayer(…)`). */
|
|
18
18
|
variableName: string;
|
|
19
19
|
/** The intlayer dictionary key passed to `useIntlayer`. */
|
|
@@ -32,7 +32,6 @@ type PlainVariableInfo = {
|
|
|
32
32
|
* If no fields can be determined for a given key it is omitted from the
|
|
33
33
|
* map so the caller can fall back to `'all'`.
|
|
34
34
|
*/
|
|
35
|
-
declare const extractSvelteIntlayerFieldUsage: (code: string, plainVariables: PlainVariableInfo[]) => Map<string, Set<string>>;
|
|
35
|
+
export declare const extractSvelteIntlayerFieldUsage: (code: string, plainVariables: PlainVariableInfo[]) => Map<string, Set<string>>;
|
|
36
36
|
//#endregion
|
|
37
|
-
export { PlainVariableInfo, extractSvelteIntlayerFieldUsage };
|
|
38
37
|
//# sourceMappingURL=extractSvelteFieldUsage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractSvelteFieldUsage.d.ts","names":[],"sources":["../../src/extractSvelteFieldUsage.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"extractSvelteFieldUsage.d.ts","names":[],"sources":["../../src/extractSvelteFieldUsage.ts"],"mappings":";;;;;;;;;;;;;;;YAmBY;;EAEV;;EAEA;;;;;;;;;;;;;;;qBAgBW,kCAA+B,cAC9B,gBACI,wBACf,YAAY"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Locale } from "@intlayer/types/allLocales";
|
|
2
2
|
//#region src/svelte-intlayer-extract.d.ts
|
|
3
|
-
type ExtractedContent = Record<string, string>;
|
|
4
|
-
type ExtractResult = {
|
|
3
|
+
export type ExtractedContent = Record<string, string>;
|
|
4
|
+
export type ExtractResult = {
|
|
5
5
|
dictionaryKey: string;
|
|
6
6
|
filePath: string;
|
|
7
7
|
content: ExtractedContent;
|
|
8
8
|
locale: Locale;
|
|
9
9
|
};
|
|
10
|
-
type ExtractPluginOptions = {
|
|
10
|
+
export type ExtractPluginOptions = {
|
|
11
11
|
defaultLocale?: Locale;
|
|
12
12
|
packageName?: string;
|
|
13
13
|
filesList?: string[];
|
|
@@ -18,8 +18,8 @@ type ExtractPluginOptions = {
|
|
|
18
18
|
extractDictionaryKeyFromPath?: (path: string) => string;
|
|
19
19
|
generateKey?: (text: string, existingKeys: Set<string>) => string;
|
|
20
20
|
};
|
|
21
|
-
declare const shouldProcessFile: (filename: string | undefined, filesList?: string[]) => boolean;
|
|
22
|
-
declare const intlayerSvelteExtract: (code: string, filename: string, options?: ExtractPluginOptions) => {
|
|
21
|
+
export declare const shouldProcessFile: (filename: string | undefined, filesList?: string[]) => boolean;
|
|
22
|
+
export declare const intlayerSvelteExtract: (code: string, filename: string, options?: ExtractPluginOptions) => {
|
|
23
23
|
code: string;
|
|
24
24
|
map?: unknown;
|
|
25
25
|
extracted: boolean;
|
|
@@ -31,11 +31,10 @@ type Tools = {
|
|
|
31
31
|
attributesToExtract: readonly string[];
|
|
32
32
|
extractTsContent: any;
|
|
33
33
|
};
|
|
34
|
-
declare const processSvelteFile: (filePath: string, _componentKey: string, packageName: string, tools: Tools, save?: boolean, providedCode?: string) => {
|
|
34
|
+
export declare const processSvelteFile: (filePath: string, _componentKey: string, packageName: string, tools: Tools, save?: boolean, providedCode?: string) => {
|
|
35
35
|
extractedContent: Record<string, string>;
|
|
36
36
|
code: string;
|
|
37
37
|
map?: any;
|
|
38
38
|
} | null;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { ExtractPluginOptions, ExtractResult, ExtractedContent, intlayerSvelteExtract, processSvelteFile, shouldProcessFile };
|
|
41
40
|
//# sourceMappingURL=svelte-intlayer-extract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte-intlayer-extract.d.ts","names":[],"sources":["../../src/svelte-intlayer-extract.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"svelte-intlayer-extract.d.ts","names":[],"sources":["../../src/svelte-intlayer-extract.ts"],"mappings":";;YA2FY,mBAAmB;YAEnB;EACV;EACA;EACA,SAAS;EACT,QAAQ;;YAGE;EACV,gBAAgB;EAChB;EACA;EACA,iBAAiB;EACjB,aAAa,QAAQ;EACrB;EACA;EACA,gCAAgC;EAChC,eAAe,cAAc,cAAc;;qBAahC,oBAAiB,8BACA;qBAejB,wBAAqB,cACpB,kBACI,UACP;EACN;EAAc;EAAe;;KA6V7B;EACH,cAAc,cAAc,cAAc;EAC1C,gBAAgB;EAChB,+BAA+B;EAC/B;EACA;;qBAGW,oBAAiB,kBACZ,uBACK,qBACF,OACZ,OAAK,gBACC;EAGb,kBAAkB;EAClB;EACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/svelte-compiler",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vite-compatible compiler plugin for Svelte with Intlayer, providing HMR support, file transformation, and optimized dictionary loading for Svelte applications.",
|
|
6
6
|
"keywords": [
|
|
@@ -78,24 +78,24 @@
|
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@babel/core": "8.0.1",
|
|
81
|
-
"@intlayer/types": "9.
|
|
81
|
+
"@intlayer/types": "9.5.0",
|
|
82
82
|
"fast-glob": "3.3.3",
|
|
83
83
|
"magic-string": "1.2.3"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@intlayer/config": "9.
|
|
87
|
-
"@intlayer/types": "9.
|
|
86
|
+
"@intlayer/config": "9.5.0",
|
|
87
|
+
"@intlayer/types": "9.5.0",
|
|
88
88
|
"@types/babel__core": "7.20.5",
|
|
89
89
|
"@types/babel__generator": "7.27.0",
|
|
90
90
|
"@types/babel__traverse": "7.28.0",
|
|
91
|
-
"@types/node": "26.
|
|
91
|
+
"@types/node": "26.5.0",
|
|
92
92
|
"@utils/ts-config": "1.0.4",
|
|
93
93
|
"@utils/ts-config-types": "1.0.4",
|
|
94
94
|
"@utils/tsdown-config": "1.0.4",
|
|
95
95
|
"rimraf": "6.1.3",
|
|
96
|
-
"tsdown": "0.
|
|
96
|
+
"tsdown": "0.23.0",
|
|
97
97
|
"typescript": "7.0.2",
|
|
98
|
-
"vitest": "
|
|
98
|
+
"vitest": "5.0.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@babel/core": ">=6.0.0",
|