@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
package/dist/AnchoredPopup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { placePopup } from './popup-placement.js';
|
|
@@ -6,21 +6,75 @@ import { placePopup } from './popup-placement.js';
|
|
|
6
6
|
* A card next to a character of the editor, portaled to the page: inside a scaled canvas node it would be
|
|
7
7
|
* drawn at that scale and clipped by the node. Placed from the character's screen rectangle, so it holds at any zoom.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export function AnchoredPopup(t0) {
|
|
11
|
+
const $ = _c(9);
|
|
12
|
+
const {
|
|
13
|
+
rect,
|
|
14
|
+
className,
|
|
15
|
+
overflow: t1,
|
|
16
|
+
children,
|
|
17
|
+
placement,
|
|
18
|
+
onPointerEnter,
|
|
19
|
+
onPointerLeave
|
|
20
|
+
} = t0;
|
|
21
|
+
const overflow = t1 === undefined ? "scroll" : t1;
|
|
22
|
+
const element = useRef(null);
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[0] !== placement || $[1] !== rect) {
|
|
25
|
+
t2 = () => {
|
|
26
|
+
const popup = element.current;
|
|
27
|
+
if (popup === null) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
popup.style.maxHeight = "";
|
|
31
|
+
const size = {
|
|
32
|
+
width: popup.offsetWidth,
|
|
33
|
+
height: popup.offsetHeight
|
|
34
|
+
};
|
|
35
|
+
const placed = placePopup(rect, size, {
|
|
36
|
+
width: window.innerWidth,
|
|
37
|
+
height: window.innerHeight
|
|
38
|
+
}, placement);
|
|
39
|
+
popup.style.left = `${Math.round(placed.left)}px`;
|
|
40
|
+
popup.style.top = `${Math.round(placed.top)}px`;
|
|
41
|
+
popup.style.maxHeight = `${Math.floor(placed.maxHeight)}px`;
|
|
42
|
+
popup.style.visibility = "visible";
|
|
43
|
+
};
|
|
44
|
+
$[0] = placement;
|
|
45
|
+
$[1] = rect;
|
|
46
|
+
$[2] = t2;
|
|
47
|
+
} else {
|
|
48
|
+
t2 = $[2];
|
|
49
|
+
}
|
|
50
|
+
useLayoutEffect(t2);
|
|
51
|
+
const t3 = `fixed top-0 left-0 z-(--z-popup) ${overflow === "clip" ? "overflow-hidden" : "overflow-y-auto"} rounded-lg border border-border bg-surface-raised text-text shadow-(--float-shadow) ${className ?? ""}`;
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
54
|
+
t4 = {
|
|
55
|
+
visibility: "hidden"
|
|
56
|
+
};
|
|
57
|
+
$[3] = t4;
|
|
58
|
+
} else {
|
|
59
|
+
t4 = $[3];
|
|
60
|
+
}
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[4] !== children || $[5] !== onPointerEnter || $[6] !== onPointerLeave || $[7] !== t3) {
|
|
63
|
+
t5 = createPortal(/*#__PURE__*/_jsx("div", {
|
|
64
|
+
ref: element,
|
|
65
|
+
className: t3,
|
|
66
|
+
style: t4,
|
|
67
|
+
onPointerEnter: onPointerEnter,
|
|
68
|
+
onPointerLeave: onPointerLeave,
|
|
69
|
+
children: children
|
|
70
|
+
}), document.body);
|
|
71
|
+
$[4] = children;
|
|
72
|
+
$[5] = onPointerEnter;
|
|
73
|
+
$[6] = onPointerLeave;
|
|
74
|
+
$[7] = t3;
|
|
75
|
+
$[8] = t5;
|
|
76
|
+
} else {
|
|
77
|
+
t5 = $[8];
|
|
78
|
+
}
|
|
79
|
+
return t5;
|
|
80
|
+
}
|
package/dist/AttributionCard.js
CHANGED
|
@@ -1,5 +1,163 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { AnchoredPopup } from "./AnchoredPopup.js";
|
|
1
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export function AttributionCard(t0) {
|
|
5
|
+
const $ = _c(34);
|
|
6
|
+
const {
|
|
7
|
+
rect,
|
|
8
|
+
title,
|
|
9
|
+
subtitle,
|
|
10
|
+
metadata,
|
|
11
|
+
prompt,
|
|
12
|
+
color,
|
|
13
|
+
icon,
|
|
14
|
+
actions,
|
|
15
|
+
onHold
|
|
16
|
+
} = t0;
|
|
17
|
+
let t1;
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[0] !== onHold) {
|
|
20
|
+
t1 = () => onHold?.(true);
|
|
21
|
+
t2 = () => onHold?.(false);
|
|
22
|
+
$[0] = onHold;
|
|
23
|
+
$[1] = t1;
|
|
24
|
+
$[2] = t2;
|
|
25
|
+
} else {
|
|
26
|
+
t1 = $[1];
|
|
27
|
+
t2 = $[2];
|
|
28
|
+
}
|
|
29
|
+
const t3 = color?.startsWith("--") ? `var(${color})` : color;
|
|
30
|
+
let t4;
|
|
31
|
+
if ($[3] !== t3) {
|
|
32
|
+
t4 = {
|
|
33
|
+
color: t3
|
|
34
|
+
};
|
|
35
|
+
$[3] = t3;
|
|
36
|
+
$[4] = t4;
|
|
37
|
+
} else {
|
|
38
|
+
t4 = $[4];
|
|
39
|
+
}
|
|
40
|
+
let t5;
|
|
41
|
+
if ($[5] !== icon) {
|
|
42
|
+
t5 = icon ?? /*#__PURE__*/_jsx("span", {
|
|
43
|
+
className: "size-2 rounded-full bg-current"
|
|
44
|
+
});
|
|
45
|
+
$[5] = icon;
|
|
46
|
+
$[6] = t5;
|
|
47
|
+
} else {
|
|
48
|
+
t5 = $[6];
|
|
49
|
+
}
|
|
50
|
+
let t6;
|
|
51
|
+
if ($[7] !== t4 || $[8] !== t5) {
|
|
52
|
+
t6 = /*#__PURE__*/_jsx("span", {
|
|
53
|
+
className: "flex shrink-0 items-center",
|
|
54
|
+
style: t4,
|
|
55
|
+
children: t5
|
|
56
|
+
});
|
|
57
|
+
$[7] = t4;
|
|
58
|
+
$[8] = t5;
|
|
59
|
+
$[9] = t6;
|
|
60
|
+
} else {
|
|
61
|
+
t6 = $[9];
|
|
62
|
+
}
|
|
63
|
+
let t7;
|
|
64
|
+
if ($[10] !== title) {
|
|
65
|
+
t7 = /*#__PURE__*/_jsx("span", {
|
|
66
|
+
className: "shrink-0 text-sm font-semibold text-text",
|
|
67
|
+
children: title
|
|
68
|
+
});
|
|
69
|
+
$[10] = title;
|
|
70
|
+
$[11] = t7;
|
|
71
|
+
} else {
|
|
72
|
+
t7 = $[11];
|
|
73
|
+
}
|
|
74
|
+
let t8;
|
|
75
|
+
if ($[12] !== subtitle) {
|
|
76
|
+
t8 = subtitle !== undefined && /*#__PURE__*/_jsx("span", {
|
|
77
|
+
className: "min-w-0 truncate text-sm text-text-muted",
|
|
78
|
+
children: subtitle
|
|
79
|
+
});
|
|
80
|
+
$[12] = subtitle;
|
|
81
|
+
$[13] = t8;
|
|
82
|
+
} else {
|
|
83
|
+
t8 = $[13];
|
|
84
|
+
}
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
|
|
87
|
+
t9 = /*#__PURE__*/_jsxs("div", {
|
|
88
|
+
className: "flex items-center gap-2",
|
|
89
|
+
children: [t6, t7, t8]
|
|
90
|
+
});
|
|
91
|
+
$[14] = t6;
|
|
92
|
+
$[15] = t7;
|
|
93
|
+
$[16] = t8;
|
|
94
|
+
$[17] = t9;
|
|
95
|
+
} else {
|
|
96
|
+
t9 = $[17];
|
|
97
|
+
}
|
|
98
|
+
let t10;
|
|
99
|
+
if ($[18] !== metadata) {
|
|
100
|
+
t10 = metadata !== undefined && /*#__PURE__*/_jsx("div", {
|
|
101
|
+
className: "text-text-muted",
|
|
102
|
+
children: metadata
|
|
103
|
+
});
|
|
104
|
+
$[18] = metadata;
|
|
105
|
+
$[19] = t10;
|
|
106
|
+
} else {
|
|
107
|
+
t10 = $[19];
|
|
108
|
+
}
|
|
109
|
+
let t11;
|
|
110
|
+
if ($[20] !== prompt) {
|
|
111
|
+
t11 = prompt !== undefined && prompt !== "" && /*#__PURE__*/_jsx("q", {
|
|
112
|
+
className: "line-clamp-4 rounded-md bg-surface-hover px-2.5 py-2 text-sm leading-4.5 text-text select-text",
|
|
113
|
+
children: prompt
|
|
114
|
+
});
|
|
115
|
+
$[20] = prompt;
|
|
116
|
+
$[21] = t11;
|
|
117
|
+
} else {
|
|
118
|
+
t11 = $[21];
|
|
119
|
+
}
|
|
120
|
+
let t12;
|
|
121
|
+
if ($[22] !== t10 || $[23] !== t11 || $[24] !== t9) {
|
|
122
|
+
t12 = /*#__PURE__*/_jsxs("div", {
|
|
123
|
+
className: "flex flex-col gap-2 px-3 pt-3 pb-2.5",
|
|
124
|
+
children: [t9, t10, t11]
|
|
125
|
+
});
|
|
126
|
+
$[22] = t10;
|
|
127
|
+
$[23] = t11;
|
|
128
|
+
$[24] = t9;
|
|
129
|
+
$[25] = t12;
|
|
130
|
+
} else {
|
|
131
|
+
t12 = $[25];
|
|
132
|
+
}
|
|
133
|
+
let t13;
|
|
134
|
+
if ($[26] !== actions) {
|
|
135
|
+
t13 = actions !== undefined && /*#__PURE__*/_jsx("div", {
|
|
136
|
+
className: "flex gap-1 border-t border-border px-1.5 py-1.25",
|
|
137
|
+
children: actions
|
|
138
|
+
});
|
|
139
|
+
$[26] = actions;
|
|
140
|
+
$[27] = t13;
|
|
141
|
+
} else {
|
|
142
|
+
t13 = $[27];
|
|
143
|
+
}
|
|
144
|
+
let t14;
|
|
145
|
+
if ($[28] !== rect || $[29] !== t1 || $[30] !== t12 || $[31] !== t13 || $[32] !== t2) {
|
|
146
|
+
t14 = /*#__PURE__*/_jsxs(AnchoredPopup, {
|
|
147
|
+
rect: rect,
|
|
148
|
+
className: "flex w-105 flex-col text-xs",
|
|
149
|
+
onPointerEnter: t1,
|
|
150
|
+
onPointerLeave: t2,
|
|
151
|
+
children: [t12, t13]
|
|
152
|
+
});
|
|
153
|
+
$[28] = rect;
|
|
154
|
+
$[29] = t1;
|
|
155
|
+
$[30] = t12;
|
|
156
|
+
$[31] = t13;
|
|
157
|
+
$[32] = t2;
|
|
158
|
+
$[33] = t14;
|
|
159
|
+
} else {
|
|
160
|
+
t14 = $[33];
|
|
161
|
+
}
|
|
162
|
+
return t14;
|
|
163
|
+
}
|
package/dist/BaselineStatus.js
CHANGED
|
@@ -1,13 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { CircleCheck, Sparkles, TriangleAlert } from 'lucide-react';
|
|
3
3
|
import { Icon } from '@adecore/ui';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
5
|
const BASELINE_MARKS = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
widely: {
|
|
7
|
+
icon: CircleCheck,
|
|
8
|
+
color: 'text-status-idle'
|
|
9
|
+
},
|
|
10
|
+
newly: {
|
|
11
|
+
icon: Sparkles,
|
|
12
|
+
color: 'text-status-running'
|
|
13
|
+
},
|
|
14
|
+
limited: {
|
|
15
|
+
icon: TriangleAlert,
|
|
16
|
+
color: 'text-status-needs-you'
|
|
17
|
+
}
|
|
8
18
|
};
|
|
9
19
|
/* Where a web feature stands across browsers, as one line under a CSS property. */
|
|
10
|
-
export function BaselineStatus(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
export function BaselineStatus(t0) {
|
|
21
|
+
const $ = _c(8);
|
|
22
|
+
const {
|
|
23
|
+
baseline
|
|
24
|
+
} = t0;
|
|
25
|
+
const {
|
|
26
|
+
icon,
|
|
27
|
+
color
|
|
28
|
+
} = BASELINE_MARKS[baseline.level];
|
|
29
|
+
const t1 = `mt-px shrink-0 ${color}`;
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[0] !== icon || $[1] !== t1) {
|
|
32
|
+
t2 = /*#__PURE__*/_jsx(Icon, {
|
|
33
|
+
icon: icon,
|
|
34
|
+
size: 14,
|
|
35
|
+
className: t1
|
|
36
|
+
});
|
|
37
|
+
$[0] = icon;
|
|
38
|
+
$[1] = t1;
|
|
39
|
+
$[2] = t2;
|
|
40
|
+
} else {
|
|
41
|
+
t2 = $[2];
|
|
42
|
+
}
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[3] !== baseline.text) {
|
|
45
|
+
t3 = /*#__PURE__*/_jsx("span", {
|
|
46
|
+
className: "min-w-0",
|
|
47
|
+
children: baseline.text
|
|
48
|
+
});
|
|
49
|
+
$[3] = baseline.text;
|
|
50
|
+
$[4] = t3;
|
|
51
|
+
} else {
|
|
52
|
+
t3 = $[4];
|
|
53
|
+
}
|
|
54
|
+
let t4;
|
|
55
|
+
if ($[5] !== t2 || $[6] !== t3) {
|
|
56
|
+
t4 = /*#__PURE__*/_jsxs("div", {
|
|
57
|
+
className: "flex items-start gap-1.5 text-xs/[18px] text-text-muted select-text",
|
|
58
|
+
children: [t2, t3]
|
|
59
|
+
});
|
|
60
|
+
$[5] = t2;
|
|
61
|
+
$[6] = t3;
|
|
62
|
+
$[7] = t4;
|
|
63
|
+
} else {
|
|
64
|
+
t4 = $[7];
|
|
65
|
+
}
|
|
66
|
+
return t4;
|
|
67
|
+
}
|