@adecore/editor-react 0.53.2 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -2,8 +2,8 @@ import { identifierPrefix, isIdentifierCharacter } from './completion-model.js';
2
2
  import { comparePositions } from './diagnostics-model.js';
3
3
  import { KEY_PRIORITY } from './key-priority.js';
4
4
  import { textBeforeOf } from './line-text.js';
5
- import { isShortcut } from './shortcut-keys.js';
6
5
  import { PostfixFeature } from './postfix.js';
6
+ import { isShortcut } from './shortcut-keys.js';
7
7
  import { bodyWithIndentUnit, dedentLines, indentUnitOf, insertSnippet } from './snippet-insert.js';
8
8
  import { escapeSnippetText } from './snippet.js';
9
9
  import { SNIPPET_KIND, sortAfterServer, templateApplies, templateContextAt } from './template-context.js';
package/dist/markup.js CHANGED
@@ -3,9 +3,9 @@ import { KEY_PRIORITY } from './key-priority.js';
3
3
  import { lineTextOf } from './line-text.js';
4
4
  import { isVoidElement, markupPlaceAt, markupSyntaxOf, tagPairAt } from './markup-context.js';
5
5
  import { isShortcut } from './shortcut-keys.js';
6
- import { parseSnippet } from './snippet.js';
7
6
  import { indentSnippet } from './snippet-indent.js';
8
7
  import { positionInInsertion } from './snippet-session.js';
8
+ import { parseSnippet } from './snippet.js';
9
9
  const NAME = /^[\w:.-]*$/;
10
10
  const NAME_BEFORE = /<\/?[\w:.-]*$/;
11
11
  /*
@@ -1,5 +1,5 @@
1
- import { type Location, type NavigationResult, type Range } from '@adecore/lsp';
2
1
  import type { EditorPosition } from '@adecore/editor';
2
+ import { type Location, type NavigationResult, type Range } from '@adecore/lsp';
3
3
  import type { EditorLanguage } from './editor-language.ts';
4
4
  export type NavigationKind = 'definition' | 'declaration' | 'typeDefinition' | 'implementation';
5
5
  export declare function uniquePlaces(result: NavigationResult): {
@@ -1,10 +1,10 @@
1
1
  import { StaleResultError, fileUriToPath } from '@adecore/lsp';
2
+ import { rangeHolds } from './diagnostics-model.js';
3
+ import { messageOf } from './error-message.js';
2
4
  import { KEY_PRIORITY } from './key-priority.js';
3
5
  import { basenameOf } from './paths.js';
4
- import { rangeHolds } from './diagnostics-model.js';
5
- import { placesOfName } from './symbol-links.js';
6
6
  import { isShortcut } from './shortcut-keys.js';
7
- import { messageOf } from './error-message.js';
7
+ import { placesOfName } from './symbol-links.js';
8
8
  import { placeKey, uniqueBy } from './unique.js';
9
9
  const METHODS = {
10
10
  definition: 'textDocument/definition',
package/dist/peek.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { StaleResultError } from '@adecore/lsp';
2
+ import { messageOf } from './error-message.js';
2
3
  import { KEY_PRIORITY } from './key-priority.js';
3
4
  import { uniquePlaces } from './navigation.js';
4
5
  import { PEEK_READ_FILES, definitionSnippetOf, peekFilesOf, snippetOf } from './peek-model.js';
5
6
  import { isShortcut } from './shortcut-keys.js';
6
- import { messageOf } from './error-message.js';
7
7
  import { realTimers, revealRow } from './timers.js';
8
8
  import { placeKey, uniqueBy } from './unique.js';
9
9
  const TOAST_ID = 'language-peek';
package/dist/popups.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { type StoreApi } from 'zustand';
2
1
  import type { EditorPosition, EditorRange, EditorRect } from '@adecore/editor';
3
2
  import type { Location } from '@adecore/lsp';
4
- import type { CodeAuthorship } from './code-authors.ts';
5
- import type { Problem } from './diagnostics-model.ts';
6
- import type { PeekFile, PeekSnippet } from './peek-model.ts';
3
+ import { type StoreApi } from 'zustand';
7
4
  import type { CallDirection, CallRow } from './call-hierarchy-model.ts';
8
5
  import type { ActionEntry } from './code-actions-model.ts';
9
- import type { SymbolEntry } from './symbol-picker-model.ts';
6
+ import type { CodeAuthorship } from './code-authors.ts';
7
+ import type { Problem } from './diagnostics-model.ts';
10
8
  import type { HoverText } from './hover-content.ts';
9
+ import type { PeekFile, PeekSnippet } from './peek-model.ts';
11
10
  import type { SignatureViewModel } from './signature-model.ts';
11
+ import type { SymbolEntry } from './symbol-picker-model.ts';
12
12
  import type { ResourceOperationView } from './workspace-edit.ts';
13
13
  export interface HoverView {
14
14
  readonly anchor: EditorPosition;
@@ -1,12 +1,12 @@
1
- import { type i18n } from 'i18next';
2
- import { type ApplyWorkspaceEditResult, type LanguageService, type WorkspaceEdit } from '@adecore/lsp';
3
1
  import type { Editor, EditorPosition } from '@adecore/editor';
2
+ import { type ApplyWorkspaceEditResult, type LanguageService, type WorkspaceEdit } from '@adecore/lsp';
3
+ import { type i18n } from 'i18next';
4
4
  import { ClipboardHistory } from './clipboard-history.ts';
5
- import { TemplateRegistry } from './templates.ts';
6
5
  import { EditLocations } from './edit-locations.ts';
6
+ import type { LanguageHost } from './host-types.ts';
7
7
  import { NavigationHistory, type Place } from './navigation-history.ts';
8
8
  import { ProjectProblems } from './project-problems.ts';
9
- import type { LanguageHost } from './host-types.ts';
9
+ import { TemplateRegistry } from './templates.ts';
10
10
  export interface LanguageDocumentHandle {
11
11
  readonly uri: string;
12
12
  readonly service: LanguageService;
@@ -1,14 +1,14 @@
1
- import { disposeSnippetTransforms } from './snippet-transform-queue.js';
2
- import i18next from 'i18next';
3
1
  import { fileUriToPath, pathToFileUri, unservedLanguageService } from '@adecore/lsp';
2
+ import i18next from 'i18next';
4
3
  import { ClipboardHistory } from './clipboard-history.js';
5
- import { TemplateRegistry } from './templates.js';
6
4
  import { EditLocations } from './edit-locations.js';
7
5
  import { NavigationHistory } from './navigation-history.js';
6
+ import { PANEL_BODY_HEIGHT } from './panel-size.js';
7
+ import { relativeTo } from './paths.js';
8
8
  import { ProjectProblems, serviceProblems } from './project-problems.js';
9
+ import { disposeSnippetTransforms } from './snippet-transform-queue.js';
10
+ import { TemplateRegistry } from './templates.js';
9
11
  import { applyWorkspaceEdit } from './workspace-edit.js';
10
- import { relativeTo } from './paths.js';
11
- import { PANEL_BODY_HEIGHT } from './panel-size.js';
12
12
  const UNSERVED = unservedLanguageService();
13
13
  /* Sends one editor's edits to the document, holding them until the document is open. */
