@adecore/editor-react 0.31.11 → 0.32.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/dist/AnchoredPopup.js +73 -19
- package/dist/AttributionCard.js +162 -4
- package/dist/BaselineStatus.js +62 -8
- package/dist/CallHierarchyPanel.js +977 -60
- package/dist/ChangeReview.js +76 -25
- package/dist/CodeAuthorsCard.js +314 -14
- package/dist/CompletionPopup.js +490 -83
- package/dist/DiffView.js +548 -181
- package/dist/EditorContextMenu.js +352 -34
- package/dist/EditorView.js +276 -99
- package/dist/FindReplace.js +525 -67
- package/dist/HoverCard.js +378 -38
- package/dist/HoverSections.js +367 -56
- package/dist/LanguagePopups.js +95 -34
- package/dist/Markdown.js +41 -6
- package/dist/PanelResizeHandle.js +199 -66
- package/dist/PathText.js +49 -7
- package/dist/PeekPanel.js +675 -72
- package/dist/PickPopup.js +304 -34
- package/dist/RenameCard.js +679 -85
- package/dist/RenderedDocs.js +329 -58
- package/dist/SignatureCard.js +91 -7
- package/dist/SplitDiffView.js +344 -254
- package/dist/SymbolPicker.js +440 -85
- package/dist/call-hierarchy-model.js +102 -68
- package/dist/call-hierarchy.js +458 -359
- package/dist/code-actions-model.js +88 -76
- package/dist/code-actions.js +372 -283
- package/dist/code-authors.js +64 -55
- package/dist/code-vision-model.js +134 -127
- package/dist/code-vision.js +224 -206
- package/dist/completion-call.js +94 -67
- package/dist/completion-model.js +334 -244
- package/dist/completion.js +840 -649
- package/dist/conflict-model.js +35 -29
- package/dist/context-menu-rows.js +42 -17
- package/dist/context-menu.js +64 -46
- package/dist/definition-link.js +88 -85
- package/dist/diagnostics-model.js +74 -55
- package/dist/diagnostics.js +121 -100
- package/dist/diff-expansion.js +38 -35
- package/dist/diff-overlays.js +144 -22
- package/dist/diff-syntax.js +65 -42
- package/dist/diff-wordmarks.js +26 -23
- package/dist/doc-comment-model.js +265 -216
- package/dist/editor-language.js +177 -152
- package/dist/error-message.js +2 -2
- package/dist/find-query.js +49 -36
- package/dist/folding.js +81 -62
- package/dist/format-on-type.js +86 -67
- package/dist/highlight-layers.js +19 -20
- package/dist/highlights.js +105 -83
- package/dist/history.js +44 -38
- package/dist/holder.js +18 -18
- package/dist/host-types.js +1 -1
- package/dist/hover-content.js +167 -129
- package/dist/hover.js +285 -245
- package/dist/index.js +10 -10
- package/dist/inlay-hints.js +369 -324
- package/dist/key-priority.js +34 -31
- package/dist/language-ids.js +45 -42
- package/dist/line-edits.js +74 -28
- package/dist/line-text.js +18 -3
- package/dist/locales/en.json +38 -38
- package/dist/locales/nl.json +41 -41
- package/dist/models.js +1 -1
- package/dist/navigation-history.js +40 -41
- package/dist/navigation.js +141 -123
- package/dist/panel-size.js +8 -8
- package/dist/patch-decorations.js +236 -160
- package/dist/patch-layout.js +331 -262
- package/dist/paths.js +3 -3
- package/dist/peek-model.js +86 -69
- package/dist/peek.js +254 -192
- package/dist/pick.js +164 -157
- package/dist/popup-focus.js +5 -5
- package/dist/popup-placement.js +36 -21
- package/dist/popups.js +13 -13
- package/dist/project-language.js +228 -211
- package/dist/project-problems.js +81 -69
- package/dist/proposal-model.js +163 -126
- package/dist/recent-choices.js +25 -25
- package/dist/refresher.js +44 -49
- package/dist/rename-model.js +113 -113
- package/dist/rename.js +321 -233
- package/dist/rendered-docs.d.ts +4 -2
- package/dist/rendered-docs.js +384 -318
- package/dist/rendering-context.js +5 -3
- package/dist/rendering.js +22 -4
- package/dist/review-group.js +42 -39
- package/dist/row-host.d.ts +4 -2
- package/dist/row-host.js +90 -78
- package/dist/selection-ranges.js +21 -17
- package/dist/semantic-delta.js +22 -19
- package/dist/semantic-model.js +86 -73
- package/dist/semantic-tokens.js +201 -162
- package/dist/shortcut-keys.js +16 -10
- package/dist/signature-model.js +34 -28
- package/dist/signature.js +177 -129
- package/dist/snippet-field-transforms.js +118 -106
- package/dist/snippet-indent.js +48 -43
- package/dist/snippet-range-order.js +11 -11
- package/dist/snippet-session.js +703 -667
- package/dist/snippet-transform-client.js +59 -59
- package/dist/snippet-transform-format.js +285 -263
- package/dist/snippet-transform-protocol.js +1 -1
- package/dist/snippet-transform-queue.js +163 -153
- package/dist/snippet-transform-worker.js +42 -35
- package/dist/snippet-variable-names.js +1 -36
- package/dist/snippet-variables.js +53 -63
- package/dist/snippet.js +477 -405
- package/dist/split-alignment.js +47 -35
- package/dist/split-scroll.js +42 -40
- package/dist/symbol-links.js +33 -25
- package/dist/symbol-picker-model.js +126 -116
- package/dist/symbol-picker.js +98 -59
- package/dist/symbols.js +117 -88
- package/dist/testing.js +248 -165
- package/dist/timers.js +35 -30
- package/dist/use-panel-body.js +49 -8
- package/dist/use-problem-counts.js +29 -15
- package/dist/view-state.js +54 -33
- package/dist/word-diff.js +18 -18
- package/dist/workspace-edit.js +300 -249
- package/package.json +6 -6
- package/src/CallHierarchyPanel.tsx +2 -2
- package/src/DiffView.tsx +3 -3
- package/src/FindReplace.tsx +2 -2
- package/src/LanguagePopups.tsx +2 -0
- package/src/PeekPanel.tsx +3 -3
- package/src/RenderedDocs.tsx +9 -10
- package/src/SymbolPicker.tsx +2 -2
- package/src/diff-overlays.tsx +6 -4
- package/src/locales/en.json +38 -38
- package/src/locales/nl.json +41 -41
- package/src/rendered-docs.ts +14 -3
- package/src/row-host.ts +14 -3
|
@@ -2,92 +2,126 @@
|
|
|
2
2
|
export const CALL_LEVEL_LIMIT = 50;
|
|
3
3
|
/* The id of the status line under a node. */
|
|
4
4
|
export function statusIdOf(parent) {
|
|
5
|
-
|
|
5
|
+
return `${parent}:status`;
|
|
6
6
|
}
|
|
7
7
|
/* The id of the line that shows more calls under a node. */
|
|
8
8
|
export function moreIdOf(parent) {
|
|
9
|
-
|
|
9
|
+
return `${parent}:more`;
|
|
10
10
|
}
|
|
11
11
|
/* The tree's roots, each one a symbol the server prepared. */
|
|
12
12
|
export function rootsOf(items) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
return items.map((item, index) => ({
|
|
14
|
+
id: `r${index}`,
|
|
15
|
+
parent: null,
|
|
16
|
+
level: 1,
|
|
17
|
+
item,
|
|
18
|
+
sites: [],
|
|
19
|
+
siteUri: null,
|
|
20
|
+
expanded: true,
|
|
21
|
+
load: 'idle',
|
|
22
|
+
error: null,
|
|
23
|
+
children: [],
|
|
24
|
+
shown: 0
|
|
25
|
+
}));
|
|
26
26
|
}
|
|
27
27
|
/*
|
|
28
28
|
* The children of a node made from the calls a server returned, in the order the server gave them.
|
|
29
29
|
* The call sites of a caller are in its own file; those of a callee are in the file of the node that was asked about.
|
|
30
30
|
*/
|
|
31
31
|
export function childrenOf(direction, parent, calls) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
const entries = calls.map(call => ({
|
|
33
|
+
item: 'from' in call ? call.from : call.to,
|
|
34
|
+
sites: call.fromRanges
|
|
35
|
+
}));
|
|
36
|
+
return entries.map((entry, index) => ({
|
|
37
|
+
id: `${parent.id}.${index}`,
|
|
38
|
+
parent: parent.id,
|
|
39
|
+
level: parent.level + 1,
|
|
40
|
+
item: entry.item,
|
|
41
|
+
sites: entry.sites,
|
|
42
|
+
siteUri: direction === 'incoming' ? entry.item.uri : parent.item.uri,
|
|
43
|
+
expanded: false,
|
|
44
|
+
load: 'idle',
|
|
45
|
+
error: null,
|
|
46
|
+
children: [],
|
|
47
|
+
shown: 0
|
|
48
|
+
}));
|
|
46
49
|
}
|
|
47
50
|
/* The lines the tree draws: every root, and under an expanded node its status, its calls and the row that shows more. */
|
|
48
51
|
export function rowsOf(nodes, roots) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
52
|
+
const rows = [];
|
|
53
|
+
const visit = (id, position, size) => {
|
|
54
|
+
const node = nodes.get(id);
|
|
55
|
+
rows.push({
|
|
56
|
+
kind: 'node',
|
|
57
|
+
id,
|
|
58
|
+
level: node.level,
|
|
59
|
+
item: node.item,
|
|
60
|
+
expanded: node.expanded,
|
|
61
|
+
load: node.load,
|
|
62
|
+
sites: node.sites.length,
|
|
63
|
+
leaf: node.load === 'loaded' && node.children.length === 0,
|
|
64
|
+
position,
|
|
65
|
+
size
|
|
66
|
+
});
|
|
67
|
+
if (!node.expanded) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (node.load === 'loading') {
|
|
71
|
+
rows.push({
|
|
72
|
+
kind: 'status',
|
|
73
|
+
id: statusIdOf(id),
|
|
74
|
+
parent: id,
|
|
75
|
+
level: node.level + 1,
|
|
76
|
+
status: 'loading',
|
|
77
|
+
message: null
|
|
78
|
+
});
|
|
79
|
+
} else if (node.load === 'failed') {
|
|
80
|
+
rows.push({
|
|
81
|
+
kind: 'status',
|
|
82
|
+
id: statusIdOf(id),
|
|
83
|
+
parent: id,
|
|
84
|
+
level: node.level + 1,
|
|
85
|
+
status: 'failed',
|
|
86
|
+
message: node.error
|
|
87
|
+
});
|
|
88
|
+
} else if (node.load === 'loaded' && node.children.length === 0) {
|
|
89
|
+
rows.push({
|
|
90
|
+
kind: 'status',
|
|
91
|
+
id: statusIdOf(id),
|
|
92
|
+
parent: id,
|
|
93
|
+
level: node.level + 1,
|
|
94
|
+
status: 'empty',
|
|
95
|
+
message: null
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const shown = node.children.slice(0, node.shown);
|
|
99
|
+
shown.forEach((child, index) => visit(child, index + 1, node.children.length));
|
|
100
|
+
if (node.children.length > node.shown) {
|
|
101
|
+
rows.push({
|
|
102
|
+
kind: 'more',
|
|
103
|
+
id: moreIdOf(id),
|
|
104
|
+
level: node.level + 1,
|
|
105
|
+
parent: id,
|
|
106
|
+
hidden: node.children.length - node.shown
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
roots.forEach((root, index) => visit(root, index + 1, roots.length));
|
|
111
|
+
return rows;
|
|
84
112
|
}
|
|
85
113
|
/* The rows a key can land on: symbols, and the row that shows more. */
|
|
86
114
|
export function stepsOf(rows) {
|
|
87
|
-
|
|
115
|
+
return rows.filter(row => row.kind !== 'status');
|
|
88
116
|
}
|
|
89
117
|
/* The place a node goes to: its first call site, or the symbol itself for a root. */
|
|
90
118
|
export function targetOf(node, site = 0) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
119
|
+
const range = node.sites[site];
|
|
120
|
+
return range === undefined || node.siteUri === null ? {
|
|
121
|
+
uri: node.item.uri,
|
|
122
|
+
range: node.item.selectionRange
|
|
123
|
+
} : {
|
|
124
|
+
uri: node.siteUri,
|
|
125
|
+
range
|
|
126
|
+
};
|
|
127
|
+
}
|