@intlayer/lsp 9.7.0 → 9.7.1

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.
Files changed (45) hide show
  1. package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -2
  2. package/dist/esm/callers/editorCallers.mjs +1 -2
  3. package/dist/esm/callers/index.mjs +1 -2
  4. package/dist/esm/callers/patterns.mjs +2 -3
  5. package/dist/esm/dictionaryUtils.mjs +1 -2
  6. package/dist/esm/findFieldDeclaration.mjs +2 -3
  7. package/dist/esm/findFieldInFile.mjs +1 -2
  8. package/dist/esm/findKeyAtOffset.mjs +1 -2
  9. package/dist/esm/findKeyInContentFile.mjs +1 -2
  10. package/dist/esm/findTCallAtOffset.mjs +1 -2
  11. package/dist/esm/findUsageFieldAtOffset.mjs +1 -2
  12. package/dist/esm/index.mjs +9 -10
  13. package/dist/esm/oxcUtils.mjs +1 -2
  14. package/dist/esm/protocol.mjs +1 -2
  15. package/dist/esm/resolveDictionaryTarget.mjs +1 -2
  16. package/dist/esm/usageAnalyzer.mjs +2 -3
  17. package/dist/esm/utils.mjs +7 -7
  18. package/dist/types/callers/editorCallers.d.ts +0 -2
  19. package/dist/types/callers/editorCallers.d.ts.map +1 -1
  20. package/dist/types/callers/index.d.ts +0 -1
  21. package/dist/types/callers/patterns.d.ts +0 -2
  22. package/dist/types/callers/patterns.d.ts.map +1 -1
  23. package/dist/types/dictionaryUtils.d.ts +0 -2
  24. package/dist/types/dictionaryUtils.d.ts.map +1 -1
  25. package/dist/types/findFieldDeclaration.d.ts +0 -2
  26. package/dist/types/findFieldDeclaration.d.ts.map +1 -1
  27. package/dist/types/findFieldInFile.d.ts +0 -2
  28. package/dist/types/findFieldInFile.d.ts.map +1 -1
  29. package/dist/types/findKeyAtOffset.d.ts +0 -2
  30. package/dist/types/findKeyAtOffset.d.ts.map +1 -1
  31. package/dist/types/findKeyInContentFile.d.ts +1 -2
  32. package/dist/types/findKeyInContentFile.d.ts.map +1 -1
  33. package/dist/types/findTCallAtOffset.d.ts +0 -2
  34. package/dist/types/findTCallAtOffset.d.ts.map +1 -1
  35. package/dist/types/findUsageFieldAtOffset.d.ts +0 -2
  36. package/dist/types/findUsageFieldAtOffset.d.ts.map +1 -1
  37. package/dist/types/oxcUtils.d.ts +0 -2
  38. package/dist/types/oxcUtils.d.ts.map +1 -1
  39. package/dist/types/protocol.d.ts +0 -2
  40. package/dist/types/protocol.d.ts.map +1 -1
  41. package/dist/types/resolveDictionaryTarget.d.ts +1 -2
  42. package/dist/types/resolveDictionaryTarget.d.ts.map +1 -1
  43. package/dist/types/usageAnalyzer.d.ts +0 -2
  44. package/dist/types/usageAnalyzer.d.ts.map +1 -1
  45. package/package.json +10 -10
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -32,5 +32,4 @@ var __copyProps = (to, from, except, desc) => {
32
32
  };
33
33
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
34
34
 
35
- //#endregion
36
35
  export { __exportAll, __reExport };
@@ -1,6 +1,6 @@
1
1
  import { COMPAT_CALLERS } from "@intlayer/config/callers";
2
2
 
3
- //#region src/callers/editorCallers.ts
3
+ // src/callers/editorCallers.ts
4
4
  /**
5
5
  * Every module a compat adapter is imported from (original library names and
6
6
  * their `@intlayer/*` equivalents), derived from the shared registry so a new
@@ -34,6 +34,5 @@ const EDITOR_CALLERS = [{
34
34
  translationFunction: "self"
35
35
  }];
36
36
 
37
- //#endregion
38
37
  export { EDITOR_CALLERS };
39
38
  //# sourceMappingURL=editorCallers.mjs.map
@@ -2,11 +2,10 @@ import { __exportAll, __reExport } from "../_virtual/_rolldown/runtime.mjs";
2
2
 
3
3
  export * from "@intlayer/config/callers"
4
4
 
5
- //#region src/callers/index.ts
5
+ // src/callers/index.ts
6
6
  var callers_exports = /* @__PURE__ */ __exportAll({});
7
7
  import * as import__intlayer_config_callers from "@intlayer/config/callers";
8
8
  __reExport(callers_exports, import__intlayer_config_callers);
9
9
 
10
- //#endregion
11
10
  export { callers_exports };
12
11
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
- import { callers_exports } from "./index.mjs";
2
1
  import { escapeRegularExpression } from "../findFieldInFile.mjs";
2
+ import { callers_exports } from "./index.mjs";
3
3
 
4
- //#region src/callers/patterns.ts
4
+ // src/callers/patterns.ts
5
5
  /**
6
6
  * Alternation of every caller name whose dictionary key appears as a
7
7
  * positional string argument — for building text-search patterns.
@@ -32,6 +32,5 @@ const buildKeyUsagePatterns = (key) => {
32
32
  */
