@adecore/editor-react 0.53.3 → 0.54.1

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.
Files changed (131) hide show
  1. package/dist/AnchoredPopup.d.ts +1 -1
  2. package/dist/AnchoredPopup.js +27 -12
  3. package/dist/AttributionCard.d.ts +1 -1
  4. package/dist/BaselineStatus.js +1 -1
  5. package/dist/CallHierarchyPanel.js +11 -10
  6. package/dist/ChangeReview.d.ts +1 -1
  7. package/dist/CodeAuthorsCard.js +2 -2
  8. package/dist/CompletionPopup.js +18 -14
  9. package/dist/DiffView.d.ts +2 -2
  10. package/dist/DiffView.js +159 -143
  11. package/dist/EditorContextMenu.js +1 -1
  12. package/dist/EditorView.d.ts +2 -2
  13. package/dist/EditorView.js +97 -81
  14. package/dist/FindReplace.js +3 -3
  15. package/dist/HoverCard.d.ts +3 -3
  16. package/dist/HoverCard.js +3 -3
  17. package/dist/HoverSections.js +1 -1
  18. package/dist/LanguagePopups.js +1 -1
  19. package/dist/Markdown.js +15 -3
  20. package/dist/PeekPanel.js +124 -103
  21. package/dist/PickPopup.js +8 -4
  22. package/dist/RenameCard.js +7 -7
  23. package/dist/RenderedDocs.d.ts +1 -1
  24. package/dist/RenderedDocs.js +1 -1
  25. package/dist/SplitDiffView.js +21 -4
  26. package/dist/SymbolPicker.js +93 -89
  27. package/dist/WrapCard.js +1 -1
  28. package/dist/call-hierarchy.d.ts +1 -1
  29. package/dist/call-hierarchy.js +3 -3
  30. package/dist/code-actions.js +2 -2
  31. package/dist/code-vision.d.ts +1 -1
  32. package/dist/completion-model.d.ts +1 -1
  33. package/dist/completion-model.js +2 -2
  34. package/dist/completion.d.ts +1 -1
  35. package/dist/completion.js +12 -12
  36. package/dist/diagnostics.d.ts +1 -1
  37. package/dist/diagnostics.js +1 -1
  38. package/dist/diff-overlays.js +2 -2
  39. package/dist/editor-language.d.ts +12 -12
  40. package/dist/editor-language.js +10 -10
  41. package/dist/editor-react.css +4 -4
  42. package/dist/highlights.d.ts +1 -1
  43. package/dist/highlights.js +2 -2
  44. package/dist/host-types.d.ts +4 -4
  45. package/dist/hover.js +1 -1
  46. package/dist/inlay-hints.js +1 -1
  47. package/dist/live-templates.js +1 -1
  48. package/dist/markup.js +1 -1
  49. package/dist/navigation.d.ts +1 -1
  50. package/dist/navigation.js +3 -3
  51. package/dist/peek.js +1 -1
  52. package/dist/popups.d.ts +5 -5
  53. package/dist/project-language.d.ts +4 -4
  54. package/dist/project-language.js +5 -5
  55. package/dist/rename.js +1 -1
  56. package/dist/rendered-docs.d.ts +1 -1
  57. package/dist/rendered-docs.js +1 -1
  58. package/dist/shortcut-keys.d.ts +1 -1
  59. package/dist/signature.js +1 -1
  60. package/dist/snippet-field-transforms.d.ts +2 -2
  61. package/dist/snippet-insert.js +3 -3
  62. package/dist/snippet-session.d.ts +2 -2
  63. package/dist/snippet-session.js +5 -5
  64. package/dist/snippet-transform-queue.d.ts +1 -1
  65. package/dist/surround.js +1 -1
  66. package/dist/symbol-picker.js +2 -2
  67. package/dist/templates.js +1 -1
  68. package/dist/use-problem-counts.d.ts +1 -1
  69. package/package.json +6 -6
  70. package/src/AnchoredPopup.tsx +7 -3
  71. package/src/AttributionCard.tsx +1 -1
  72. package/src/BaselineStatus.tsx +1 -1
  73. package/src/CallHierarchyPanel.tsx +13 -12
  74. package/src/ChangeReview.tsx +1 -1
  75. package/src/CodeAuthorsCard.tsx +2 -2
  76. package/src/CompletionPopup.tsx +16 -13
  77. package/src/DiffView.tsx +12 -6
  78. package/src/EditorContextMenu.tsx +2 -2
  79. package/src/EditorView.tsx +14 -6
  80. package/src/FindReplace.tsx +3 -3
  81. package/src/HoverCard.tsx +7 -7
  82. package/src/HoverSections.tsx +1 -1
  83. package/src/LanguagePopups.tsx +3 -3
  84. package/src/Markdown.tsx +13 -2
  85. package/src/PeekPanel.tsx +13 -13
  86. package/src/PickPopup.tsx +6 -5
  87. package/src/RenameCard.tsx +8 -8
  88. package/src/RenderedDocs.tsx +3 -3
  89. package/src/SplitDiffView.tsx +14 -5
  90. package/src/SymbolPicker.tsx +6 -6
  91. package/src/WrapCard.tsx +2 -2
  92. package/src/call-hierarchy.ts +5 -5
  93. package/src/code-actions.ts +3 -3
  94. package/src/code-authors.ts +1 -1
  95. package/src/code-vision.ts +3 -3
  96. package/src/completion-model.ts +3 -3
  97. package/src/completion.ts +15 -15
  98. package/src/diagnostics.ts +4 -4
  99. package/src/diff-overlays.tsx +4 -4
  100. package/src/editor-language.ts +13 -13
  101. package/src/editor-react.css +4 -4
  102. package/src/format-on-type.ts +1 -1
  103. package/src/highlights.ts +3 -3
  104. package/src/host-types.ts +4 -4
  105. package/src/hover.ts +3 -3
  106. package/src/inlay-hints.ts +1 -1
  107. package/src/line-edits.ts +1 -1
  108. package/src/live-templates.ts +2 -2
  109. package/src/markup.ts +2 -2
  110. package/src/navigation.ts +5 -5
  111. package/src/patch-decorations.ts +1 -1
  112. package/src/peek.ts +3 -3
  113. package/src/pick.ts +1 -1
  114. package/src/popups.ts +5 -5
  115. package/src/postfix.ts +1 -1
  116. package/src/project-language.ts +7 -7
  117. package/src/proposal-model.ts +1 -1
  118. package/src/rename.ts +3 -3
  119. package/src/rendered-docs.ts +2 -2
  120. package/src/shortcut-keys.ts +1 -1
  121. package/src/signature.ts +3 -3
  122. package/src/snippet-field-transforms.ts +2 -2
  123. package/src/snippet-insert.ts +3 -3
  124. package/src/snippet-session.ts +7 -7
  125. package/src/snippet-transform-queue.ts +1 -1
  126. package/src/surround.ts +1 -1
  127. package/src/symbol-picker-model.ts +1 -1
  128. package/src/symbol-picker.ts +3 -3
  129. package/src/templates.ts +1 -1
  130. package/src/use-problem-counts.ts +1 -1
  131. package/src/workspace-edit.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { fileUriToPath } from '@adecore/lsp';
