@adecore/editor-react 0.53.3 → 0.54.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.d.ts +1 -1
- package/dist/AnchoredPopup.js +27 -12
- package/dist/AttributionCard.d.ts +1 -1
- package/dist/BaselineStatus.js +1 -1
- package/dist/CallHierarchyPanel.js +11 -10
- package/dist/ChangeReview.d.ts +1 -1
- package/dist/CodeAuthorsCard.js +2 -2
- package/dist/CompletionPopup.js +18 -14
- package/dist/DiffView.d.ts +2 -2
- package/dist/DiffView.js +159 -143
- package/dist/EditorContextMenu.js +1 -1
- package/dist/EditorView.d.ts +2 -2
- package/dist/EditorView.js +97 -81
- package/dist/FindReplace.js +3 -3
- package/dist/HoverCard.d.ts +3 -3
- package/dist/HoverCard.js +3 -3
- package/dist/HoverSections.js +1 -1
- package/dist/LanguagePopups.js +1 -1
- package/dist/Markdown.js +15 -3
- package/dist/PeekPanel.js +124 -103
- package/dist/PickPopup.js +8 -4
- package/dist/RenameCard.js +7 -7
- package/dist/RenderedDocs.d.ts +1 -1
- package/dist/RenderedDocs.js +1 -1
- package/dist/SplitDiffView.js +21 -4
- package/dist/SymbolPicker.js +93 -89
- package/dist/WrapCard.js +1 -1
- package/dist/call-hierarchy.d.ts +1 -1
- package/dist/call-hierarchy.js +3 -3
- package/dist/code-actions.js +2 -2
- package/dist/code-vision.d.ts +1 -1
- package/dist/completion-model.d.ts +1 -1
- package/dist/completion-model.js +2 -2
- package/dist/completion.d.ts +1 -1
- package/dist/completion.js +12 -12
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js +1 -1
- package/dist/diff-overlays.js +2 -2
- package/dist/editor-language.d.ts +12 -12
- package/dist/editor-language.js +10 -10
- package/dist/editor-react.css +4 -4
- package/dist/highlights.d.ts +1 -1
- package/dist/highlights.js +2 -2
- package/dist/host-types.d.ts +4 -4
- package/dist/hover.js +1 -1
- package/dist/inlay-hints.js +1 -1
- package/dist/live-templates.js +1 -1
- package/dist/markup.js +1 -1
- package/dist/navigation.d.ts +1 -1
- package/dist/navigation.js +3 -3
- package/dist/peek.js +1 -1
- package/dist/popups.d.ts +5 -5
- package/dist/project-language.d.ts +4 -4
- package/dist/project-language.js +5 -5
- package/dist/rename.js +1 -1
- package/dist/rendered-docs.d.ts +1 -1
- package/dist/rendered-docs.js +1 -1
- package/dist/shortcut-keys.d.ts +1 -1
- package/dist/signature.js +1 -1
- package/dist/snippet-field-transforms.d.ts +2 -2
- package/dist/snippet-insert.js +3 -3
- package/dist/snippet-session.d.ts +2 -2
- package/dist/snippet-session.js +5 -5
- package/dist/snippet-transform-queue.d.ts +1 -1
- package/dist/surround.js +1 -1
- package/dist/symbol-picker.js +2 -2
- package/dist/templates.js +1 -1
- package/dist/use-problem-counts.d.ts +1 -1
- package/package.json +6 -6
- package/src/AnchoredPopup.tsx +7 -3
- package/src/AttributionCard.tsx +1 -1
- package/src/BaselineStatus.tsx +1 -1
- package/src/CallHierarchyPanel.tsx +13 -12
- package/src/ChangeReview.tsx +1 -1
- package/src/CodeAuthorsCard.tsx +2 -2
- package/src/CompletionPopup.tsx +16 -13
- package/src/DiffView.tsx +12 -6
- package/src/EditorContextMenu.tsx +2 -2
- package/src/EditorView.tsx +14 -6
- package/src/FindReplace.tsx +3 -3
- package/src/HoverCard.tsx +7 -7
- package/src/HoverSections.tsx +1 -1
- package/src/LanguagePopups.tsx +3 -3
- package/src/Markdown.tsx +13 -2
- package/src/PeekPanel.tsx +13 -13
- package/src/PickPopup.tsx +6 -5
- package/src/RenameCard.tsx +8 -8
- package/src/RenderedDocs.tsx +3 -3
- package/src/SplitDiffView.tsx +14 -5
- package/src/SymbolPicker.tsx +6 -6
- package/src/WrapCard.tsx +2 -2
- package/src/call-hierarchy.ts +5 -5
- package/src/code-actions.ts +3 -3
- package/src/code-authors.ts +1 -1
- package/src/code-vision.ts +3 -3
- package/src/completion-model.ts +3 -3
- package/src/completion.ts +15 -15
- package/src/diagnostics.ts +4 -4
- package/src/diff-overlays.tsx +4 -4
- package/src/editor-language.ts +13 -13
- package/src/editor-react.css +4 -4
- package/src/format-on-type.ts +1 -1
- package/src/highlights.ts +3 -3
- package/src/host-types.ts +4 -4
- package/src/hover.ts +3 -3
- package/src/inlay-hints.ts +1 -1
- package/src/line-edits.ts +1 -1
- package/src/live-templates.ts +2 -2
- package/src/markup.ts +2 -2
- package/src/navigation.ts +5 -5
- package/src/patch-decorations.ts +1 -1
- package/src/peek.ts +3 -3
- package/src/pick.ts +1 -1
- package/src/popups.ts +5 -5
- package/src/postfix.ts +1 -1
- package/src/project-language.ts +7 -7
- package/src/proposal-model.ts +1 -1
- package/src/rename.ts +3 -3
- package/src/rendered-docs.ts +2 -2
- package/src/shortcut-keys.ts +1 -1
- package/src/signature.ts +3 -3
- package/src/snippet-field-transforms.ts +2 -2
- package/src/snippet-insert.ts +3 -3
- package/src/snippet-session.ts +7 -7
- package/src/snippet-transform-queue.ts +1 -1
- package/src/surround.ts +1 -1
- package/src/symbol-picker-model.ts +1 -1
- package/src/symbol-picker.ts +3 -3
- package/src/templates.ts +1 -1
- package/src/use-problem-counts.ts +1 -1
- package/src/workspace-edit.ts +1 -1
package/dist/PeekPanel.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { fileUriToPath } from '@adecore/lsp';
|
|
3
|
+
import { FileIcon, IconButton, ScrollArea, Tooltip } from '@adecore/ui';
|
|
4
|
+
import { formatNumber } from '@adecore/ui/format';
|
|
5
|
+
import { ChevronDown, ChevronRight, X } from 'lucide-react';
|
|
2
6
|
import { useEffect, useRef, useState } from 'react';
|
|
3
7
|
import { createPortal } from 'react-dom';
|
|
4
8
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { ChevronDown, ChevronRight, X } from 'lucide-react';
|
|
6
|
-
import { fileUriToPath } from '@adecore/lsp';
|
|
7
|
-
import { FileIcon, IconButton, Tooltip } from '@adecore/ui';
|
|
8
|
-
import { formatNumber } from '@adecore/ui/format';
|
|
9
|
-
import { basenameOf, relativeTo } from './paths.js';
|
|
10
9
|
import { shikiLanguageOfPath } from './language-ids.js';
|
|
11
|
-
import { PathText } from "./PathText.js";
|
|
12
|
-
import { PanelResizeHandle } from "./PanelResizeHandle.js";
|
|
13
|
-
import { usePanelBody } from './use-panel-body.js';
|
|
14
10
|
import { PANEL_BODY_HEIGHT } from './panel-size.js';
|
|
15
|
-
import {
|
|
11
|
+
import { PanelResizeHandle } from "./PanelResizeHandle.js";
|
|
12
|
+
import { basenameOf, relativeTo } from './paths.js';
|
|
13
|
+
import { PathText } from "./PathText.js";
|
|
16
14
|
import { distinguishingFolders, visualColumnOf } from './peek-model.js';
|
|
15
|
+
import { PEEK_HEIGHT } from './peek.js';
|
|
17
16
|
import { useEditorRendering } from './rendering-context.js';
|
|
17
|
+
import { usePanelBody } from './use-panel-body.js';
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const TAB_SIZE = 4;
|
|
20
20
|
const CODE = 'font-mono text-(length:--code-font-size) [tab-size:4] [&_.line]:block [&_.line]:h-(--code-line-height) [&_.line]:leading-(--code-line-height) [&_pre]:m-0 [&_pre]:bg-transparent! [&_pre]:p-0 [&_pre]:whitespace-pre [&_code]:font-mono';
|
|
21
21
|
/* The code around the active reference, drawn like the editor's own rows: its gutter, the line the reference is on and the name marked. */
|
|
22
22
|
export function Preview(t0) {
|
|
23
|
-
const $ = _c(
|
|
23
|
+
const $ = _c(57);
|
|
24
24
|
const {
|
|
25
25
|
preview
|
|
26
26
|
} = t0;
|
|
@@ -99,9 +99,12 @@ export function Preview(t0) {
|
|
|
99
99
|
}
|
|
100
100
|
return t6;
|
|
101
101
|
}
|
|
102
|
+
let T0;
|
|
102
103
|
let name;
|
|
103
104
|
let t10;
|
|
104
105
|
let t11;
|
|
106
|
+
let t12;
|
|
107
|
+
let t13;
|
|
105
108
|
let t6;
|
|
106
109
|
let t7;
|
|
107
110
|
let t8;
|
|
@@ -109,72 +112,81 @@ export function Preview(t0) {
|
|
|
109
112
|
if ($[13] !== preview.active || $[14] !== preview.name || $[15] !== preview.startLine || $[16] !== preview.text) {
|
|
110
113
|
const lines = preview.text.split("\n");
|
|
111
114
|
name = preview.name === null ? null : columnsOf(lines[preview.active] ?? "", preview.name);
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
T0 = ScrollArea;
|
|
116
|
+
t10 = "both";
|
|
117
|
+
t11 = scroller;
|
|
118
|
+
t12 = "flex-1";
|
|
119
|
+
t13 = "relative pt-1";
|
|
114
120
|
t8 = "relative flex min-w-max";
|
|
115
|
-
const
|
|
116
|
-
if ($[
|
|
121
|
+
const t14 = `calc(${preview.active} * var(--code-line-height))`;
|
|
122
|
+
if ($[27] !== t14) {
|
|
117
123
|
t9 = /*#__PURE__*/_jsx("div", {
|
|
118
124
|
className: "absolute inset-x-0 bg-surface-hover",
|
|
119
125
|
style: {
|
|
120
|
-
top:
|
|
126
|
+
top: t14,
|
|
121
127
|
height: "var(--code-line-height)"
|
|
122
128
|
}
|
|
123
129
|
});
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
130
|
+
$[27] = t14;
|
|
131
|
+
$[28] = t9;
|
|
126
132
|
} else {
|
|
127
|
-
t9 = $[
|
|
133
|
+
t9 = $[28];
|
|
128
134
|
}
|
|
129
135
|
t6 = "sticky left-0 z-10 w-16 shrink-0 pr-4 text-right font-mono text-(length:--code-font-size) text-text-faint select-none";
|
|
130
|
-
let
|
|
131
|
-
if ($[
|
|
132
|
-
|
|
136
|
+
let t15;
|
|
137
|
+
if ($[29] !== preview.active || $[30] !== preview.startLine) {
|
|
138
|
+
t15 = (_, index) => /*#__PURE__*/_jsx("div", {
|
|
133
139
|
className: `h-(--code-line-height) leading-(--code-line-height) ${index === preview.active ? "bg-surface-hover text-text" : "bg-surface"}`,
|
|
134
140
|
children: preview.startLine + index + 1
|
|
135
141
|
}, index);
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
142
|
+
$[29] = preview.active;
|
|
143
|
+
$[30] = preview.startLine;
|
|
144
|
+
$[31] = t15;
|
|
139
145
|
} else {
|
|
140
|
-
|
|
146
|
+
t15 = $[31];
|
|
141
147
|
}
|
|
142
|
-
t7 = lines.map(
|
|
148
|
+
t7 = lines.map(t15);
|
|
143
149
|
$[13] = preview.active;
|
|
144
150
|
$[14] = preview.name;
|
|
145
151
|
$[15] = preview.startLine;
|
|
146
152
|
$[16] = preview.text;
|
|
147
|
-
$[17] =
|
|
148
|
-
$[18] =
|
|
149
|
-
$[19] =
|
|
150
|
-
$[20] =
|
|
151
|
-
$[21] =
|
|
152
|
-
$[22] =
|
|
153
|
-
$[23] =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
$[17] = T0;
|
|
154
|
+
$[18] = name;
|
|
155
|
+
$[19] = t10;
|
|
156
|
+
$[20] = t11;
|
|
157
|
+
$[21] = t12;
|
|
158
|
+
$[22] = t13;
|
|
159
|
+
$[23] = t6;
|
|
160
|
+
$[24] = t7;
|
|
161
|
+
$[25] = t8;
|
|
162
|
+
$[26] = t9;
|
|
163
|
+
} else {
|
|
164
|
+
T0 = $[17];
|
|
165
|
+
name = $[18];
|
|
166
|
+
t10 = $[19];
|
|
167
|
+
t11 = $[20];
|
|
168
|
+
t12 = $[21];
|
|
169
|
+
t13 = $[22];
|
|
170
|
+
t6 = $[23];
|
|
171
|
+
t7 = $[24];
|
|
172
|
+
t8 = $[25];
|
|
173
|
+
t9 = $[26];
|
|
162
174
|
}
|
|
163
|
-
let
|
|
164
|
-
if ($[
|
|
165
|
-
|
|
175
|
+
let t14;
|
|
176
|
+
if ($[32] !== t6 || $[33] !== t7) {
|
|
177
|
+
t14 = /*#__PURE__*/_jsx("div", {
|
|
166
178
|
className: t6,
|
|
167
179
|
children: t7
|
|
168
180
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
181
|
+
$[32] = t6;
|
|
182
|
+
$[33] = t7;
|
|
183
|
+
$[34] = t14;
|
|
172
184
|
} else {
|
|
173
|
-
|
|
185
|
+
t14 = $[34];
|
|
174
186
|
}
|
|
175
|
-
let
|
|
176
|
-
if ($[
|
|
177
|
-
|
|
187
|
+
let t15;
|
|
188
|
+
if ($[35] !== name || $[36] !== preview.active) {
|
|
189
|
+
t15 = name !== null && /*#__PURE__*/_jsx("div", {
|
|
178
190
|
className: "absolute rounded-sm bg-(--editor-occurrence) font-mono text-(length:--code-font-size)",
|
|
179
191
|
style: {
|
|
180
192
|
top: `calc(${preview.active} * var(--code-line-height))`,
|
|
@@ -183,15 +195,15 @@ export function Preview(t0) {
|
|
|
183
195
|
width: `${name.end - name.start}ch`
|
|
184
196
|
}
|
|
185
197
|
});
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
198
|
+
$[35] = name;
|
|
199
|
+
$[36] = preview.active;
|
|
200
|
+
$[37] = t15;
|
|
189
201
|
} else {
|
|
190
|
-
|
|
202
|
+
t15 = $[37];
|
|
191
203
|
}
|
|
192
|
-
let
|
|
193
|
-
if ($[
|
|
194
|
-
|
|
204
|
+
let t16;
|
|
205
|
+
if ($[38] !== html || $[39] !== key || $[40] !== preview.text) {
|
|
206
|
+
t16 = html?.key === key ? /*#__PURE__*/_jsx("div", {
|
|
195
207
|
className: `relative ${CODE}`,
|
|
196
208
|
dangerouslySetInnerHTML: {
|
|
197
209
|
__html: html.html
|
|
@@ -200,54 +212,59 @@ export function Preview(t0) {
|
|
|
200
212
|
className: `relative ${CODE} whitespace-pre`,
|
|
201
213
|
children: preview.text
|
|
202
214
|
});
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
215
|
+
$[38] = html;
|
|
216
|
+
$[39] = key;
|
|
217
|
+
$[40] = preview.text;
|
|
218
|
+
$[41] = t16;
|
|
207
219
|
} else {
|
|
208
|
-
|
|
220
|
+
t16 = $[41];
|
|
209
221
|
}
|
|
210
|
-
let
|
|
211
|
-
if ($[
|
|
212
|
-
|
|
222
|
+
let t17;
|
|
223
|
+
if ($[42] !== t15 || $[43] !== t16) {
|
|
224
|
+
t17 = /*#__PURE__*/_jsxs("div", {
|
|
213
225
|
className: "relative",
|
|
214
|
-
children: [
|
|
226
|
+
children: [t15, t16]
|
|
215
227
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
228
|
+
$[42] = t15;
|
|
229
|
+
$[43] = t16;
|
|
230
|
+
$[44] = t17;
|
|
219
231
|
} else {
|
|
220
|
-
|
|
232
|
+
t17 = $[44];
|
|
221
233
|
}
|
|
222
|
-
let
|
|
223
|
-
if ($[
|
|
224
|
-
|
|
234
|
+
let t18;
|
|
235
|
+
if ($[45] !== t14 || $[46] !== t17 || $[47] !== t8 || $[48] !== t9) {
|
|
236
|
+
t18 = /*#__PURE__*/_jsxs("div", {
|
|
225
237
|
className: t8,
|
|
226
|
-
children: [t9,
|
|
238
|
+
children: [t9, t14, t17]
|
|
227
239
|
});
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
240
|
+
$[45] = t14;
|
|
241
|
+
$[46] = t17;
|
|
242
|
+
$[47] = t8;
|
|
243
|
+
$[48] = t9;
|
|
244
|
+
$[49] = t18;
|
|
233
245
|
} else {
|
|
234
|
-
|
|
246
|
+
t18 = $[49];
|
|
235
247
|
}
|
|
236
|
-
let
|
|
237
|
-
if ($[
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
248
|
+
let t19;
|
|
249
|
+
if ($[50] !== T0 || $[51] !== t10 || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t18) {
|
|
250
|
+
t19 = /*#__PURE__*/_jsx(T0, {
|
|
251
|
+
axis: t10,
|
|
252
|
+
viewportRef: t11,
|
|
253
|
+
className: t12,
|
|
254
|
+
viewportClassName: t13,
|
|
255
|
+
children: t18
|
|
242
256
|
});
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
257
|
+
$[50] = T0;
|
|
258
|
+
$[51] = t10;
|
|
259
|
+
$[52] = t11;
|
|
260
|
+
$[53] = t12;
|
|
261
|
+
$[54] = t13;
|
|
262
|
+
$[55] = t18;
|
|
263
|
+
$[56] = t19;
|
|
247
264
|
} else {
|
|
248
|
-
|
|
265
|
+
t19 = $[56];
|
|
249
266
|
}
|
|
250
|
-
return
|
|
267
|
+
return t19;
|
|
251
268
|
}
|
|
252
269
|
/* The name's stretch of a line in monospace columns, which is what the code is laid out in. */
|
|
253
270
|
function _temp() {}
|
|
@@ -354,7 +371,7 @@ function PlaceText(t0) {
|
|
|
354
371
|
return t5;
|
|
355
372
|
}
|
|
356
373
|
function Places(t0) {
|
|
357
|
-
const $ = _c(
|
|
374
|
+
const $ = _c(8);
|
|
358
375
|
const {
|
|
359
376
|
language,
|
|
360
377
|
view
|
|
@@ -394,8 +411,10 @@ function Places(t0) {
|
|
|
394
411
|
t3 = $[4];
|
|
395
412
|
}
|
|
396
413
|
useEffect(t2, t3);
|
|
397
|
-
const
|
|
398
|
-
const
|
|
414
|
+
const T0 = ScrollArea;
|
|
415
|
+
const t4 = "w-1/3 shrink-0 border-l border-border";
|
|
416
|
+
const t5 = "py-1";
|
|
417
|
+
const t6 = view.files.map((file_0, fileIndex) => {
|
|
399
418
|
const collapsed = view.collapsed.includes(file_0.uri);
|
|
400
419
|
return /*#__PURE__*/_jsxs("div", {
|
|
401
420
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
@@ -436,18 +455,20 @@ function Places(t0) {
|
|
|
436
455
|
}, place.id))]
|
|
437
456
|
}, file_0.uri);
|
|
438
457
|
});
|
|
439
|
-
let
|
|
440
|
-
if ($[5] !==
|
|
441
|
-
|
|
458
|
+
let t7;
|
|
459
|
+
if ($[5] !== T0 || $[6] !== t6) {
|
|
460
|
+
t7 = /*#__PURE__*/_jsx(T0, {
|
|
442
461
|
className: t4,
|
|
443
|
-
|
|
462
|
+
viewportClassName: t5,
|
|
463
|
+
children: t6
|
|
444
464
|
});
|
|
445
|
-
$[5] =
|
|
465
|
+
$[5] = T0;
|
|
446
466
|
$[6] = t6;
|
|
467
|
+
$[7] = t7;
|
|
447
468
|
} else {
|
|
448
|
-
|
|
469
|
+
t7 = $[7];
|
|
449
470
|
}
|
|
450
|
-
return
|
|
471
|
+
return t7;
|
|
451
472
|
}
|
|
452
473
|
/*
|
|
453
474
|
* The references of a name in the row the editor leaves under the line: the code around the active one on
|
package/dist/PickPopup.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ScrollArea } from '@adecore/ui';
|
|
2
3
|
import { useId, useLayoutEffect, useRef } from 'react';
|
|
3
4
|
import { createPortal } from 'react-dom';
|
|
4
5
|
import { PathText } from "./PathText.js";
|
|
@@ -99,8 +100,10 @@ function PreviewLines(t0) {
|
|
|
99
100
|
}
|
|
100
101
|
let t2;
|
|
101
102
|
if ($[2] !== t1) {
|
|
102
|
-
t2 = /*#__PURE__*/_jsx(
|
|
103
|
-
|
|
103
|
+
t2 = /*#__PURE__*/_jsx(ScrollArea, {
|
|
104
|
+
axis: "both",
|
|
105
|
+
className: "max-h-48 border-t border-border",
|
|
106
|
+
viewportClassName: "p-2 font-mono text-code whitespace-pre",
|
|
104
107
|
children: t1
|
|
105
108
|
});
|
|
106
109
|
$[2] = t1;
|
|
@@ -379,10 +382,11 @@ export function PickPopup(t0) {
|
|
|
379
382
|
}
|
|
380
383
|
let t10;
|
|
381
384
|
if ($[27] !== listId || $[28] !== t9) {
|
|
382
|
-
t10 = /*#__PURE__*/_jsx(
|
|
385
|
+
t10 = /*#__PURE__*/_jsx(ScrollArea, {
|
|
383
386
|
id: listId,
|
|
384
387
|
role: "listbox",
|
|
385
|
-
className: "
|
|
388
|
+
className: "flex-1",
|
|
389
|
+
viewportClassName: "p-1",
|
|
386
390
|
children: t9
|
|
387
391
|
});
|
|
388
392
|
$[27] = listId;
|
package/dist/RenameCard.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { fileUriToPath } from '@adecore/lsp';
|
|
3
|
+
import { Button, Icon, ScrollArea } from '@adecore/ui';
|
|
4
|
+
import { formatNumber } from '@adecore/ui/format';
|
|
5
|
+
import { Sparkles } from 'lucide-react';
|
|
2
6
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
3
7
|
import { createPortal } from 'react-dom';
|
|
4
8
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { Sparkles } from 'lucide-react';
|
|
6
|
-
import { fileUriToPath } from '@adecore/lsp';
|
|
7
|
-
import { Button, Icon } from '@adecore/ui';
|
|
8
|
-
import { formatNumber } from '@adecore/ui/format';
|
|
9
|
-
import { basenameOf, relativeTo } from './paths.js';
|
|
10
9
|
import { AnchoredPopup } from "./AnchoredPopup.js";
|
|
10
|
+
import { basenameOf, relativeTo } from './paths.js';
|
|
11
11
|
import { keepFocusOutOfList } from './popup-focus.js';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
const CARD_ATTRIBUTE = 'data-rename-card';
|
|
@@ -327,8 +327,8 @@ function Preview(t0) {
|
|
|
327
327
|
}
|
|
328
328
|
let t5;
|
|
329
329
|
if ($[13] !== t3 || $[14] !== t4) {
|
|
330
|
-
t5 = /*#__PURE__*/_jsxs(
|
|
331
|
-
className: "max-h-[320px]
|
|
330
|
+
t5 = /*#__PURE__*/_jsxs(ScrollArea, {
|
|
331
|
+
className: "max-h-[320px]",
|
|
332
332
|
children: [t3, t4]
|
|
333
333
|
});
|
|
334
334
|
$[13] = t3;
|
package/dist/RenderedDocs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DocComment } from '@adecore/editor';
|
|
2
|
-
import type { EditorLanguage } from './editor-language.ts';
|
|
3
2
|
import { type ParsedDocComment } from './doc-comment-model.ts';
|
|
3
|
+
import type { EditorLanguage } from './editor-language.ts';
|
|
4
4
|
interface DocBlockProps {
|
|
5
5
|
language: EditorLanguage;
|
|
6
6
|
comment: DocComment;
|
package/dist/RenderedDocs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
2
|
import { memo, useSyncExternalStore } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { DOC_LINK_PREFIX, sectionsOf } from './doc-comment-model.js';
|
|
6
6
|
import { markdownParts } from './hover-content.js';
|
package/dist/SplitDiffView.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
1
|
import { parseChord } from '@adecore/editor/keymap';
|
|
4
2
|
import { sourceLineOf } from '@adecore/merge';
|
|
5
|
-
import {
|
|
3
|
+
import { useOverlayScrollbars } from '@adecore/ui';
|
|
4
|
+
import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { DiffOverlays } from "./diff-overlays.js";
|
|
7
|
+
import { repaintOnTokens } from './diff-syntax.js';
|
|
7
8
|
import { wordMarks } from './diff-wordmarks.js';
|
|
8
9
|
import { RowHost, LineActionHost } from './row-host.js';
|
|
9
10
|
import { splitAlignment } from './split-alignment.js';
|
|
10
11
|
import { SplitScroll } from './split-scroll.js';
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
const SIDES = ['old', 'new'];
|
|
14
|
+
const NO_SCROLLERS = {
|
|
15
|
+
old: null,
|
|
16
|
+
new: null
|
|
17
|
+
};
|
|
13
18
|
export function SplitDiffView({
|
|
14
19
|
engine,
|
|
15
20
|
document,
|
|
@@ -50,6 +55,13 @@ export function SplitDiffView({
|
|
|
50
55
|
const [failure, setFailure] = useState(null);
|
|
51
56
|
const [mounted, setMounted] = useState(null);
|
|
52
57
|
const [height, setHeight] = useState(0);
|
|
58
|
+
const [scrollers, setScrollers] = useState(NO_SCROLLERS);
|
|
59
|
+
const oldScrollbars = useOverlayScrollbars(scrollers.old, {
|
|
60
|
+
axis: 'both'
|
|
61
|
+
});
|
|
62
|
+
const newScrollbars = useOverlayScrollbars(scrollers.new, {
|
|
63
|
+
axis: 'both'
|
|
64
|
+
});
|
|
53
65
|
useLayoutEffect(() => {
|
|
54
66
|
current.current = {
|
|
55
67
|
document,
|
|
@@ -182,9 +194,14 @@ export function SplitDiffView({
|
|
|
182
194
|
update,
|
|
183
195
|
drive: side_1 => scroll.drive(side_1)
|
|
184
196
|
});
|
|
197
|
+
setScrollers({
|
|
198
|
+
old: oldHost.querySelector('.se-viewport'),
|
|
199
|
+
new: newHost.querySelector('.se-viewport')
|
|
200
|
+
});
|
|
185
201
|
measure();
|
|
186
202
|
return () => {
|
|
187
203
|
stopped = true;
|
|
204
|
+
setScrollers(NO_SCROLLERS);
|
|
188
205
|
for (const stop of stops) {
|
|
189
206
|
stop();
|
|
190
207
|
}
|
|
@@ -357,7 +374,7 @@ export function SplitDiffView({
|
|
|
357
374
|
children: [/*#__PURE__*/_jsx("div", {
|
|
358
375
|
ref: side_10 === 'old' ? oldElement : newElement,
|
|
359
376
|
className: "adecore-editor-diff-surface"
|
|
360
|
-
}), mounted !== null && mounted[side_10].engine === engine && /*#__PURE__*/_jsx(DiffOverlays, {
|
|
377
|
+
}), side_10 === 'old' ? oldScrollbars : newScrollbars, mounted !== null && mounted[side_10].engine === engine && /*#__PURE__*/_jsx(DiffOverlays, {
|
|
361
378
|
mounted: mounted[side_10],
|
|
362
379
|
display: display[side_10],
|
|
363
380
|
unfold: unfold,
|