33
33
  const buildCallerWithKeyPattern = (key) => new RegExp(`\\b(?:${getCallerNamesAlternation()})\\b(?:<[^<>()]*>)?\\s*\\(\\s*['"\`]${escapeRegularExpression(key)}['"\`]`);
34
34
 
35
- //#endregion
36
35
  export { buildCallerWithKeyPattern, buildKeyUsagePatterns, getCallerNamesAlternation };
37
36
  //# sourceMappingURL=patterns.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/dictionaryUtils.ts
1
+ // src/dictionaryUtils.ts
2
2
  const LOCALE_PATTERN = /^[a-z]{2}(-[A-Z]{2})?$/;
3
3
  const META_KEYS = /* @__PURE__ */ new Set([
4
4
  "nodeType",
@@ -79,6 +79,5 @@ const formatFieldHover = (dictionaries, dictionaryKey, fieldPath) => {
79
79
  return null;
80
80
  };
81
81
 
82
- //#endregion
83
82
  export { formatDictionaryHover, formatFieldHover, formatFieldValue, getFieldByPath, getFieldsAtPath, getTopLevelFields };
84
83
  //# sourceMappingURL=dictionaryUtils.mjs.map
@@ -1,8 +1,8 @@
1
- import { getPropertyKeyName, nodeEnd, nodeStart, parseText } from "./oxcUtils.mjs";
2
1
  import { escapeRegularExpression } from "./findFieldInFile.mjs";
2
+ import { getPropertyKeyName, nodeEnd, nodeStart, parseText } from "./oxcUtils.mjs";
3
3
  import { extname } from "node:path";
4
4
 
5
- //#region src/findFieldDeclaration.ts
5
+ // src/findFieldDeclaration.ts
6
6
  const JSON_EXTENSIONS = /* @__PURE__ */ new Set([
7
7
  ".json",
8
8
  ".jsonc",
@@ -147,6 +147,5 @@ const findFieldDeclaration = (text, filePath, dictionaryKey, fieldPath) => {
147
147
  return findLeafPropertyByText(text, fieldPath);
148
148
  };
149
149
 
150
- //#endregion
151
150
  export { findFieldDeclaration };
152
151
  //# sourceMappingURL=findFieldDeclaration.mjs.map
@@ -1,7 +1,7 @@
1
1
  import { collectMessageUsages } from "./usageAnalyzer.mjs";
2
2
  import { Position, Range } from "vscode-languageserver/node";
3
3
 
4
- //#region src/findFieldInFile.ts
4
+ // src/findFieldInFile.ts
5
5
  const escapeRegularExpression = (content) => content.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
6
6
  const offsetToRange = (text, start, end) => {
7
7
  const beforeStart = text.slice(0, start);
@@ -48,6 +48,5 @@ const findFieldRangesInFile = (text, escapedKey, _fieldName, escapedField, field
48
48
  return ranges;
49
49
  };
50
50
 
51
- //#endregion
52
51
  export { escapeRegularExpression, findFieldRangesInFile, offsetToRange };
53
52
  //# sourceMappingURL=findFieldInFile.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { collectNamespaceReferences } from "./usageAnalyzer.mjs";
2
2
 
3
- //#region src/findKeyAtOffset.ts
3
+ // src/findKeyAtOffset.ts
4
4
  /**
5
5
  * Scan `text` for a caller whose namespace (dictionary key) is addressed at
6
6
  * `offset`. Returns the namespace string when the cursor is on the caller
@@ -26,6 +26,5 @@ const findKeyAtOffset = (text, offset) => {
26
26
  return null;
27
27
  };
28
28
 
29
- //#endregion
30
29
  export { findKeyAtOffset };
31
30
  //# sourceMappingURL=findKeyAtOffset.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { parseText, walkAst } from "./oxcUtils.mjs";
2
2
 
3
- //#region src/findKeyInContentFile.ts
3
+ // src/findKeyInContentFile.ts
4
4
  const KEY_DECLARATION_REGULAR_EXPRESSION = /(?:^|[{,\s])"?key"?\s*:\s*(?:(['"`])([^'"`\r\n]+)\1|([^ \t'"`{},\r\n]+))/g;
5
5
  /**
6
6
  * If `offset` falls within a `key:` declaration in a content file,
@@ -347,6 +347,5 @@ const findContentFieldAtOffsetOxc = (_text, offset, program) => {
347
347
  return foundResult;
348
348
  };
349
349
 
350
- //#endregion
351
350
  export { findContentFieldAtOffset, findKeyInContentFile };
352
351
  //# sourceMappingURL=findKeyInContentFile.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { findMessageUsageAtOffset } from "./usageAnalyzer.mjs";
2
2
 
3
- //#region src/findTCallAtOffset.ts
3
+ // src/findTCallAtOffset.ts
4
4
  /**
5
5
  * Detect when the cursor is on a message usage carrying an explicit id: a
6
6
  * `t('key')` call from any translator caller, a self call
@@ -28,6 +28,5 @@ const findTCallAtOffset = (text, offset) => {
28
28
  };
29
29
  };
30
30
 
31
- //#endregion
32
31
  export { findTCallAtOffset };
33
32
  //# sourceMappingURL=findTCallAtOffset.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { findMessageUsageAtOffset } from "./usageAnalyzer.mjs";
2
2
 
3
- //#region src/findUsageFieldAtOffset.ts
3
+ // src/findUsageFieldAtOffset.ts
4
4
  /**
5
5
  * Detect when the cursor is on a field name that was obtained from a
6
6
  * useIntlayer / getIntlayer call in the same file. Two patterns:
@@ -28,6 +28,5 @@ const findUsageFieldAtOffset = (text, offset) => {
28
28
  };
29
29
  };
30
30
 
31
- //#endregion
32
31
  export { findUsageFieldAtOffset };
33
32
  //# sourceMappingURL=findUsageFieldAtOffset.mjs.map
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { parseText, walkAst } from "./oxcUtils.mjs";
3
- import { DICTIONARIES_NOT_BUILT_NOTIFICATION } from "./protocol.mjs";
4
- import { collectNamespaceReferences, findMessageUsageAtOffset, matchCallNamespace } from "./usageAnalyzer.mjs";
5
- import { escapeRegularExpression, findFieldRangesInFile, offsetToRange } from "./findFieldInFile.mjs";
6
- import { findFieldDeclaration } from "./findFieldDeclaration.mjs";
7
- import { formatDictionaryHover, formatFieldHover, formatFieldValue, getFieldByPath, getFieldsAtPath } from "./dictionaryUtils.mjs";
8
- import { resolveDictionaryTarget } from "./resolveDictionaryTarget.mjs";
9
2
  import { buildCallerWithKeyPattern, buildKeyUsagePatterns, getCallerNamesAlternation } from "./callers/patterns.mjs";
3
+ import { formatDictionaryHover, formatFieldHover, formatFieldValue, getFieldByPath, getFieldsAtPath } from "./dictionaryUtils.mjs";
4
+ import { findFieldDeclaration } from "./findFieldDeclaration.mjs";
5
+ import { escapeRegularExpression, findFieldRangesInFile, offsetToRange } from "./findFieldInFile.mjs";
10
6
  import { findKeyAtOffset } from "./findKeyAtOffset.mjs";
11
7
  import { findContentFieldAtOffset, findKeyInContentFile } from "./findKeyInContentFile.mjs";
12
- import { dirname, isAbsolute, join } from "node:path";
8
+ import { parseText, walkAst } from "./oxcUtils.mjs";
9
+ import { DICTIONARIES_NOT_BUILT_NOTIFICATION } from "./protocol.mjs";
10
+ import { resolveDictionaryTarget } from "./resolveDictionaryTarget.mjs";
11
+ import { collectNamespaceReferences, findMessageUsageAtOffset, matchCallNamespace } from "./usageAnalyzer.mjs";
13
12
  import { CompletionItemKind, DiagnosticSeverity, Location, MarkupKind, Position, ProposedFeatures, Range, TextDocumentSyncKind, TextDocuments, createConnection } from "vscode-languageserver/node";
13
+ import { dirname, isAbsolute, join } from "node:path";
14
14
  import { readFile } from "node:fs/promises";
15
15
  import { pathToFileURL } from "node:url";
16
16
  import { getConfiguration, searchConfigurationFile } from "@intlayer/config/node";
@@ -19,7 +19,7 @@ import { getUnmergedDictionaries } from "@intlayer/dictionaries-entry/unmerged";
19
19
  import { buildComponentFilesList } from "@intlayer/engine/utils";
20
20
  import { TextDocument } from "vscode-languageserver-textdocument";
21
21
 
22
- //#region src/index.ts
22
+ // src/index.ts
23
23
  const connection = createConnection(ProposedFeatures.all);
24
24
  const documents = new TextDocuments(TextDocument);
25
25
  /**
@@ -582,5 +582,4 @@ connection.onDidChangeWatchedFiles(() => {
582
582
  documents.listen(connection);
583
583
  connection.listen();
584
584
 
585
- //#endregion
586
585
  //# sourceMappingURL=index.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { parseSync } from "oxc-parser";
2
2
 
3
- //#region src/oxcUtils.ts
3
+ // src/oxcUtils.ts
4
4
  /**
5
5
  * Parse `text` into an Oxc program AST.
6
6
  * Returns null when the parse completely fails (e.g. unsupported syntax).
@@ -125,6 +125,5 @@ const getPropertyKeyName = (keyNode) => {
125
125
  return null;
126
126
  };
127
127
 
128
- //#endregion
129
128
  export { buildParentMap, getFirstStringArg, getObjectPropertyNode, getObjectPropertyString, getPropertyKeyName, getStaticStringValue, getStringArgAt, isStringLiteralNode, nodeContainsOffset, nodeEnd, nodeStart, parseText, walkAst };
130
129
  //# sourceMappingURL=oxcUtils.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/protocol.ts
1
+ // src/protocol.ts
2
2
  /**
3
3
  * Custom notifications the Intlayer language server sends to its client, on
4
4
  * top of the standard LSP surface. Kept in a dedicated module so the client
@@ -17,6 +17,5 @@
17
17
  */
18
18
  const DICTIONARIES_NOT_BUILT_NOTIFICATION = "intlayer/dictionariesNotBuilt";
19
19
 
20
- //#endregion
21
20
  export { DICTIONARIES_NOT_BUILT_NOTIFICATION };
22
21
  //# sourceMappingURL=protocol.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { getLibraryRootDictionaryKey } from "./usageAnalyzer.mjs";
2
2
 
3
- //#region src/resolveDictionaryTarget.ts
3
+ // src/resolveDictionaryTarget.ts
4
4
  /**
5
5
  * Dictionary produced by a JSON source holding a whole namespace-less catalog
6
6
  * (`./locales/{{locale}}.json`), which i18next's default namespace resolves to.
@@ -96,6 +96,5 @@ const resolveDictionaryTarget = async (target, loadDictionaries) => {
96
96
  return fallback;
97
97
  };
98
98
 
99
- //#endregion
100
99
  export { findContentPath, getUsageTargetCandidates, resolveDictionaryTarget };
101
100
  //# sourceMappingURL=resolveDictionaryTarget.mjs.map
@@ -1,8 +1,8 @@
1
- import { buildParentMap, getObjectPropertyNode, getObjectPropertyString, getPropertyKeyName, getStaticStringValue, nodeEnd, nodeStart, parseText, walkAst } from "./oxcUtils.mjs";
2
1
  import { callers_exports } from "./callers/index.mjs";
3
2
  import { EDITOR_CALLERS } from "./callers/editorCallers.mjs";
3
+ import { buildParentMap, getObjectPropertyNode, getObjectPropertyString, getPropertyKeyName, getStaticStringValue, nodeEnd, nodeStart, parseText, walkAst } from "./oxcUtils.mjs";
4
4
 
5
- //#region src/usageAnalyzer.ts
5
+ // src/usageAnalyzer.ts
6
6
  /**
7
7
  * Property names that are framework accessors rather than content fields
8
8
  * (react `.value`, vue refs `.value`, editor `.raw`/`.use`): they are skipped
@@ -906,6 +906,5 @@ const findMessageUsageAtOffset = (text, offset) => {
906
906
  return bestMatch;
907
907
  };
908
908
 
909
- //#endregion
910
909
  export { collectCallerBindings, collectMessageUsages, collectNamespaceReferences, findMessageUsageAtOffset, getLibraryRootDictionaryKey, matchCallNamespace };
911
910
  //# sourceMappingURL=usageAnalyzer.mjs.map
@@ -1,15 +1,15 @@
1
- import { buildParentMap, getFirstStringArg, getObjectPropertyNode, getObjectPropertyString, getPropertyKeyName, getStaticStringValue, getStringArgAt, isStringLiteralNode, nodeContainsOffset, nodeEnd, nodeStart, parseText, walkAst } from "./oxcUtils.mjs";
2
- import { DICTIONARIES_NOT_BUILT_NOTIFICATION } from "./protocol.mjs";
3
1
  import { callers_exports } from "./callers/index.mjs";
4
- import { collectCallerBindings, collectMessageUsages, collectNamespaceReferences, findMessageUsageAtOffset, matchCallNamespace } from "./usageAnalyzer.mjs";
5
- import { escapeRegularExpression, findFieldRangesInFile, offsetToRange } from "./findFieldInFile.mjs";
6
- import { findFieldDeclaration } from "./findFieldDeclaration.mjs";
7
- import { findContentPath, getUsageTargetCandidates, resolveDictionaryTarget } from "./resolveDictionaryTarget.mjs";
8
2
  import { buildCallerWithKeyPattern, buildKeyUsagePatterns, getCallerNamesAlternation } from "./callers/patterns.mjs";
3
+ import { findFieldDeclaration } from "./findFieldDeclaration.mjs";
4
+ import { escapeRegularExpression, findFieldRangesInFile, offsetToRange } from "./findFieldInFile.mjs";
9
5
  import { findKeyAtOffset } from "./findKeyAtOffset.mjs";
10
6
  import { findContentFieldAtOffset, findKeyInContentFile } from "./findKeyInContentFile.mjs";
11
- import { findUsageFieldAtOffset } from "./findUsageFieldAtOffset.mjs";
12
7
  import { findTCallAtOffset } from "./findTCallAtOffset.mjs";
8
+ import { findUsageFieldAtOffset } from "./findUsageFieldAtOffset.mjs";
9
+ import { buildParentMap, getFirstStringArg, getObjectPropertyNode, getObjectPropertyString, getPropertyKeyName, getStaticStringValue, getStringArgAt, isStringLiteralNode, nodeContainsOffset, nodeEnd, nodeStart, parseText, walkAst } from "./oxcUtils.mjs";
10
+ import { DICTIONARIES_NOT_BUILT_NOTIFICATION } from "./protocol.mjs";
11
+ import { findContentPath, getUsageTargetCandidates, resolveDictionaryTarget } from "./resolveDictionaryTarget.mjs";
12
+ import { collectCallerBindings, collectMessageUsages, collectNamespaceReferences, findMessageUsageAtOffset, matchCallNamespace } from "./usageAnalyzer.mjs";
13
13
 
14
14
  var ALL_CALLERS = callers_exports.ALL_CALLERS;
15
15
  var BASE_CALLERS = callers_exports.BASE_CALLERS;
@@ -1,5 +1,4 @@
1
1
  import { CallerDescriptor } from "@intlayer/config/callers";
2
- //#region src/callers/editorCallers.d.ts
3
2
  /**
4
3
  * Callers recognised by the editor tooling only (go-to-definition, hover,
5
4
  * references) — deliberately kept out of the shared registry in
@@ -11,5 +10,4 @@ import { CallerDescriptor } from "@intlayer/config/callers";
11
10
  * (`index`) when that segment names no dictionary.
12
11
  */
13
12
  export declare const EDITOR_CALLERS: CallerDescriptor[];
14
- //#endregion
15
13
  //# sourceMappingURL=editorCallers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editorCallers.d.ts","names":[],"sources":["../../../src/callers/editorCallers.ts"],"mappings":";;;;;;;;;;;;qBAwBa,gBAAgB"}
1
+ {"version":3,"file":"editorCallers.d.ts","names":[],"sources":["../../../src/callers/editorCallers.ts"],"mappings":";;;;;;;;;;;qBAwBa,gBAAgB"}
@@ -1,5 +1,4 @@
1
1
  export * from "@intlayer/config/callers";
2
2
  import * as import__intlayer_config_callers from "@intlayer/config/callers";
3
- //#endregion
4
3
  export { import__intlayer_config_callers as index_d_exports };
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
- //#region src/callers/patterns.d.ts
2
1
  /**
3
2
  * Alternation of every caller name whose dictionary key appears as a
4
3
  * positional string argument — for building text-search patterns.
@@ -25,5 +24,4 @@ export declare const buildKeyUsagePatterns: (key: string) => RegExp[];
25
24
  * @param key - The dictionary key.
26
25
  */
27
26
  export declare const buildCallerWithKeyPattern: (key: string) => RegExp;
28
- //#endregion
29
27
  //# sourceMappingURL=patterns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"patterns.d.ts","names":[],"sources":["../../../src/callers/patterns.ts"],"mappings":";;;;;qBAOa;;;;;;;;;;;;;;qBAgBA,wBAAyB,gBAAc;;;;;;;qBAqBvC,4BAA6B,gBAAc"}
1
+ {"version":3,"file":"patterns.d.ts","names":[],"sources":["../../../src/callers/patterns.ts"],"mappings":";;;;qBAOa;;;;;;;;;;;;;;qBAgBA,wBAAyB,gBAAc;;;;;;;qBAqBvC,4BAA6B,gBAAc"}
@@ -1,10 +1,8 @@
1
1
  import { Dictionary } from "@intlayer/types/dictionary";
2
- //#region src/dictionaryUtils.d.ts
3
2
  export declare const formatFieldValue: (value: unknown) => string;
4
3
  export declare const getFieldByPath: (content: unknown, path: string[]) => unknown;
5
4
  export declare const getTopLevelFields: (content: unknown) => string[];
6
5
  export declare const getFieldsAtPath: (content: unknown, path: string[]) => string[];
7
6
  export declare const formatDictionaryHover: (dictionaries: Dictionary[], key: string) => string;
8
7
  export declare const formatFieldHover: (dictionaries: Dictionary[], dictionaryKey: string, fieldPath: string[]) => string | null;
9
- //#endregion
10
8
  //# sourceMappingURL=dictionaryUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionaryUtils.d.ts","names":[],"sources":["../../src/dictionaryUtils.ts"],"mappings":";;qBAoDa,mBAAoB;qBAoBpB,iBAAkB,kBAAkB;qBAYpC,oBAAqB;qBAKrB,kBAAmB,kBAAkB;qBASrC,wBACX,cAAc,cACd;qBAyBW,mBACX,cAAc,cACd,uBACA"}
1
+ {"version":3,"file":"dictionaryUtils.d.ts","names":[],"sources":["../../src/dictionaryUtils.ts"],"mappings":";qBAoDa,mBAAoB;qBAoBpB,iBAAkB,kBAAkB;qBAYpC,oBAAqB;qBAKrB,kBAAmB,kBAAkB;qBASrC,wBACX,cAAc,cACd;qBAyBW,mBACX,cAAc,cACd,uBACA"}
@@ -1,4 +1,3 @@
1
- //#region src/findFieldDeclaration.d.ts
2
1
  /** Offsets of a declaration inside a file's text. */
3
2
  export type OffsetSpan = {
4
3
  start: number;
@@ -20,5 +19,4 @@ export type OffsetSpan = {
20
19
  * @returns The span of the property key, or `null` when not found.
21
20
  */
22
21
  export declare const findFieldDeclaration: (text: string, filePath: string, dictionaryKey: string, fieldPath: string[]) => OffsetSpan | null;
23
- //#endregion
24
22
  //# sourceMappingURL=findFieldDeclaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findFieldDeclaration.d.ts","names":[],"sources":["../../src/findFieldDeclaration.ts"],"mappings":";;YAWY;EAAe;EAAe;;;;;;;;;;;;;;;;;qBAuN7B,uBACX,cACA,kBACA,uBACA,wBACC"}
1
+ {"version":3,"file":"findFieldDeclaration.d.ts","names":[],"sources":["../../src/findFieldDeclaration.ts"],"mappings":";YAWY;EAAe;EAAe;;;;;;;;;;;;;;;;;qBAuN7B,uBACX,cACA,kBACA,uBACA,wBACC"}
@@ -1,5 +1,4 @@
1
1
  import { Range } from "vscode-languageserver/node";
2
- //#region src/findFieldInFile.d.ts
3
2
  export declare const escapeRegularExpression: (content: string) => string;
4
3
  export declare const offsetToRange: (text: string, start: number, end: number) => Range;
5
4
  /**
@@ -22,5 +21,4 @@ export declare const offsetToRange: (text: string, start: number, end: number) =
22
21
  * backward compatibility.
23
22
  */
24
23
  export declare const findFieldRangesInFile: (text: string, escapedKey: string, _fieldName: string, escapedField: string, fieldPath?: string[]) => Range[];
25
- //#endregion
26
24
  //# sourceMappingURL=findFieldInFile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findFieldInFile.d.ts","names":[],"sources":["../../src/findFieldInFile.ts"],"mappings":";;qBAGa,0BAA2B;qBAG3B,gBACX,cACA,eACA,gBACC;;;;;;;;;;;;;;;;;;;;qBAiCU,wBACX,cACA,oBACA,oBACA,sBACA,yBACC"}
1
+ {"version":3,"file":"findFieldInFile.d.ts","names":[],"sources":["../../src/findFieldInFile.ts"],"mappings":";qBAGa,0BAA2B;qBAG3B,gBACX,cACA,eACA,gBACC;;;;;;;;;;;;;;;;;;;;qBAiCU,wBACX,cACA,oBACA,oBACA,sBACA,yBACC"}
@@ -1,4 +1,3 @@
1
- //#region src/findKeyAtOffset.d.ts
2
1
  /**
3
2
  * Scan `text` for a caller whose namespace (dictionary key) is addressed at
4
3
  * `offset`. Returns the namespace string when the cursor is on the caller
@@ -16,5 +15,4 @@
16
15
  * namespace declarations — they are resolved by `findMessageUsageAtOffset`.
17
16
  */
18
17
  export declare const findKeyAtOffset: (text: string, offset: number) => string | null;
19
- //#endregion
20
18
  //# sourceMappingURL=findKeyAtOffset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findKeyAtOffset.d.ts","names":[],"sources":["../../src/findKeyAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAkBa,kBACX,cACA"}
1
+ {"version":3,"file":"findKeyAtOffset.d.ts","names":[],"sources":["../../src/findKeyAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;;qBAkBa,kBACX,cACA"}
@@ -1,4 +1,3 @@
1
- //#region src/findKeyInContentFile.d.ts
2
1
  /**
3
2
  * If `offset` falls within a `key:` declaration in a content file,
4
3
  * return the declared key string; otherwise return null.
@@ -28,5 +27,5 @@ type FieldResult = {
28
27
  fieldName: string;
29
28
  fieldPath: string[];
30
29
  };
31
- //#endregion
30
+ export {};
32
31
  //# sourceMappingURL=findKeyInContentFile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findKeyInContentFile.d.ts","names":[],"sources":["../../src/findKeyInContentFile.ts"],"mappings":";;;;;;;;;qBAea,uBACX,cACA;;;;;;;;;;;;;;;qBA4BW,2BACX,cACA,gBACA,2BACC;KA4LE;EACH;EACA;EACA"}
1
+ {"version":3,"file":"findKeyInContentFile.d.ts","names":[],"sources":["../../src/findKeyInContentFile.ts"],"mappings":";;;;;;;;qBAea,uBACX,cACA;;;;;;;;;;;;;;;qBA4BW,2BACX,cACA,gBACA,2BACC;KA4LE;EACH;EACA;EACA"}
@@ -1,4 +1,3 @@
1
- //#region src/findTCallAtOffset.d.ts
2
1
  /**
3
2
  * Detect when the cursor is on a message usage carrying an explicit id: a
4
3
  * `t('key')` call from any translator caller, a self call
@@ -19,5 +18,4 @@ export declare const findTCallAtOffset: (text: string, offset: number) => {
19
18
  dictionaryKey: string;
20
19
  fieldName: string;
21
20
  } | null;
22
- //#endregion
23
21
  //# sourceMappingURL=findTCallAtOffset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findTCallAtOffset.d.ts","names":[],"sources":["../../src/findTCallAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAkBa,oBACX,cACA;EACG;EAAuB"}
1
+ {"version":3,"file":"findTCallAtOffset.d.ts","names":[],"sources":["../../src/findTCallAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;;qBAkBa,oBACX,cACA;EACG;EAAuB"}
@@ -1,4 +1,3 @@
1
- //#region src/findUsageFieldAtOffset.d.ts
2
1
  /**
3
2
  * Detect when the cursor is on a field name that was obtained from a
4
3
  * useIntlayer / getIntlayer call in the same file. Two patterns:
@@ -18,5 +17,4 @@ export declare const findUsageFieldAtOffset: (text: string, offset: number) => {
18
17
  dictionaryKey: string;
19
18
  fieldName: string;
20
19
  } | null;
21
- //#endregion
22
20
  //# sourceMappingURL=findUsageFieldAtOffset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findUsageFieldAtOffset.d.ts","names":[],"sources":["../../src/findUsageFieldAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa,yBACX,cACA;EACG;EAAuB"}
1
+ {"version":3,"file":"findUsageFieldAtOffset.d.ts","names":[],"sources":["../../src/findUsageFieldAtOffset.ts"],"mappings":";;;;;;;;;;;;;;;qBAiBa,yBACX,cACA;EACG;EAAuB"}
@@ -1,4 +1,3 @@
1
- //#region src/oxcUtils.d.ts
2
1
  export type OxcNode = Record<string, unknown>;
3
2
  /**
4
3
  * Parse `text` into an Oxc program AST.
@@ -48,5 +47,4 @@ export declare const getObjectPropertyNode: (objectExpression: OxcNode | undefin
48
47
  export declare const getObjectPropertyString: (objectExpression: OxcNode | undefined, propertyName: string) => string | null;
49
48
  /** Get the identifier or string name of an object-property key node. */
50
49
  export declare const getPropertyKeyName: (keyNode: OxcNode | undefined) => string | null;
51
- //#endregion
52
50
  //# sourceMappingURL=oxcUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oxcUtils.d.ts","names":[],"sources":["../../src/oxcUtils.ts"],"mappings":";YAEY,UAAU;;;;;;;qBAQT,YAAa,iBAAe;;;;;qBAc5B,UACX,eAEA,UAAU,MAAM;;;;;qBAyBL,iBAAkB,MAAM,YAAU,IAAI,SAAS;;qBA4B/C,YAAa,MAAM;;qBAMnB,UAAW,MAAM;;qBAMjB,qBAAsB,MAAM,SAAS;;;;;qBAOrC,sBAAuB,MAAM;;;;;qBAkB7B,uBACX,MAAM;;qBA8BK,iBACX,UAAU,SACV;;qBAUW,oBAAqB,oBAAoB;;;;qBAMzC,wBACX,kBAAkB,qBAClB,yBACC;;;;;qBA4BU,0BACX,kBAAkB,qBAClB;;qBAUW,qBACX,SAAS"}
1
+ {"version":3,"file":"oxcUtils.d.ts","names":[],"sources":["../../src/oxcUtils.ts"],"mappings":"A,YAEY,UAAU;;;;;;;qBAQT,YAAa,iBAAe;;;;;qBAc5B,UACX,eAEA,UAAU,MAAM;;;;;qBAyBL,iBAAkB,MAAM,YAAU,IAAI,SAAS;;qBA4B/C,YAAa,MAAM;;qBAMnB,UAAW,MAAM;;qBAMjB,qBAAsB,MAAM,SAAS;;;;;qBAOrC,sBAAuB,MAAM;;;;;qBAkB7B,uBACX,MAAM;;qBA8BK,iBACX,UAAU,SACV;;qBAUW,oBAAqB,oBAAoB;;;;qBAMzC,wBACX,kBAAkB,qBAClB,yBACC;;;;;qBA4BU,0BACX,kBAAkB,qBAClB;;qBAUW,qBACX,SAAS"}
@@ -1,4 +1,3 @@
1
- //#region src/protocol.d.ts
2
1
  /**
3
2
  * Custom notifications the Intlayer language server sends to its client, on
4
3
  * top of the standard LSP surface. Kept in a dedicated module so the client
@@ -21,5 +20,4 @@ export type DictionariesNotBuiltParams = {
21
20
  /** Root directory of the project whose dictionaries are missing. */
22
21
  baseDir: string;
23
22
  };
24
- //#endregion
25
23
  //# sourceMappingURL=protocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","names":[],"sources":["../../src/protocol.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAiBa;;YAID;;EAEV"}
1
+ {"version":3,"file":"protocol.d.ts","names":[],"sources":["../../src/protocol.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa;;YAID;;EAEV"}
@@ -1,4 +1,3 @@
1
- //#region src/resolveDictionaryTarget.d.ts
2
1
  /** A dictionary and the path of a field inside its content. */
3
2
  export type DictionaryTarget = {
4
3
  dictionaryKey: string;
@@ -55,5 +54,5 @@ export declare const getUsageTargetCandidates: ({ dictionaryKey, fieldPath, libr
55
54
  * @param loadDictionaries - Built dictionaries by key.
56
55
  */
57
56
  export declare const resolveDictionaryTarget: <TDictionary extends DictionaryWithContent>(target: UsageTarget, loadDictionaries: DictionaryLoader<TDictionary>) => Promise<ResolvedDictionaryTarget<TDictionary> | null>;
58
- //#endregion
57
+ export {};
59
58
  //# sourceMappingURL=resolveDictionaryTarget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveDictionaryTarget.d.ts","names":[],"sources":["../../src/resolveDictionaryTarget.ts"],"mappings":";;YAGY;EACV;EACA;;;YAIU,cAAc;;EAExB;;;YAIU,yBAAyB,eAAe;;EAElD,cAAc;;;;;EAKd;;;;;KAYG;EAA0B;;;;;YAKnB,iBAAiB,gBAC3B,0BAEE,mCAGA,QAAQ;;;;;;;;qBAwBC,kBACX,kBACA;;;;;;;;;qBA+BW,6BACX,eACA,WACA,WACC,gBAAc;;;;;;;;;qBAwCJ,0BACX,oBAAoB,uBAEpB,QAAQ,aACR,kBAAkB,iBAAiB,iBAClC,QAAQ,yBAAyB"}
1
+ {"version":3,"file":"resolveDictionaryTarget.d.ts","names":[],"sources":["../../src/resolveDictionaryTarget.ts"],"mappings":";YAGY;EACV;EACA;;;YAIU,cAAc;;EAExB;;;YAIU,yBAAyB,eAAe;;EAElD,cAAc;;;;;EAKd;;;;;KAYG;EAA0B;;;;;YAKnB,iBAAiB,gBAC3B,0BAEE,mCAGA,QAAQ;;;;;;;;qBAwBC,kBACX,kBACA;;;;;;;;;qBA+BW,6BACX,eACA,WACA,WACC,gBAAc;;;;;;;;;qBAwCJ,0BACX,oBAAoB,uBAEpB,QAAQ,aACR,kBAAkB,iBAAiB,iBAClC,QAAQ,yBAAyB"}
@@ -1,6 +1,5 @@
1
1
  import { index_d_exports } from "./callers/index.js";
2
2
  import { OxcNode } from "./oxcUtils.js";
3
- //#region src/usageAnalyzer.d.ts
4
3
  /** How a message usage appears in source code. */
5
4
  export type MessageUsageKind = "call" | "member" | "destructure" | "jsx" | "tagged-template" | "namespace";
6
5
  /**
@@ -142,5 +141,4 @@ export declare const collectCallerBindings: (text: string) => CallerVariableBind
142
141
  * @param offset - Cursor offset in `text`.
143
142
  */
144
143
  export declare const findMessageUsageAtOffset: (text: string, offset: number) => MessageUsage | null;
145
- //#endregion
146
144
  //# sourceMappingURL=usageAnalyzer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usageAnalyzer.d.ts","names":[],"sources":["../../src/usageAnalyzer.ts"],"mappings":";;;;YAyBY;;;;;YAkBA;;EAEV;;;;;EAKA;;;;;;EAMA;IAAe;IAAe;;;EAE9B;;EAEA;EACA,MAAM;;EAEN;;EAEA;;EAEA;;;;;;;EAOA;;;;;;qBA+NW,8BACX,SAAS,gBAAA;;;;;;;;;;;;qBAymCE,uBAAwB,iBAAe;;;;;;;;;qBAsCvC,qBAAsB,UAAU;;;;;;YAgCjC;EACV;EACA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;;;;;;;;;;;qBAwCW,6BACX,iBACC;;;;;;YA8DS;;EAEV;;EAEA;;;;;EAKA;;EAEA;;EAEA;EACA;;;;;;;;;qBAUW,wBACX,iBACC;;;;;;;;;;;;;;qBAkEU,2BACX,cACA,mBACC"}
1
+ {"version":3,"file":"usageAnalyzer.d.ts","names":["CallerDescriptor"],"sources":["../../src/usageAnalyzer.ts"],"mappings":";;;YAyBY;;;;;YAkBA;;EAEV;;;;;EAKA;;;;;;EAMA;IAAe;IAAe;;;EAE9B;;EAEA;EACA,MAAM;;EAEN;;EAEA;;EAEA;;;;;;;EAOA;;;;;;qBA+NW,8BACX,SAASA,gBAAAA;;;;;;;;;;;;qBAymCE,uBAAwB,iBAAe;;;;;;;;;qBAsCvC,qBAAsB,UAAU;;;;;;YAgCjC;EACV;EACA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;;;;;;;;;;;qBAwCW,6BACX,iBACC;;;;;;YA8DS;;EAEV;;EAEA;;;;;EAKA;;EAEA;;EAEA;EACA;;;;;;;;;qBAUW,wBACX,iBACC;;;;;;;;;;;;;;qBAkEU,2BACX,cACA,mBACC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/lsp",
3
- "version": "9.7.0",
3
+ "version": "9.7.1",
4
4
  "private": false,
5
5
  "description": "Intlayer Language Server. Handle LSP to help IDE and AI agent to use Intlayer",
6
6
  "keywords": [
@@ -87,13 +87,13 @@
87
87
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
88
88
  },
89
89
  "dependencies": {
90
- "@intlayer/config": "9.6.0",
91
- "@intlayer/dictionaries-entry": "9.6.0",
92
- "@intlayer/engine": "9.7.0",
93
- "@intlayer/types": "9.7.0",
94
- "oxc-parser": "0.153.0",
95
- "vscode-languageserver": "10.1.2",
96
- "vscode-languageserver-textdocument": "1.0.15"
90
+ "@intlayer/config": "9.7.1",
91
+ "@intlayer/dictionaries-entry": "9.7.1",
92
+ "@intlayer/engine": "9.7.1",
93
+ "@intlayer/types": "9.7.1",
94
+ "oxc-parser": "0.157.0",
95
+ "vscode-languageserver": "11.0.0",
96
+ "vscode-languageserver-textdocument": "1.0.16"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@types/node": "^26",
@@ -101,9 +101,9 @@
101
101
  "@utils/ts-config-types": "1.0.4",
102
102
  "@utils/tsdown-config": "1.0.4",
103
103
  "rimraf": "6.1.3",
104
- "tsdown": "0.23.0",
104
+ "tsdown": "0.23.4",
105
105
  "typescript": "7.0.2",
106
- "vitest": "5.0.3"
106
+ "vitest": "5.1.0"
107
107
  },
108
108
  "engines": {
109
109
  "node": ">=14.18"