14
14
  class DocumentSync {
package/dist/rename.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { StaleResultError } from '@adecore/lsp';
2
+ import { messageOf } from './error-message.js';
2
3
  import { KEY_PRIORITY } from './key-priority.js';
3
4
  import { lineTextOf } from './line-text.js';
4
5
  import { occurrencesOf, renameKindOf, renamePreviewOf, renameTargetOf, wordRangeAt } from './rename-model.js';
5
6
  import { isShortcut } from './shortcut-keys.js';
6
7
  import { resourceOperationsOf } from './workspace-edit.js';
7
- import { messageOf } from './error-message.js';
8
8
  const METHOD = 'textDocument/rename';
9
9
  const TOAST_ID = 'language-rename';
10
10
  /* How much is read to tell a name suggester how the symbol is used: its first places, other files and lines around it. */
@@ -1,6 +1,6 @@
1
1
  import { type DocComment } from '@adecore/editor';
2
- import type { EditorLanguage } from './editor-language.ts';
3
2
  import { type ParsedDocComment } from './doc-comment-model.ts';
3
+ import type { EditorLanguage } from './editor-language.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  export interface RenderedDocsSettings {
6
6
  readonly renderDocComments: boolean;
@@ -1,7 +1,7 @@
1
1
  import { findDocComments } from '@adecore/editor';
2
2
  import { comparePositions } from './diagnostics-model.js';
3
- import { KEY_PRIORITY } from './key-priority.js';
4
3
  import { parseDocComment } from './doc-comment-model.js';
4
+ import { KEY_PRIORITY } from './key-priority.js';
5
5
  import { lineTextOf } from './line-text.js';
6
6
  import { isShortcut } from './shortcut-keys.js';
7
7
  import { realTimers } from './timers.js';
@@ -1,5 +1,5 @@
1
- import { type Keymap } from '@adecore/editor/keymap';
2
1
  import type { KeyChord } from '@adecore/editor';
2
+ import { type Keymap } from '@adecore/editor/keymap';
3
3
  export interface LanguageShortcut extends KeyChord {
4
4
  readonly apple: boolean;
5
5
  }
package/dist/signature.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { KEY_PRIORITY } from './key-priority.js';
2
- import { signatureViewOf } from './signature-model.js';
3
2
  import { isShortcut } from './shortcut-keys.js';
3
+ import { signatureViewOf } from './signature-model.js';
4
4
  import { realTimers } from './timers.js';
5
5
  const METHOD = 'textDocument/signatureHelp';
6
6
  const PAUSE_MS = 60;
@@ -1,7 +1,7 @@
1
1
  import type { Editor, EditorContentChange, EditorRange } from '@adecore/editor';
2
- import type { SnippetTransform } from './snippet.ts';
3
- import type { SnippetTransformLease } from './snippet-transform-queue.ts';
4
2
  import type { SnippetTransformJob } from './snippet-transform-protocol.ts';
3
+ import type { SnippetTransformLease } from './snippet-transform-queue.ts';
4
+ import type { SnippetTransform } from './snippet.ts';
5
5
  export interface FieldTransformTarget {
6
6
  readonly id: symbol;
7
7
  range: EditorRange;
@@ -1,4 +1,4 @@
1
- import { SnippetTransformQueueError } from './snippet-transform-queue.js';
1
+ import { fileUriToPath } from '@adecore/lsp';
2
2
  import { comparePositions, shiftPosition } from './diagnostics-model.js';
3
3
  import { lineTextOf, textBeforeOf } from './line-text.js';
4
4
  import { wordRangeAt } from './rename-model.js';
@@ -7,9 +7,9 @@ import { indentSnippet } from './snippet-indent.js';
7
7
  import { positionInInsertion } from './snippet-session.js';
8
8
  import { SnippetTransformError } from './snippet-transform-client.js';
9
9
  import { MAX_TRANSFORM_JOBS, MAX_TRANSFORM_WORK } from './snippet-transform-protocol.js';
10
- import { compileSnippet, tabOrder } from './snippet.js';
10
+ import { SnippetTransformQueueError } from './snippet-transform-queue.js';
11
11
  import { createSnippetResolver } from './snippet-variables.js';
12
- import { fileUriToPath } from '@adecore/lsp';
12
+ import { compileSnippet, tabOrder } from './snippet.js';
13
13
  /* The same limits as an inserted completion item. */
14
14
  const MAX_CHARACTERS = 2_000_000;
15
15
  const MAX_RANGES = 1_000;
@@ -1,8 +1,8 @@
1
- import { type Timers } from './timers.ts';
2
- import { type SnippetTransformJob } from './snippet-transform-protocol.ts';
3
1
  import type { EditorApplyEditsOptions, EditorContentChange, EditorPosition, EditorRange } from '@adecore/editor';
4
2
  import type { EditorLanguage } from './editor-language.ts';
3
+ import { type SnippetTransformJob } from './snippet-transform-protocol.ts';
5
4
  import type { SnippetField, SnippetStop } from './snippet.ts';
5
+ import { type Timers } from './timers.ts';
6
6
  export declare function positionInInsertion(start: EditorPosition, text: string, offset: number): EditorPosition;
7
7
  export interface SnippetInsertion {
8
8
  readonly start: EditorPosition;
@@ -1,12 +1,12 @@
1
- import { compareSnippetOrder, snippetOrderOf } from './snippet-range-order.js';
1
+ import { comparePositions, endOfInsertion, rangeHolds, sameRange, shiftPosition } from './diagnostics-model.js';
2
+ import { KEY_PRIORITY } from './key-priority.js';
3
+ import { textBeforeOf } from './line-text.js';
2
4
  import { SnippetFieldTransforms } from './snippet-field-transforms.js';
5
+ import { compareSnippetOrder, snippetOrderOf } from './snippet-range-order.js';
3
6
  import { SnippetTransformError } from './snippet-transform-client.js';
7
+ import { MAX_TRANSFORM_CHARACTERS } from './snippet-transform-protocol.js';
4
8
  import { acquireSnippetTransforms } from './snippet-transform-queue.js';
5
9
  import { realTimers } from './timers.js';
6
- import { KEY_PRIORITY } from './key-priority.js';
7
- import { MAX_TRANSFORM_CHARACTERS } from './snippet-transform-protocol.js';
8
- import { comparePositions, endOfInsertion, rangeHolds, sameRange, shiftPosition } from './diagnostics-model.js';
9
- import { textBeforeOf } from './line-text.js';
10
10
  export function positionInInsertion(start, text, offset) {
11
11
  return endOfInsertion(start, text.slice(0, offset));
12
12
  }
@@ -1,6 +1,6 @@
1
1
  import type { WorkerRequestPort } from '@adecore/editor/worker-client';
2
- import { type SnippetTransformJob } from './snippet-transform-protocol.ts';
3
2
  import type { ProjectLanguage } from './project-language.ts';
3
+ import { type SnippetTransformJob } from './snippet-transform-protocol.ts';
4
4
  import { type Timers } from './timers.ts';
5
5
  interface RequestOptions {
6
6
  readonly kind?: 'accept' | 'exit';
package/dist/surround.js CHANGED
@@ -4,8 +4,8 @@ import { KEY_PRIORITY } from './key-priority.js';
4
4
  import { lineTextOf, textBeforeOf } from './line-text.js';
5
5
  import { enclosingElements, lineEndOf, lineStartOf, markupSyntaxOf, removeTagEdits } from './markup-context.js';
6
6
  import { isShortcut } from './shortcut-keys.js';
7
- import { bodyWithIndentUnit, dedentLines, insertSnippet } from './snippet-insert.js';
8
7
  import { indentSnippet } from './snippet-indent.js';
8
+ import { bodyWithIndentUnit, dedentLines, insertSnippet } from './snippet-insert.js';
9
9
  import { compileSnippet, snippetVariables } from './snippet.js';
10
10
  import { expressionConstructs, regionConstructs, statementConstructs } from './surround-constructs.js';
11
11
  import { templateApplies, templateContextAt } from './template-context.js';
@@ -1,9 +1,9 @@
1
1
  import { StaleResultError } from '@adecore/lsp';
2
+ import { messageOf } from './error-message.js';
2
3
  import { KEY_PRIORITY } from './key-priority.js';
3
4
  import { basenameOf } from './paths.js';
4
- import { entriesOf, workspaceEntriesOf } from './symbol-picker-model.js';
5
5
  import { isShortcut } from './shortcut-keys.js';
6
- import { messageOf } from './error-message.js';
6
+ import { entriesOf, workspaceEntriesOf } from './symbol-picker-model.js';
7
7
  const TOAST_ID = 'language-symbols';
8
8
  /*
9
9
  * Go to symbol: a picker over the symbols the language servers know in the file, filtered as it is typed.
package/dist/templates.js CHANGED
@@ -1,5 +1,5 @@
1
- import { BUILT_IN_LIVE_TEMPLATES, BUILT_IN_POSTFIX_TEMPLATES } from './template-builtins.js';
2
1
  import { checkSnippet } from './snippet.js';
2
+ import { BUILT_IN_LIVE_TEMPLATES, BUILT_IN_POSTFIX_TEMPLATES } from './template-builtins.js';
3
3
  export { BUILT_IN_LIVE_TEMPLATES, BUILT_IN_POSTFIX_TEMPLATES };
4
4
  export {} from './live-templates.js';
5
5
  const MAX_KEY_LENGTH = 40;
@@ -1,3 +1,3 @@
1
- import type { EditorLanguage } from './editor-language.ts';
2
1
  import type { ProblemCounts } from './diagnostics.ts';
2
+ import type { EditorLanguage } from './editor-language.ts';
3
3
  export declare function useProblemCounts(language: EditorLanguage | null): ProblemCounts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/editor-react",
3
- "version": "0.53.2",
3
+ "version": "0.54.0",
4
4
  "type": "module",
5
5
  "description": "Language-enabled editors, feature coordination and React popups over injected language services.",
6
6
  "license": "FSL-1.1-MIT",
@@ -62,9 +62,9 @@
62
62
  "test": "bun test --conditions=source"
63
63
  },
64
64
  "dependencies": {
65
- "@adecore/editor": "0.53.2",
66
- "@adecore/lsp": "0.53.2",
67
- "@adecore/merge": "0.53.2",
65
+ "@adecore/editor": "0.54.0",
66
+ "@adecore/lsp": "0.54.0",
67
+ "@adecore/merge": "0.54.0",
68
68
  "emmet": "^2.4.11",
69
69
  "lucide-react": "^1.65.0",
70
70
  "react-markdown": "^10.1.0",
@@ -73,14 +73,14 @@
73
73
  "zustand": "^5.0.16"
74
74
  },
75
75
  "peerDependencies": {
76
- "@adecore/ui": "^0.53.2",
76
+ "@adecore/ui": "^0.54.0",
77
77
  "i18next": "^26.5.12",
78
78
  "react": "^19.3.1",
79
79
  "react-dom": "^19.3.1",
80
80
  "react-i18next": "^17.1.9"
81
81
  },
82
82
  "devDependencies": {
83
- "@adecore/ui": "0.53.2",
83
+ "@adecore/ui": "0.54.0",
84
84
  "@types/bun": "^1.4.4",
85
85
  "@types/react": "^19.3.0",
86
86
  "@types/react-dom": "^19.3.0",
@@ -1,6 +1,7 @@
1
+ import type { EditorRect } from '@adecore/editor';
2
+ import { ScrollArea } from '@adecore/ui';
1
3
  import { useLayoutEffect, useRef, type ReactNode } from 'react';
2
4
  import { createPortal } from 'react-dom';
3
- import type { EditorRect } from '@adecore/editor';
4
5
  import { placePopup, type PlaceOptions } from './popup-placement.ts';
5
6
 
6
7
  export interface AnchoredPopupProps {
@@ -39,15 +40,18 @@ export function AnchoredPopup({ rect, className, overflow = 'scroll', children,
39
40
  popup.style.visibility = 'visible';
40
41
  });
41
42
 
43
+ const scrolls = overflow === 'scroll';
44
+
45
+ // A card that scrolls is a frame around a `ScrollArea`, which takes the content's classes.
42
46
  return createPortal(
43
47
  <div
44
48
  ref={element}
45
- className={`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 ?? ''}`}
49
+ className={`fixed top-0 left-0 z-(--z-popup) overflow-hidden rounded-lg border border-border bg-surface-raised text-text shadow-(--float-shadow) ${scrolls ? 'flex flex-col' : (className ?? '')}`}
46
50
  style={{ visibility: 'hidden' }}
47
51
  onPointerEnter={onPointerEnter}
48
52
  onPointerLeave={onPointerLeave}
49
53
  >
50
- {children}
54
+ {scrolls ? <ScrollArea viewportClassName={className}>{children}</ScrollArea> : children}
51
55
  </div>,
52
56
  document.body
53
57
  );
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  import type { EditorMarkColor, EditorRect } from '@adecore/editor';
2
+ import type { ReactNode } from 'react';
3
3
  import { AnchoredPopup } from './AnchoredPopup.tsx';
4
4
 
5
5
  export interface AttributionCardProps {
@@ -1,5 +1,5 @@
1
- import { CircleCheck, Sparkles, TriangleAlert } from 'lucide-react';
2
1
  import { Icon } from '@adecore/ui';
2
+ import { CircleCheck, Sparkles, TriangleAlert } from 'lucide-react';
3
3
  import type { Baseline, BaselineLevel } from './hover-content.ts';
4
4
 
5
5
  const BASELINE_MARKS: Record<BaselineLevel, { icon: typeof CircleCheck; color: string }> = {
@@ -1,22 +1,22 @@
1
+ import { fileUriToPath } from '@adecore/lsp';
2
+ import { Icon, IconButton, ScrollArea, Segmented, Spinner, Tooltip } from '@adecore/ui';
3
+ import { formatNumber } from '@adecore/ui/format';
4
+ import { ChevronDown, ChevronLeft, ChevronRight, X } from 'lucide-react';
1
5
  import { useEffect, useId, useRef, type ReactNode, type Ref } from 'react';
2
6
  import { createPortal } from 'react-dom';
3
7
  import { useTranslation } from 'react-i18next';
4
- import { ChevronDown, ChevronLeft, ChevronRight, X } from 'lucide-react';
5
- import { fileUriToPath } from '@adecore/lsp';
6
- import { Icon, IconButton, Segmented, Spinner, Tooltip } from '@adecore/ui';
7
- import { formatNumber } from '@adecore/ui/format';
8
- import { CALL_HIERARCHY_HEIGHT } from './call-hierarchy.ts';
9
- import { PanelResizeHandle } from './PanelResizeHandle.tsx';
10
- import { usePanelBody } from './use-panel-body.ts';
11
- import { PANEL_BODY_HEIGHT } from './panel-size.ts';
12
8
  import { CALL_LEVEL_LIMIT, isTypeDirection, type CallDirection, type CallRow } from './call-hierarchy-model.ts';
9
+ import { CALL_HIERARCHY_HEIGHT } from './call-hierarchy.ts';
13
10
  import type { EditorLanguage } from './editor-language.ts';
11
+ import { PANEL_BODY_HEIGHT } from './panel-size.ts';
12
+ import { PanelResizeHandle } from './PanelResizeHandle.tsx';
14
13
  import { basenameOf, relativeTo } from './paths.ts';
15
14
  import { PathText } from './PathText.tsx';
16
15
  import { Preview } from './PeekPanel.tsx';
16
+ import { useInputPopup } from './popup-focus.ts';
17
17
  import type { CallHierarchyView } from './popups.ts';
18
18
  import { SymbolBadge } from './SymbolPicker.tsx';
19
- import { useInputPopup } from './popup-focus.ts';
19
+ import { usePanelBody } from './use-panel-body.ts';
20
20
 
21
21
  const INDENT = 14;
22
22
  const BASE_INDENT = 8;
@@ -125,11 +125,12 @@ function Tree({ language, view }: { language: EditorLanguage; view: CallHierarch
125
125
  useInputPopup(language, treeId, activeId);
126
126
 
127
127
  return (
128
- <div
128
+ <ScrollArea
129
129
  id={treeId}
130
130
  role="tree"
131
131
  aria-label={t(isTypeDirection(view.direction) ? 'language.callHierarchy.typesLabel' : 'language.callHierarchy.label')}
132
- className="w-1/2 shrink-0 overflow-y-auto border-r border-border py-1"
132
+ className="w-1/2 shrink-0 border-r border-border"
133
+ viewportClassName="py-1"
133
134
  >
134
135
  {view.rows.map((row) => {
135
136
  const active = row.id === view.active;
@@ -157,7 +158,7 @@ function Tree({ language, view }: { language: EditorLanguage; view: CallHierarch
157
158
  </Line>
158
159
  );
159
160
  })}
160
- </div>
161
+ </ScrollArea>
161
162
  );
162
163
  }
163
164
 
@@ -1,5 +1,5 @@
1
- import { useLayoutEffect, useRef, type ReactNode } from 'react';
2
1
  import type { Editor } from '@adecore/editor';
2
+ import { useLayoutEffect, useRef, type ReactNode } from 'react';
3
3
  import { diffSegments, emphasisOf } from './proposal-model.ts';
4
4
 
5
5
  export interface ChangeReviewProps {
@@ -1,7 +1,7 @@
1
- import { useTranslation } from 'react-i18next';
2
- import { GitCommitHorizontal, User, Users } from 'lucide-react';
3
1
  import { Button, Icon, Popover, Separator, Tooltip, useNow } from '@adecore/ui';
4
2
  import { formatAge, formatNumber } from '@adecore/ui/format';
3
+ import { GitCommitHorizontal, User, Users } from 'lucide-react';
4
+ import { useTranslation } from 'react-i18next';
5
5
  import type { EditorLanguage } from './editor-language.ts';
6
6
  import type { GitBlameCommit } from './host-types.ts';
7
7
  import type { AuthorsView } from './popups.ts';
@@ -1,10 +1,10 @@
1
+ import type { EditorRect } from '@adecore/editor';
2
+ import { formatShortcut, ScrollArea } from '@adecore/ui';
1
3
  import { useId, useLayoutEffect, useRef, useState } from 'react';
2
4
  import { createPortal } from 'react-dom';
3
5
  import { useTranslation } from 'react-i18next';
4
- import { formatShortcut } from '@adecore/ui';
5
- import type { EditorRect } from '@adecore/editor';
6
- import type { EditorLanguage } from './editor-language.ts';
7
6
  import { kindLetterOf, kindToneOf, rowWindow } from './completion-model.ts';
7
+ import type { EditorLanguage } from './editor-language.ts';
8
8
  import { SourceLine, SymbolSections } from './HoverSections.tsx';
9
9
  import { PathText } from './PathText.tsx';
10
10
  import { keepFocusOutOfList, useInputPopup } from './popup-focus.ts';
@@ -150,10 +150,11 @@ export function CompletionPopup({ language, view, rect }: { language: EditorLang
150
150
  width: `calc(${Math.max(widest, need)}ch + ${ROW_CHROME}px)`
151
151
  }}
152
152
  />
153
- <div
153
+ <ScrollArea
154
154
  id={listId}
155
155
  role="listbox"
156
- className="w-0 min-w-full overflow-y-auto p-1"
156
+ className="w-0 min-w-full"
157
+ viewportClassName="p-1"
157
158
  style={{ maxHeight: ROW_HEIGHT * VISIBLE_ROWS + 8 }}
158
159
  onScroll={(event) => setListTop(event.currentTarget.scrollTop)}
159
160
  >
@@ -190,7 +191,7 @@ export function CompletionPopup({ language, view, rect }: { language: EditorLang
190
191
  );
191
192
  })}
192
193
  <div aria-hidden style={{ height: (total - last) * ROW_HEIGHT }} />
193
- </div>
194
+ </ScrollArea>
194
195
  <div className="flex items-center gap-3 border-t border-border px-2 py-1 text-xs whitespace-nowrap text-text-faint">
195
196
  <span>↵ {t('language.completion.insert')}</span>
196
197
  <span>⇥ {t('language.completion.replace')}</span>
@@ -205,16 +206,18 @@ export function CompletionPopup({ language, view, rect }: { language: EditorLang
205
206
  {view.detailsOpen && view.docs !== null && (
206
207
  <div
207
208
  ref={docs}
208
- className={`${CARD} flex w-[360px] flex-col divide-y divide-border overflow-y-auto select-text`}
209
+ className={`${CARD} flex w-[360px] flex-col`}
209
210
  style={{ visibility: 'hidden' }}
210
211
  onPointerDown={(event) => event.preventDefault()}
211
212
  >
212
- {view.docs.source !== '' && (
213
- <div className="px-3 py-2">
214
- <SourceLine text={view.docs.source} language={view.highlightLanguage} />
215
- </div>
216
- )}
217
- <SymbolSections text={view.docs.text} />
213
+ <ScrollArea viewportClassName="flex flex-col divide-y divide-border select-text">
214
+ {view.docs.source !== '' && (
215
+ <div className="px-3 py-2">
216
+ <SourceLine text={view.docs.source} language={view.highlightLanguage} />
217
+ </div>
218
+ )}
219
+ <SymbolSections text={view.docs.text} />
220
+ </ScrollArea>
218
221
  </div>
219
222
  )}
220
223
  </>,
package/src/DiffView.tsx CHANGED
@@ -1,14 +1,15 @@
1
- import { useLayoutEffect, useRef, useState, type Ref } from 'react';
2
- import { useTranslation } from 'react-i18next';
3
1
  import type { Editor, EditorEngine, EditorLineHighlight, EditorTheme } from '@adecore/editor';
4
2
  import { parseChord } from '@adecore/editor/keymap';
5
3
  import { diffDisplay, diffSplit, sourceLineOf, type DiffDocument, type DiffDisplay, type DiffSourceLine } from '@adecore/merge';
6
- import { wordMarks } from './diff-wordmarks.ts';
4
+ import { useOverlayScrollbars } from '@adecore/ui';
5
+ import { useLayoutEffect, useRef, useState, type Ref } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { DEFAULT_UNFOLD_LIMITS, expandDiff, type DiffLimits } from './diff-expansion.ts';
7
8
  import { DiffOverlays, type MountedDiff } from './diff-overlays.tsx';
8
- import { SplitDiffView } from './SplitDiffView.tsx';
9
9
  import { repaintOnTokens, type DiffSourceTokens } from './diff-syntax.ts';
10
+ import { wordMarks } from './diff-wordmarks.ts';
10
11
  import { LineActionHost, RowHost } from './row-host.ts';
11
- import { DEFAULT_UNFOLD_LIMITS, expandDiff, type DiffLimits } from './diff-expansion.ts';
12
+ import { SplitDiffView } from './SplitDiffView.tsx';
12
13
 
13
14
  export interface DiffViewProps {
14
15
  engine: EditorEngine;
@@ -74,6 +75,8 @@ function UnifiedDiffView({
74
75
  const applied = useRef({ theme, wrap, label });
75
76
  const [mounted, setMounted] = useState<MountedDiff | null>(null);
76
77
  const [height, setHeight] = useState(0);
78
+ const [scroller, setScroller] = useState<HTMLElement | null>(null);
79
+ const scrollbars = useOverlayScrollbars(scroller, { axis: 'both' });
77
80
 
78
81
  useLayoutEffect(() => {
79
82
  current.current = { document, display, tokens, theme, wrap, label };
@@ -112,6 +115,7 @@ function UnifiedDiffView({
112
115
  });
113
116
 
114
117
  setMounted({ engine, editor, rows: new RowHost(editor, 'diff-gaps'), actions: new LineActionHost(editor, 'diff-status') });
118
+ setScroller(host.querySelector<HTMLElement>('.se-viewport'));
115
119
 
116
120
  const measure = (): void => setHeight(editor.getContentHeight());
117
121
 
@@ -120,6 +124,7 @@ function UnifiedDiffView({
120
124
 
121
125
  return () => {
122
126
  stop();
127
+ setScroller(null);
123
128
  editor.dispose();
124
129
  };
125
130
  }, [engine]);
@@ -271,8 +276,9 @@ function UnifiedDiffView({
271
276
  data-scroll={fill || height > limit}
272
277
  style={{ position: 'relative', minHeight: 0, height: fill ? '100%' : Math.min(height, limit) }}
273
278
  >
274
- <div ref={element} style={{ position: 'absolute', inset: 0 }} />
279
+ <div ref={element} style={{ position: 'absolute', inset: 0, isolation: 'isolate' }} />
275
280
  {mounted !== null && mounted.engine === engine && <DiffOverlays mounted={mounted} display={display} unfold={unfold} blocked={blocked} />}
281
+ {scrollbars}
276
282
  </div>
277
283
  );
278
284
  }
@@ -1,8 +1,8 @@
1
+ import { ContextMenu, EDIT_SHORTCUTS, Kbd } from '@adecore/ui';
1
2
  import { Fragment, useEffect, useRef, type ReactNode } from 'react';
2
3
  import { useTranslation } from 'react-i18next';
3
- import { ContextMenu, EDIT_SHORTCUTS, Kbd } from '@adecore/ui';
4
- import type { EditorLanguage } from './editor-language.ts';
5
4
  import { menuGroupsOf, type MenuRowId, type MenuRowSpec } from './context-menu-rows.ts';
5
+ import type { EditorLanguage } from './editor-language.ts';
6
6
  import type { MenuView } from './popups.ts';
7
7
 
8
8
  /*
@@ -1,7 +1,3 @@
1
- import { createHolder } from './holder.ts';
2
- import { useLayoutEffect, useMemo, useRef, useSyncExternalStore, type ReactNode, type Ref } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import type { TFunction } from 'i18next';
5
1
  import {
6
2
  DEFAULT_SMART_KEYS,
7
3
  DEFAULT_TODO_WORDS,
@@ -12,10 +8,15 @@ import {
12
8
  type EditorOptions,
13
9
  type EditorSmartKeys
14
10
  } from '@adecore/editor';
11
+ import { useOverlayScrollbars } from '@adecore/ui';
12
+ import type { TFunction } from 'i18next';
13
+ import { useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, type ReactNode, type Ref } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
15
  import { EditorLanguage, type EditorLanguageOptions } from './editor-language.ts';
16
+ import { createHolder } from './holder.ts';
16
17
  import { LanguagePopups } from './LanguagePopups.tsx';
17
- import type { ProjectLanguage } from './project-language.ts';
18
18
  import type { HoverView } from './popups.ts';
19
+ import type { ProjectLanguage } from './project-language.ts';
19
20
  import type { Timers } from './timers.ts';
20
21
 
21
22
  export interface EditorViewProps {
@@ -147,6 +148,8 @@ export function EditorView({
147
148
  const applied = useRef(options);
148
149
  const holder = useMemo(() => createHolder<EditorLanguage>(), []);
149
150
  const language = useSyncExternalStore(holder.subscribe, holder.get, holder.get);
151
+ const [scroller, setScroller] = useState<HTMLElement | null>(null);
152
+ const scrollbars = useOverlayScrollbars(scroller, { axis: 'both' });
150
153
 
151
154
  useLayoutEffect(() => {
152
155
  latest.current = { options, timers, languageOptions, onMount };
@@ -163,6 +166,8 @@ export function EditorView({
163
166
  const editor = engine.mount(host, { ...inputs.options, messages: { ...foldMessages(words.current), ...inputs.options.messages } });
164
167
  mounted.current = editor;
165
168
  applied.current = inputs.options;
169
+ // The engine's scroller stays native; it gets the overlay bars here, over the host it fills.
170
+ setScroller(host.querySelector<HTMLElement>('.se-viewport'));
166
171
 
167
172
  const attached =
168
173
  project === undefined || uri === undefined || languageId === undefined
@@ -174,6 +179,7 @@ export function EditorView({
174
179
 
175
180
  return () => {
176
181
  mounted.current = null;
182
+ setScroller(null);
177
183
  holder.set(null);
178
184
  stop?.();
179
185
  attached?.dispose();
@@ -207,7 +213,9 @@ export function EditorView({
207
213
 
208
214
  return (
209
215
  <div className={className} ref={ref} style={{ position: 'relative', minHeight: 0 }}>
210
- <div ref={element} style={{ position: 'absolute', inset: 0 }} />
216
+ {/* Its own stacking layer, so no layer of the editor rises over the bars beside it. */}
217
+ <div ref={element} style={{ position: 'absolute', inset: 0, isolation: 'isolate' }} />
218
+ {scrollbars}
211
219
  {language !== null && <LanguagePopups language={language} contextMenuItems={contextMenuItems} hoverFooter={hoverFooter} />}
212
220
  </div>
213
221
  );