@adecore/editor-react 0.31.12 → 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
package/dist/HoverCard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { CircleX, Info, TriangleAlert } from 'lucide-react';
|
|
4
4
|
import { fileUriToPath } from '@adecore/lsp';
|
|
@@ -6,48 +6,388 @@ import { Button, Icon, Tooltip } from '@adecore/ui';
|
|
|
6
6
|
import { formatNumber } from '@adecore/ui/format';
|
|
7
7
|
import { basenameOf } from './paths.js';
|
|
8
8
|
import { codeLabelOf, severityOf } from './diagnostics-model.js';
|
|
9
|
-
import { SymbolSections } from
|
|
10
|
-
|
|
11
|
-
const
|
|
9
|
+
import { SymbolSections } from "./HoverSections.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
const SEVERITY_ICONS = {
|
|
12
|
+
error: CircleX,
|
|
13
|
+
warning: TriangleAlert,
|
|
14
|
+
info: Info,
|
|
15
|
+
hint: Info
|
|
16
|
+
};
|
|
17
|
+
const SEVERITY_COLORS = {
|
|
18
|
+
error: 'text-status-error',
|
|
19
|
+
warning: 'text-status-needs-you',
|
|
20
|
+
info: 'text-status-running',
|
|
21
|
+
hint: 'text-text-muted'
|
|
22
|
+
};
|
|
12
23
|
/*
|
|
13
24
|
* Where a definition is: only its line in the file of the card, else the file and the line, with a long name cut
|
|
14
25
|
* short before the line. A definition outside the project folder, such as the stubs of a standard library, has none.
|
|
15
26
|
*/
|
|
16
|
-
export function DefinitionPlace(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
export function DefinitionPlace(t0) {
|
|
28
|
+
const $ = _c(19);
|
|
29
|
+
const {
|
|
30
|
+
definition,
|
|
31
|
+
uri,
|
|
32
|
+
folder
|
|
33
|
+
} = t0;
|
|
34
|
+
const {
|
|
35
|
+
t
|
|
36
|
+
} = useTranslation("editor");
|
|
37
|
+
let line;
|
|
38
|
+
let t1;
|
|
39
|
+
let t2;
|
|
40
|
+
let t3;
|
|
41
|
+
let t4;
|
|
42
|
+
if ($[0] !== definition.range.start.line || $[1] !== definition.uri || $[2] !== folder || $[3] !== t || $[4] !== uri) {
|
|
43
|
+
t4 = Symbol.for("react.early_return_sentinel");
|
|
44
|
+
bb0: {
|
|
45
|
+
const path = fileUriToPath(definition.uri);
|
|
46
|
+
line = formatNumber(definition.range.start.line + 1);
|
|
47
|
+
if (path === null || folder !== "" && !path.startsWith(`${folder}/`)) {
|
|
48
|
+
t4 = null;
|
|
49
|
+
break bb0;
|
|
50
|
+
}
|
|
51
|
+
if (definition.uri === uri) {
|
|
52
|
+
t4 = /*#__PURE__*/_jsx("span", {
|
|
53
|
+
className: "text-text-faint",
|
|
54
|
+
children: t("language.hover.line", {
|
|
55
|
+
line
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
break bb0;
|
|
59
|
+
}
|
|
60
|
+
t3 = "flex min-w-0 font-mono text-text-faint";
|
|
61
|
+
t1 = "truncate";
|
|
62
|
+
t2 = basenameOf(path);
|
|
22
63
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
64
|
+
$[0] = definition.range.start.line;
|
|
65
|
+
$[1] = definition.uri;
|
|
66
|
+
$[2] = folder;
|
|
67
|
+
$[3] = t;
|
|
68
|
+
$[4] = uri;
|
|
69
|
+
$[5] = line;
|
|
70
|
+
$[6] = t1;
|
|
71
|
+
$[7] = t2;
|
|
72
|
+
$[8] = t3;
|
|
73
|
+
$[9] = t4;
|
|
74
|
+
} else {
|
|
75
|
+
line = $[5];
|
|
76
|
+
t1 = $[6];
|
|
77
|
+
t2 = $[7];
|
|
78
|
+
t3 = $[8];
|
|
79
|
+
t4 = $[9];
|
|
80
|
+
}
|
|
81
|
+
if (t4 !== Symbol.for("react.early_return_sentinel")) {
|
|
82
|
+
return t4;
|
|
83
|
+
}
|
|
84
|
+
let t5;
|
|
85
|
+
if ($[10] !== t1 || $[11] !== t2) {
|
|
86
|
+
t5 = /*#__PURE__*/_jsx("span", {
|
|
87
|
+
className: t1,
|
|
88
|
+
children: t2
|
|
89
|
+
});
|
|
90
|
+
$[10] = t1;
|
|
91
|
+
$[11] = t2;
|
|
92
|
+
$[12] = t5;
|
|
93
|
+
} else {
|
|
94
|
+
t5 = $[12];
|
|
95
|
+
}
|
|
96
|
+
let t6;
|
|
97
|
+
if ($[13] !== line) {
|
|
98
|
+
t6 = /*#__PURE__*/_jsxs("span", {
|
|
99
|
+
className: "shrink-0",
|
|
100
|
+
children: [":", line]
|
|
101
|
+
});
|
|
102
|
+
$[13] = line;
|
|
103
|
+
$[14] = t6;
|
|
104
|
+
} else {
|
|
105
|
+
t6 = $[14];
|
|
106
|
+
}
|
|
107
|
+
let t7;
|
|
108
|
+
if ($[15] !== t3 || $[16] !== t5 || $[17] !== t6) {
|
|
109
|
+
t7 = /*#__PURE__*/_jsxs("span", {
|
|
110
|
+
className: t3,
|
|
111
|
+
children: [t5, t6]
|
|
112
|
+
});
|
|
113
|
+
$[15] = t3;
|
|
114
|
+
$[16] = t5;
|
|
115
|
+
$[17] = t6;
|
|
116
|
+
$[18] = t7;
|
|
117
|
+
} else {
|
|
118
|
+
t7 = $[18];
|
|
119
|
+
}
|
|
120
|
+
return t7;
|
|
27
121
|
}
|
|
28
|
-
function ProblemSection(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
122
|
+
function ProblemSection(t0) {
|
|
123
|
+
const $ = _c(38);
|
|
124
|
+
const {
|
|
125
|
+
problem,
|
|
126
|
+
language
|
|
127
|
+
} = t0;
|
|
128
|
+
const {
|
|
129
|
+
t
|
|
130
|
+
} = useTranslation("editor");
|
|
131
|
+
const {
|
|
132
|
+
diagnostic
|
|
133
|
+
} = problem;
|
|
134
|
+
const severity = severityOf(diagnostic);
|
|
135
|
+
let t1;
|
|
136
|
+
if ($[0] !== diagnostic || $[1] !== problem.server) {
|
|
137
|
+
t1 = diagnostic.source === undefined ? [codeLabelOf(diagnostic), problem.server].filter(_temp).join(" \xB7 ") : codeLabelOf(diagnostic);
|
|
138
|
+
$[0] = diagnostic;
|
|
139
|
+
$[1] = problem.server;
|
|
140
|
+
$[2] = t1;
|
|
141
|
+
} else {
|
|
142
|
+
t1 = $[2];
|
|
143
|
+
}
|
|
144
|
+
const label = t1;
|
|
145
|
+
const supported = language.codeActions.supported;
|
|
146
|
+
const t2 = SEVERITY_ICONS[severity];
|
|
147
|
+
const t3 = `mt-px shrink-0 ${SEVERITY_COLORS[severity]}`;
|
|
148
|
+
let t4;
|
|
149
|
+
if ($[3] !== t2 || $[4] !== t3) {
|
|
150
|
+
t4 = /*#__PURE__*/_jsx(Icon, {
|
|
151
|
+
icon: t2,
|
|
152
|
+
size: 14,
|
|
153
|
+
className: t3
|
|
154
|
+
});
|
|
155
|
+
$[3] = t2;
|
|
156
|
+
$[4] = t3;
|
|
157
|
+
$[5] = t4;
|
|
158
|
+
} else {
|
|
159
|
+
t4 = $[5];
|
|
160
|
+
}
|
|
161
|
+
let t5;
|
|
162
|
+
if ($[6] !== diagnostic.message) {
|
|
163
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
164
|
+
className: "min-w-0 text-xs/[18px] break-words whitespace-pre-wrap select-text",
|
|
165
|
+
children: diagnostic.message
|
|
166
|
+
});
|
|
167
|
+
$[6] = diagnostic.message;
|
|
168
|
+
$[7] = t5;
|
|
169
|
+
} else {
|
|
170
|
+
t5 = $[7];
|
|
171
|
+
}
|
|
172
|
+
let t6;
|
|
173
|
+
if ($[8] !== t4 || $[9] !== t5) {
|
|
174
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
175
|
+
className: "flex items-start gap-2",
|
|
176
|
+
children: [t4, t5]
|
|
177
|
+
});
|
|
178
|
+
$[8] = t4;
|
|
179
|
+
$[9] = t5;
|
|
180
|
+
$[10] = t6;
|
|
181
|
+
} else {
|
|
182
|
+
t6 = $[10];
|
|
183
|
+
}
|
|
184
|
+
let t7;
|
|
185
|
+
if ($[11] !== label) {
|
|
186
|
+
t7 = label !== "" && /*#__PURE__*/_jsx("div", {
|
|
187
|
+
className: "pl-[22px] text-xs text-text-muted select-text",
|
|
188
|
+
children: label
|
|
189
|
+
});
|
|
190
|
+
$[11] = label;
|
|
191
|
+
$[12] = t7;
|
|
192
|
+
} else {
|
|
193
|
+
t7 = $[12];
|
|
194
|
+
}
|
|
195
|
+
let t8;
|
|
196
|
+
if ($[13] !== diagnostic.relatedInformation || $[14] !== language) {
|
|
197
|
+
t8 = diagnostic.relatedInformation?.map((related, index) => {
|
|
198
|
+
const path = fileUriToPath(related.location.uri);
|
|
199
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
200
|
+
className: "pl-[22px] text-xs text-text-muted",
|
|
201
|
+
children: [path !== null && /*#__PURE__*/_jsxs("button", {
|
|
202
|
+
type: "button",
|
|
203
|
+
className: "font-mono text-accent hover:underline",
|
|
204
|
+
onClick: () => language.goTo(related.location),
|
|
205
|
+
children: [basenameOf(path), ":", formatNumber(related.location.range.start.line + 1)]
|
|
206
|
+
}), " ", related.message]
|
|
207
|
+
}, index);
|
|
208
|
+
});
|
|
209
|
+
$[13] = diagnostic.relatedInformation;
|
|
210
|
+
$[14] = language;
|
|
211
|
+
$[15] = t8;
|
|
212
|
+
} else {
|
|
213
|
+
t8 = $[15];
|
|
214
|
+
}
|
|
215
|
+
const t9 = supported ? "language.hover.quickFix" : "language.hover.quickFixNone";
|
|
216
|
+
let t10;
|
|
217
|
+
if ($[16] !== t || $[17] !== t9) {
|
|
218
|
+
t10 = t(t9);
|
|
219
|
+
$[16] = t;
|
|
220
|
+
$[17] = t9;
|
|
221
|
+
$[18] = t10;
|
|
222
|
+
} else {
|
|
223
|
+
t10 = $[18];
|
|
224
|
+
}
|
|
225
|
+
const t11 = !supported;
|
|
226
|
+
let t12;
|
|
227
|
+
if ($[19] !== language.codeActions || $[20] !== language.hover || $[21] !== problem || $[22] !== supported) {
|
|
228
|
+
t12 = () => {
|
|
229
|
+
if (supported) {
|
|
230
|
+
language.hover.hide();
|
|
231
|
+
language.codeActions.quickFixFor(problem);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
$[19] = language.codeActions;
|
|
235
|
+
$[20] = language.hover;
|
|
236
|
+
$[21] = problem;
|
|
237
|
+
$[22] = supported;
|
|
238
|
+
$[23] = t12;
|
|
239
|
+
} else {
|
|
240
|
+
t12 = $[23];
|
|
241
|
+
}
|
|
242
|
+
let t13;
|
|
243
|
+
if ($[24] !== t) {
|
|
244
|
+
t13 = t("language.hover.quickFix");
|
|
245
|
+
$[24] = t;
|
|
246
|
+
$[25] = t13;
|
|
247
|
+
} else {
|
|
248
|
+
t13 = $[25];
|
|
249
|
+
}
|
|
250
|
+
let t14;
|
|
251
|
+
if ($[26] !== t11 || $[27] !== t12 || $[28] !== t13) {
|
|
252
|
+
t14 = /*#__PURE__*/_jsx(Button, {
|
|
253
|
+
size: "xs",
|
|
254
|
+
variant: "secondary",
|
|
255
|
+
"aria-disabled": t11,
|
|
256
|
+
onClick: t12,
|
|
257
|
+
children: t13
|
|
258
|
+
});
|
|
259
|
+
$[26] = t11;
|
|
260
|
+
$[27] = t12;
|
|
261
|
+
$[28] = t13;
|
|
262
|
+
$[29] = t14;
|
|
263
|
+
} else {
|
|
264
|
+
t14 = $[29];
|
|
265
|
+
}
|
|
266
|
+
let t15;
|
|
267
|
+
if ($[30] !== t10 || $[31] !== t14) {
|
|
268
|
+
t15 = /*#__PURE__*/_jsx("div", {
|
|
269
|
+
className: "pt-1 pl-[22px]",
|
|
270
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
271
|
+
label: t10,
|
|
272
|
+
children: t14
|
|
273
|
+
})
|
|
274
|
+
});
|
|
275
|
+
$[30] = t10;
|
|
276
|
+
$[31] = t14;
|
|
277
|
+
$[32] = t15;
|
|
278
|
+
} else {
|
|
279
|
+
t15 = $[32];
|
|
280
|
+
}
|
|
281
|
+
let t16;
|
|
282
|
+
if ($[33] !== t15 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8) {
|
|
283
|
+
t16 = /*#__PURE__*/_jsxs("div", {
|
|
284
|
+
className: "flex flex-col gap-1.5 px-3 py-2.5",
|
|
285
|
+
children: [t6, t7, t8, t15]
|
|
286
|
+
});
|
|
287
|
+
$[33] = t15;
|
|
288
|
+
$[34] = t6;
|
|
289
|
+
$[35] = t7;
|
|
290
|
+
$[36] = t8;
|
|
291
|
+
$[37] = t16;
|
|
292
|
+
} else {
|
|
293
|
+
t16 = $[37];
|
|
294
|
+
}
|
|
295
|
+
return t16;
|
|
43
296
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return (_jsxs("div", { className: "flex w-max min-w-[280px] max-w-[min(520px,calc(100vw-16px))] flex-col divide-y divide-border", children: [info !== null && (_jsxs(_Fragment, { children: [_jsx(SymbolSections, { text: info.text, onName: (name, declared) => {
|
|
47
|
-
language.hover.hide();
|
|
48
|
-
void language.navigation.goToName(name, anchor, name === (declared ?? info.word) ? info.definition : null);
|
|
49
|
-
} }), info.plain !== true && (_jsxs("div", { className: "flex flex-col gap-0.5 px-3 py-1.5 text-xs", children: [_jsxs("div", { className: "flex items-center gap-3 whitespace-nowrap", children: [info.definition !== null && (_jsx("button", { type: "button", className: "text-accent hover:underline", onClick: () => language.goTo(info.definition), children: t('language.hover.definition') })), info.references !== null && info.references > 0 && (_jsx("button", { type: "button", className: "text-accent hover:underline", onClick: () => {
|
|
50
|
-
language.hover.hide();
|
|
51
|
-
void language.peek.open(position);
|
|
52
|
-
}, children: t('language.hover.references', { count: info.references, formatted: formatNumber(info.references) }) }))] }), info.definition !== null && _jsx(DefinitionPlace, { definition: info.definition, uri: language.uri, folder: language.project.folder })] }))] })), problems.map((problem, index) => (_jsx(ProblemSection, { problem: problem, language: language }, index))), footer] }));
|
|
297
|
+
function _temp(part) {
|
|
298
|
+
return part !== "";
|
|
53
299
|
}
|
|
300
|
+
export function HoverCard(t0) {
|
|
301
|
+
const $ = _c(15);
|
|
302
|
+
const {
|
|
303
|
+
language,
|
|
304
|
+
problems,
|
|
305
|
+
info,
|
|
306
|
+
anchor,
|
|
307
|
+
position,
|
|
308
|
+
footer
|
|
309
|
+
} = t0;
|
|
310
|
+
const {
|
|
311
|
+
t
|
|
312
|
+
} = useTranslation("editor");
|
|
313
|
+
let t1;
|
|
314
|
+
if ($[0] !== anchor || $[1] !== info || $[2] !== language || $[3] !== position || $[4] !== t) {
|
|
315
|
+
t1 = info !== null && /*#__PURE__*/_jsxs(_Fragment, {
|
|
316
|
+
children: [/*#__PURE__*/_jsx(SymbolSections, {
|
|
317
|
+
text: info.text,
|
|
318
|
+
onName: (name, declared) => {
|
|
319
|
+
language.hover.hide();
|
|
320
|
+
language.navigation.goToName(name, anchor, name === (declared ?? info.word) ? info.definition : null);
|
|
321
|
+
}
|
|
322
|
+
}), info.plain !== true && /*#__PURE__*/_jsxs("div", {
|
|
323
|
+
className: "flex flex-col gap-0.5 px-3 py-1.5 text-xs",
|
|
324
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
325
|
+
className: "flex items-center gap-3 whitespace-nowrap",
|
|
326
|
+
children: [info.definition !== null && /*#__PURE__*/_jsx("button", {
|
|
327
|
+
type: "button",
|
|
328
|
+
className: "text-accent hover:underline",
|
|
329
|
+
onClick: () => language.goTo(info.definition),
|
|
330
|
+
children: t("language.hover.definition")
|
|
331
|
+
}), info.references !== null && info.references > 0 && /*#__PURE__*/_jsx("button", {
|
|
332
|
+
type: "button",
|
|
333
|
+
className: "text-accent hover:underline",
|
|
334
|
+
onClick: () => {
|
|
335
|
+
language.hover.hide();
|
|
336
|
+
language.peek.open(position);
|
|
337
|
+
},
|
|
338
|
+
children: t("language.hover.references", {
|
|
339
|
+
count: info.references,
|
|
340
|
+
formatted: formatNumber(info.references)
|
|
341
|
+
})
|
|
342
|
+
})]
|
|
343
|
+
}), info.definition !== null && /*#__PURE__*/_jsx(DefinitionPlace, {
|
|
344
|
+
definition: info.definition,
|
|
345
|
+
uri: language.uri,
|
|
346
|
+
folder: language.project.folder
|
|
347
|
+
})]
|
|
348
|
+
})]
|
|
349
|
+
});
|
|
350
|
+
$[0] = anchor;
|
|
351
|
+
$[1] = info;
|
|
352
|
+
$[2] = language;
|
|
353
|
+
$[3] = position;
|
|
354
|
+
$[4] = t;
|
|
355
|
+
$[5] = t1;
|
|
356
|
+
} else {
|
|
357
|
+
t1 = $[5];
|
|
358
|
+
}
|
|
359
|
+
let t2;
|
|
360
|
+
if ($[6] !== language || $[7] !== problems) {
|
|
361
|
+
let t3;
|
|
362
|
+
if ($[9] !== language) {
|
|
363
|
+
t3 = (problem, index) => /*#__PURE__*/_jsx(ProblemSection, {
|
|
364
|
+
problem: problem,
|
|
365
|
+
language: language
|
|
366
|
+
}, index);
|
|
367
|
+
$[9] = language;
|
|
368
|
+
$[10] = t3;
|
|
369
|
+
} else {
|
|
370
|
+
t3 = $[10];
|
|
371
|
+
}
|
|
372
|
+
t2 = problems.map(t3);
|
|
373
|
+
$[6] = language;
|
|
374
|
+
$[7] = problems;
|
|
375
|
+
$[8] = t2;
|
|
376
|
+
} else {
|
|
377
|
+
t2 = $[8];
|
|
378
|
+
}
|
|
379
|
+
let t3;
|
|
380
|
+
if ($[11] !== footer || $[12] !== t1 || $[13] !== t2) {
|
|
381
|
+
t3 = /*#__PURE__*/_jsxs("div", {
|
|
382
|
+
className: "flex w-max min-w-[280px] max-w-[min(520px,calc(100vw-16px))] flex-col divide-y divide-border",
|
|
383
|
+
children: [t1, t2, footer]
|
|
384
|
+
});
|
|
385
|
+
$[11] = footer;
|
|
386
|
+
$[12] = t1;
|
|
387
|
+
$[13] = t2;
|
|
388
|
+
$[14] = t3;
|
|
389
|
+
} else {
|
|
390
|
+
t3 = $[14];
|
|
391
|
+
}
|
|
392
|
+
return t3;
|
|
393
|
+
}
|