@adecore/editor-react 0.31.12 → 0.33.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/SymbolPicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useEffect,
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { AtSign, Hash } from 'lucide-react';
|
|
@@ -8,101 +8,456 @@ import { formatShortcut, Icon } from '@adecore/ui';
|
|
|
8
8
|
import { formatNumber } from '@adecore/ui/format';
|
|
9
9
|
import { basenameOf } from './paths.js';
|
|
10
10
|
import { filterEntries, groupEntries, letterOfKind, modeOf, toneOfKind } from './symbol-picker-model.js';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
const TONES = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
callable: 'bg-accent-soft text-accent',
|
|
14
|
+
value: 'bg-status-running/15 text-status-running',
|
|
15
|
+
type: 'bg-status-idle/15 text-status-idle',
|
|
16
|
+
other: 'bg-surface-hover text-text-muted'
|
|
16
17
|
};
|
|
17
18
|
const SEARCH_DELAY_MS = 200;
|
|
18
19
|
/* The letter badge of a symbol kind, tinted by what the symbol is. */
|
|
19
|
-
export function SymbolBadge(
|
|
20
|
-
|
|
20
|
+
export function SymbolBadge(t0) {
|
|
21
|
+
const $ = _c(5);
|
|
22
|
+
const {
|
|
23
|
+
kind
|
|
24
|
+
} = t0;
|
|
25
|
+
const t1 = `grid size-4 shrink-0 place-items-center rounded-sm font-mono text-xs font-semibold ${TONES[toneOfKind(kind)]}`;
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[0] !== kind) {
|
|
28
|
+
t2 = letterOfKind(kind);
|
|
29
|
+
$[0] = kind;
|
|
30
|
+
$[1] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
t2 = $[1];
|
|
33
|
+
}
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[2] !== t1 || $[3] !== t2) {
|
|
36
|
+
t3 = /*#__PURE__*/_jsx("span", {
|
|
37
|
+
className: t1,
|
|
38
|
+
children: t2
|
|
39
|
+
});
|
|
40
|
+
$[2] = t1;
|
|
41
|
+
$[3] = t2;
|
|
42
|
+
$[4] = t3;
|
|
43
|
+
} else {
|
|
44
|
+
t3 = $[4];
|
|
45
|
+
}
|
|
46
|
+
return t3;
|
|
21
47
|
}
|
|
22
48
|
/*
|
|
23
49
|
* The picker of go to symbol, over the editor: an input, the symbols of the file in groups by kind, and the
|
|
24
50
|
* keys. The input keeps the focus; Enter goes, Escape and the focus leaving close it.
|
|
25
51
|
*/
|
|
26
|
-
export function SymbolPicker(
|
|
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
|
-
function choose(index) {
|
|
60
|
-
if (mode.mode === 'line') {
|
|
61
|
-
if (mode.line !== null) {
|
|
62
|
-
language.symbolPicker.goToLine(mode.line);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else if (mode.mode === 'workspace') {
|
|
66
|
-
const place = places[index];
|
|
67
|
-
if (place !== undefined) {
|
|
68
|
-
language.symbolPicker.goToWorkspace(place);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else if (flat[index] !== undefined) {
|
|
72
|
-
language.symbolPicker.goTo(flat[index]);
|
|
73
|
-
}
|
|
52
|
+
export function SymbolPicker(t0) {
|
|
53
|
+
const $ = _c(56);
|
|
54
|
+
const {
|
|
55
|
+
language,
|
|
56
|
+
view
|
|
57
|
+
} = t0;
|
|
58
|
+
const {
|
|
59
|
+
t
|
|
60
|
+
} = useTranslation("editor");
|
|
61
|
+
const [input, setInput] = useState("");
|
|
62
|
+
const [active, setActive] = useState(0);
|
|
63
|
+
let t1;
|
|
64
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
65
|
+
t1 = {
|
|
66
|
+
text: "",
|
|
67
|
+
entries: []
|
|
68
|
+
};
|
|
69
|
+
$[0] = t1;
|
|
70
|
+
} else {
|
|
71
|
+
t1 = $[0];
|
|
72
|
+
}
|
|
73
|
+
const [found, setFound] = useState(t1);
|
|
74
|
+
const activeRow = useRef(null);
|
|
75
|
+
const mode = modeOf(input);
|
|
76
|
+
const filterText = mode.mode === "symbol" ? mode.text : "";
|
|
77
|
+
const searchText = mode.mode === "workspace" ? mode.text : "";
|
|
78
|
+
const groups = groupEntries(filterEntries(view.entries, filterText));
|
|
79
|
+
const flat = groups.flatMap(_temp);
|
|
80
|
+
const places = mode.mode === "workspace" && found.text === mode.text ? found.entries : [];
|
|
81
|
+
const count = mode.mode === "workspace" ? places.length : mode.mode === "line" ? mode.line === null ? 0 : 1 : flat.length;
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (searchText === "") {
|
|
84
|
+
return;
|
|
74
85
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
const controller = new AbortController();
|
|
87
|
+
const text = searchText;
|
|
88
|
+
const timer = setTimeout(() => {
|
|
89
|
+
language.symbolPicker.search(text, controller.signal).then(entries => !controller.signal.aborted && setFound({
|
|
90
|
+
text,
|
|
91
|
+
entries
|
|
92
|
+
})).catch(_temp2);
|
|
93
|
+
}, SEARCH_DELAY_MS);
|
|
94
|
+
return () => {
|
|
95
|
+
clearTimeout(timer);
|
|
96
|
+
controller.abort();
|
|
97
|
+
};
|
|
98
|
+
}, [language, searchText]);
|
|
99
|
+
let t2;
|
|
100
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
101
|
+
t2 = () => {
|
|
102
|
+
activeRow.current?.scrollIntoView({
|
|
103
|
+
block: "nearest"
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
$[1] = t2;
|
|
107
|
+
} else {
|
|
108
|
+
t2 = $[1];
|
|
109
|
+
}
|
|
110
|
+
let t3;
|
|
111
|
+
if ($[2] !== active || $[3] !== input) {
|
|
112
|
+
t3 = [active, input];
|
|
113
|
+
$[2] = active;
|
|
114
|
+
$[3] = input;
|
|
115
|
+
$[4] = t3;
|
|
116
|
+
} else {
|
|
117
|
+
t3 = $[4];
|
|
118
|
+
}
|
|
119
|
+
useEffect(t2, t3);
|
|
120
|
+
const choose = function choose(index) {
|
|
121
|
+
if (mode.mode === "line") {
|
|
122
|
+
if (mode.line !== null) {
|
|
123
|
+
language.symbolPicker.goToLine(mode.line);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
if (mode.mode === "workspace") {
|
|
127
|
+
const place = places[index];
|
|
128
|
+
if (place !== undefined) {
|
|
129
|
+
language.symbolPicker.goToWorkspace(place);
|
|
80
130
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
choose(active);
|
|
131
|
+
} else {
|
|
132
|
+
if (flat[index] !== undefined) {
|
|
133
|
+
language.symbolPicker.goTo(flat[index]);
|
|
85
134
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const onKeyDown = function onKeyDown(event) {
|
|
139
|
+
if (event.key === "Escape") {
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
event.stopPropagation();
|
|
142
|
+
language.symbolPicker.close();
|
|
143
|
+
} else {
|
|
144
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
event.stopPropagation();
|
|
147
|
+
choose(active);
|
|
148
|
+
} else {
|
|
149
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
150
|
+
event.preventDefault();
|
|
151
|
+
setActive(Math.max(0, Math.min(Math.max(0, count - 1), active + (event.key === "ArrowDown" ? 1 : -1))));
|
|
89
152
|
}
|
|
153
|
+
}
|
|
90
154
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
155
|
+
};
|
|
156
|
+
let offset = 0;
|
|
157
|
+
const t4 = mode.mode === "workspace" ? Hash : AtSign;
|
|
158
|
+
let t5;
|
|
159
|
+
if ($[5] !== t4) {
|
|
160
|
+
t5 = /*#__PURE__*/_jsx(Icon, {
|
|
161
|
+
icon: t4,
|
|
162
|
+
size: 14,
|
|
163
|
+
className: "shrink-0 text-text-muted"
|
|
164
|
+
});
|
|
165
|
+
$[5] = t4;
|
|
166
|
+
$[6] = t5;
|
|
167
|
+
} else {
|
|
168
|
+
t5 = $[6];
|
|
169
|
+
}
|
|
170
|
+
let t6;
|
|
171
|
+
if ($[7] !== t || $[8] !== view.file) {
|
|
172
|
+
t6 = t("language.symbols.placeholder", {
|
|
173
|
+
file: view.file
|
|
174
|
+
});
|
|
175
|
+
$[7] = t;
|
|
176
|
+
$[8] = view.file;
|
|
177
|
+
$[9] = t6;
|
|
178
|
+
} else {
|
|
179
|
+
t6 = $[9];
|
|
180
|
+
}
|
|
181
|
+
let t7;
|
|
182
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
183
|
+
t7 = event_1 => {
|
|
184
|
+
setInput(event_1.target.value);
|
|
185
|
+
setActive(0);
|
|
186
|
+
};
|
|
187
|
+
$[10] = t7;
|
|
188
|
+
} else {
|
|
189
|
+
t7 = $[10];
|
|
190
|
+
}
|
|
191
|
+
let t8;
|
|
192
|
+
if ($[11] !== language.symbolPicker) {
|
|
193
|
+
t8 = () => language.symbolPicker.close();
|
|
194
|
+
$[11] = language.symbolPicker;
|
|
195
|
+
$[12] = t8;
|
|
196
|
+
} else {
|
|
197
|
+
t8 = $[12];
|
|
198
|
+
}
|
|
199
|
+
let t9;
|
|
200
|
+
if ($[13] !== language.apple || $[14] !== language.shortcuts.goToSymbol) {
|
|
201
|
+
t9 = language.shortcuts.goToSymbol === null ? "" : formatShortcut(language.shortcuts.goToSymbol, language.apple);
|
|
202
|
+
$[13] = language.apple;
|
|
203
|
+
$[14] = language.shortcuts.goToSymbol;
|
|
204
|
+
$[15] = t9;
|
|
205
|
+
} else {
|
|
206
|
+
t9 = $[15];
|
|
207
|
+
}
|
|
208
|
+
let t10;
|
|
209
|
+
if ($[16] !== t9) {
|
|
210
|
+
t10 = /*#__PURE__*/_jsx("span", {
|
|
211
|
+
className: "shrink-0 text-xs text-text-faint",
|
|
212
|
+
children: t9
|
|
213
|
+
});
|
|
214
|
+
$[16] = t9;
|
|
215
|
+
$[17] = t10;
|
|
216
|
+
} else {
|
|
217
|
+
t10 = $[17];
|
|
218
|
+
}
|
|
219
|
+
const t11 = "listbox";
|
|
220
|
+
const t12 = "max-h-[320px] overflow-y-auto p-1";
|
|
221
|
+
const t13 = mode.mode === "line" && /*#__PURE__*/_jsx("div", {
|
|
222
|
+
className: "px-2 py-1.5 text-xs text-text-muted",
|
|
223
|
+
children: mode.line === null ? t("language.symbols.lineHint") : t("language.symbols.goToLine", {
|
|
224
|
+
line: formatNumber(mode.line)
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
const t14 = mode.mode === "workspace" && places.map((place_0, index_0) => {
|
|
228
|
+
const path = fileUriToPath(place_0.uri);
|
|
229
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
230
|
+
ref: index_0 === active ? activeRow : undefined,
|
|
231
|
+
type: "button",
|
|
232
|
+
role: "option",
|
|
233
|
+
"aria-selected": index_0 === active,
|
|
234
|
+
"data-active": index_0 === active,
|
|
235
|
+
className: "flex h-7 w-full items-center gap-2 rounded-md px-2 text-left text-xs cursor-row",
|
|
236
|
+
onClick: () => choose(index_0),
|
|
237
|
+
children: [/*#__PURE__*/_jsx(SymbolBadge, {
|
|
238
|
+
kind: place_0.kind
|
|
239
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
240
|
+
className: "shrink-0",
|
|
241
|
+
children: place_0.name
|
|
242
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
243
|
+
className: "min-w-0 truncate font-mono text-text-faint",
|
|
244
|
+
children: place_0.container
|
|
245
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
246
|
+
className: "ml-auto shrink-0 font-mono text-text-faint",
|
|
247
|
+
children: [path === null ? "" : basenameOf(path), ":", formatNumber(place_0.line + 1)]
|
|
248
|
+
})]
|
|
249
|
+
}, place_0.id);
|
|
250
|
+
});
|
|
251
|
+
const t15 = mode.mode === "symbol" && groups.map(group_0 => {
|
|
252
|
+
const start = offset;
|
|
253
|
+
offset = offset + group_0.entries.length;
|
|
254
|
+
offset;
|
|
255
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
256
|
+
role: "group",
|
|
257
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
258
|
+
className: "px-2 pt-1.5 pb-0.5 text-xs font-medium text-text-faint",
|
|
259
|
+
children: t(`language.symbols.groups.${group_0.group}`)
|
|
260
|
+
}), group_0.entries.map((entry, index_1) => {
|
|
261
|
+
const position = start + index_1;
|
|
262
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
263
|
+
ref: position === active ? activeRow : undefined,
|
|
264
|
+
type: "button",
|
|
265
|
+
role: "option",
|
|
266
|
+
"aria-selected": position === active,
|
|
267
|
+
"data-active": position === active,
|
|
268
|
+
className: "flex h-7 w-full items-center gap-2 rounded-md px-2 text-left text-xs cursor-row",
|
|
269
|
+
onClick: () => choose(position),
|
|
270
|
+
children: [/*#__PURE__*/_jsx(SymbolBadge, {
|
|
271
|
+
kind: entry.kind
|
|
272
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
273
|
+
className: "shrink-0",
|
|
274
|
+
children: entry.name
|
|
275
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
276
|
+
className: "min-w-0 truncate font-mono text-text-faint",
|
|
277
|
+
children: entry.detail
|
|
278
|
+
}), entry.container !== "" && /*#__PURE__*/_jsx("span", {
|
|
279
|
+
className: "min-w-0 truncate text-text-faint",
|
|
280
|
+
children: entry.container
|
|
281
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
282
|
+
className: "ml-auto shrink-0 font-mono text-text-faint",
|
|
283
|
+
children: formatNumber(entry.line + 1)
|
|
284
|
+
})]
|
|
285
|
+
}, entry.id);
|
|
286
|
+
})]
|
|
287
|
+
}, group_0.group);
|
|
288
|
+
});
|
|
289
|
+
let t16;
|
|
290
|
+
if ($[18] !== flat || $[19] !== mode.mode || $[20] !== t) {
|
|
291
|
+
t16 = mode.mode === "symbol" && flat.length === 0 && /*#__PURE__*/_jsx("div", {
|
|
292
|
+
className: "px-2 py-3 text-center text-xs text-text-muted",
|
|
293
|
+
children: t("language.symbols.none")
|
|
294
|
+
});
|
|
295
|
+
$[18] = flat;
|
|
296
|
+
$[19] = mode.mode;
|
|
297
|
+
$[20] = t;
|
|
298
|
+
$[21] = t16;
|
|
299
|
+
} else {
|
|
300
|
+
t16 = $[21];
|
|
301
|
+
}
|
|
302
|
+
let t17;
|
|
303
|
+
if ($[22] !== mode.mode || $[23] !== mode.text || $[24] !== places || $[25] !== t) {
|
|
304
|
+
t17 = mode.mode === "workspace" && places.length === 0 && /*#__PURE__*/_jsx("div", {
|
|
305
|
+
className: "px-2 py-3 text-center text-xs text-text-muted",
|
|
306
|
+
children: mode.text === "" ? t("language.symbols.workspaceHint") : t("language.symbols.none")
|
|
307
|
+
});
|
|
308
|
+
$[22] = mode.mode;
|
|
309
|
+
$[23] = mode.text;
|
|
310
|
+
$[24] = places;
|
|
311
|
+
$[25] = t;
|
|
312
|
+
$[26] = t17;
|
|
313
|
+
} else {
|
|
314
|
+
t17 = $[26];
|
|
315
|
+
}
|
|
316
|
+
let t18;
|
|
317
|
+
if ($[27] !== t13 || $[28] !== t14 || $[29] !== t15 || $[30] !== t16 || $[31] !== t17) {
|
|
318
|
+
t18 = /*#__PURE__*/_jsxs("div", {
|
|
319
|
+
role: t11,
|
|
320
|
+
className: t12,
|
|
321
|
+
children: [t13, t14, t15, t16, t17]
|
|
322
|
+
});
|
|
323
|
+
$[27] = t13;
|
|
324
|
+
$[28] = t14;
|
|
325
|
+
$[29] = t15;
|
|
326
|
+
$[30] = t16;
|
|
327
|
+
$[31] = t17;
|
|
328
|
+
$[32] = t18;
|
|
329
|
+
} else {
|
|
330
|
+
t18 = $[32];
|
|
331
|
+
}
|
|
332
|
+
let t19;
|
|
333
|
+
if ($[33] !== t) {
|
|
334
|
+
t19 = t("language.symbols.navigate");
|
|
335
|
+
$[33] = t;
|
|
336
|
+
$[34] = t19;
|
|
337
|
+
} else {
|
|
338
|
+
t19 = $[34];
|
|
339
|
+
}
|
|
340
|
+
let t20;
|
|
341
|
+
if ($[35] !== t19) {
|
|
342
|
+
t20 = /*#__PURE__*/_jsxs("span", {
|
|
343
|
+
children: ["\u2191\u2193 ", t19]
|
|
344
|
+
});
|
|
345
|
+
$[35] = t19;
|
|
346
|
+
$[36] = t20;
|
|
347
|
+
} else {
|
|
348
|
+
t20 = $[36];
|
|
349
|
+
}
|
|
350
|
+
let t21;
|
|
351
|
+
if ($[37] !== t) {
|
|
352
|
+
t21 = t("language.symbols.open");
|
|
353
|
+
$[37] = t;
|
|
354
|
+
$[38] = t21;
|
|
355
|
+
} else {
|
|
356
|
+
t21 = $[38];
|
|
357
|
+
}
|
|
358
|
+
let t22;
|
|
359
|
+
if ($[39] !== t21) {
|
|
360
|
+
t22 = /*#__PURE__*/_jsxs("span", {
|
|
361
|
+
children: ["\u21B5 ", t21]
|
|
362
|
+
});
|
|
363
|
+
$[39] = t21;
|
|
364
|
+
$[40] = t22;
|
|
365
|
+
} else {
|
|
366
|
+
t22 = $[40];
|
|
367
|
+
}
|
|
368
|
+
let t23;
|
|
369
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
370
|
+
t23 = () => setInput("#");
|
|
371
|
+
$[41] = t23;
|
|
372
|
+
} else {
|
|
373
|
+
t23 = $[41];
|
|
374
|
+
}
|
|
375
|
+
let t24;
|
|
376
|
+
if ($[42] !== t) {
|
|
377
|
+
t24 = t("language.symbols.workspace");
|
|
378
|
+
$[42] = t;
|
|
379
|
+
$[43] = t24;
|
|
380
|
+
} else {
|
|
381
|
+
t24 = $[43];
|
|
382
|
+
}
|
|
383
|
+
let t25;
|
|
384
|
+
if ($[44] !== t24) {
|
|
385
|
+
t25 = /*#__PURE__*/_jsxs("button", {
|
|
386
|
+
type: "button",
|
|
387
|
+
className: "ml-auto hover:text-text",
|
|
388
|
+
onClick: t23,
|
|
389
|
+
children: ["# ", t24]
|
|
390
|
+
});
|
|
391
|
+
$[44] = t24;
|
|
392
|
+
$[45] = t25;
|
|
393
|
+
} else {
|
|
394
|
+
t25 = $[45];
|
|
395
|
+
}
|
|
396
|
+
let t26;
|
|
397
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
398
|
+
t26 = () => setInput(":");
|
|
399
|
+
$[46] = t26;
|
|
400
|
+
} else {
|
|
401
|
+
t26 = $[46];
|
|
402
|
+
}
|
|
403
|
+
let t27;
|
|
404
|
+
if ($[47] !== t) {
|
|
405
|
+
t27 = t("language.symbols.line");
|
|
406
|
+
$[47] = t;
|
|
407
|
+
$[48] = t27;
|
|
408
|
+
} else {
|
|
409
|
+
t27 = $[48];
|
|
410
|
+
}
|
|
411
|
+
let t28;
|
|
412
|
+
if ($[49] !== t27) {
|
|
413
|
+
t28 = /*#__PURE__*/_jsxs("button", {
|
|
414
|
+
type: "button",
|
|
415
|
+
className: "hover:text-text",
|
|
416
|
+
onClick: t26,
|
|
417
|
+
children: [": ", t27]
|
|
418
|
+
});
|
|
419
|
+
$[49] = t27;
|
|
420
|
+
$[50] = t28;
|
|
421
|
+
} else {
|
|
422
|
+
t28 = $[50];
|
|
423
|
+
}
|
|
424
|
+
let t29;
|
|
425
|
+
if ($[51] !== t20 || $[52] !== t22 || $[53] !== t25 || $[54] !== t28) {
|
|
426
|
+
t29 = /*#__PURE__*/_jsxs("div", {
|
|
427
|
+
className: "flex items-center gap-3 border-t border-border px-3 py-1.5 text-xs whitespace-nowrap text-text-faint",
|
|
428
|
+
children: [t20, t22, t25, t28]
|
|
429
|
+
});
|
|
430
|
+
$[51] = t20;
|
|
431
|
+
$[52] = t22;
|
|
432
|
+
$[53] = t25;
|
|
433
|
+
$[54] = t28;
|
|
434
|
+
$[55] = t29;
|
|
435
|
+
} else {
|
|
436
|
+
t29 = $[55];
|
|
437
|
+
}
|
|
438
|
+
return createPortal(/*#__PURE__*/_jsxs("div", {
|
|
439
|
+
className: "fixed top-[12vh] left-1/2 z-(--z-popup) flex w-[560px] max-w-[calc(100vw-16px)] -translate-x-1/2 flex-col overflow-hidden rounded-lg border border-border bg-surface-raised text-text shadow-(--float-shadow)",
|
|
440
|
+
onPointerDown: _temp3,
|
|
441
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
442
|
+
className: "flex items-center gap-2 border-b border-border px-3 py-2",
|
|
443
|
+
children: [t5, /*#__PURE__*/_jsx("input", {
|
|
444
|
+
autoFocus: true,
|
|
445
|
+
value: input,
|
|
446
|
+
spellCheck: false,
|
|
447
|
+
autoComplete: "off",
|
|
448
|
+
placeholder: t6,
|
|
449
|
+
className: "min-w-0 flex-1 bg-transparent text-sm text-text outline-none placeholder:text-text-faint",
|
|
450
|
+
onChange: t7,
|
|
451
|
+
onKeyDown: onKeyDown,
|
|
452
|
+
onBlur: t8
|
|
453
|
+
}), t10]
|
|
454
|
+
}), t18, t29]
|
|
455
|
+
}), document.body);
|
|
456
|
+
}
|
|
457
|
+
function _temp3(event_0) {
|
|
458
|
+
return event_0.target !== event_0.currentTarget && event_0.target.tagName !== "INPUT" && event_0.preventDefault();
|
|
108
459
|
}
|
|
460
|
+
function _temp2() {}
|
|
461
|
+
function _temp(group) {
|
|
462
|
+
return group.entries;
|
|
463
|
+
}
|