3
+ import { formatShortcut, Icon, ScrollArea } from '@adecore/ui';
4
+ import { formatNumber } from '@adecore/ui/format';
5
+ import { AtSign, Hash } 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 { AtSign, Hash } from 'lucide-react';
6
- import { fileUriToPath } from '@adecore/lsp';
7
- import { formatShortcut, Icon } from '@adecore/ui';
8
- import { formatNumber } from '@adecore/ui/format';
9
9
  import { basenameOf } from './paths.js';
10
10
  import { filterEntries, groupEntries, letterOfKind, modeOf, toneOfKind, TONE_CLASSES } from './symbol-picker-model.js';
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -44,7 +44,7 @@ export function SymbolBadge(t0) {
44
44
  * keys. The input keeps the focus; Enter goes, Escape and the focus leaving close it.
45
45
  */
46
46
  export function SymbolPicker(t0) {
47
- const $ = _c(56);
47
+ const $ = _c(57);
48
48
  const {
49
49
  language,
50
50
  view
@@ -210,15 +210,17 @@ export function SymbolPicker(t0) {
210
210
  } else {
211
211
  t10 = $[17];
212
212
  }
213
+ const T0 = ScrollArea;
213
214
  const t11 = "listbox";
214
- const t12 = "max-h-[320px] overflow-y-auto p-1";
215
- const t13 = mode.mode === "line" && /*#__PURE__*/_jsx("div", {
215
+ const t12 = "max-h-[320px]";
216
+ const t13 = "p-1";
217
+ const t14 = mode.mode === "line" && /*#__PURE__*/_jsx("div", {
216
218
  className: "px-2 py-1.5 text-xs text-text-muted",
217
219
  children: mode.line === null ? t("language.symbols.lineHint") : t("language.symbols.goToLine", {
218
220
  line: formatNumber(mode.line)
219
221
  })
220
222
  });
221
- const t14 = mode.mode === "workspace" && places.map((place_0, index_0) => {
223
+ const t15 = mode.mode === "workspace" && places.map((place_0, index_0) => {
222
224
  const path = fileUriToPath(place_0.uri);
223
225
  return /*#__PURE__*/_jsxs("button", {
224
226
  ref: index_0 === active ? activeRow : undefined,
@@ -242,7 +244,7 @@ export function SymbolPicker(t0) {
242
244
  })]
243
245
  }, place_0.id);
244
246
  });
245
- const t15 = mode.mode === "symbol" && groups.map(group_0 => {
247
+ const t16 = mode.mode === "symbol" && groups.map(group_0 => {
246
248
  const start = offset;
247
249
  offset = offset + group_0.entries.length;
248
250
  offset;
@@ -280,22 +282,22 @@ export function SymbolPicker(t0) {
280
282
  })]
281
283
  }, group_0.group);
282
284
  });
283
- let t16;
285
+ let t17;
284
286
  if ($[18] !== flat || $[19] !== mode.mode || $[20] !== t) {
285
- t16 = mode.mode === "symbol" && flat.length === 0 && /*#__PURE__*/_jsx("div", {
287
+ t17 = mode.mode === "symbol" && flat.length === 0 && /*#__PURE__*/_jsx("div", {
286
288
  className: "px-2 py-3 text-center text-xs text-text-muted",
287
289
  children: t("language.symbols.none")
288
290
  });
289
291
  $[18] = flat;
290
292
  $[19] = mode.mode;
291
293
  $[20] = t;
292
- $[21] = t16;
294
+ $[21] = t17;
293
295
  } else {
294
- t16 = $[21];
296
+ t17 = $[21];
295
297
  }
296
- let t17;
298
+ let t18;
297
299
  if ($[22] !== mode.mode || $[23] !== mode.text || $[24] !== places || $[25] !== t) {
298
- t17 = mode.mode === "workspace" && places.length === 0 && /*#__PURE__*/_jsx("div", {
300
+ t18 = mode.mode === "workspace" && places.length === 0 && /*#__PURE__*/_jsx("div", {
299
301
  className: "px-2 py-3 text-center text-xs text-text-muted",
300
302
  children: mode.text === "" ? t("language.symbols.workspaceHint") : t("language.symbols.none")
301
303
  });
@@ -303,131 +305,133 @@ export function SymbolPicker(t0) {
303
305
  $[23] = mode.text;
304
306
  $[24] = places;
305
307
  $[25] = t;
306
- $[26] = t17;
308
+ $[26] = t18;
307
309
  } else {
308
- t17 = $[26];
310
+ t18 = $[26];
309
311
  }
310
- let t18;
311
- if ($[27] !== t13 || $[28] !== t14 || $[29] !== t15 || $[30] !== t16 || $[31] !== t17) {
312
- t18 = /*#__PURE__*/_jsxs("div", {
312
+ let t19;
313
+ if ($[27] !== T0 || $[28] !== t14 || $[29] !== t15 || $[30] !== t16 || $[31] !== t17 || $[32] !== t18) {
314
+ t19 = /*#__PURE__*/_jsxs(T0, {
313
315
  role: t11,
314
316
  className: t12,
315
- children: [t13, t14, t15, t16, t17]
317
+ viewportClassName: t13,
318
+ children: [t14, t15, t16, t17, t18]
316
319
  });
317
- $[27] = t13;
320
+ $[27] = T0;
318
321
  $[28] = t14;
319
322
  $[29] = t15;
320
323
  $[30] = t16;
321
324
  $[31] = t17;
322
325
  $[32] = t18;
326
+ $[33] = t19;
323
327
  } else {
324
- t18 = $[32];
325
- }
326
- let t19;
327
- if ($[33] !== t) {
328
- t19 = t("language.symbols.navigate");
329
- $[33] = t;
330
- $[34] = t19;
331
- } else {
332
- t19 = $[34];
328
+ t19 = $[33];
333
329
  }
334
330
  let t20;
335
- if ($[35] !== t19) {
336
- t20 = /*#__PURE__*/_jsxs("span", {
337
- children: ["\u2191\u2193 ", t19]
338
- });
339
- $[35] = t19;
340
- $[36] = t20;
331
+ if ($[34] !== t) {
332
+ t20 = t("language.symbols.navigate");
333
+ $[34] = t;
334
+ $[35] = t20;
341
335
  } else {
342
- t20 = $[36];
336
+ t20 = $[35];
343
337
  }
344
338
  let t21;
345
- if ($[37] !== t) {
346
- t21 = t("language.symbols.open");
347
- $[37] = t;
348
- $[38] = t21;
339
+ if ($[36] !== t20) {
340
+ t21 = /*#__PURE__*/_jsxs("span", {
341
+ children: ["\u2191\u2193 ", t20]
342
+ });
343
+ $[36] = t20;
344
+ $[37] = t21;
349
345
  } else {
350
- t21 = $[38];
346
+ t21 = $[37];
351
347
  }
352
348
  let t22;
353
- if ($[39] !== t21) {
354
- t22 = /*#__PURE__*/_jsxs("span", {
355
- children: ["\u21B5 ", t21]
356
- });
357
- $[39] = t21;
358
- $[40] = t22;
349
+ if ($[38] !== t) {
350
+ t22 = t("language.symbols.open");
351
+ $[38] = t;
352
+ $[39] = t22;
359
353
  } else {
360
- t22 = $[40];
354
+ t22 = $[39];
361
355
  }
362
356
  let t23;
363
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
364
- t23 = () => setInput("#");
357
+ if ($[40] !== t22) {
358
+ t23 = /*#__PURE__*/_jsxs("span", {
359
+ children: ["\u21B5 ", t22]
360
+ });
361
+ $[40] = t22;
365
362
  $[41] = t23;
366
363
  } else {
367
364
  t23 = $[41];
368
365
  }
369
366
  let t24;
370
- if ($[42] !== t) {
371
- t24 = t("language.symbols.workspace");
372
- $[42] = t;
373
- $[43] = t24;
367
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
368
+ t24 = () => setInput("#");
369
+ $[42] = t24;
374
370
  } else {
375
- t24 = $[43];
371
+ t24 = $[42];
376
372
  }
377
373
  let t25;
378
- if ($[44] !== t24) {
379
- t25 = /*#__PURE__*/_jsxs("button", {
374
+ if ($[43] !== t) {
375
+ t25 = t("language.symbols.workspace");
376
+ $[43] = t;
377
+ $[44] = t25;
378
+ } else {
379
+ t25 = $[44];
380
+ }
381
+ let t26;
382
+ if ($[45] !== t25) {
383
+ t26 = /*#__PURE__*/_jsxs("button", {
380
384
  type: "button",
381
385
  className: "ml-auto hover:text-text",
382
- onClick: t23,
383
- children: ["# ", t24]
386
+ onClick: t24,
387
+ children: ["# ", t25]
384
388
  });
385
- $[44] = t24;
386
389
  $[45] = t25;
387
- } else {
388
- t25 = $[45];
389
- }
390
- let t26;
391
- if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
392
- t26 = () => setInput(":");
393
390
  $[46] = t26;
394
391
  } else {
395
392
  t26 = $[46];
396
393
  }
397
394
  let t27;
398
- if ($[47] !== t) {
399
- t27 = t("language.symbols.line");
400
- $[47] = t;
401
- $[48] = t27;
395
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
396
+ t27 = () => setInput(":");
397
+ $[47] = t27;
402
398
  } else {
403
- t27 = $[48];
399
+ t27 = $[47];
404
400
  }
405
401
  let t28;
406
- if ($[49] !== t27) {
407
- t28 = /*#__PURE__*/_jsxs("button", {
402
+ if ($[48] !== t) {
403
+ t28 = t("language.symbols.line");
404
+ $[48] = t;
405
+ $[49] = t28;
406
+ } else {
407
+ t28 = $[49];
408
+ }
409
+ let t29;
410
+ if ($[50] !== t28) {
411
+ t29 = /*#__PURE__*/_jsxs("button", {
408
412
  type: "button",
409
413
  className: "hover:text-text",
410
- onClick: t26,
411
- children: [": ", t27]
414
+ onClick: t27,
415
+ children: [": ", t28]
412
416
  });
413
- $[49] = t27;
414
417
  $[50] = t28;
418
+ $[51] = t29;
415
419
  } else {
416
- t28 = $[50];
420
+ t29 = $[51];
417
421
  }
418
- let t29;
419
- if ($[51] !== t20 || $[52] !== t22 || $[53] !== t25 || $[54] !== t28) {
420
- t29 = /*#__PURE__*/_jsxs("div", {
422
+ let t30;
423
+ if ($[52] !== t21 || $[53] !== t23 || $[54] !== t26 || $[55] !== t29) {
424
+ t30 = /*#__PURE__*/_jsxs("div", {
421
425
  className: "flex items-center gap-3 border-t border-border px-3 py-1.5 text-xs whitespace-nowrap text-text-faint",
422
- children: [t20, t22, t25, t28]
426
+ children: [t21, t23, t26, t29]
423
427
  });
424
- $[51] = t20;
425
- $[52] = t22;
426
- $[53] = t25;
427
- $[54] = t28;
428
+ $[52] = t21;
429
+ $[53] = t23;
430
+ $[54] = t26;
428
431
  $[55] = t29;
432
+ $[56] = t30;
429
433
  } else {
430
- t29 = $[55];
434
+ t30 = $[56];
431
435
  }
432
436
  return createPortal(/*#__PURE__*/_jsxs("div", {
433
437
  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)",
@@ -445,7 +449,7 @@ export function SymbolPicker(t0) {
445
449
  onKeyDown: onKeyDown,
446
450
  onBlur: t8
447
451
  }), t10]
448
- }), t18, t29]
452
+ }), t19, t30]
449
453
  }), document.body);
450
454
  }
451
455
  function _temp3(event_0) {
package/dist/WrapCard.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Input } from '@adecore/ui';
2
3
  import { useLayoutEffect, useRef, useState } from 'react';
3
4
  import { useTranslation } from 'react-i18next';
4
- import { Input } from '@adecore/ui';
5
5
  import { AnchoredPopup } from "./AnchoredPopup.js";
6
6
  /* The field for the abbreviation a selection is wrapped in: Enter wraps, Escape or leaving the field cancels. */
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import type { EditorPosition } from '@adecore/editor';
2
- import type { EditorLanguage } from './editor-language.ts';
3
2
  import { type CallDirection } from './call-hierarchy-model.ts';
3
+ import type { EditorLanguage } from './editor-language.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  export declare const CALL_HIERARCHY_HEIGHT: number;
6
6
  export declare class CallHierarchyFeature {
@@ -1,10 +1,10 @@
1
1
  import { StaleResultError } from '@adecore/lsp';
2
- import { KEY_PRIORITY } from './key-priority.js';
3
2
  import { CALL_LEVEL_LIMIT, childrenOf, isTypeDirection, moreIdOf, rootsOf, rowsOf, statusIdOf, stepsOf, targetOf, typeChildrenOf } from './call-hierarchy-model.js';
4
- import { PEEK_HEIGHT } from './peek.js';
3
+ import { messageOf } from './error-message.js';
4
+ import { KEY_PRIORITY } from './key-priority.js';
5
5
  import { snippetOf } from './peek-model.js';
6
+ import { PEEK_HEIGHT } from './peek.js';
6
7
  import { isShortcut } from './shortcut-keys.js';
7
- import { messageOf } from './error-message.js';
8
8
  import { realTimers, revealRow } from './timers.js';
9
9
  const TOAST_ID = 'language-call-hierarchy';
10
10
  const PREPARE = 'textDocument/prepareCallHierarchy';
@@ -1,11 +1,11 @@
1
1
  import { ErrorCodes, LspError, StaleResultError } from '@adecore/lsp';
2
- import { KEY_PRIORITY } from './key-priority.js';
3
2
  import { ACTION_GROUPS, REFACTOR_GROUPS, actionsOf, diagnosticsAt, fixableOnLine, isHint, mergeEntries, previewOf } from './code-actions-model.js';
4
3
  import { comparePositions } from './diagnostics-model.js';
4
+ import { messageOf } from './error-message.js';
5
+ import { KEY_PRIORITY } from './key-priority.js';
5
6
  import { Refresher } from './refresher.js';
6
7
  import { isShortcut } from './shortcut-keys.js';
7
8
  import { realTimers } from './timers.js';
8
- import { messageOf } from './error-message.js';
9
9
  const METHOD = 'textDocument/codeAction';
10
10
  const PAUSE_MS = 250;
11
11
  const INVOKED = 1;
@@ -1,6 +1,6 @@
1
- import type { GitBlameResult } from './host-types.ts';
2
1
  import type { DocumentSymbolResult } from '@adecore/lsp';
3
2
  import type { EditorLanguage } from './editor-language.ts';
3
+ import type { GitBlameResult } from './host-types.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  export declare const MAX_LINES = 20000;
6
6
  export interface CodeVisionSettings {
@@ -1,7 +1,7 @@
1
- import type { SnippetTransformJob } from './snippet-transform-protocol.ts';
2
1
  import type { EditorContentChange, EditorPosition, EditorRange } from '@adecore/editor';
3
2
  import { type CompletionItem, type CompletionResult, type MarkupContent } from '@adecore/lsp';
4
3
  import type { CompletionDocs } from './popups.ts';
4
+ import type { SnippetTransformJob } from './snippet-transform-protocol.ts';
5
5
  import { type SnippetField, type SnippetStop, type SnippetTemplate, type SnippetVariableResolver } from './snippet.ts';
6
6
  export declare function isIdentifierCharacter(character: string): boolean;
7
7
  export declare function identifierPrefix(before: string): string;
@@ -1,9 +1,9 @@
1
- import { labelCollator } from '@adecore/ui/format';
2
1
  import { applyCompletionDefaults } from '@adecore/lsp';
2
+ import { labelCollator } from '@adecore/ui/format';
3
3
  import { comparePositions, sameRange } from './diagnostics-model.js';
4
4
  import { escapeMarkdown, isEmptyHover, splitSignatures } from './hover-content.js';
5
- import { compileSnippet, parseSnippet, tabOrder } from './snippet.js';
6
5
  import { indentSnippet } from './snippet-indent.js';
6
+ import { compileSnippet, parseSnippet, tabOrder } from './snippet.js';
7
7
  const IDENTIFIER_CHARACTER = /[\p{L}\p{N}\p{M}_$]/u;
8
8
  export function isIdentifierCharacter(character) {
9
9
  return IDENTIFIER_CHARACTER.test(character);
@@ -1,5 +1,5 @@
1
- import { type CompletionItem } from '@adecore/lsp';
2
1
  import type { EditorPosition } from '@adecore/editor';
2
+ import { type CompletionItem } from '@adecore/lsp';
3
3
  import type { EditorLanguage } from './editor-language.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  /** A row a source of the editor offers beside the language server's. */
@@ -1,22 +1,22 @@
1
- import { SnippetTransformQueueError } from './snippet-transform-queue.js';
2
- import { KEY_PRIORITY } from './key-priority.js';
3
- import { SnippetTransformError } from './snippet-transform-client.js';
4
- import { MAX_TRANSFORM_JOBS, MAX_TRANSFORM_WORK } from './snippet-transform-protocol.js';
5
- import { jobTable } from './snippet-field-transforms.js';
6
1
  import { fileUriToPath, StaleResultError } from '@adecore/lsp';
7
- import { comparePositions, sameRange, shiftPosition } from './diagnostics-model.js';
8
- import { completionDocsOf, editRangeOf, identifierPrefix, insertionOf, isIdentifierCharacter, itemsOf, matchedCharacters, mirroredInsertions, opensCompletion, prefixFor, qualifiersOf, rankCompletions } from './completion-model.js';
9
2
  import { PARAMETER_HINTS_COMMAND, isCallItem, planCall, withParentheses } from './completion-call.js';
10
- import { compileSnippet } from './snippet.js';
11
- import { createSnippetResolver } from './snippet-variables.js';
12
- import { wordRangeAt } from './rename-model.js';
13
- import { RecentChoices, recentChoicesOf } from './recent-choices.js';
3
+ import { completionDocsOf, editRangeOf, identifierPrefix, insertionOf, isIdentifierCharacter, itemsOf, matchedCharacters, mirroredInsertions, opensCompletion, prefixFor, qualifiersOf, rankCompletions } from './completion-model.js';
4
+ import { comparePositions, sameRange, shiftPosition } from './diagnostics-model.js';
5
+ import { messageOf } from './error-message.js';
6
+ import { KEY_PRIORITY } from './key-priority.js';
14
7
  import { shikiLanguageOf } from './language-ids.js';
15
8
  import { lineTextOf, textBeforeOf } from './line-text.js';
16
9
  import { isEmptyRange } from './proposal-model.js';
10
+ import { RecentChoices, recentChoicesOf } from './recent-choices.js';
11
+ import { wordRangeAt } from './rename-model.js';
17
12
  import { isShortcut } from './shortcut-keys.js';
13
+ import { jobTable } from './snippet-field-transforms.js';
14
+ import { SnippetTransformError } from './snippet-transform-client.js';
15
+ import { MAX_TRANSFORM_JOBS, MAX_TRANSFORM_WORK } from './snippet-transform-protocol.js';
16
+ import { SnippetTransformQueueError } from './snippet-transform-queue.js';
17
+ import { createSnippetResolver } from './snippet-variables.js';
18
+ import { compileSnippet } from './snippet.js';
18
19
  import { realTimers } from './timers.js';
19
- import { messageOf } from './error-message.js';
20
20
  const METHOD = 'textDocument/completion';
21
21
  const START_DELAY_MS = 80;
22
22
  const RESOLVE_DELAY_MS = 120;
@@ -1,6 +1,6 @@
1
1
  import type { EditorPosition } from '@adecore/editor';
2
- import type { EditorLanguage } from './editor-language.ts';
3
2
  import { type Problem } from './diagnostics-model.ts';
3
+ import type { EditorLanguage } from './editor-language.ts';
4
4
  export interface ProblemCounts {
5
5
  readonly error: number;
6
6
  readonly warning: number;
@@ -1,6 +1,6 @@
1
+ import { comparePositions, markerOf, neighborProblem, problemCountsOf, problemsAt, sameRange, severityOf, shiftRange } from './diagnostics-model.js';
1
2
  import { KEY_PRIORITY } from './key-priority.js';
2
3
  import { isShortcut } from './shortcut-keys.js';
3
- import { comparePositions, markerOf, neighborProblem, problemCountsOf, problemsAt, sameRange, severityOf, shiftRange } from './diagnostics-model.js';
4
4
  /*
5
5
  * The problems the servers report for one file. A report from a server replaces the one before it
6
6
  * from the same server, the editor draws them, and each one follows its text through edits made
@@ -1,9 +1,9 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Button, Tooltip } from '@adecore/ui';
3
+ import { formatNumber } from '@adecore/ui/format';
2
4
  import { useSyncExternalStore } from 'react';
3
5
  import { createPortal } from 'react-dom';
4
6
  import { useTranslation } from 'react-i18next';
5
- import { Button, Tooltip } from '@adecore/ui';
6
- import { formatNumber } from '@adecore/ui/format';
7
7
  import { RowHost, LineActionHost } from './row-host.js';
8
8
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  export function DiffOverlays(t0) {
@@ -1,10 +1,6 @@
1
- import { type Keymap } from '@adecore/editor/keymap';
2
1
  import type { Editor, EditorKeyHandler, EditorPosition } from '@adecore/editor';
2
+ import { type Keymap } from '@adecore/editor/keymap';
3
3
  import type { LanguageService, Location, TextDocumentSaveReason } from '@adecore/lsp';
4
- import { DocumentColorsFeature } from './document-colors.ts';
5
- import { DocumentLinksFeature } from './document-links.ts';
6
- import { InlineCompletionFeature } from './inline-completion.ts';
7
- import { LinkedEditingFeature } from './linked-editing.ts';
8
4
  import { CallHierarchyFeature } from './call-hierarchy.ts';
9
5
  import { CodeActionsFeature } from './code-actions.ts';
10
6
  import { CodeVisionFeature } from './code-vision.ts';
@@ -12,29 +8,33 @@ import { CompletionFeature } from './completion.ts';
12
8
  import { ContextMenuFeature } from './context-menu.ts';
13
9
  import { DefinitionLinkFeature } from './definition-link.ts';
14
10
  import { DiagnosticsFeature } from './diagnostics.ts';
11
+ import { DocumentColorsFeature } from './document-colors.ts';
12
+ import { DocumentLinksFeature } from './document-links.ts';
15
13
  import { FormatOnTypeFeature } from './format-on-type.ts';
16
14
  import { HighlightsFeature } from './highlights.ts';
17
15
  import { HistoryFeature } from './history.ts';
18
16
  import { HoverFeature } from './hover.ts';
17
+ import { InlayHintsFeature } from './inlay-hints.ts';
18
+ import { InlineCompletionFeature } from './inline-completion.ts';
19
+ import { LinkedEditingFeature } from './linked-editing.ts';
20
+ import { TemplatesFeature } from './live-templates.ts';
19
21
  import { MarkupFeature } from './markup.ts';
22
+ import type { Place } from './navigation-history.ts';
20
23
  import { NavigationFeature } from './navigation.ts';
21
24
  import { PasteHistoryFeature } from './paste-history.ts';
22
25
  import { PeekFeature } from './peek.ts';
23
26
  import { PickFeature } from './pick.ts';
24
- import { SymbolPickerFeature } from './symbol-picker.ts';
27
+ import type { LanguageDocumentHandle, ProjectLanguage } from './project-language.ts';
25
28
  import { RenameFeature } from './rename.ts';
26
29
  import { RenderedDocsFeature } from './rendered-docs.ts';
27
- import { shortcutsOf } from './shortcut-keys.ts';
28
- import { type Timers } from './timers.ts';
29
- import { InlayHintsFeature } from './inlay-hints.ts';
30
30
  import { type SemanticTokensOptions } from './semantic-tokens.ts';
31
+ import { shortcutsOf } from './shortcut-keys.ts';
31
32
  import { SignatureFeature } from './signature.ts';
32
33
  import { SnippetFeature } from './snippet-session.ts';
33
34
  import { SurroundFeature } from './surround.ts';
35
+ import { SymbolPickerFeature } from './symbol-picker.ts';
34
36
  import { SymbolsFeature } from './symbols.ts';
35
- import { TemplatesFeature } from './live-templates.ts';
36
- import type { Place } from './navigation-history.ts';
37
- import type { LanguageDocumentHandle, ProjectLanguage } from './project-language.ts';
37
+ import { type Timers } from './timers.ts';
38
38
  export interface EditorLanguageOptions {
39
39
  semanticTokens?: SemanticTokensOptions;
40
40
  serve?: boolean;
@@ -1,8 +1,4 @@
1
1
  import { KEYMAP } from '@adecore/editor/keymap';
2
- import { DocumentColorsFeature } from './document-colors.js';
3
- import { DocumentLinksFeature } from './document-links.js';
4
- import { InlineCompletionFeature } from './inline-completion.js';
5
- import { LinkedEditingFeature } from './linked-editing.js';
6
2
  import { CallHierarchyFeature } from './call-hierarchy.js';
7
3
  import { CodeActionsFeature } from './code-actions.js';
8
4
  import { CodeVisionFeature } from './code-vision.js';
@@ -10,31 +6,35 @@ import { CompletionFeature } from './completion.js';
10
6
  import { ContextMenuFeature } from './context-menu.js';
11
7
  import { DefinitionLinkFeature } from './definition-link.js';
12
8
  import { DiagnosticsFeature } from './diagnostics.js';
9
+ import { DocumentColorsFeature } from './document-colors.js';
10
+ import { DocumentLinksFeature } from './document-links.js';
13
11
  import { FoldingFeature } from './folding.js';
14
12
  import { FormatOnTypeFeature } from './format-on-type.js';
15
13
  import { HighlightsFeature } from './highlights.js';
16
14
  import { HistoryFeature } from './history.js';
17
15
  import { HoverFeature } from './hover.js';
16
+ import { InlayHintsFeature } from './inlay-hints.js';
17
+ import { InlineCompletionFeature } from './inline-completion.js';
18
18
  import { KeyDispatcher } from './key-priority.js';
19
+ import { LinkedEditingFeature } from './linked-editing.js';
20
+ import { TemplatesFeature } from './live-templates.js';
19
21
  import { MarkupFeature } from './markup.js';
20
22
  import { NavigationFeature, locationRow } from './navigation.js';
21
23
  import { PasteHistoryFeature } from './paste-history.js';
22
24
  import { PeekFeature } from './peek.js';
23
25
  import { PickFeature } from './pick.js';
24
- import { SymbolPickerFeature } from './symbol-picker.js';
26
+ import { createPopupStore } from './popups.js';
25
27
  import { RenameFeature } from './rename.js';
26
28
  import { RenderedDocsFeature } from './rendered-docs.js';
27
- import { shortcutsOf } from './shortcut-keys.js';
28
- import { createPopupStore } from './popups.js';
29
- import { realTimers } from './timers.js';
30
- import { InlayHintsFeature } from './inlay-hints.js';
31
29
  import { SelectionRangesFeature } from './selection-ranges.js';
32
30
  import { SemanticTokensFeature } from './semantic-tokens.js';
31
+ import { shortcutsOf } from './shortcut-keys.js';
33
32
  import { SignatureFeature } from './signature.js';
34
33
  import { SnippetFeature } from './snippet-session.js';
35
34
  import { SurroundFeature } from './surround.js';
35
+ import { SymbolPickerFeature } from './symbol-picker.js';
36
36
  import { SymbolsFeature } from './symbols.js';
37
- import { TemplatesFeature } from './live-templates.js';
37
+ import { realTimers } from './timers.js';
38
38
  /* How long the edits servers want before a save are waited for. */
39
39
  const SAVE_PARTICIPANT_MS = 1_000;
40
40
  /*
@@ -10,7 +10,6 @@
10
10
  margin: 0;
11
11
  }
12
12
  .adecore-editor-markdown pre {
13
- overflow: auto;
14
13
  font-family: var(--font-mono);
15
14
  }
16
15
  .adecore-editor-markdown a {
@@ -109,12 +108,13 @@
109
108
  .adecore-editor-diff-side + .adecore-editor-diff-side {
110
109
  border-inline-start: 1px solid var(--border);
111
110
  }
111
+ /* No `scrollbar-gutter` on the sides: their bars float over the code and take no width, so the two
112
+ sides line up whether one of them scrolls or both do. Its own stacking layer keeps the editor's
113
+ layers under the bars beside it. */
112
114
  .adecore-editor-diff-surface {
113
115
  position: absolute;
114
116
  inset: 0;
115
- }
116
- .adecore-editor-diff-split .se-viewport {
117
- scrollbar-gutter: stable;
117
+ isolation: isolate;
118
118
  }
119
119
  .adecore-editor-diff-filler {
120
120
  background: repeating-linear-gradient(135deg, transparent 0 6px, var(--editor-hatch) 6px 7px);
@@ -1,5 +1,5 @@
1
- import type { DocumentHighlight } from '@adecore/lsp';
2
1
  import type { EditorHighlight, EditorPosition, EditorRange } from '@adecore/editor';
2
+ import type { DocumentHighlight } from '@adecore/lsp';
3
3
  import type { EditorLanguage } from './editor-language.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  export declare function editorHighlightsOf(highlights: readonly DocumentHighlight[]): EditorHighlight[];
@@ -1,6 +1,6 @@
1
- import { KEY_PRIORITY } from './key-priority.js';
2
- import { comparePositions, rangeHolds } from './diagnostics-model.js';
3
1
  import { isIdentifierCharacter } from './completion-model.js';
2
+ import { comparePositions, rangeHolds } from './diagnostics-model.js';
3
+ import { KEY_PRIORITY } from './key-priority.js';
4
4
  import { Refresher } from './refresher.js';
5
5
  import { isShortcut } from './shortcut-keys.js';
6
6
  import { realTimers } from './timers.js';
@@ -1,13 +1,13 @@
1
- import type { WorkerRequestPort } from '@adecore/editor/worker-client';
2
1
  import type { EditorPosition, EditorRange } from '@adecore/editor';
3
- import type { i18n } from 'i18next';
4
2
  import type { Keymap } from '@adecore/editor/keymap';
3
+ import type { WorkerRequestPort } from '@adecore/editor/worker-client';
4
+ import type { ServerMessage } from '@adecore/lsp';
5
+ import type { i18n } from 'i18next';
5
6
  import type { ClipboardHistory } from './clipboard-history.ts';
6
- import type { ProjectFiles } from './workspace-edit.ts';
7
7
  import type { Place } from './navigation-history.ts';
8
8
  import type { ProblemSource } from './project-problems.ts';
9
9
  import type { LiveTemplateDraft, TemplateRegistry } from './templates.ts';
10
- import type { ServerMessage } from '@adecore/lsp';
10
+ import type { ProjectFiles } from './workspace-edit.ts';
11
11
  export interface DiskText {
12
12
  text: string;
13
13
  mtime: number;
package/dist/hover.js CHANGED
@@ -1,6 +1,6 @@
1
- import { KEY_PRIORITY } from './key-priority.js';
2
1
  import { rangeHolds } from './diagnostics-model.js';
3
2
  import { hoverTextOf, isEmptyHover, locationsOf } from './hover-content.js';
3
+ import { KEY_PRIORITY } from './key-priority.js';
4
4
  import { lineTextOf } from './line-text.js';
5
5
  import { wordRangeAt } from './rename-model.js';
6
6
  import { isShortcut } from './shortcut-keys.js';
@@ -1,8 +1,8 @@
1
1
  import { followModKey } from './definition-link.js';
2
2
  import { comparePositions } from './diagnostics-model.js';
3
+ import { messageOf } from './error-message.js';
3
4
  import { hoverTextOf, isEmptyHover } from './hover-content.js';
4
5
  import { SHOW_DELAY_MS } from './hover.js';
5
- import { messageOf } from './error-message.js';
6
6
  import { lineTextOf } from './line-text.js';
7
7
  import { Refresher } from './refresher.js';
8
8
  import { realTimers } from './timers.js';