@adecore/editor-react 0.0.1 → 0.17.0-beta.2

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 (264) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +60 -0
  3. package/dist/AnchoredPopup.d.ts +12 -0
  4. package/dist/AnchoredPopup.js +27 -0
  5. package/dist/AttributionCard.d.ts +14 -0
  6. package/dist/AttributionCard.js +5 -0
  7. package/dist/BaselineStatus.d.ts +4 -0
  8. package/dist/BaselineStatus.js +13 -0
  9. package/dist/ChangeReview.d.ts +12 -0
  10. package/dist/ChangeReview.js +27 -0
  11. package/dist/CodeAuthorsCard.d.ts +6 -0
  12. package/dist/CodeAuthorsCard.js +22 -0
  13. package/dist/CompletionPopup.d.ts +8 -0
  14. package/dist/CompletionPopup.js +103 -0
  15. package/dist/EditorContextMenu.d.ts +8 -0
  16. package/dist/EditorContextMenu.js +23 -0
  17. package/dist/EditorView.d.ts +16 -0
  18. package/dist/EditorView.js +27 -0
  19. package/dist/FindReplace.d.ts +6 -0
  20. package/dist/FindReplace.js +44 -0
  21. package/dist/HoverCard.d.ts +11 -0
  22. package/dist/HoverCard.js +38 -0
  23. package/dist/HoverSections.d.ts +21 -0
  24. package/dist/HoverSections.js +82 -0
  25. package/dist/LanguagePopups.d.ts +6 -0
  26. package/dist/LanguagePopups.js +38 -0
  27. package/dist/Markdown.d.ts +3 -0
  28. package/dist/Markdown.js +7 -0
  29. package/dist/PathText.d.ts +4 -0
  30. package/dist/PathText.js +12 -0
  31. package/dist/PeekPanel.d.ts +6 -0
  32. package/dist/PeekPanel.js +111 -0
  33. package/dist/PickPopup.d.ts +8 -0
  34. package/dist/PickPopup.js +33 -0
  35. package/dist/RenameCard.d.ts +9 -0
  36. package/dist/RenameCard.js +108 -0
  37. package/dist/SignatureCard.d.ts +4 -0
  38. package/dist/SignatureCard.js +8 -0
  39. package/dist/SymbolPicker.d.ts +6 -0
  40. package/dist/SymbolPicker.js +108 -0
  41. package/dist/code-actions-model.d.ts +23 -0
  42. package/dist/code-actions-model.js +114 -0
  43. package/dist/code-actions.d.ts +30 -0
  44. package/dist/code-actions.js +326 -0
  45. package/dist/code-authors.d.ts +18 -0
  46. package/dist/code-authors.js +79 -0
  47. package/dist/code-vision-model.d.ts +21 -0
  48. package/dist/code-vision-model.js +183 -0
  49. package/dist/code-vision.d.ts +48 -0
  50. package/dist/code-vision.js +236 -0
  51. package/dist/completion-call.d.ts +24 -0
  52. package/dist/completion-call.js +110 -0
  53. package/dist/completion-model.d.ts +51 -0
  54. package/dist/completion-model.js +353 -0
  55. package/dist/completion.d.ts +43 -0
  56. package/dist/completion.js +463 -0
  57. package/dist/conflict-model.d.ts +15 -0
  58. package/dist/conflict-model.js +36 -0
  59. package/dist/context-menu.d.ts +10 -0
  60. package/dist/context-menu.js +55 -0
  61. package/dist/definition-link.d.ts +14 -0
  62. package/dist/definition-link.js +99 -0
  63. package/dist/diagnostics-model.d.ts +15 -0
  64. package/dist/diagnostics-model.js +83 -0
  65. package/dist/diagnostics.d.ts +23 -0
  66. package/dist/diagnostics.js +95 -0
  67. package/dist/editor-language.d.ts +65 -0
  68. package/dist/editor-language.js +170 -0
  69. package/dist/editor-react.css +43 -0
  70. package/dist/find-query.d.ts +26 -0
  71. package/dist/find-query.js +51 -0
  72. package/dist/folding.d.ts +16 -0
  73. package/dist/folding.js +95 -0
  74. package/dist/highlight-layers.d.ts +10 -0
  75. package/dist/highlight-layers.js +30 -0
  76. package/dist/highlights.d.ts +16 -0
  77. package/dist/highlights.js +102 -0
  78. package/dist/history.d.ts +8 -0
  79. package/dist/history.js +46 -0
  80. package/dist/holder.d.ts +5 -0
  81. package/dist/holder.js +19 -0
  82. package/dist/host-types.d.ts +45 -0
  83. package/dist/host-types.js +1 -0
  84. package/dist/hover-content.d.ts +45 -0
  85. package/dist/hover-content.js +198 -0
  86. package/dist/hover.d.ts +32 -0
  87. package/dist/hover.js +260 -0
  88. package/dist/index.d.ts +44 -0
  89. package/dist/index.js +28 -0
  90. package/dist/inlay-hints.d.ts +13 -0
  91. package/dist/inlay-hints.js +71 -0
  92. package/dist/language-ids.d.ts +3 -0
  93. package/dist/language-ids.js +49 -0
  94. package/dist/line-edits.d.ts +8 -0
  95. package/dist/line-edits.js +39 -0
  96. package/dist/locales/en.json +171 -0
  97. package/dist/locales/nl.json +171 -0
  98. package/dist/models.d.ts +20 -0
  99. package/dist/models.js +20 -0
  100. package/dist/navigation-history.d.ts +16 -0
  101. package/dist/navigation-history.js +53 -0
  102. package/dist/navigation.d.ts +23 -0
  103. package/dist/navigation.js +155 -0
  104. package/dist/paths.d.ts +1 -0
  105. package/dist/paths.js +3 -0
  106. package/dist/peek-model.d.ts +28 -0
  107. package/dist/peek-model.js +104 -0
  108. package/dist/peek.d.ts +30 -0
  109. package/dist/peek.js +215 -0
  110. package/dist/pick.d.ts +34 -0
  111. package/dist/pick.js +166 -0
  112. package/dist/popup-placement.d.ts +23 -0
  113. package/dist/popup-placement.js +34 -0
  114. package/dist/popups.d.ts +133 -0
  115. package/dist/popups.js +14 -0
  116. package/dist/project-language.d.ts +36 -0
  117. package/dist/project-language.js +190 -0
  118. package/dist/project-problems.d.ts +24 -0
  119. package/dist/project-problems.js +63 -0
  120. package/dist/proposal-model.d.ts +36 -0
  121. package/dist/proposal-model.js +197 -0
  122. package/dist/recent-choices.d.ts +10 -0
  123. package/dist/recent-choices.js +39 -0
  124. package/dist/refresher.d.ts +13 -0
  125. package/dist/refresher.js +50 -0
  126. package/dist/relative-time.d.ts +1 -0
  127. package/dist/relative-time.js +9 -0
  128. package/dist/rename-model.d.ts +25 -0
  129. package/dist/rename-model.js +93 -0
  130. package/dist/rename.d.ts +21 -0
  131. package/dist/rename.js +257 -0
  132. package/dist/rendering-context.d.ts +6 -0
  133. package/dist/rendering-context.js +5 -0
  134. package/dist/rendering.d.ts +6 -0
  135. package/dist/rendering.js +5 -0
  136. package/dist/review-group.d.ts +16 -0
  137. package/dist/review-group.js +54 -0
  138. package/dist/row-host.d.ts +42 -0
  139. package/dist/row-host.js +120 -0
  140. package/dist/selection-ranges.d.ts +7 -0
  141. package/dist/selection-ranges.js +26 -0
  142. package/dist/semantic-model.d.ts +4 -0
  143. package/dist/semantic-model.js +76 -0
  144. package/dist/semantic-tokens.d.ts +6 -0
  145. package/dist/semantic-tokens.js +38 -0
  146. package/dist/shortcut-keys.d.ts +91 -0
  147. package/dist/shortcut-keys.js +12 -0
  148. package/dist/signature-model.d.ts +18 -0
  149. package/dist/signature-model.js +33 -0
  150. package/dist/signature.d.ts +22 -0
  151. package/dist/signature.js +150 -0
  152. package/dist/snippet-session.d.ts +17 -0
  153. package/dist/snippet-session.js +110 -0
  154. package/dist/snippet.d.ts +11 -0
  155. package/dist/snippet.js +134 -0
  156. package/dist/symbol-links.d.ts +6 -0
  157. package/dist/symbol-links.js +50 -0
  158. package/dist/symbol-picker-model.d.ts +44 -0
  159. package/dist/symbol-picker-model.js +146 -0
  160. package/dist/symbol-picker.d.ts +12 -0
  161. package/dist/symbol-picker.js +76 -0
  162. package/dist/symbols.d.ts +11 -0
  163. package/dist/symbols.js +95 -0
  164. package/dist/testing.d.ts +57 -0
  165. package/dist/testing.js +156 -0
  166. package/dist/timers.d.ts +14 -0
  167. package/dist/timers.js +34 -0
  168. package/dist/use-problem-counts.d.ts +3 -0
  169. package/dist/use-problem-counts.js +20 -0
  170. package/dist/view-state.d.ts +21 -0
  171. package/dist/view-state.js +63 -0
  172. package/dist/word-diff.d.ts +1 -0
  173. package/dist/word-diff.js +32 -0
  174. package/dist/workspace-edit.d.ts +21 -0
  175. package/dist/workspace-edit.js +147 -0
  176. package/package.json +74 -2
  177. package/src/AnchoredPopup.tsx +51 -0
  178. package/src/AttributionCard.tsx +36 -0
  179. package/src/BaselineStatus.tsx +20 -0
  180. package/src/ChangeReview.tsx +43 -0
  181. package/src/CodeAuthorsCard.tsx +81 -0
  182. package/src/CompletionPopup.tsx +196 -0
  183. package/src/EditorContextMenu.tsx +67 -0
  184. package/src/EditorView.tsx +47 -0
  185. package/src/FindReplace.tsx +89 -0
  186. package/src/HoverCard.tsx +121 -0
  187. package/src/HoverSections.tsx +146 -0
  188. package/src/LanguagePopups.tsx +65 -0
  189. package/src/Markdown.tsx +11 -0
  190. package/src/PathText.tsx +18 -0
  191. package/src/PeekPanel.tsx +222 -0
  192. package/src/PickPopup.tsx +102 -0
  193. package/src/RenameCard.tsx +219 -0
  194. package/src/SignatureCard.tsx +42 -0
  195. package/src/SymbolPicker.tsx +219 -0
  196. package/src/code-actions-model.ts +146 -0
  197. package/src/code-actions.ts +384 -0
  198. package/src/code-authors.ts +104 -0
  199. package/src/code-vision-model.ts +230 -0
  200. package/src/code-vision.ts +269 -0
  201. package/src/completion-call.ts +139 -0
  202. package/src/completion-model.ts +440 -0
  203. package/src/completion.ts +500 -0
  204. package/src/conflict-model.ts +56 -0
  205. package/src/context-menu.ts +63 -0
  206. package/src/definition-link.ts +106 -0
  207. package/src/diagnostics-model.ts +102 -0
  208. package/src/diagnostics.ts +117 -0
  209. package/src/editor-language.ts +189 -0
  210. package/src/editor-react.css +43 -0
  211. package/src/find-query.ts +74 -0
  212. package/src/folding.ts +110 -0
  213. package/src/highlight-layers.ts +37 -0
  214. package/src/highlights.ts +123 -0
  215. package/src/history.ts +56 -0
  216. package/src/holder.ts +19 -0
  217. package/src/host-types.ts +52 -0
  218. package/src/hover-content.ts +264 -0
  219. package/src/hover.ts +280 -0
  220. package/src/index.ts +63 -0
  221. package/src/inlay-hints.ts +85 -0
  222. package/src/language-ids.ts +54 -0
  223. package/src/line-edits.ts +48 -0
  224. package/src/locales/en.json +171 -0
  225. package/src/locales/nl.json +171 -0
  226. package/src/models.ts +157 -0
  227. package/src/navigation-history.ts +69 -0
  228. package/src/navigation.ts +168 -0
  229. package/src/paths.ts +3 -0
  230. package/src/peek-model.ts +147 -0
  231. package/src/peek.ts +247 -0
  232. package/src/pick.ts +197 -0
  233. package/src/popup-placement.ts +64 -0
  234. package/src/popups.ts +204 -0
  235. package/src/project-language.ts +223 -0
  236. package/src/project-problems.ts +87 -0
  237. package/src/proposal-model.ts +259 -0
  238. package/src/recent-choices.ts +48 -0
  239. package/src/refresher.ts +56 -0
  240. package/src/relative-time.ts +10 -0
  241. package/src/rename-model.ts +130 -0
  242. package/src/rename.ts +290 -0
  243. package/src/rendering-context.ts +12 -0
  244. package/src/rendering.tsx +6 -0
  245. package/src/review-group.ts +70 -0
  246. package/src/row-host.ts +158 -0
  247. package/src/selection-ranges.ts +32 -0
  248. package/src/semantic-model.ts +80 -0
  249. package/src/semantic-tokens.ts +46 -0
  250. package/src/shortcut-keys.ts +21 -0
  251. package/src/signature-model.ts +49 -0
  252. package/src/signature.ts +164 -0
  253. package/src/snippet-session.ts +122 -0
  254. package/src/snippet.ts +147 -0
  255. package/src/symbol-links.ts +72 -0
  256. package/src/symbol-picker-model.ts +198 -0
  257. package/src/symbol-picker.ts +85 -0
  258. package/src/symbols.ts +110 -0
  259. package/src/testing.ts +240 -0
  260. package/src/timers.ts +45 -0
  261. package/src/use-problem-counts.ts +25 -0
  262. package/src/view-state.ts +88 -0
  263. package/src/word-diff.ts +35 -0
  264. package/src/workspace-edit.ts +194 -0
