@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
|
@@ -1,71 +1,204 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { PANEL_BODY_MIN, PANEL_KEY_STEP, availableHeightOf, clampPanelBody, panelBodyMax } from './panel-size.js';
|
|
5
5
|
import { realTimers, revealRow } from './timers.js';
|
|
6
6
|
/* The bottom edge of a panel: a drag, or the arrow keys, change the height of its body. */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function PanelResizeHandle(t0) {
|
|
9
|
+
const $ = _c(34);
|
|
10
|
+
const {
|
|
11
|
+
container,
|
|
12
|
+
height,
|
|
13
|
+
onHeight,
|
|
14
|
+
onCommit
|
|
15
|
+
} = t0;
|
|
16
|
+
const {
|
|
17
|
+
t
|
|
18
|
+
} = useTranslation("editor");
|
|
19
|
+
const drag = useRef(null);
|
|
20
|
+
const [dragging, setDragging] = useState(false);
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== container) {
|
|
23
|
+
t1 = () => panelBodyMax(availableHeightOf(container));
|
|
24
|
+
$[0] = container;
|
|
25
|
+
$[1] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[1];
|
|
28
|
+
}
|
|
29
|
+
const [max, setMax] = useState(t1);
|
|
30
|
+
let t2;
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[2] !== container) {
|
|
33
|
+
t2 = () => {
|
|
34
|
+
const viewport = container.closest(".se-viewport");
|
|
35
|
+
const Observer = viewport?.ownerDocument.defaultView?.ResizeObserver;
|
|
36
|
+
if (viewport === null || viewport === undefined || Observer === undefined) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const observer = new Observer(() => setMax(panelBodyMax(availableHeightOf(container))));
|
|
40
|
+
observer.observe(viewport);
|
|
41
|
+
return () => observer.disconnect();
|
|
42
|
+
};
|
|
43
|
+
t3 = [container];
|
|
44
|
+
$[2] = container;
|
|
45
|
+
$[3] = t2;
|
|
46
|
+
$[4] = t3;
|
|
47
|
+
} else {
|
|
48
|
+
t2 = $[3];
|
|
49
|
+
t3 = $[4];
|
|
50
|
+
}
|
|
51
|
+
useEffect(t2, t3);
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[5] !== container || $[6] !== onCommit || $[7] !== onHeight) {
|
|
54
|
+
t4 = function settle(value, from) {
|
|
55
|
+
const next = clampPanelBody(value, availableHeightOf(container));
|
|
56
|
+
onHeight(next);
|
|
57
|
+
if (next !== from) {
|
|
58
|
+
onCommit(next);
|
|
59
|
+
revealRow(realTimers, container);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
$[5] = container;
|
|
63
|
+
$[6] = onCommit;
|
|
64
|
+
$[7] = onHeight;
|
|
65
|
+
$[8] = t4;
|
|
66
|
+
} else {
|
|
67
|
+
t4 = $[8];
|
|
68
|
+
}
|
|
69
|
+
const settle = t4;
|
|
70
|
+
let t5;
|
|
71
|
+
if ($[9] !== container) {
|
|
72
|
+
t5 = function heightAt(clientY) {
|
|
73
|
+
return clampPanelBody(drag.current.startHeight + clientY - drag.current.startY, availableHeightOf(container));
|
|
74
|
+
};
|
|
75
|
+
$[9] = container;
|
|
76
|
+
$[10] = t5;
|
|
77
|
+
} else {
|
|
78
|
+
t5 = $[10];
|
|
79
|
+
}
|
|
80
|
+
const heightAt = t5;
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[11] !== height) {
|
|
83
|
+
t6 = function down(event) {
|
|
84
|
+
if (event.button !== 0) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
88
|
+
drag.current = {
|
|
89
|
+
startY: event.clientY,
|
|
90
|
+
startHeight: height,
|
|
91
|
+
lastY: event.clientY
|
|
92
|
+
};
|
|
93
|
+
setDragging(true);
|
|
94
|
+
};
|
|
95
|
+
$[11] = height;
|
|
96
|
+
$[12] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t6 = $[12];
|
|
99
|
+
}
|
|
100
|
+
const down = t6;
|
|
101
|
+
let t7;
|
|
102
|
+
if ($[13] !== heightAt || $[14] !== onHeight) {
|
|
103
|
+
t7 = function move(event_0) {
|
|
104
|
+
if (drag.current !== null) {
|
|
105
|
+
drag.current.lastY = event_0.clientY;
|
|
106
|
+
onHeight(heightAt(event_0.clientY));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
$[13] = heightAt;
|
|
110
|
+
$[14] = onHeight;
|
|
111
|
+
$[15] = t7;
|
|
112
|
+
} else {
|
|
113
|
+
t7 = $[15];
|
|
114
|
+
}
|
|
115
|
+
const move = t7;
|
|
116
|
+
let t8;
|
|
117
|
+
if ($[16] !== heightAt || $[17] !== settle) {
|
|
118
|
+
t8 = function end(event_1) {
|
|
119
|
+
if (drag.current === null) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const {
|
|
123
|
+
startHeight
|
|
124
|
+
} = drag.current;
|
|
125
|
+
const next_0 = heightAt(drag.current.lastY);
|
|
126
|
+
drag.current = null;
|
|
127
|
+
setDragging(false);
|
|
128
|
+
event_1.currentTarget.releasePointerCapture?.(event_1.pointerId);
|
|
129
|
+
settle(next_0, startHeight);
|
|
130
|
+
};
|
|
131
|
+
$[16] = heightAt;
|
|
132
|
+
$[17] = settle;
|
|
133
|
+
$[18] = t8;
|
|
134
|
+
} else {
|
|
135
|
+
t8 = $[18];
|
|
136
|
+
}
|
|
137
|
+
const end = t8;
|
|
138
|
+
let t9;
|
|
139
|
+
if ($[19] !== container || $[20] !== height || $[21] !== settle) {
|
|
140
|
+
t9 = function key(event_2) {
|
|
141
|
+
const step = event_2.shiftKey ? PANEL_KEY_STEP * 4 : PANEL_KEY_STEP;
|
|
142
|
+
const end_0 = panelBodyMax(availableHeightOf(container));
|
|
143
|
+
const target = {
|
|
144
|
+
ArrowUp: height - step,
|
|
145
|
+
ArrowDown: height + step,
|
|
146
|
+
Home: PANEL_BODY_MIN,
|
|
147
|
+
End: end_0
|
|
148
|
+
}[event_2.key];
|
|
149
|
+
if (target === undefined) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
event_2.preventDefault();
|
|
153
|
+
event_2.stopPropagation();
|
|
154
|
+
settle(target, height);
|
|
155
|
+
};
|
|
156
|
+
$[19] = container;
|
|
157
|
+
$[20] = height;
|
|
158
|
+
$[21] = settle;
|
|
159
|
+
$[22] = t9;
|
|
160
|
+
} else {
|
|
161
|
+
t9 = $[22];
|
|
162
|
+
}
|
|
163
|
+
const key = t9;
|
|
164
|
+
let t10;
|
|
165
|
+
if ($[23] !== t) {
|
|
166
|
+
t10 = t("language.panel.resize");
|
|
167
|
+
$[23] = t;
|
|
168
|
+
$[24] = t10;
|
|
169
|
+
} else {
|
|
170
|
+
t10 = $[24];
|
|
171
|
+
}
|
|
172
|
+
let t11;
|
|
173
|
+
if ($[25] !== down || $[26] !== dragging || $[27] !== end || $[28] !== height || $[29] !== key || $[30] !== max || $[31] !== move || $[32] !== t10) {
|
|
174
|
+
t11 = /*#__PURE__*/_jsx("div", {
|
|
175
|
+
role: "separator",
|
|
176
|
+
"aria-orientation": "horizontal",
|
|
177
|
+
"aria-label": t10,
|
|
178
|
+
"aria-valuemin": PANEL_BODY_MIN,
|
|
179
|
+
"aria-valuemax": max,
|
|
180
|
+
"aria-valuenow": height,
|
|
181
|
+
tabIndex: 0,
|
|
182
|
+
"data-dragging": dragging,
|
|
183
|
+
className: "absolute inset-x-0 bottom-0 z-10 h-1 cursor-row-resize touch-none outline-none hover:bg-accent-soft focus-visible:bg-accent-soft data-[dragging=true]:bg-accent-soft",
|
|
184
|
+
onPointerDown: down,
|
|
185
|
+
onPointerMove: move,
|
|
186
|
+
onPointerUp: end,
|
|
187
|
+
onPointerCancel: end,
|
|
188
|
+
onLostPointerCapture: end,
|
|
189
|
+
onKeyDown: key
|
|
190
|
+
});
|
|
191
|
+
$[25] = down;
|
|
192
|
+
$[26] = dragging;
|
|
193
|
+
$[27] = end;
|
|
194
|
+
$[28] = height;
|
|
195
|
+
$[29] = key;
|
|
196
|
+
$[30] = max;
|
|
197
|
+
$[31] = move;
|
|
198
|
+
$[32] = t10;
|
|
199
|
+
$[33] = t11;
|
|
200
|
+
} else {
|
|
201
|
+
t11 = $[33];
|
|
202
|
+
}
|
|
203
|
+
return t11;
|
|
204
|
+
}
|
package/dist/PathText.js
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Tooltip } from '@adecore/ui';
|
|
3
3
|
/*
|
|
4
4
|
* A path that gives way from its start, so the end of it, which names the place, stays readable. The
|
|
5
5
|
* full path is in the tooltip. The `bdi` keeps the slashes in reading order inside the right-to-left box.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function PathText(t0) {
|
|
9
|
+
const $ = _c(8);
|
|
10
|
+
const {
|
|
11
|
+
path,
|
|
12
|
+
className: t1
|
|
13
|
+
} = t0;
|
|
14
|
+
const className = t1 === undefined ? "" : t1;
|
|
15
|
+
if (path === "") {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const t2 = `min-w-0 overflow-hidden text-left text-ellipsis whitespace-nowrap [direction:rtl] ${className}`;
|
|
19
|
+
let t3;
|
|
20
|
+
if ($[0] !== path) {
|
|
21
|
+
t3 = /*#__PURE__*/_jsx("bdi", {
|
|
22
|
+
children: path
|
|
23
|
+
});
|
|
24
|
+
$[0] = path;
|
|
25
|
+
$[1] = t3;
|
|
26
|
+
} else {
|
|
27
|
+
t3 = $[1];
|
|
28
|
+
}
|
|
29
|
+
let t4;
|
|
30
|
+
if ($[2] !== t2 || $[3] !== t3) {
|
|
31
|
+
t4 = /*#__PURE__*/_jsx("span", {
|
|
32
|
+
className: t2,
|
|
33
|
+
children: t3
|
|
34
|
+
});
|
|
35
|
+
$[2] = t2;
|
|
36
|
+
$[3] = t3;
|
|
37
|
+
$[4] = t4;
|
|
38
|
+
} else {
|
|
39
|
+
t4 = $[4];
|
|
40
|
+
}
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[5] !== path || $[6] !== t4) {
|
|
43
|
+
t5 = /*#__PURE__*/_jsx(Tooltip, {
|
|
44
|
+
label: path,
|
|
45
|
+
children: t4
|
|
46
|
+
});
|
|
47
|
+
$[5] = path;
|
|
48
|
+
$[6] = t4;
|
|
49
|
+
$[7] = t5;
|
|
50
|
+
} else {
|
|
51
|
+
t5 = $[7];
|
|
52
|
+
}
|
|
53
|
+
return t5;
|
|
54
|
+
}
|