volar-service-typescript 0.0.31-patch.1 → 0.0.32

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 (77) hide show
  1. package/index.d.ts +4 -17
  2. package/index.js +12 -545
  3. package/lib/configs/getFormatCodeSettings.d.ts +2 -3
  4. package/lib/configs/getUserPreferences.d.ts +1 -1
  5. package/lib/plugins/directiveComment.d.ts +3 -0
  6. package/lib/plugins/directiveComment.js +65 -0
  7. package/lib/plugins/docCommentTemplate.d.ts +3 -0
  8. package/lib/{features/completions/jsDoc.js → plugins/docCommentTemplate.js} +42 -30
  9. package/lib/plugins/semantic.d.ts +23 -0
  10. package/lib/plugins/semantic.js +706 -0
  11. package/lib/plugins/syntactic.d.ts +7 -0
  12. package/lib/plugins/syntactic.js +92 -0
  13. package/lib/{features → semanticFeatures}/codeAction.d.ts +3 -2
  14. package/lib/{features → semanticFeatures}/codeAction.js +14 -17
  15. package/lib/{features → semanticFeatures}/codeActionResolve.d.ts +1 -1
  16. package/lib/{features → semanticFeatures}/codeActionResolve.js +7 -7
  17. package/lib/semanticFeatures/semanticTokens.d.ts +5 -0
  18. package/lib/{features → semanticFeatures}/semanticTokens.js +4 -8
  19. package/lib/{types.d.ts → semanticFeatures/types.d.ts} +1 -2
  20. package/lib/shared.d.ts +1 -0
  21. package/lib/shared.js +5 -1
  22. package/lib/syntacticLanguageService.d.ts +7 -0
  23. package/lib/syntacticLanguageService.js +38 -0
  24. package/lib/utils/lspConverters.d.ts +27 -0
  25. package/lib/utils/lspConverters.js +782 -0
  26. package/lib/utils/previewer.d.ts +5 -11
  27. package/lib/utils/previewer.js +30 -35
  28. package/package.json +5 -6
  29. package/lib/features/callHierarchy.d.ts +0 -8
  30. package/lib/features/callHierarchy.js +0 -102
  31. package/lib/features/completions/basic.d.ts +0 -17
  32. package/lib/features/completions/basic.js +0 -326
  33. package/lib/features/completions/directiveComment.d.ts +0 -4
  34. package/lib/features/completions/directiveComment.js +0 -54
  35. package/lib/features/completions/jsDoc.d.ts +0 -4
  36. package/lib/features/completions/resolve.d.ts +0 -6
  37. package/lib/features/completions/resolve.js +0 -146
  38. package/lib/features/definition.d.ts +0 -4
  39. package/lib/features/definition.js +0 -20
  40. package/lib/features/diagnostics.d.ts +0 -11
  41. package/lib/features/diagnostics.js +0 -120
  42. package/lib/features/documentHighlight.d.ts +0 -4
  43. package/lib/features/documentHighlight.js +0 -32
  44. package/lib/features/documentSymbol.d.ts +0 -4
  45. package/lib/features/documentSymbol.js +0 -94
  46. package/lib/features/fileReferences.d.ts +0 -4
  47. package/lib/features/fileReferences.js +0 -19
  48. package/lib/features/fileRename.d.ts +0 -4
  49. package/lib/features/fileRename.js +0 -25
  50. package/lib/features/foldingRanges.d.ts +0 -4
  51. package/lib/features/foldingRanges.js +0 -55
  52. package/lib/features/formatting.d.ts +0 -8
  53. package/lib/features/formatting.js +0 -55
  54. package/lib/features/hover.d.ts +0 -4
  55. package/lib/features/hover.js +0 -43
  56. package/lib/features/implementation.d.ts +0 -4
  57. package/lib/features/implementation.js +0 -20
  58. package/lib/features/inlayHints.d.ts +0 -4
  59. package/lib/features/inlayHints.js +0 -34
  60. package/lib/features/prepareRename.d.ts +0 -9
  61. package/lib/features/prepareRename.js +0 -27
  62. package/lib/features/references.d.ts +0 -4
  63. package/lib/features/references.js +0 -35
  64. package/lib/features/rename.d.ts +0 -6
  65. package/lib/features/rename.js +0 -116
  66. package/lib/features/selectionRanges.d.ts +0 -4
  67. package/lib/features/selectionRanges.js +0 -32
  68. package/lib/features/semanticTokens.d.ts +0 -4
  69. package/lib/features/signatureHelp.d.ts +0 -4
  70. package/lib/features/signatureHelp.js +0 -63
  71. package/lib/features/typeDefinition.d.ts +0 -4
  72. package/lib/features/typeDefinition.js +0 -20
  73. package/lib/features/workspaceSymbol.d.ts +0 -4
  74. package/lib/features/workspaceSymbol.js +0 -63
  75. package/lib/utils/transforms.d.ts +0 -15
  76. package/lib/utils/transforms.js +0 -85
  77. /package/lib/{types.js → semanticFeatures/types.js} +0 -0
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.boundSpanToLocationLinks = exports.entriesToLocationLinks = exports.entryToLocation = exports.entriesToLocations = void 0;
4
- function entriesToLocations(entries, ctx) {
5
- return entries
6
- .map(entry => entryToLocation(entry, ctx))
7
- .filter((location) => !!location);
8
- }
9
- exports.entriesToLocations = entriesToLocations;
10
- function entryToLocation(entry, ctx) {
11
- const entryUri = ctx.fileNameToUri(entry.fileName);
12
- const doc = ctx.getTextDocument(entryUri);
13
- if (!doc)
14
- return;
15
- const range = {
16
- start: doc.positionAt(entry.textSpan.start),
17
- end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
18
- };
19
- const location = { uri: entryUri, range };
20
- return location;
21
- }
22
- exports.entryToLocation = entryToLocation;
23
- function entriesToLocationLinks(entries, ctx) {
24
- const locations = [];
25
- for (const entry of entries) {
26
- const entryUri = ctx.fileNameToUri(entry.fileName);
27
- const doc = ctx.getTextDocument(entryUri);
28
- if (!doc)
29
- continue;
30
- const targetSelectionRange = {
31
- start: doc.positionAt(entry.textSpan.start),
32
- end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
33
- };
34
- const targetRange = entry.contextSpan ? {
35
- start: doc.positionAt(entry.contextSpan.start),
36
- end: doc.positionAt(entry.contextSpan.start + entry.contextSpan.length),
37
- } : targetSelectionRange;
38
- const originSelectionRange = entry.originalTextSpan ? {
39
- start: doc.positionAt(entry.originalTextSpan.start),
40
- end: doc.positionAt(entry.originalTextSpan.start + entry.originalTextSpan.length),
41
- } : undefined;
42
- const location = {
43
- targetUri: entryUri,
44
- targetRange,
45
- targetSelectionRange,
46
- originSelectionRange,
47
- };
48
- locations.push(location);
49
- }
50
- return locations;
51
- }
52
- exports.entriesToLocationLinks = entriesToLocationLinks;
53
- function boundSpanToLocationLinks(info, originalDoc, ctx) {
54
- const locations = [];
55
- if (!info.definitions)
56
- return locations;
57
- const originSelectionRange = {
58
- start: originalDoc.positionAt(info.textSpan.start),
59
- end: originalDoc.positionAt(info.textSpan.start + info.textSpan.length),
60
- };
61
- for (const entry of info.definitions) {
62
- const entryUri = ctx.fileNameToUri(entry.fileName);
63
- const doc = ctx.getTextDocument(entryUri);
64
- if (!doc)
65
- continue;
66
- const targetSelectionRange = {
67
- start: doc.positionAt(entry.textSpan.start),
68
- end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
69
- };
70
- const targetRange = entry.contextSpan ? {
71
- start: doc.positionAt(entry.contextSpan.start),
72
- end: doc.positionAt(entry.contextSpan.start + entry.contextSpan.length),
73
- } : targetSelectionRange;
74
- const location = {
75
- targetUri: entryUri,
76
- targetRange,
77
- targetSelectionRange,
78
- originSelectionRange,
79
- };
80
- locations.push(location);
81
- }
82
- return locations;
83
- }
84
- exports.boundSpanToLocationLinks = boundSpanToLocationLinks;
85
- //# sourceMappingURL=transforms.js.map
File without changes