@@ -0,0 +1,171 @@
1
+ {
2
+ "language": {
3
+ "hover": {
4
+ "quickFix": "Quick fix…",
5
+ "quickFixNone": "This language server offers no quick fixes",
6
+ "definition": "Go to definition",
7
+ "references_one": "{{formatted}} reference",
8
+ "references_other": "{{formatted}} references",
9
+ "none": "No information for this position"
10
+ },
11
+ "edit": {
12
+ "staged_one": "{{count}} file changed and not saved yet",
13
+ "staged_other": "{{count}} files changed and not saved yet",
14
+ "stagedMore": "{{names}} and {{count}} more",
15
+ "saveAll": "Save all",
16
+ "notSaved": "{{name}} could not be saved"
17
+ },
18
+ "actions": {
19
+ "show": "Show code actions",
20
+ "none": "No code actions here",
21
+ "unavailable": "No language server offers code actions here",
22
+ "organized": "The imports are already organized",
23
+ "noFormatter": "No language server formats this file",
24
+ "readOnly": "This file is read only",
25
+ "failed": "Could not apply the action: {{message}}",
26
+ "refused": "The edit was refused",
27
+ "moreLines": "{{count}} more lines",
28
+ "otherFiles_one": "and {{count}} other file",
29
+ "otherFiles_other": "and {{count}} other files",
30
+ "moves_one": "moves {{count}} file",
31
+ "moves_other": "moves {{count}} files",
32
+ "groups": {
33
+ "quickfix": "Quick fix",
34
+ "rewrite": "Rewrite",
35
+ "extract": "Extract",
36
+ "inline": "Inline",
37
+ "move": "Move",
38
+ "refactor": "Refactor",
39
+ "source": "Source",
40
+ "other": "Other"
41
+ }
42
+ },
43
+ "rename": {
44
+ "unavailable": "No language server renames in this file",
45
+ "nothing": "There is nothing to rename here",
46
+ "refused": "The language server refused the new name",
47
+ "stale": "The text changed while the rename was being asked for",
48
+ "failed": "Could not rename: {{message}}",
49
+ "occurrences_one": "{{formatted}} occurrence",
50
+ "occurrences_other": "{{formatted}} occurrences",
51
+ "occurrencesFiles_one": "{{formatted}} occurrence in {{files}} files",
52
+ "occurrencesFiles_other": "{{formatted}} occurrences in {{files}} files",
53
+ "rename": "Rename",
54
+ "preview": "Preview",
55
+ "cancel": "Cancel",
56
+ "apply": "Rename",
57
+ "suggestions": "Suggested names",
58
+ "useSuggestion": "Use suggestion"
59
+ },
60
+ "navigation": {
61
+ "unavailable": "No language server answers that here",
62
+ "none": "Nothing found",
63
+ "failed": "Could not look it up: {{message}}",
64
+ "titles": {
65
+ "definition": "Definitions",
66
+ "declaration": "Declarations",
67
+ "typeDefinition": "Type definitions",
68
+ "implementation": "Implementations",
69
+ "symbol": "Matches"
70
+ }
71
+ },
72
+ "peek": {
73
+ "unavailable": "No language server finds references in this file",
74
+ "none": "No references found",
75
+ "failed": "Could not look up the references: {{message}}",
76
+ "references_one": "{{formatted}} reference",
77
+ "references_other": "{{formatted}} references",
78
+ "close": "Close",
79
+ "collapse": "Collapse",
80
+ "expand": "Expand",
81
+ "definitions_one": "{{formatted}} definition",
82
+ "definitions_other": "{{formatted}} definitions",
83
+ "noDefinition": "No definition found",
84
+ "unavailableDefinition": "No language server finds definitions in this file"
85
+ },
86
+ "codeVision": {
87
+ "usagesNone": "No usages",
88
+ "usages_one": "{{formatted}} usage",
89
+ "usages_other": "{{formatted}} usages",
90
+ "newCode": "new *",
91
+ "lines_one": "{{formatted}} line",
92
+ "lines_other": "{{formatted}} lines",
93
+ "uncommitted": "Not committed yet",
94
+ "latest": "Latest change",
95
+ "showCommit": "Show commit"
96
+ },
97
+ "symbols": {
98
+ "unavailable": "No language server knows the symbols of this file",
99
+ "failed": "Could not read the symbols: {{message}}",
100
+ "placeholder": "Go to symbol in {{file}}",
101
+ "navigate": "Navigate",
102
+ "open": "Open",
103
+ "workspace": "Workspace symbols",
104
+ "line": "Go to line",
105
+ "none": "No matching symbols",
106
+ "workspaceHint": "Type the name of a symbol in the project",
107
+ "lineHint": "Type a line number",
108
+ "goToLine": "Go to line {{line}}",
109
+ "groups": {
110
+ "namespaces": "Namespaces",
111
+ "classes": "Classes",
112
+ "interfaces": "Interfaces",
113
+ "enums": "Enums",
114
+ "functions": "Functions",
115
+ "methods": "Methods",
116
+ "properties": "Properties",
117
+ "variables": "Variables",
118
+ "constants": "Constants",
119
+ "other": "Other"
120
+ }
121
+ },
122
+ "context": {
123
+ "refactor": "Refactor",
124
+ "cut": "Cut",
125
+ "copy": "Copy",
126
+ "paste": "Paste"
127
+ },
128
+ "completion": {
129
+ "insert": "Insert",
130
+ "replace": "Replace",
131
+ "details": "Details",
132
+ "none": "No suggestions"
133
+ },
134
+ "history": {
135
+ "recent": "Recent locations"
136
+ }
137
+ },
138
+ "commands": {
139
+ "goToDefinition": "Go to definition",
140
+ "goToTypeDefinition": "Go to type definition",
141
+ "goToImplementation": "Go to implementation",
142
+ "peekReferences": "Peek references",
143
+ "renameSymbol": "Rename symbol",
144
+ "codeActions": "Code actions",
145
+ "formatDocument": "Format document"
146
+ },
147
+ "find": {
148
+ "label": "Find",
149
+ "count": "{{current}} / {{total}}",
150
+ "none": "No results",
151
+ "invalid": "Invalid regular expression",
152
+ "caseSensitive": "Match case",
153
+ "wholeWord": "Match whole word",
154
+ "regex": "Use regular expression",
155
+ "inSelection": "In selection",
156
+ "noSelection": "No selection",
157
+ "selectAll": "Select all matches",
158
+ "previous": "Previous match",
159
+ "next": "Next match",
160
+ "close": "Close",
161
+ "replace": {
162
+ "label": "Replace with",
163
+ "one": "Replace",
164
+ "all": "All",
165
+ "allLabel": "Replace all",
166
+ "preserveCase": "Preserve case",
167
+ "toggle": "Show replace",
168
+ "hide": "Hide replace"
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "language": {
3
+ "hover": {
4
+ "quickFix": "Quick fix…",
5
+ "quickFixNone": "Deze language server biedt geen quick fixes",
6
+ "definition": "Ga naar definitie",
7
+ "references_one": "{{formatted}} referentie",
8
+ "references_other": "{{formatted}} referenties",
9
+ "none": "Geen informatie voor deze plek"
10
+ },
11
+ "edit": {
12
+ "staged_one": "{{count}} bestand gewijzigd en nog niet opgeslagen",
13
+ "staged_other": "{{count}} bestanden gewijzigd en nog niet opgeslagen",
14
+ "stagedMore": "{{names}} en nog {{count}}",
15
+ "saveAll": "Alles opslaan",
16
+ "notSaved": "{{name}} kon niet worden opgeslagen"
17
+ },
18
+ "actions": {
19
+ "show": "Toon code actions",
20
+ "none": "Geen code actions hier",
21
+ "unavailable": "Geen language server biedt hier code actions",
22
+ "organized": "De imports zijn al georganiseerd",
23
+ "noFormatter": "Geen language server formatteert dit bestand",
24
+ "readOnly": "Dit bestand is alleen-lezen",
25
+ "failed": "De actie kon niet worden toegepast: {{message}}",
26
+ "refused": "De wijziging is geweigerd",
27
+ "moreLines": "nog {{count}} regels",
28
+ "otherFiles_one": "en nog {{count}} bestand",
29
+ "otherFiles_other": "en nog {{count}} bestanden",
30
+ "moves_one": "verplaatst {{count}} bestand",
31
+ "moves_other": "verplaatst {{count}} bestanden",
32
+ "groups": {
33
+ "quickfix": "Quick fix",
34
+ "rewrite": "Herschrijven",
35
+ "extract": "Extraheren",
36
+ "inline": "Inline",
37
+ "move": "Verplaatsen",
38
+ "refactor": "Refactor",
39
+ "source": "Source",
40
+ "other": "Overig"
41
+ }
42
+ },
43
+ "rename": {
44
+ "unavailable": "Geen language server hernoemt in dit bestand",
45
+ "nothing": "Hier is niets om te hernoemen",
46
+ "refused": "De language server weigerde de nieuwe naam",
47
+ "stale": "De tekst veranderde terwijl de hernoeming werd opgevraagd",
48
+ "failed": "Hernoemen mislukt: {{message}}",
49
+ "occurrences_one": "{{formatted}} voorkomen",
50
+ "occurrences_other": "{{formatted}} voorkomens",
51
+ "occurrencesFiles_one": "{{formatted}} voorkomen in {{files}} bestanden",
52
+ "occurrencesFiles_other": "{{formatted}} voorkomens in {{files}} bestanden",
53
+ "rename": "Hernoem",
54
+ "preview": "Voorbeeld",
55
+ "cancel": "Annuleer",
56
+ "apply": "Hernoem",
57
+ "suggestions": "Voorgestelde namen",
58
+ "useSuggestion": "Suggestie gebruiken"
59
+ },
60
+ "navigation": {
61
+ "unavailable": "Geen language server die dat hier beantwoordt",
62
+ "none": "Niets gevonden",
63
+ "failed": "Opzoeken mislukt: {{message}}",
64
+ "titles": {
65
+ "definition": "Definities",
66
+ "declaration": "Declaraties",
67
+ "typeDefinition": "Typedefinities",
68
+ "implementation": "Implementaties",
69
+ "symbol": "Overeenkomsten"
70
+ }
71
+ },
72
+ "peek": {
73
+ "unavailable": "Geen language server vindt referenties in dit bestand",
74
+ "none": "Geen referenties gevonden",
75
+ "failed": "Referenties opzoeken mislukt: {{message}}",
76
+ "references_one": "{{formatted}} referentie",
77
+ "references_other": "{{formatted}} referenties",
78
+ "close": "Sluit",
79
+ "collapse": "Inklappen",
80
+ "expand": "Uitklappen",
81
+ "definitions_one": "{{formatted}} definitie",
82
+ "definitions_other": "{{formatted}} definities",
83
+ "noDefinition": "Geen definitie gevonden",
84
+ "unavailableDefinition": "Geen language server vindt definities in dit bestand"
85
+ },
86
+ "codeVision": {
87
+ "usagesNone": "Niet gebruikt",
88
+ "usages_one": "{{formatted}} keer gebruikt",
89
+ "usages_other": "{{formatted}} keer gebruikt",
90
+ "newCode": "nieuw *",
91
+ "lines_one": "{{formatted}} regel",
92
+ "lines_other": "{{formatted}} regels",
93
+ "uncommitted": "Nog niet gecommit",
94
+ "latest": "Laatste wijziging",
95
+ "showCommit": "Commit tonen"
96
+ },
97
+ "symbols": {
98
+ "unavailable": "Geen language server kent de symbolen van dit bestand",
99
+ "failed": "De symbolen konden niet worden gelezen: {{message}}",
100
+ "placeholder": "Ga naar symbool in {{file}}",
101
+ "navigate": "Navigeer",
102
+ "open": "Open",
103
+ "workspace": "Symbolen in het project",
104
+ "line": "Ga naar regel",
105
+ "none": "Geen symbolen gevonden",
106
+ "workspaceHint": "Typ de naam van een symbool in het project",
107
+ "lineHint": "Typ een regelnummer",
108
+ "goToLine": "Ga naar regel {{line}}",
109
+ "groups": {
110
+ "namespaces": "Namespaces",
111
+ "classes": "Classes",
112
+ "interfaces": "Interfaces",
113
+ "enums": "Enums",
114
+ "functions": "Functies",
115
+ "methods": "Methoden",
116
+ "properties": "Properties",
117
+ "variables": "Variabelen",
118
+ "constants": "Constanten",
119
+ "other": "Overig"
120
+ }
121
+ },
122
+ "context": {
123
+ "refactor": "Refactor",
124
+ "cut": "Knip",
125
+ "copy": "Kopieer",
126
+ "paste": "Plak"
127
+ },
128
+ "completion": {
129
+ "insert": "Invoegen",
130
+ "replace": "Vervangen",
131
+ "details": "Details",
132
+ "none": "Geen suggesties"
133
+ },
134
+ "history": {
135
+ "recent": "Recente plekken"
136
+ }
137
+ },
138
+ "commands": {
139
+ "goToDefinition": "Ga naar definitie",
140
+ "goToTypeDefinition": "Ga naar typedefinitie",
141
+ "goToImplementation": "Ga naar implementatie",
142
+ "peekReferences": "Bekijk referenties",
143
+ "renameSymbol": "Symbool hernoemen",
144
+ "codeActions": "Codeacties",
145
+ "formatDocument": "Document formatteren"
146
+ },
147
+ "find": {
148
+ "label": "Zoeken",
149
+ "count": "{{current}} / {{total}}",
150
+ "none": "Geen resultaten",
151
+ "invalid": "Ongeldige reguliere expressie",
152
+ "caseSensitive": "Hoofdlettergevoelig",
153
+ "wholeWord": "Heel woord",
154
+ "regex": "Reguliere expressie gebruiken",
155
+ "inSelection": "In selectie",
156
+ "noSelection": "Geen selectie",
157
+ "selectAll": "Alle treffers selecteren",
158
+ "previous": "Vorige treffer",
159
+ "next": "Volgende treffer",
160
+ "close": "Sluiten",
161
+ "replace": {
162
+ "label": "Vervangen door",
163
+ "one": "Vervang",
164
+ "all": "Alles",
165
+ "allLabel": "Alles vervangen",
166
+ "preserveCase": "Hoofdletters behouden",
167
+ "toggle": "Vervangen tonen",
168
+ "hide": "Vervangen verbergen"
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,20 @@
1
+ export { isIdentifierCharacter, identifierPrefix, type MatchDetail, matchDetail, matchScore, editRangeOf, itemsOf, prefixFor, type Ranked, rankCompletions, matchedCharacters, qualifierOf, qualifiersOf, snippetToText, METHOD_KIND, FUNCTION_KIND, CONSTRUCTOR_KIND, CLASS_KIND, SNIPPET_FORMAT, type Insertion, insertionOf, mirroredInsertions, documentationText, completionDocsOf, type KindTone, kindLetterOf, kindToneOf, type RowWindow, rowWindow } from './completion-model.ts';
2
+ export { PARAMETER_HINTS_COMMAND, type CallPlan, type CallSite, isCallItem, hasParameters, planCall, withParentheses } from './completion-call.ts';
3
+ export { type Problem, severityOf, markerOf, comparePositions, shiftPosition, shiftRange, rangeHolds, problemsAt, neighborProblem, codeLabelOf } from './diagnostics-model.ts';
4
+ export { type SignatureBlock, type HoverText, splitSignatures, hoverTextOf, isEmptyHover, locationsOf, sameRange, type DocTag, splitDocTags, type HoverSection, type BaselineLevel, type Baseline, docblockMarkdown, type MarkdownPart, markdownParts, hoverSectionsOf } from './hover-content.ts';
5
+ export { type SignatureViewModel, parameterSpan, signatureViewOf } from './signature-model.ts';
6
+ export { wordRangeAt, type RenameTarget, renameTargetOf, type Occurrences, occurrencesOf, type RenameRow, type RenameFile, renameRowsOf, renamePreviewOf } from './rename-model.ts';
7
+ export { type NameRange, type PeekPlace, type PeekFile, PEEK_READ_FILES, peekFilesOf, type PeekSnippet, snippetOf, definitionSnippetOf, distinguishingFolders, visualColumnOf } from './peek-model.ts';
8
+ export { type SymbolGroup, SYMBOL_GROUPS, groupOfKind, letterOfKind, type SymbolTone, toneOfKind, type SymbolEntry, entriesOf, scoreOf, filterEntries, type EntryGroup, groupEntries, type PickerMode, modeOf, type WorkspaceEntry, workspaceEntriesOf } from './symbol-picker-model.ts';
9
+ export { SYMBOL_LINK_CLASS, isTypeName, linkTypeNames, declaredNameOf, placesOfName } from './symbol-links.ts';
10
+ export { scopesOf, decodeSemanticTokens } from './semantic-model.ts';
11
+ export { type ActionGroup, ACTION_GROUPS, REFACTOR_GROUPS, type ActionEntry, groupOf, actionsOf, mergeEntries, isHint, fixableOnLine, diagnosticsAt, type EditPreview, previewOf } from './code-actions-model.ts';
12
+ export { MAX_DECLARATIONS, type CodeVisionDeclaration, type DeclarationSource, startAfterComments, declarationsOf, usagesText } from './code-vision-model.ts';
13
+ export { UNCOMMITTED, mapBlame, type CodeAuthor, type CodeAuthorship, shortName, authorshipOf, authorsText } from './code-authors.ts';
14
+ export { type SnippetStop, type ParsedSnippet, parseSnippet, tabOrder } from './snippet.ts';
15
+ export { type LineSpan, lineSpanOf, isEmptyRange, inlineRangeOf, type InlineProblem, problemsOnLines, type InlineAnswer, parseAnswer, fitReplacement, endOfInsertion, type DiffSegment, diffSegments, emphasisOf, offsetOf, textInRange, replaceRange, locateSelection } from './proposal-model.ts';
16
+ export { type LineReplacement, replaceLines, replaceAllLines } from './line-edits.ts';
17
+ export { replacedWords } from './word-diff.ts';
18
+ export { type FindOptions, type FindQuery, EMPTY_FIND_QUERY, type TextMatch, type CompiledFind, MATCH_LIMIT, compileFind, matchesIn, stepIndex } from './find-query.ts';
19
+ export { type PopupSize, type PopupPlacement, type PlaceOptions, placePopup, placeBeside } from './popup-placement.ts';
20
+ export { planConflict, type ConflictStretch, type ConflictPlan } from './conflict-model.ts';
package/dist/models.js ADDED
@@ -0,0 +1,20 @@
1
+ export { isIdentifierCharacter, identifierPrefix, matchDetail, matchScore, editRangeOf, itemsOf, prefixFor, rankCompletions, matchedCharacters, qualifierOf, qualifiersOf, snippetToText, METHOD_KIND, FUNCTION_KIND, CONSTRUCTOR_KIND, CLASS_KIND, SNIPPET_FORMAT, insertionOf, mirroredInsertions, documentationText, completionDocsOf, kindLetterOf, kindToneOf, rowWindow } from './completion-model.js';
2
+ export { PARAMETER_HINTS_COMMAND, isCallItem, hasParameters, planCall, withParentheses } from './completion-call.js';
3
+ export { severityOf, markerOf, comparePositions, shiftPosition, shiftRange, rangeHolds, problemsAt, neighborProblem, codeLabelOf } from './diagnostics-model.js';
4
+ export { splitSignatures, hoverTextOf, isEmptyHover, locationsOf, sameRange, splitDocTags, docblockMarkdown, markdownParts, hoverSectionsOf } from './hover-content.js';
5
+ export { parameterSpan, signatureViewOf } from './signature-model.js';
6
+ export { wordRangeAt, renameTargetOf, occurrencesOf, renameRowsOf, renamePreviewOf } from './rename-model.js';
7
+ export { PEEK_READ_FILES, peekFilesOf, snippetOf, definitionSnippetOf, distinguishingFolders, visualColumnOf } from './peek-model.js';
8
+ export { SYMBOL_GROUPS, groupOfKind, letterOfKind, toneOfKind, entriesOf, scoreOf, filterEntries, groupEntries, modeOf, workspaceEntriesOf } from './symbol-picker-model.js';
9
+ export { SYMBOL_LINK_CLASS, isTypeName, linkTypeNames, declaredNameOf, placesOfName } from './symbol-links.js';
10
+ export { scopesOf, decodeSemanticTokens } from './semantic-model.js';
11
+ export { ACTION_GROUPS, REFACTOR_GROUPS, groupOf, actionsOf, mergeEntries, isHint, fixableOnLine, diagnosticsAt, previewOf } from './code-actions-model.js';
12
+ export { MAX_DECLARATIONS, startAfterComments, declarationsOf, usagesText } from './code-vision-model.js';
13
+ export { UNCOMMITTED, mapBlame, shortName, authorshipOf, authorsText } from './code-authors.js';
14
+ export { parseSnippet, tabOrder } from './snippet.js';
15
+ export { lineSpanOf, isEmptyRange, inlineRangeOf, problemsOnLines, parseAnswer, fitReplacement, endOfInsertion, diffSegments, emphasisOf, offsetOf, textInRange, replaceRange, locateSelection } from './proposal-model.js';
16
+ export { replaceLines, replaceAllLines } from './line-edits.js';
17
+ export { replacedWords } from './word-diff.js';
18
+ export { EMPTY_FIND_QUERY, MATCH_LIMIT, compileFind, matchesIn, stepIndex } from './find-query.js';
19
+ export { placePopup, placeBeside } from './popup-placement.js';
20
+ export { planConflict } from './conflict-model.js';
@@ -0,0 +1,16 @@
1
+ import type { EditorPosition } from '@adecore/editor';
2
+ export interface Place {
3
+ readonly uri: string;
4
+ readonly position: EditorPosition;
5
+ }
6
+ export declare class NavigationHistory {
7
+ private backs;
8
+ private forwards;
9
+ record(from: Place): void;
10
+ back(current: Place): Place | null;
11
+ forward(current: Place): Place | null;
12
+ canGoBack(current: Place): boolean;
13
+ canGoForward(current: Place): boolean;
14
+ recent(current: Place): Place[];
15
+ private walk;
16
+ }
@@ -0,0 +1,53 @@
1
+ const LIMIT = 100;
2
+ /* Two places on one line of one file are one place: a jump lands wherever, and walking back should not stop twice on the same line. */
3
+ function samePlace(left, right) {
4
+ return left.uri === right.uri && left.position.line === right.position.line;
5
+ }
6
+ /*
7
+ * Where the caret was before each jump, for Back and Forward. A jump records the place it left and
8
+ * forgets what Forward knew; walking back moves the place it left onto Forward, and the other way round.
9
+ * One history serves every editor of a project, so it walks across files.
10
+ */
11
+ export class NavigationHistory {
12
+ backs = [];
13
+ forwards = [];
14
+ record(from) {
15
+ if (this.backs.length > 0 && samePlace(this.backs[this.backs.length - 1], from)) {
16
+ this.backs[this.backs.length - 1] = from;
17
+ }
18
+ else {
19
+ this.backs.push(from);
20
+ if (this.backs.length > LIMIT) {
21
+ this.backs.shift();
22
+ }
23
+ }
24
+ this.forwards = [];
25
+ }
26
+ /* The place before `current`, which Forward then returns to; null when there is none. */
27
+ back(current) {
28
+ return this.walk(this.backs, this.forwards, current);
29
+ }
30
+ forward(current) {
31
+ return this.walk(this.forwards, this.backs, current);
32
+ }
33
+ canGoBack(current) {
34
+ return this.backs.some((place) => !samePlace(place, current));
35
+ }
36
+ canGoForward(current) {
37
+ return this.forwards.some((place) => !samePlace(place, current));
38
+ }
39
+ /* Every place in the history but the one the caret is on, the latest first: where Back would go, then where Forward would. */
40
+ recent(current) {
41
+ return [...this.backs.toReversed(), ...this.forwards.toReversed()].filter((place) => !samePlace(place, current));
42
+ }
43
+ walk(from, to, current) {
44
+ while (from.length > 0) {
45
+ const place = from.pop();
46
+ if (!samePlace(place, current)) {
47
+ to.push(current);
48
+ return place;
49
+ }
50
+ }
51
+ return null;
52
+ }
53
+ }
@@ -0,0 +1,23 @@
1
+ import { type Location, type NavigationResult, type Range } from '@adecore/lsp';
2
+ import type { EditorPosition } from '@adecore/editor';
3
+ import type { EditorLanguage } from './editor-language.ts';
4
+ export type NavigationKind = 'definition' | 'declaration' | 'typeDefinition' | 'implementation';
5
+ export declare function uniquePlaces(result: NavigationResult): {
6
+ location: Location;
7
+ target: Range | null;
8
+ }[];
9
+ export declare function uniqueLocations(result: NavigationResult): Location[];
10
+ export declare class NavigationFeature {
11
+ private readonly language;
12
+ constructor(language: EditorLanguage);
13
+ supports(kind: NavigationKind): boolean;
14
+ go(kind: NavigationKind, position?: EditorPosition): Promise<void>;
15
+ goToName(name: string, anchor: EditorPosition, own: Location | null): Promise<void>;
16
+ private tell;
17
+ private say;
18
+ }
19
+ export declare function locationRow(location: Location, stored: string | null): {
20
+ label: string;
21
+ detail: string;
22
+ path: true;
23
+ };
@@ -0,0 +1,155 @@
1
+ import { StaleResultError, fileUriToPath } from '@adecore/lsp';
2
+ import { basenameOf } from './paths.js';
3
+ import { rangeHolds } from './diagnostics-model.js';
4
+ import { placesOfName } from './symbol-links.js';
5
+ import { isShortcut } from './shortcut-keys.js';
6
+ const METHODS = {
7
+ definition: 'textDocument/definition',
8
+ declaration: 'textDocument/declaration',
9
+ typeDefinition: 'textDocument/typeDefinition',
10
+ implementation: 'textDocument/implementation'
11
+ };
12
+ const SHORTCUT_KINDS = [
13
+ ['definition', 'goToDefinition'],
14
+ ['typeDefinition', 'goToTypeDefinition'],
15
+ ['implementation', 'goToImplementation']
16
+ ];
17
+ const TOAST_ID = 'language-navigation';
18
+ /* The places of a result, each once: the two servers of a Vue file may both know the same one. `target` is the whole declaration when the server gave it. */
19
+ export function uniquePlaces(result) {
20
+ const seen = new Set();
21
+ const list = result === null ? [] : Array.isArray(result) ? result : [result];
22
+ return list
23
+ .map((entry) => 'targetUri' in entry
24
+ ? { location: { uri: entry.targetUri, range: entry.targetSelectionRange }, target: entry.targetRange }
25
+ : { location: entry, target: null })
26
+ .filter(({ location }) => {
27
+ const { start } = location.range;
28
+ const key = `${location.uri}\0${start.line}\0${start.character}`;
29
+ if (seen.has(key)) {
30
+ return false;
31
+ }
32
+ seen.add(key);
33
+ return true;
34
+ });
35
+ }
36
+ /* The places of a result, each once. */
37
+ export function uniqueLocations(result) {
38
+ return uniquePlaces(result).map(({ location }) => location);
39
+ }
40
+ /*
41
+ * Going to where a name is defined, declared, typed or implemented: Mod+click on the name or a shortcut
42
+ * for the caret. One place opens at once, in this file or in the one it lives in, the way a file opens in
43
+ * the host; several are listed under the name to choose from.
44
+ */
45
+ export class NavigationFeature {
46
+ language;
47
+ constructor(language) {
48
+ this.language = language;
49
+ const { editor } = language;
50
+ const offs = [
51
+ editor.onClick((click) => {
52
+ if (!click.mod || click.alt || click.shift || !this.supports('definition')) {
53
+ return false;
54
+ }
55
+ void this.go('definition', click.position);
56
+ return true;
57
+ }),
58
+ editor.onKeyDown((event) => {
59
+ const found = SHORTCUT_KINDS.find(([, name]) => isShortcut(this.language.shortcuts[name], event));
60
+ if (found === undefined) {
61
+ return false;
62
+ }
63
+ void this.go(found[0]);
64
+ return true;
65
+ })
66
+ ];
67
+ language.onDispose(() => {
68
+ for (const off of offs) {
69
+ off();
70
+ }
71
+ });
72
+ }
73
+ supports(kind) {
74
+ return this.language.project.service.supports(METHODS[kind], this.language.uri);
75
+ }
76
+ async go(kind, position = this.language.editor.getCaret()) {
77
+ const { project, uri, editor } = this.language;
78
+ if (!this.supports(kind)) {
79
+ this.tell(this.say('unavailable'));
80
+ return;
81
+ }
82
+ let result;
83
+ try {
84
+ const { service } = project;
85
+ result = await (kind === 'definition'
86
+ ? service.definition(uri, position)
87
+ : kind === 'declaration'
88
+ ? service.declaration(uri, position)
89
+ : kind === 'typeDefinition'
90
+ ? service.typeDefinition(uri, position)
91
+ : service.implementation(uri, position));
92
+ }
93
+ catch (error) {
94
+ if (!(error instanceof StaleResultError)) {
95
+ this.tell(this.say('failed', { message: error instanceof Error ? error.message : String(error) }));
96
+ }
97
+ return;
98
+ }
99
+ const places = uniqueLocations(result);
100
+ if (places.length === 0) {
101
+ this.tell(this.say('none'));
102
+ }
103
+ else if (kind === 'definition' && places.length === 1 && places[0].uri === uri && rangeHolds(places[0].range, position)) {
104
+ // The name is its own definition, so what a person wants to see is where it is used.
105
+ void this.language.peek.open(position);
106
+ }
107
+ else if (places.length === 1) {
108
+ this.language.goTo(places[0]);
109
+ }
110
+ else {
111
+ this.language.locations(places, position, this.say(`titles.${kind}`));
112
+ }
113
+ editor.focus();
114
+ }
115
+ /*
116
+ * A name in the signature of a hover, which is a snippet and no document a server can be asked about by position.
117
+ * The symbol the signature declares goes to the definition the hover already knows; any other name is looked
118
+ * up by name among the symbols of the project. One match goes there at once, several are listed, and none says nothing.
119
+ */
120
+ async goToName(name, anchor, own) {
121
+ const { project, uri, editor } = this.language;
122
+ if (own !== null) {
123
+ this.language.goTo(own);
124
+ return;
125
+ }
126
+ if (!project.service.supports('workspace/symbol', uri)) {
127
+ return;
128
+ }
129
+ try {
130
+ const places = placesOfName(await project.service.workspaceSymbols(uri, name), name, editor.getText());
131
+ if (places.length === 1) {
132
+ this.language.goTo(places[0]);
133
+ }
134
+ else if (places.length > 1) {
135
+ this.language.locations(places, anchor, this.say('titles.symbol'));
136
+ }
137
+ }
138
+ catch {
139
+ // A name that cannot be found is a link that does nothing, not an error.
140
+ }
141
+ }
142
+ tell(title) {
143
+ this.language.project.host.notify?.({ id: TOAST_ID, kind: 'error', title });
144
+ }
145
+ say(key, options) {
146
+ return this.language.project.i18n.t(`editor:language.navigation.${key}`, options);
147
+ }
148
+ }
149
+ /* How a place reads in a list: the file and the line, with the folder it is in. */
150
+ export function locationRow(location, stored) {
151
+ const path = stored ?? fileUriToPath(location.uri) ?? location.uri;
152
+ const name = basenameOf(path);
153
+ const folder = path.slice(0, Math.max(0, path.length - name.length)).replace(/\/$/, '');
154
+ return { label: `${name}:${location.range.start.line + 1}`, detail: folder, path: true };
155
+ }
@@ -0,0 +1 @@
1
+ export declare function basenameOf(path: string): string;
package/dist/paths.js ADDED
@@ -0,0 +1,3 @@
1
+ export function basenameOf(path) {
2
+ return path.replaceAll('\\', '/').split('/').at(-1) ?? path;
3
+ }