@intlayer/svelte-compiler 9.4.2 → 9.4.4

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.
@@ -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":";;;;;;;;;;;;;;;KAmBY;;EAEV;;EAEA;;;;;;;;;;;;;;;cAgBW,kCAA+B,cAC9B,gBACI,wBACf,YAAY"}
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":";;KA2FY,mBAAmB;KAEnB;EACV;EACA;EACA,SAAS;EACT,QAAQ;;KAGE;EACV,gBAAgB;EAChB;EACA;EACA,iBAAiB;EACjB,aAAa,QAAQ;EACrB;EACA;EACA,gCAAgC;EAChC,eAAe,cAAc,cAAc;;cAahC,oBAAiB,8BACA;cAejB,wBAAqB,cACpB,kBACI,UACP;EACN;EAAc;EAAe;;KA6V7B;EACH,cAAc,cAAc,cAAc;EAC1C,gBAAgB;EAChB,+BAA+B;EAC/B;EACA;;cAGW,oBAAiB,kBACZ,uBACK,qBACF,OACZ,OAAK,gBACC;EAGb,kBAAkB;EAClB;EACA"}
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.4.2",
3
+ "version": "9.4.4",
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,13 +78,13 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "@babel/core": "8.0.1",
81
- "@intlayer/types": "9.4.2",
81
+ "@intlayer/types": "9.4.4",
82
82
  "fast-glob": "3.3.3",
83
83
  "magic-string": "1.2.3"
84
84
  },
85
85
  "devDependencies": {
86
- "@intlayer/config": "9.4.2",
87
- "@intlayer/types": "9.4.2",
86
+ "@intlayer/config": "9.4.4",
87
+ "@intlayer/types": "9.4.4",
88
88
  "@types/babel__core": "7.20.5",
89
89
  "@types/babel__generator": "7.27.0",
90
90
  "@types/babel__traverse": "7.28.0",
@@ -93,9 +93,9 @@
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.22.14",
96
+ "tsdown": "0.23.0",
97
97
  "typescript": "7.0.2",
98
- "vitest": "4.1.11"
98
+ "vitest": "5.0.0"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "@babel/core": ">=6.0.0",