monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251218

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 (410) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +34 -6
  18. package/esm/vs/base/browser/dom.js +1 -4
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/markdownRenderer.js +25 -11
  21. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  22. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
  23. package/esm/vs/base/browser/ui/button/button.js +15 -8
  24. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  25. package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
  26. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  27. package/esm/vs/base/browser/ui/findinput/findInput.js +6 -1
  28. package/esm/vs/base/browser/ui/findinput/findInput.js.map +1 -1
  29. package/esm/vs/base/browser/ui/inputbox/inputBox.js +17 -1
  30. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  31. package/esm/vs/base/browser/ui/list/list.css +1 -0
  32. package/esm/vs/base/browser/ui/toggle/toggle.js +78 -6
  33. package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
  34. package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
  35. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  36. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  37. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  38. package/esm/vs/base/common/defaultAccount.js +6 -0
  39. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  40. package/esm/vs/base/common/equals.js +73 -24
  41. package/esm/vs/base/common/equals.js.map +1 -1
  42. package/esm/vs/base/common/event.js +14 -4
  43. package/esm/vs/base/common/event.js.map +1 -1
  44. package/esm/vs/base/common/iterator.js.map +1 -1
  45. package/esm/vs/base/common/keybindings.js +0 -8
  46. package/esm/vs/base/common/keybindings.js.map +1 -1
  47. package/esm/vs/base/common/lifecycle.js +2 -2
  48. package/esm/vs/base/common/lifecycle.js.map +1 -1
  49. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  50. package/esm/vs/base/common/observableInternal/index.js +1 -1
  51. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  52. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  53. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  54. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  55. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  56. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  57. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  58. package/esm/vs/base/common/product.js.map +1 -1
  59. package/esm/vs/base/common/strings.js +3 -1
  60. package/esm/vs/base/common/strings.js.map +1 -1
  61. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  62. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  64. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  66. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  67. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  69. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  70. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  71. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  72. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  73. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  74. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  75. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  76. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  77. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  78. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  79. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  80. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  81. package/esm/vs/editor/browser/services/editorWorkerService.js +6 -2
  82. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  83. package/esm/vs/editor/browser/view.js +11 -2
  84. package/esm/vs/editor/browser/view.js.map +1 -1
  85. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  86. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  87. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  88. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  89. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  90. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  91. package/esm/vs/editor/common/config/editorConfigurationSchema.js +49 -47
  92. package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
  93. package/esm/vs/editor/common/config/editorOptions.js +410 -410
  94. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  95. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  96. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -69
  97. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  98. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  99. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  100. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  101. package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
  102. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  103. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  104. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  105. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  106. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  107. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  108. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  109. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  110. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  111. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  112. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  113. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  114. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  115. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  116. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  117. package/esm/vs/editor/common/languages.js +58 -57
  118. package/esm/vs/editor/common/languages.js.map +1 -1
  119. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  120. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  121. package/esm/vs/editor/common/model/editStack.js +1 -1
  122. package/esm/vs/editor/common/model/textModel.js +49 -30
  123. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  124. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  125. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  126. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  127. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  128. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  129. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  130. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  131. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  132. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  133. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  134. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  135. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  136. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  137. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  138. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  139. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +3 -3
  140. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  141. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  142. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  143. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  144. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  145. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +71 -53
  146. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  147. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  148. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  149. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  150. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  151. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  152. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  153. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  154. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  155. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  156. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  157. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  158. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  159. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  160. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  161. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  162. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +23 -10
  163. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  164. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  165. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  166. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  167. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  168. package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
  169. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  170. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  171. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  172. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  173. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  174. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  175. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  176. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  177. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  178. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  179. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  180. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  181. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  182. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  183. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  184. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  185. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  186. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  187. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  188. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  189. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  190. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -10
  191. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  192. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  193. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  194. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  195. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  196. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +50 -21
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  214. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  215. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  216. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
  217. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  218. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
  219. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  220. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
  221. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  222. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
  223. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  224. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
  225. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
  226. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  227. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  228. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  229. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  230. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  231. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  232. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  233. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  234. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  235. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  236. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  237. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  238. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  276. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  277. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  278. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  279. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  280. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  281. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  282. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  283. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  284. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  285. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  286. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  287. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  288. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +25 -27
  289. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  290. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  291. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  292. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
  293. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  294. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  295. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  296. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  297. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  298. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  299. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  300. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  301. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  302. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  303. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  304. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  305. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  306. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  307. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  308. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  309. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  310. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  311. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  312. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  315. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  316. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  317. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  318. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  319. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  320. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  321. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  322. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  323. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  324. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  326. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  327. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  328. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +34 -3
  330. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  331. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  333. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  334. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  335. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  336. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  337. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  338. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  339. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  340. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  341. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  342. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  343. package/esm/vs/platform/actions/common/actions.js +11 -5
  344. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  345. package/esm/vs/platform/actions/common/menuService.js +2 -2
  346. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  347. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  348. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  349. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  350. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  351. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  352. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  353. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  354. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  355. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  356. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  357. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  358. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  359. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  360. package/esm/vs/platform/list/browser/listService.js +27 -27
  361. package/esm/vs/platform/log/common/log.js +1 -1
  362. package/esm/vs/platform/log/common/log.js.map +1 -1
  363. package/esm/vs/platform/markers/common/markerService.js +6 -6
  364. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  365. package/esm/vs/platform/markers/common/markers.js +6 -6
  366. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  367. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  368. package/esm/vs/platform/quickinput/browser/media/quickInput.css +45 -7
  369. package/esm/vs/platform/quickinput/browser/quickInput.js +51 -15
  370. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  371. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  372. package/esm/vs/platform/quickinput/browser/quickInputBox.js +13 -1
  373. package/esm/vs/platform/quickinput/browser/quickInputBox.js.map +1 -1
  374. package/esm/vs/platform/quickinput/browser/quickInputController.js +22 -12
  375. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  376. package/esm/vs/platform/quickinput/browser/quickInputList.js +17 -12
  377. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  378. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +36 -8
  379. package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
  380. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  381. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +3 -3
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +8 -4
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  385. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  386. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  387. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  388. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  390. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  391. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  392. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  393. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  394. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  395. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  396. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  397. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  398. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  399. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  400. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  401. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  402. package/esm/vs/platform/window/common/window.js +1 -1
  403. package/esm/vs/platform/window/common/window.js.map +1 -1
  404. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  405. package/monaco.d.ts +34 -3
  406. package/package.json +2 -2
  407. package/version.txt +1 -1
  408. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  409. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  410. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAe,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE5F,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAA+D,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAExI,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,k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O,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC,UAAU,IAAI,CAAC,CAAC,yBAAyB;IAC9F,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAEtC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAE3C,MAAM,GAAG,GAAG,cAAc,CAAC,WAAW,CAAC;IAEvC,SAAS,CAAC,MAAM,EAAE,CAAC;IAEnB,OAAO,GAAG,CAAC;AACZ,CAAC","file":"textAreaEditContext.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './textAreaEditContext.css';\nimport * as nls from '../../../../../nls.js';\nimport * as browser from '../../../../../base/browser/browser.js';\nimport { FastDomNode, createFastDomNode } from '../../../../../base/browser/fastDomNode.js';\nimport { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport * as strings from '../../../../../base/common/strings.js';\nimport { applyFontInfo } from '../../../config/domFontInfo.js';\nimport { ViewController } from '../../../view/viewController.js';\nimport { PartFingerprint, PartFingerprints } from '../../../view/viewPart.js';\nimport { LineNumbersOverlay } from '../../../viewParts/lineNumbers/lineNumbers.js';\nimport { Margin } from '../../../viewParts/margin/margin.js';\nimport { RenderLineNumbersType, EditorOption, IComputedEditorOptions, EditorOptions } from '../../../../common/config/editorOptions.js';\nimport { FontInfo } from '../../../../common/config/fontInfo.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { Selection } from '../../../../common/core/selection.js';\nimport { ScrollType } from '../../../../common/editorCommon.js';\nimport { EndOfLinePreference } from '../../../../common/model.js';\nimport { RenderingContext, RestrictedRenderingContext, HorizontalPosition, LineVisibleRanges } from '../../../view/renderingContext.js';\nimport { ViewContext } from '../../../../common/viewModel/viewContext.js';\nimport * as viewEvents from '../../../../common/viewEvents.js';\nimport { AccessibilitySupport } from '../../../../../platform/accessibility/common/accessibility.js';\nimport { IEditorAriaOptions } from '../../../editorBrowser.js';\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../../base/browser/ui/mouseCursor/mouseCursor.js';\nimport { TokenizationRegistry } from '../../../../common/languages.js';\nimport { ColorId, ITokenPresentation } from '../../../../common/encodedTokenAttributes.js';\nimport { Color } from '../../../../../base/common/color.js';\nimport { IME } from '../../../../../base/common/ime.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { AbstractEditContext } from '../editContext.js';\nimport { ICompositionData, IPasteData, ITextAreaInputHost, TextAreaInput, TextAreaWrapper } from './textAreaEditContextInput.js';\nimport { ariaLabelForScreenReaderContent, newlinecount, SimplePagedScreenReaderStrategy } from '../screenReaderUtils.js';\nimport { ClipboardDataToCopy, getDataToCopy } from '../clipboardUtils.js';\nimport { _debugComposition, ITypeData, TextAreaState } from './textAreaEditContextState.js';\nimport { getMapForWordSeparators, WordCharacterClass } from '../../../../common/core/wordCharacterClassifier.js';\n\nexport interface IVisibleRangeProvider {\n\tvisibleRangeForPosition(position: Position): HorizontalPosition | null;\n\tlinesVisibleRangesForRange(range: Range, includeNewLines: boolean): LineVisibleRanges[] | null;\n}\n\nclass VisibleTextAreaData {\n\t_visibleTextAreaBrand: void = undefined;\n\n\tpublic startPosition: Position | null = null;\n\tpublic endPosition: Position | null = null;\n\n\tpublic visibleTextareaStart: HorizontalPosition | null = null;\n\tpublic visibleTextareaEnd: HorizontalPosition | null = null;\n\n\t/**\n\t * When doing composition, the currently composed text might be split up into\n\t * multiple tokens, then merged again into a single token, etc. Here we attempt\n\t * to keep the presentation of the <textarea> stable by using the previous used\n\t * style if multiple tokens come into play. This avoids flickering.\n\t */\n\tprivate _previousPresentation: ITokenPresentation | null = null;\n\n\tconstructor(\n\t\tprivate readonly _context: ViewContext,\n\t\tpublic readonly modelLineNumber: number,\n\t\tpublic readonly distanceToModelLineStart: number,\n\t\tpublic readonly widthOfHiddenLineTextBefore: number,\n\t\tpublic readonly distanceToModelLineEnd: number,\n\t) {\n\t}\n\n\tprepareRender(visibleRangeProvider: IVisibleRangeProvider): void {\n\t\tconst startModelPosition = new Position(this.modelLineNumber, this.distanceToModelLineStart + 1);\n\t\tconst endModelPosition = new Position(this.modelLineNumber, this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber) - this.distanceToModelLineEnd);\n\n\t\tthis.startPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(startModelPosition);\n\t\tthis.endPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(endModelPosition);\n\n\t\tif (this.startPosition.lineNumber === this.endPosition.lineNumber) {\n\t\t\tthis.visibleTextareaStart = visibleRangeProvider.visibleRangeForPosition(this.startPosition);\n\t\t\tthis.visibleTextareaEnd = visibleRangeProvider.visibleRangeForPosition(this.endPosition);\n\t\t} else {\n\t\t\t// TODO: what if the view positions are not on the same line?\n\t\t\tthis.visibleTextareaStart = null;\n\t\t\tthis.visibleTextareaEnd = null;\n\t\t}\n\t}\n\n\tdefinePresentation(tokenPresentation: ITokenPresentation | null): ITokenPresentation {\n\t\tif (!this._previousPresentation) {\n\t\t\t// To avoid flickering, once set, always reuse a presentation throughout the entire IME session\n\t\t\tif (tokenPresentation) {\n\t\t\t\tthis._previousPresentation = tokenPresentation;\n\t\t\t} else {\n\t\t\t\tthis._previousPresentation = {\n\t\t\t\t\tforeground: ColorId.DefaultForeground,\n\t\t\t\t\titalic: false,\n\t\t\t\t\tbold: false,\n\t\t\t\t\tunderline: false,\n\t\t\t\t\tstrikethrough: false,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn this._previousPresentation;\n\t}\n}\n\nconst canUseZeroSizeTextarea = (browser.isFirefox);\n\nexport class TextAreaEditContext extends AbstractEditContext {\n\n\tprivate readonly _viewController: ViewController;\n\tprivate readonly _visibleRangeProvider: IVisibleRangeProvider;\n\tprivate _scrollLeft: number;\n\tprivate _scrollTop: number;\n\n\tprivate _accessibilitySupport!: AccessibilitySupport;\n\tprivate _accessibilityPageSize!: number;\n\tprivate _textAreaWrapping!: boolean;\n\tprivate _textAreaWidth!: number;\n\tprivate _contentLeft: number;\n\tprivate _contentWidth: number;\n\tprivate _contentHeight: number;\n\tprivate _fontInfo: FontInfo;\n\tprivate _emptySelectionClipboard: boolean;\n\tprivate _copyWithSyntaxHighlighting: boolean;\n\n\t/**\n\t * Defined only when the text area is visible (composition case).\n\t */\n\tprivate _visibleTextArea: VisibleTextAreaData | null;\n\tprivate _selections: Selection[];\n\tprivate _modelSelections: Selection[];\n\n\t/**\n\t * The position at which the textarea was rendered.\n\t * This is useful for hit-testing and determining the mouse position.\n\t */\n\tprivate _lastRenderPosition: Position | null;\n\n\tpublic readonly textArea: FastDomNode<HTMLTextAreaElement>;\n\tpublic readonly textAreaCover: FastDomNode<HTMLElement>;\n\tprivate readonly _textAreaInput: TextAreaInput;\n\n\tconstructor(\n\t\tcontext: ViewContext,\n\t\toverflowGuardContainer: FastDomNode<HTMLElement>,\n\t\tviewController: ViewController,\n\t\tvisibleRangeProvider: IVisibleRangeProvider,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper(context);\n\n\t\tthis._viewController = viewController;\n\t\tthis._visibleRangeProvider = visibleRangeProvider;\n\t\tthis._scrollLeft = 0;\n\t\tthis._scrollTop = 0;\n\n\t\tconst options = this._context.configuration.options;\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\n\t\tthis._setAccessibilityOptions(options);\n\t\tthis._contentLeft = layoutInfo.contentLeft;\n\t\tthis._contentWidth = layoutInfo.contentWidth;\n\t\tthis._contentHeight = layoutInfo.height;\n\t\tthis._fontInfo = options.get(EditorOption.fontInfo);\n\t\tthis._emptySelectionClipboard = options.get(EditorOption.emptySelectionClipboard);\n\t\tthis._copyWithSyntaxHighlighting = options.get(EditorOption.copyWithSyntaxHighlighting);\n\n\t\tthis._visibleTextArea = null;\n\t\tthis._selections = [new Selection(1, 1, 1, 1)];\n\t\tthis._modelSelections = [new Selection(1, 1, 1, 1)];\n\t\tthis._lastRenderPosition = null;\n\n\t\t// Text Area (The focus will always be in the textarea when the cursor is blinking)\n\t\tthis.textArea = createFastDomNode(document.createElement('textarea'));\n\t\tPartFingerprints.write(this.textArea, PartFingerprint.TextArea);\n\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\n\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\tthis.textArea.domNode.style.tabSize = `${tabSize * this._fontInfo.spaceWidth}px`;\n\t\tthis.textArea.setAttribute('autocorrect', 'off');\n\t\tthis.textArea.setAttribute('autocapitalize', 'off');\n\t\tthis.textArea.setAttribute('autocomplete', 'off');\n\t\tthis.textArea.setAttribute('spellcheck', 'false');\n\t\tthis.textArea.setAttribute('aria-label', ariaLabelForScreenReaderContent(options, this._keybindingService));\n\t\tthis.textArea.setAttribute('aria-required', options.get(EditorOption.ariaRequired) ? 'true' : 'false');\n\t\tthis.textArea.setAttribute('tabindex', String(options.get(EditorOption.tabIndex)));\n\t\tthis.textArea.setAttribute('role', 'textbox');\n\t\tthis.textArea.setAttribute('aria-roledescription', nls.localize('editor', \"editor\"));\n\t\tthis.textArea.setAttribute('aria-multiline', 'true');\n\t\tthis.textArea.setAttribute('aria-autocomplete', options.get(EditorOption.readOnly) ? 'none' : 'both');\n\n\t\tthis._ensureReadOnlyAttribute();\n\n\t\tthis.textAreaCover = createFastDomNode(document.createElement('div'));\n\t\tthis.textAreaCover.setPosition('absolute');\n\n\t\toverflowGuardContainer.appendChild(this.textArea);\n\t\toverflowGuardContainer.appendChild(this.textAreaCover);\n\n\t\tconst simplePagedScreenReaderStrategy = new SimplePagedScreenReaderStrategy();\n\t\tconst textAreaInputHost: ITextAreaInputHost = {\n\t\t\tgetDataToCopy: (): ClipboardDataToCopy => {\n\t\t\t\treturn getDataToCopy(this._context.viewModel, this._modelSelections, this._emptySelectionClipboard, this._copyWithSyntaxHighlighting);\n\t\t\t},\n\t\t\tgetScreenReaderContent: (): TextAreaState => {\n\t\t\t\tif (this._accessibilitySupport === AccessibilitySupport.Disabled) {\n\t\t\t\t\t// We know for a fact that a screen reader is not attached\n\t\t\t\t\t// On OSX, we write the character before the cursor to allow for \"long-press\" composition\n\t\t\t\t\t// Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints\n\t\t\t\t\tconst selection = this._selections[0];\n\t\t\t\t\tif (platform.isMacintosh && selection.isEmpty()) {\n\t\t\t\t\t\tconst position = selection.getStartPosition();\n\n\t\t\t\t\t\tlet textBefore = this._getWordBeforePosition(position);\n\t\t\t\t\t\tif (textBefore.length === 0) {\n\t\t\t\t\t\t\ttextBefore = this._getCharacterBeforePosition(position);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (textBefore.length > 0) {\n\t\t\t\t\t\t\treturn new TextAreaState(textBefore, textBefore.length, textBefore.length, Range.fromPositions(position), 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// on macOS, write current selection into textarea will allow system text services pick selected text,\n\t\t\t\t\t// but we still want to limit the amount of text given Chromium handles very poorly text even of a few\n\t\t\t\t\t// thousand chars\n\t\t\t\t\t// (https://github.com/microsoft/vscode/issues/27799)\n\t\t\t\t\tconst LIMIT_CHARS = 500;\n\t\t\t\t\tif (platform.isMacintosh && !selection.isEmpty() && this._context.viewModel.getValueLengthInRange(selection, EndOfLinePreference.TextDefined) < LIMIT_CHARS) {\n\t\t\t\t\t\tconst text = this._context.viewModel.getValueInRange(selection, EndOfLinePreference.TextDefined);\n\t\t\t\t\t\treturn new TextAreaState(text, 0, text.length, selection, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// on Safari, document.execCommand('cut') and document.execCommand('copy') will just not work\n\t\t\t\t\t// if the textarea has no content selected. So if there is an editor selection, ensure something\n\t\t\t\t\t// is selected in the textarea.\n\t\t\t\t\tif (browser.isSafari && !selection.isEmpty()) {\n\t\t\t\t\t\tconst placeholderText = 'vscode-placeholder';\n\t\t\t\t\t\treturn new TextAreaState(placeholderText, 0, placeholderText.length, null, undefined);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn TextAreaState.EMPTY;\n\t\t\t\t}\n\n\t\t\t\tif (browser.isAndroid) {\n\t\t\t\t\t// when tapping in the editor on a word, Android enters composition mode.\n\t\t\t\t\t// in the `compositionstart` event we cannot clear the textarea, because\n\t\t\t\t\t// it then forgets to ever send a `compositionend`.\n\t\t\t\t\t// we therefore only write the current word in the textarea\n\t\t\t\t\tconst selection = this._selections[0];\n\t\t\t\t\tif (selection.isEmpty()) {\n\t\t\t\t\t\tconst position = selection.getStartPosition();\n\t\t\t\t\t\tconst [wordAtPosition, positionOffsetInWord] = this._getAndroidWordAtPosition(position);\n\t\t\t\t\t\tif (wordAtPosition.length > 0) {\n\t\t\t\t\t\t\treturn new TextAreaState(wordAtPosition, positionOffsetInWord, positionOffsetInWord, Range.fromPositions(position), 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn TextAreaState.EMPTY;\n\t\t\t\t}\n\n\t\t\t\tconst screenReaderContentState = simplePagedScreenReaderStrategy.fromEditorSelection(this._context.viewModel, this._selections[0], this._accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown);\n\t\t\t\treturn TextAreaState.fromScreenReaderContentState(screenReaderContentState);\n\t\t\t},\n\n\t\t\tdeduceModelPosition: (viewAnchorPosition: Position, deltaOffset: number, lineFeedCnt: number): Position => {\n\t\t\t\treturn this._context.viewModel.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt);\n\t\t\t}\n\t\t};\n\n\t\tconst textAreaWrapper = this._register(new TextAreaWrapper(this.textArea.domNode));\n\t\tthis._textAreaInput = this._register(this._instantiationService.createInstance(TextAreaInput, textAreaInputHost, textAreaWrapper, platform.OS, {\n\t\t\tisAndroid: browser.isAndroid,\n\t\t\tisChrome: browser.isChrome,\n\t\t\tisFirefox: browser.isFirefox,\n\t\t\tisSafari: browser.isSafari,\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => {\n\t\t\tthis._viewController.emitKeyDown(e);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onKeyUp((e: IKeyboardEvent) => {\n\t\t\tthis._viewController.emitKeyUp(e);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onPaste((e: IPasteData) => {\n\t\t\tlet pasteOnNewLine = false;\n\t\t\tlet multicursorText: string[] | null = null;\n\t\t\tlet mode: string | null = null;\n\t\t\tif (e.metadata) {\n\t\t\t\tpasteOnNewLine = (this._emptySelectionClipboard && !!e.metadata.isFromEmptySelection);\n\t\t\t\tmulticursorText = (typeof e.metadata.multicursorText !== 'undefined' ? e.metadata.multicursorText : null);\n\t\t\t\tmode = e.metadata.mode;\n\t\t\t}\n\t\t\tthis._viewController.paste(e.text, pasteOnNewLine, multicursorText, mode);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCut(() => {\n\t\t\tthis._viewController.cut();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onType((e: ITypeData) => {\n\t\t\tif (e.replacePrevCharCnt || e.replaceNextCharCnt || e.positionDelta) {\n\t\t\t\t// must be handled through the new command\n\t\t\t\tif (_debugComposition) {\n\t\t\t\t\tconsole.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`);\n\t\t\t\t}\n\t\t\t\tthis._viewController.compositionType(e.text, e.replacePrevCharCnt, e.replaceNextCharCnt, e.positionDelta);\n\t\t\t} else {\n\t\t\t\tif (_debugComposition) {\n\t\t\t\t\tconsole.log(` => type: <<${e.text}>>`);\n\t\t\t\t}\n\t\t\t\tthis._viewController.type(e.text);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onSelectionChangeRequest((modelSelection: Selection) => {\n\t\t\tthis._viewController.setSelection(modelSelection);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionStart((e) => {\n\n\t\t\t// The textarea might contain some content when composition starts.\n\t\t\t//\n\t\t\t// When we make the textarea visible, it always has a height of 1 line,\n\t\t\t// so we don't need to worry too much about content on lines above or below\n\t\t\t// the selection.\n\t\t\t//\n\t\t\t// However, the text on the current line needs to be made visible because\n\t\t\t// some IME methods allow to move to other glyphs on the current line\n\t\t\t// (by pressing arrow keys).\n\t\t\t//\n\t\t\t// (1) The textarea might contain only some parts of the current line,\n\t\t\t// like the word before the selection. Also, the content inside the textarea\n\t\t\t// can grow or shrink as composition occurs. We therefore anchor the textarea\n\t\t\t// in terms of distance to a certain line start and line end.\n\t\t\t//\n\t\t\t// (2) Also, we should not make \\t characters visible, because their rendering\n\t\t\t// inside the <textarea> will not align nicely with our rendering. We therefore\n\t\t\t// will hide (if necessary) some of the leading text on the current line.\n\n\t\t\tconst ta = this.textArea.domNode;\n\t\t\tconst modelSelection = this._modelSelections[0];\n\n\t\t\tconst { distanceToModelLineStart, widthOfHiddenTextBefore } = (() => {\n\t\t\t\t// Find the text that is on the current line before the selection\n\t\t\t\tconst textBeforeSelection = ta.value.substring(0, Math.min(ta.selectionStart, ta.selectionEnd));\n\t\t\t\tconst lineFeedOffset1 = textBeforeSelection.lastIndexOf('\\n');\n\t\t\t\tconst lineTextBeforeSelection = textBeforeSelection.substring(lineFeedOffset1 + 1);\n\n\t\t\t\t// We now search to see if we should hide some part of it (if it contains \\t)\n\t\t\t\tconst tabOffset1 = lineTextBeforeSelection.lastIndexOf('\\t');\n\t\t\t\tconst desiredVisibleBeforeCharCount = lineTextBeforeSelection.length - tabOffset1 - 1;\n\t\t\t\tconst startModelPosition = modelSelection.getStartPosition();\n\t\t\t\tconst visibleBeforeCharCount = Math.min(startModelPosition.column - 1, desiredVisibleBeforeCharCount);\n\t\t\t\tconst distanceToModelLineStart = startModelPosition.column - 1 - visibleBeforeCharCount;\n\t\t\t\tconst hiddenLineTextBefore = lineTextBeforeSelection.substring(0, lineTextBeforeSelection.length - visibleBeforeCharCount);\n\t\t\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\t\t\tconst widthOfHiddenTextBefore = measureText(this.textArea.domNode.ownerDocument, hiddenLineTextBefore, this._fontInfo, tabSize);\n\n\t\t\t\treturn { distanceToModelLineStart, widthOfHiddenTextBefore };\n\t\t\t})();\n\n\t\t\tconst { distanceToModelLineEnd } = (() => {\n\t\t\t\t// Find the text that is on the current line after the selection\n\t\t\t\tconst textAfterSelection = ta.value.substring(Math.max(ta.selectionStart, ta.selectionEnd));\n\t\t\t\tconst lineFeedOffset2 = textAfterSelection.indexOf('\\n');\n\t\t\t\tconst lineTextAfterSelection = lineFeedOffset2 === -1 ? textAfterSelection : textAfterSelection.substring(0, lineFeedOffset2);\n\n\t\t\t\tconst tabOffset2 = lineTextAfterSelection.indexOf('\\t');\n\t\t\t\tconst desiredVisibleAfterCharCount = (tabOffset2 === -1 ? lineTextAfterSelection.length : lineTextAfterSelection.length - tabOffset2 - 1);\n\t\t\t\tconst endModelPosition = modelSelection.getEndPosition();\n\t\t\t\tconst visibleAfterCharCount = Math.min(this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber) - endModelPosition.column, desiredVisibleAfterCharCount);\n\t\t\t\tconst distanceToModelLineEnd = this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber) - endModelPosition.column - visibleAfterCharCount;\n\n\t\t\t\treturn { distanceToModelLineEnd };\n\t\t\t})();\n\n\t\t\t// Scroll to reveal the location in the editor where composition occurs\n\t\t\tthis._context.viewModel.revealRange(\n\t\t\t\t'keyboard',\n\t\t\t\ttrue,\n\t\t\t\tRange.fromPositions(this._selections[0].getStartPosition()),\n\t\t\t\tviewEvents.VerticalRevealType.Simple,\n\t\t\t\tScrollType.Immediate\n\t\t\t);\n\n\t\t\tthis._visibleTextArea = new VisibleTextAreaData(\n\t\t\t\tthis._context,\n\t\t\t\tmodelSelection.startLineNumber,\n\t\t\t\tdistanceToModelLineStart,\n\t\t\t\twidthOfHiddenTextBefore,\n\t\t\t\tdistanceToModelLineEnd,\n\t\t\t);\n\n\t\t\t// We turn off wrapping if the <textarea> becomes visible for composition\n\t\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\n\t\t\tthis._visibleTextArea.prepareRender(this._visibleRangeProvider);\n\t\t\tthis._render();\n\n\t\t\t// Show the textarea\n\t\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`);\n\n\t\t\tthis._viewController.compositionStart();\n\t\t\tthis._context.viewModel.onCompositionStart();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionUpdate((e: ICompositionData) => {\n\t\t\tif (!this._visibleTextArea) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._visibleTextArea.prepareRender(this._visibleRangeProvider);\n\t\t\tthis._render();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionEnd(() => {\n\n\t\t\tthis._visibleTextArea = null;\n\n\t\t\t// We turn on wrapping as necessary if the <textarea> hides after composition\n\t\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\n\t\t\tthis._render();\n\n\t\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\n\t\t\tthis._viewController.compositionEnd();\n\t\t\tthis._context.viewModel.onCompositionEnd();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onFocus(() => {\n\t\t\tthis._context.viewModel.setHasFocus(true);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onBlur(() => {\n\t\t\tthis._context.viewModel.setHasFocus(false);\n\t\t}));\n\n\t\tthis._register(IME.onDidChange(() => {\n\t\t\tthis._ensureReadOnlyAttribute();\n\t\t}));\n\t}\n\n\tpublic get domNode() {\n\t\treturn this.textArea;\n\t}\n\n\tpublic writeScreenReaderContent(reason: string): void {\n\t\tthis._textAreaInput.writeNativeTextAreaContent(reason);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.textArea.domNode.remove();\n\t\tthis.textAreaCover.domNode.remove();\n\t}\n\n\tprivate _getAndroidWordAtPosition(position: Position): [string, number] {\n\t\tconst ANDROID_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\",.<>/?';\n\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\tconst wordSeparators = getMapForWordSeparators(ANDROID_WORD_SEPARATORS, []);\n\n\t\tlet goingLeft = true;\n\t\tlet startColumn = position.column;\n\t\tlet goingRight = true;\n\t\tlet endColumn = position.column;\n\t\tlet distance = 0;\n\t\twhile (distance < 50 && (goingLeft || goingRight)) {\n\t\t\tif (goingLeft && startColumn <= 1) {\n\t\t\t\tgoingLeft = false;\n\t\t\t}\n\t\t\tif (goingLeft) {\n\t\t\t\tconst charCode = lineContent.charCodeAt(startColumn - 2);\n\t\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\t\tif (charClass !== WordCharacterClass.Regular) {\n\t\t\t\t\tgoingLeft = false;\n\t\t\t\t} else {\n\t\t\t\t\tstartColumn--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (goingRight && endColumn > lineContent.length) {\n\t\t\t\tgoingRight = false;\n\t\t\t}\n\t\t\tif (goingRight) {\n\t\t\t\tconst charCode = lineContent.charCodeAt(endColumn - 1);\n\t\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\t\tif (charClass !== WordCharacterClass.Regular) {\n\t\t\t\t\tgoingRight = false;\n\t\t\t\t} else {\n\t\t\t\t\tendColumn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdistance++;\n\t\t}\n\n\t\treturn [lineContent.substring(startColumn - 1, endColumn - 1), position.column - startColumn];\n\t}\n\n\tprivate _getWordBeforePosition(position: Position): string {\n\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\tconst wordSeparators = getMapForWordSeparators(this._context.configuration.options.get(EditorOption.wordSeparators), []);\n\n\t\tlet column = position.column;\n\t\tlet distance = 0;\n\t\twhile (column > 1) {\n\t\t\tconst charCode = lineContent.charCodeAt(column - 2);\n\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\tif (charClass !== WordCharacterClass.Regular || distance > 50) {\n\t\t\t\treturn lineContent.substring(column - 1, position.column - 1);\n\t\t\t}\n\t\t\tdistance++;\n\t\t\tcolumn--;\n\t\t}\n\t\treturn lineContent.substring(0, position.column - 1);\n\t}\n\n\tprivate _getCharacterBeforePosition(position: Position): string {\n\t\tif (position.column > 1) {\n\t\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\t\tconst charBefore = lineContent.charAt(position.column - 2);\n\t\t\tif (!strings.isHighSurrogate(charBefore.charCodeAt(0))) {\n\t\t\t\treturn charBefore;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n\n\tprivate _setAccessibilityOptions(options: IComputedEditorOptions): void {\n\t\tthis._accessibilitySupport = options.get(EditorOption.accessibilitySupport);\n\t\tconst accessibilityPageSize = options.get(EditorOption.accessibilityPageSize);\n\t\tif (this._accessibilitySupport === AccessibilitySupport.Enabled && accessibilityPageSize === EditorOptions.accessibilityPageSize.defaultValue) {\n\t\t\t// If a screen reader is attached and the default value is not set we should automatically increase the page size to 500 for a better experience\n\t\t\tthis._accessibilityPageSize = 500;\n\t\t} else {\n\t\t\tthis._accessibilityPageSize = accessibilityPageSize;\n\t\t}\n\n\t\t// When wrapping is enabled and a screen reader might be attached,\n\t\t// we will size the textarea to match the width used for wrapping points computation (see `domLineBreaksComputer.ts`).\n\t\t// This is because screen readers will read the text in the textarea and we'd like that the\n\t\t// wrapping points in the textarea match the wrapping points in the editor.\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\t\tconst wrappingColumn = layoutInfo.wrappingColumn;\n\t\tif (wrappingColumn !== -1 && this._accessibilitySupport !== AccessibilitySupport.Disabled) {\n\t\t\tconst fontInfo = options.get(EditorOption.fontInfo);\n\t\t\tthis._textAreaWrapping = true;\n\t\t\tthis._textAreaWidth = Math.round(wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\n\t\t} else {\n\t\t\tthis._textAreaWrapping = false;\n\t\t\tthis._textAreaWidth = (canUseZeroSizeTextarea ? 0 : 1);\n\t\t}\n\t}\n\n\t// --- begin event handlers\n\n\tpublic override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {\n\t\tconst options = this._context.configuration.options;\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\n\t\tthis._setAccessibilityOptions(options);\n\t\tthis._contentLeft = layoutInfo.contentLeft;\n\t\tthis._contentWidth = layoutInfo.contentWidth;\n\t\tthis._contentHeight = layoutInfo.height;\n\t\tthis._fontInfo = options.get(EditorOption.fontInfo);\n\t\tthis._emptySelectionClipboard = options.get(EditorOption.emptySelectionClipboard);\n\t\tthis._copyWithSyntaxHighlighting = options.get(EditorOption.copyWithSyntaxHighlighting);\n\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\tthis.textArea.domNode.style.tabSize = `${tabSize * this._fontInfo.spaceWidth}px`;\n\t\tthis.textArea.setAttribute('aria-label', ariaLabelForScreenReaderContent(options, this._keybindingService));\n\t\tthis.textArea.setAttribute('aria-required', options.get(EditorOption.ariaRequired) ? 'true' : 'false');\n\t\tthis.textArea.setAttribute('tabindex', String(options.get(EditorOption.tabIndex)));\n\n\t\tif (e.hasChanged(EditorOption.domReadOnly) || e.hasChanged(EditorOption.readOnly)) {\n\t\t\tthis._ensureReadOnlyAttribute();\n\t\t}\n\n\t\tif (e.hasChanged(EditorOption.accessibilitySupport)) {\n\t\t\tthis._textAreaInput.writeNativeTextAreaContent('strategy changed');\n\t\t}\n\n\t\treturn true;\n\t}\n\tpublic override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {\n\t\tthis._selections = e.selections.slice(0);\n\t\tthis._modelSelections = e.modelSelections.slice(0);\n\t\t// We must update the <textarea> synchronously, otherwise long press IME on macos breaks.\n\t\t// See https://github.com/microsoft/vscode/issues/165821\n\t\tthis._textAreaInput.writeNativeTextAreaContent('selection changed');\n\t\treturn true;\n\t}\n\tpublic override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {\n\t\t// true for inline decorations that can end up relayouting text\n\t\treturn true;\n\t}\n\tpublic override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {\n\t\tthis._scrollLeft = e.scrollLeft;\n\t\tthis._scrollTop = e.scrollTop;\n\t\treturn true;\n\t}\n\tpublic override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {\n\t\treturn true;\n\t}\n\n\t// --- end event handlers\n\n\t// --- begin view API\n\n\tpublic isFocused(): boolean {\n\t\treturn this._textAreaInput.isFocused();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._textAreaInput.focusTextArea();\n\t}\n\n\tpublic refreshFocusState() {\n\t\tthis._textAreaInput.refreshFocusState();\n\t}\n\n\tpublic getLastRenderData(): Position | null {\n\t\treturn this._lastRenderPosition;\n\t}\n\n\tpublic setAriaOptions(options: IEditorAriaOptions): void {\n\t\tif (options.activeDescendant) {\n\t\t\tthis.textArea.setAttribute('aria-haspopup', 'true');\n\t\t\tthis.textArea.setAttribute('aria-autocomplete', 'list');\n\t\t\tthis.textArea.setAttribute('aria-activedescendant', options.activeDescendant);\n\t\t} else {\n\t\t\tthis.textArea.setAttribute('aria-haspopup', 'false');\n\t\t\tthis.textArea.setAttribute('aria-autocomplete', 'both');\n\t\t\tthis.textArea.removeAttribute('aria-activedescendant');\n\t\t}\n\t\tif (options.role) {\n\t\t\tthis.textArea.setAttribute('role', options.role);\n\t\t}\n\t}\n\n\t// --- end view API\n\n\tprivate _ensureReadOnlyAttribute(): void {\n\t\tconst options = this._context.configuration.options;\n\t\t// When someone requests to disable IME, we set the \"readonly\" attribute on the <textarea>.\n\t\t// This will prevent composition.\n\t\tconst useReadOnly = !IME.enabled || (options.get(EditorOption.domReadOnly) && options.get(EditorOption.readOnly));\n\t\tif (useReadOnly) {\n\t\t\tthis.textArea.setAttribute('readonly', 'true');\n\t\t} else {\n\t\t\tthis.textArea.removeAttribute('readonly');\n\t\t}\n\t}\n\n\tprivate _primaryCursorPosition: Position = new Position(1, 1);\n\tprivate _primaryCursorVisibleRange: HorizontalPosition | null = null;\n\n\tpublic prepareRender(ctx: RenderingContext): void {\n\t\tthis._primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn);\n\t\tthis._primaryCursorVisibleRange = ctx.visibleRangeForPosition(this._primaryCursorPosition);\n\t\tthis._visibleTextArea?.prepareRender(ctx);\n\t}\n\n\tpublic render(ctx: RestrictedRenderingContext): void {\n\t\tthis._textAreaInput.writeNativeTextAreaContent('render');\n\t\tthis._render();\n\t}\n\n\tprivate _render(): void {\n\t\tif (this._visibleTextArea) {\n\t\t\t// The text area is visible for composition reasons\n\n\t\t\tconst visibleStart = this._visibleTextArea.visibleTextareaStart;\n\t\t\tconst visibleEnd = this._visibleTextArea.visibleTextareaEnd;\n\t\t\tconst startPosition = this._visibleTextArea.startPosition;\n\t\t\tconst endPosition = this._visibleTextArea.endPosition;\n\t\t\tif (startPosition && endPosition && visibleStart && visibleEnd && visibleEnd.left >= this._scrollLeft && visibleStart.left <= this._scrollLeft + this._contentWidth) {\n\t\t\t\tconst top = (this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber) - this._scrollTop);\n\t\t\t\tconst lineCount = newlinecount(this.textArea.domNode.value.substr(0, this.textArea.domNode.selectionStart));\n\n\t\t\t\tlet scrollLeft = this._visibleTextArea.widthOfHiddenLineTextBefore;\n\t\t\t\tlet left = (this._contentLeft + visibleStart.left - this._scrollLeft);\n\t\t\t\t// See https://github.com/microsoft/vscode/issues/141725#issuecomment-1050670841\n\t\t\t\t// Here we are adding +1 to avoid flickering that might be caused by having a width that is too small.\n\t\t\t\t// This could be caused by rounding errors that might only show up with certain font families.\n\t\t\t\t// In other words, a pixel might be lost when doing something like\n\t\t\t\t// `Math.round(end) - Math.round(start)`\n\t\t\t\t// vs\n\t\t\t\t// `Math.round(end - start)`\n\t\t\t\tlet width = visibleEnd.left - visibleStart.left + 1;\n\t\t\t\tif (left < this._contentLeft) {\n\t\t\t\t\t// the textarea would be rendered on top of the margin,\n\t\t\t\t\t// so reduce its width. We use the same technique as\n\t\t\t\t\t// for hiding text before\n\t\t\t\t\tconst delta = (this._contentLeft - left);\n\t\t\t\t\tleft += delta;\n\t\t\t\t\tscrollLeft += delta;\n\t\t\t\t\twidth -= delta;\n\t\t\t\t}\n\t\t\t\tif (width > this._contentWidth) {\n\t\t\t\t\t// the textarea would be wider than the content width,\n\t\t\t\t\t// so reduce its width.\n\t\t\t\t\twidth = this._contentWidth;\n\t\t\t\t}\n\n\t\t\t\t// Try to render the textarea with the color/font style to match the text under it\n\t\t\t\tconst lineHeight = this._context.viewLayout.getLineHeightForLineNumber(startPosition.lineNumber);\n\t\t\t\tconst fontSize = this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition);\n\t\t\t\tconst viewLineData = this._context.viewModel.getViewLineData(startPosition.lineNumber);\n\t\t\t\tconst startTokenIndex = viewLineData.tokens.findTokenIndexAtOffset(startPosition.column - 1);\n\t\t\t\tconst endTokenIndex = viewLineData.tokens.findTokenIndexAtOffset(endPosition.column - 1);\n\t\t\t\tconst textareaSpansSingleToken = (startTokenIndex === endTokenIndex);\n\t\t\t\tconst presentation = this._visibleTextArea.definePresentation(\n\t\t\t\t\t(textareaSpansSingleToken ? viewLineData.tokens.getPresentation(startTokenIndex) : null)\n\t\t\t\t);\n\n\t\t\t\tthis.textArea.domNode.scrollTop = lineCount * lineHeight;\n\t\t\t\tthis.textArea.domNode.scrollLeft = scrollLeft;\n\n\t\t\t\tthis._doRender({\n\t\t\t\t\tlastRenderPosition: null,\n\t\t\t\t\ttop: top,\n\t\t\t\t\tleft: left,\n\t\t\t\t\twidth: width,\n\t\t\t\t\theight: lineHeight,\n\t\t\t\t\tuseCover: false,\n\t\t\t\t\tcolor: (TokenizationRegistry.getColorMap() || [])[presentation.foreground],\n\t\t\t\t\titalic: presentation.italic,\n\t\t\t\t\tbold: presentation.bold,\n\t\t\t\t\tunderline: presentation.underline,\n\t\t\t\t\tstrikethrough: presentation.strikethrough,\n\t\t\t\t\tfontSize\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._primaryCursorVisibleRange) {\n\t\t\t// The primary cursor is outside the viewport => place textarea to the top left\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\tconst left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;\n\t\tif (left < this._contentLeft || left > this._contentLeft + this._contentWidth) {\n\t\t\t// cursor is outside the viewport\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\tconst top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;\n\t\tif (top < 0 || top > this._contentHeight) {\n\t\t\t// cursor is outside the viewport\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\t// The primary cursor is in the viewport (at least vertically) => place textarea on the cursor\n\n\t\tif (platform.isMacintosh || this._accessibilitySupport === AccessibilitySupport.Enabled) {\n\t\t\t// For the popup emoji input, we will make the text area as high as the line height\n\t\t\t// We will also make the fontSize and lineHeight the correct dimensions to help with the placement of these pickers\n\t\t\tconst lineNumber = this._primaryCursorPosition.lineNumber;\n\t\t\tconst lineHeight = this._context.viewLayout.getLineHeightForLineNumber(lineNumber);\n\t\t\tthis._doRender({\n\t\t\t\tlastRenderPosition: this._primaryCursorPosition,\n\t\t\t\ttop,\n\t\t\t\tleft: this._textAreaWrapping ? this._contentLeft : left,\n\t\t\t\twidth: this._textAreaWidth,\n\t\t\t\theight: lineHeight,\n\t\t\t\tuseCover: false\n\t\t\t});\n\t\t\t// In case the textarea contains a word, we're going to try to align the textarea's cursor\n\t\t\t// with our cursor by scrolling the textarea as much as possible\n\t\t\tthis.textArea.domNode.scrollLeft = this._primaryCursorVisibleRange.left;\n\t\t\tconst lineCount = this._textAreaInput.textAreaState.newlineCountBeforeSelection ?? newlinecount(this.textArea.domNode.value.substring(0, this.textArea.domNode.selectionStart));\n\t\t\tthis.textArea.domNode.scrollTop = lineCount * lineHeight;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._doRender({\n\t\t\tlastRenderPosition: this._primaryCursorPosition,\n\t\t\ttop: top,\n\t\t\tleft: this._textAreaWrapping ? this._contentLeft : left,\n\t\t\twidth: this._textAreaWidth,\n\t\t\theight: (canUseZeroSizeTextarea ? 0 : 1),\n\t\t\tuseCover: false\n\t\t});\n\t}\n\n\tprivate _renderAtTopLeft(): void {\n\t\t// (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea)\n\t\t// specifically, when doing Korean IME, setting the textarea to 0x0 breaks IME badly.\n\t\tthis._doRender({\n\t\t\tlastRenderPosition: null,\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: this._textAreaWidth,\n\t\t\theight: (canUseZeroSizeTextarea ? 0 : 1),\n\t\t\tuseCover: true\n\t\t});\n\t}\n\n\tprivate _doRender(renderData: IRenderData): void {\n\t\tthis._lastRenderPosition = renderData.lastRenderPosition;\n\n\t\tconst ta = this.textArea;\n\t\tconst tac = this.textAreaCover;\n\n\t\tapplyFontInfo(ta, this._fontInfo);\n\t\tta.setTop(renderData.top);\n\t\tta.setLeft(renderData.left);\n\t\tta.setWidth(renderData.width);\n\t\tta.setHeight(renderData.height);\n\t\tta.setLineHeight(renderData.height);\n\n\t\tta.setFontSize(renderData.fontSize ?? this._fontInfo.fontSize);\n\t\tta.setColor(renderData.color ? Color.Format.CSS.formatHex(renderData.color) : '');\n\t\tta.setFontStyle(renderData.italic ? 'italic' : '');\n\t\tif (renderData.bold) {\n\t\t\t// fontWeight is also set by `applyFontInfo`, so only overwrite it if necessary\n\t\t\tta.setFontWeight('bold');\n\t\t}\n\t\tta.setTextDecoration(`${renderData.underline ? ' underline' : ''}${renderData.strikethrough ? ' line-through' : ''}`);\n\n\t\ttac.setTop(renderData.useCover ? renderData.top : 0);\n\t\ttac.setLeft(renderData.useCover ? renderData.left : 0);\n\t\ttac.setWidth(renderData.useCover ? renderData.width : 0);\n\t\ttac.setHeight(renderData.useCover ? renderData.height : 0);\n\n\t\tconst options = this._context.configuration.options;\n\n\t\tif (options.get(EditorOption.glyphMargin)) {\n\t\t\ttac.setClassName('monaco-editor-background textAreaCover ' + Margin.OUTER_CLASS_NAME);\n\t\t} else {\n\t\t\tif (options.get(EditorOption.lineNumbers).renderType !== RenderLineNumbersType.Off) {\n\t\t\t\ttac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME);\n\t\t\t} else {\n\t\t\t\ttac.setClassName('monaco-editor-background textAreaCover');\n\t\t\t}\n\t\t}\n\t}\n}\n\ninterface IRenderData {\n\tlastRenderPosition: Position | null;\n\ttop: number;\n\tleft: number;\n\twidth: number;\n\theight: number;\n\tuseCover: boolean;\n\n\tfontSize?: string | null;\n\tcolor?: Color | null;\n\titalic?: boolean;\n\tbold?: boolean;\n\tunderline?: boolean;\n\tstrikethrough?: boolean;\n}\n\nfunction measureText(targetDocument: Document, text: string, fontInfo: FontInfo, tabSize: number): number {\n\tif (text.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst container = targetDocument.createElement('div');\n\tcontainer.style.position = 'absolute';\n\tcontainer.style.top = '-50000px';\n\tcontainer.style.width = '50000px';\n\n\tconst regularDomNode = targetDocument.createElement('span');\n\tapplyFontInfo(regularDomNode, fontInfo);\n\tregularDomNode.style.whiteSpace = 'pre'; // just like the textarea\n\tregularDomNode.style.tabSize = `${tabSize * fontInfo.spaceWidth}px`; // just like the textarea\n\tregularDomNode.append(text);\n\tcontainer.appendChild(regularDomNode);\n\n\ttargetDocument.body.appendChild(container);\n\n\tconst res = regularDomNode.offsetWidth;\n\n\tcontainer.remove();\n\n\treturn res;\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/browser/controller/editContext/textArea/textAreaEditContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAe,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE5F,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EA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AAqB,CAAA;GAxCX,mBAAmB,CA8tB/B;;AAkBD,SAAS,WAAW,CAAC,cAAwB,EAAE,IAAY,EAAE,QAAkB,EAAE,OAAe;IAC/F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,SAAS,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACtD,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;IACtC,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,UAAU,CAAC;IACjC,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAElC,MAAM,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5D,aAAa,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACxC,cAAc,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC,yBAAyB;IAClE,cAAc,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC,UAAU,IAAI,CAAC,CAAC,yBAAyB;IAC9F,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAEtC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAE3C,MAAM,GAAG,GAAG,cAAc,CAAC,WAAW,CAAC;IAEvC,SAAS,CAAC,MAAM,EAAE,CAAC;IAEnB,OAAO,GAAG,CAAC;AACZ,CAAC","file":"textAreaEditContext.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport './textAreaEditContext.css';\nimport * as nls from '../../../../../nls.js';\nimport * as browser from '../../../../../base/browser/browser.js';\nimport { FastDomNode, createFastDomNode } from '../../../../../base/browser/fastDomNode.js';\nimport { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js';\nimport * as platform from '../../../../../base/common/platform.js';\nimport * as strings from '../../../../../base/common/strings.js';\nimport { applyFontInfo } from '../../../config/domFontInfo.js';\nimport { ViewController } from '../../../view/viewController.js';\nimport { PartFingerprint, PartFingerprints } from '../../../view/viewPart.js';\nimport { LineNumbersOverlay } from '../../../viewParts/lineNumbers/lineNumbers.js';\nimport { Margin } from '../../../viewParts/margin/margin.js';\nimport { RenderLineNumbersType, EditorOption, IComputedEditorOptions, EditorOptions } from '../../../../common/config/editorOptions.js';\nimport { FontInfo } from '../../../../common/config/fontInfo.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { Selection } from '../../../../common/core/selection.js';\nimport { ScrollType } from '../../../../common/editorCommon.js';\nimport { EndOfLinePreference } from '../../../../common/model.js';\nimport { RenderingContext, RestrictedRenderingContext, HorizontalPosition, LineVisibleRanges } from '../../../view/renderingContext.js';\nimport { ViewContext } from '../../../../common/viewModel/viewContext.js';\nimport * as viewEvents from '../../../../common/viewEvents.js';\nimport { AccessibilitySupport } from '../../../../../platform/accessibility/common/accessibility.js';\nimport { IEditorAriaOptions } from '../../../editorBrowser.js';\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../../base/browser/ui/mouseCursor/mouseCursor.js';\nimport { TokenizationRegistry } from '../../../../common/languages.js';\nimport { ColorId, ITokenPresentation } from '../../../../common/encodedTokenAttributes.js';\nimport { Color } from '../../../../../base/common/color.js';\nimport { IME } from '../../../../../base/common/ime.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { AbstractEditContext } from '../editContext.js';\nimport { ICompositionData, ITextAreaInputHost, TextAreaInput, TextAreaWrapper } from './textAreaEditContextInput.js';\nimport { ariaLabelForScreenReaderContent, newlinecount, SimplePagedScreenReaderStrategy } from '../screenReaderUtils.js';\nimport { _debugComposition, ITypeData, TextAreaState } from './textAreaEditContextState.js';\nimport { getMapForWordSeparators, WordCharacterClass } from '../../../../common/core/wordCharacterClassifier.js';\nimport { TextAreaEditContextRegistry } from './textAreaEditContextRegistry.js';\nimport { IPasteData } from '../clipboardUtils.js';\n\nexport interface IVisibleRangeProvider {\n\tvisibleRangeForPosition(position: Position): HorizontalPosition | null;\n\tlinesVisibleRangesForRange(range: Range, includeNewLines: boolean): LineVisibleRanges[] | null;\n}\n\nclass VisibleTextAreaData {\n\t_visibleTextAreaBrand: void = undefined;\n\n\tpublic startPosition: Position | null = null;\n\tpublic endPosition: Position | null = null;\n\n\tpublic visibleTextareaStart: HorizontalPosition | null = null;\n\tpublic visibleTextareaEnd: HorizontalPosition | null = null;\n\n\t/**\n\t * When doing composition, the currently composed text might be split up into\n\t * multiple tokens, then merged again into a single token, etc. Here we attempt\n\t * to keep the presentation of the <textarea> stable by using the previous used\n\t * style if multiple tokens come into play. This avoids flickering.\n\t */\n\tprivate _previousPresentation: ITokenPresentation | null = null;\n\n\tconstructor(\n\t\tprivate readonly _context: ViewContext,\n\t\tpublic readonly modelLineNumber: number,\n\t\tpublic readonly distanceToModelLineStart: number,\n\t\tpublic readonly widthOfHiddenLineTextBefore: number,\n\t\tpublic readonly distanceToModelLineEnd: number,\n\t) {\n\t}\n\n\tprepareRender(visibleRangeProvider: IVisibleRangeProvider): void {\n\t\tconst startModelPosition = new Position(this.modelLineNumber, this.distanceToModelLineStart + 1);\n\t\tconst endModelPosition = new Position(this.modelLineNumber, this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber) - this.distanceToModelLineEnd);\n\n\t\tthis.startPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(startModelPosition);\n\t\tthis.endPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(endModelPosition);\n\n\t\tif (this.startPosition.lineNumber === this.endPosition.lineNumber) {\n\t\t\tthis.visibleTextareaStart = visibleRangeProvider.visibleRangeForPosition(this.startPosition);\n\t\t\tthis.visibleTextareaEnd = visibleRangeProvider.visibleRangeForPosition(this.endPosition);\n\t\t} else {\n\t\t\t// TODO: what if the view positions are not on the same line?\n\t\t\tthis.visibleTextareaStart = null;\n\t\t\tthis.visibleTextareaEnd = null;\n\t\t}\n\t}\n\n\tdefinePresentation(tokenPresentation: ITokenPresentation | null): ITokenPresentation {\n\t\tif (!this._previousPresentation) {\n\t\t\t// To avoid flickering, once set, always reuse a presentation throughout the entire IME session\n\t\t\tif (tokenPresentation) {\n\t\t\t\tthis._previousPresentation = tokenPresentation;\n\t\t\t} else {\n\t\t\t\tthis._previousPresentation = {\n\t\t\t\t\tforeground: ColorId.DefaultForeground,\n\t\t\t\t\titalic: false,\n\t\t\t\t\tbold: false,\n\t\t\t\t\tunderline: false,\n\t\t\t\t\tstrikethrough: false,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn this._previousPresentation;\n\t}\n}\n\nconst canUseZeroSizeTextarea = (browser.isFirefox);\n\nexport class TextAreaEditContext extends AbstractEditContext {\n\n\tprivate readonly _viewController: ViewController;\n\tprivate readonly _visibleRangeProvider: IVisibleRangeProvider;\n\tprivate _scrollLeft: number;\n\tprivate _scrollTop: number;\n\n\tprivate _accessibilitySupport!: AccessibilitySupport;\n\tprivate _accessibilityPageSize!: number;\n\tprivate _textAreaWrapping!: boolean;\n\tprivate _textAreaWidth!: number;\n\tprivate _contentLeft: number;\n\tprivate _contentWidth: number;\n\tprivate _contentHeight: number;\n\tprivate _fontInfo: FontInfo;\n\n\t/**\n\t * Defined only when the text area is visible (composition case).\n\t */\n\tprivate _visibleTextArea: VisibleTextAreaData | null;\n\tprivate _selections: Selection[];\n\tprivate _modelSelections: Selection[];\n\n\t/**\n\t * The position at which the textarea was rendered.\n\t * This is useful for hit-testing and determining the mouse position.\n\t */\n\tprivate _lastRenderPosition: Position | null;\n\n\tpublic readonly textArea: FastDomNode<HTMLTextAreaElement>;\n\tpublic readonly textAreaCover: FastDomNode<HTMLElement>;\n\tprivate readonly _textAreaInput: TextAreaInput;\n\n\tconstructor(\n\t\townerID: string,\n\t\tcontext: ViewContext,\n\t\toverflowGuardContainer: FastDomNode<HTMLElement>,\n\t\tviewController: ViewController,\n\t\tvisibleRangeProvider: IVisibleRangeProvider,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper(context);\n\n\t\tthis._viewController = viewController;\n\t\tthis._visibleRangeProvider = visibleRangeProvider;\n\t\tthis._scrollLeft = 0;\n\t\tthis._scrollTop = 0;\n\n\t\tconst options = this._context.configuration.options;\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\n\t\tthis._setAccessibilityOptions(options);\n\t\tthis._contentLeft = layoutInfo.contentLeft;\n\t\tthis._contentWidth = layoutInfo.contentWidth;\n\t\tthis._contentHeight = layoutInfo.height;\n\t\tthis._fontInfo = options.get(EditorOption.fontInfo);\n\n\t\tthis._visibleTextArea = null;\n\t\tthis._selections = [new Selection(1, 1, 1, 1)];\n\t\tthis._modelSelections = [new Selection(1, 1, 1, 1)];\n\t\tthis._lastRenderPosition = null;\n\n\t\t// Text Area (The focus will always be in the textarea when the cursor is blinking)\n\t\tthis.textArea = createFastDomNode(document.createElement('textarea'));\n\t\tPartFingerprints.write(this.textArea, PartFingerprint.TextArea);\n\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\n\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\tthis.textArea.domNode.style.tabSize = `${tabSize * this._fontInfo.spaceWidth}px`;\n\t\tthis.textArea.setAttribute('autocorrect', 'off');\n\t\tthis.textArea.setAttribute('autocapitalize', 'off');\n\t\tthis.textArea.setAttribute('autocomplete', 'off');\n\t\tthis.textArea.setAttribute('spellcheck', 'false');\n\t\tthis.textArea.setAttribute('aria-label', ariaLabelForScreenReaderContent(options, this._keybindingService));\n\t\tthis.textArea.setAttribute('aria-required', options.get(EditorOption.ariaRequired) ? 'true' : 'false');\n\t\tthis.textArea.setAttribute('tabindex', String(options.get(EditorOption.tabIndex)));\n\t\tthis.textArea.setAttribute('role', 'textbox');\n\t\tthis.textArea.setAttribute('aria-roledescription', nls.localize('editor', \"editor\"));\n\t\tthis.textArea.setAttribute('aria-multiline', 'true');\n\t\tthis.textArea.setAttribute('aria-autocomplete', options.get(EditorOption.readOnly) ? 'none' : 'both');\n\n\t\tthis._ensureReadOnlyAttribute();\n\n\t\tthis.textAreaCover = createFastDomNode(document.createElement('div'));\n\t\tthis.textAreaCover.setPosition('absolute');\n\n\t\toverflowGuardContainer.appendChild(this.textArea);\n\t\toverflowGuardContainer.appendChild(this.textAreaCover);\n\n\t\tconst simplePagedScreenReaderStrategy = new SimplePagedScreenReaderStrategy();\n\t\tconst textAreaInputHost: ITextAreaInputHost = {\n\t\t\tcontext: this._context,\n\t\t\tgetScreenReaderContent: (): TextAreaState => {\n\t\t\t\tif (this._accessibilitySupport === AccessibilitySupport.Disabled) {\n\t\t\t\t\t// We know for a fact that a screen reader is not attached\n\t\t\t\t\t// On OSX, we write the character before the cursor to allow for \"long-press\" composition\n\t\t\t\t\t// Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints\n\t\t\t\t\tconst selection = this._selections[0];\n\t\t\t\t\tif (platform.isMacintosh && selection.isEmpty()) {\n\t\t\t\t\t\tconst position = selection.getStartPosition();\n\n\t\t\t\t\t\tlet textBefore = this._getWordBeforePosition(position);\n\t\t\t\t\t\tif (textBefore.length === 0) {\n\t\t\t\t\t\t\ttextBefore = this._getCharacterBeforePosition(position);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (textBefore.length > 0) {\n\t\t\t\t\t\t\treturn new TextAreaState(textBefore, textBefore.length, textBefore.length, Range.fromPositions(position), 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// on macOS, write current selection into textarea will allow system text services pick selected text,\n\t\t\t\t\t// but we still want to limit the amount of text given Chromium handles very poorly text even of a few\n\t\t\t\t\t// thousand chars\n\t\t\t\t\t// (https://github.com/microsoft/vscode/issues/27799)\n\t\t\t\t\tconst LIMIT_CHARS = 500;\n\t\t\t\t\tif (platform.isMacintosh && !selection.isEmpty() && this._context.viewModel.getValueLengthInRange(selection, EndOfLinePreference.TextDefined) < LIMIT_CHARS) {\n\t\t\t\t\t\tconst text = this._context.viewModel.getValueInRange(selection, EndOfLinePreference.TextDefined);\n\t\t\t\t\t\treturn new TextAreaState(text, 0, text.length, selection, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// on Safari, document.execCommand('cut') and document.execCommand('copy') will just not work\n\t\t\t\t\t// if the textarea has no content selected. So if there is an editor selection, ensure something\n\t\t\t\t\t// is selected in the textarea.\n\t\t\t\t\tif (browser.isSafari && !selection.isEmpty()) {\n\t\t\t\t\t\tconst placeholderText = 'vscode-placeholder';\n\t\t\t\t\t\treturn new TextAreaState(placeholderText, 0, placeholderText.length, null, undefined);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn TextAreaState.EMPTY;\n\t\t\t\t}\n\n\t\t\t\tif (browser.isAndroid) {\n\t\t\t\t\t// when tapping in the editor on a word, Android enters composition mode.\n\t\t\t\t\t// in the `compositionstart` event we cannot clear the textarea, because\n\t\t\t\t\t// it then forgets to ever send a `compositionend`.\n\t\t\t\t\t// we therefore only write the current word in the textarea\n\t\t\t\t\tconst selection = this._selections[0];\n\t\t\t\t\tif (selection.isEmpty()) {\n\t\t\t\t\t\tconst position = selection.getStartPosition();\n\t\t\t\t\t\tconst [wordAtPosition, positionOffsetInWord] = this._getAndroidWordAtPosition(position);\n\t\t\t\t\t\tif (wordAtPosition.length > 0) {\n\t\t\t\t\t\t\treturn new TextAreaState(wordAtPosition, positionOffsetInWord, positionOffsetInWord, Range.fromPositions(position), 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn TextAreaState.EMPTY;\n\t\t\t\t}\n\n\t\t\t\tconst screenReaderContentState = simplePagedScreenReaderStrategy.fromEditorSelection(this._context.viewModel, this._selections[0], this._accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown);\n\t\t\t\treturn TextAreaState.fromScreenReaderContentState(screenReaderContentState);\n\t\t\t},\n\n\t\t\tdeduceModelPosition: (viewAnchorPosition: Position, deltaOffset: number, lineFeedCnt: number): Position => {\n\t\t\t\treturn this._context.viewModel.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt);\n\t\t\t}\n\t\t};\n\n\t\tconst textAreaWrapper = this._register(new TextAreaWrapper(this.textArea.domNode));\n\t\tthis._textAreaInput = this._register(this._instantiationService.createInstance(TextAreaInput, textAreaInputHost, textAreaWrapper, platform.OS, {\n\t\t\tisAndroid: browser.isAndroid,\n\t\t\tisChrome: browser.isChrome,\n\t\t\tisFirefox: browser.isFirefox,\n\t\t\tisSafari: browser.isSafari,\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => {\n\t\t\tthis._viewController.emitKeyDown(e);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onKeyUp((e: IKeyboardEvent) => {\n\t\t\tthis._viewController.emitKeyUp(e);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onPaste((e: IPasteData) => {\n\t\t\tthis._viewController.paste(e.text, e.pasteOnNewLine, e.multicursorText, e.mode);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCut(() => {\n\t\t\tthis._viewController.cut();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onType((e: ITypeData) => {\n\t\t\tif (e.replacePrevCharCnt || e.replaceNextCharCnt || e.positionDelta) {\n\t\t\t\t// must be handled through the new command\n\t\t\t\tif (_debugComposition) {\n\t\t\t\t\tconsole.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`);\n\t\t\t\t}\n\t\t\t\tthis._viewController.compositionType(e.text, e.replacePrevCharCnt, e.replaceNextCharCnt, e.positionDelta);\n\t\t\t} else {\n\t\t\t\tif (_debugComposition) {\n\t\t\t\t\tconsole.log(` => type: <<${e.text}>>`);\n\t\t\t\t}\n\t\t\t\tthis._viewController.type(e.text);\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onSelectionChangeRequest((modelSelection: Selection) => {\n\t\t\tthis._viewController.setSelection(modelSelection);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionStart((e) => {\n\n\t\t\t// The textarea might contain some content when composition starts.\n\t\t\t//\n\t\t\t// When we make the textarea visible, it always has a height of 1 line,\n\t\t\t// so we don't need to worry too much about content on lines above or below\n\t\t\t// the selection.\n\t\t\t//\n\t\t\t// However, the text on the current line needs to be made visible because\n\t\t\t// some IME methods allow to move to other glyphs on the current line\n\t\t\t// (by pressing arrow keys).\n\t\t\t//\n\t\t\t// (1) The textarea might contain only some parts of the current line,\n\t\t\t// like the word before the selection. Also, the content inside the textarea\n\t\t\t// can grow or shrink as composition occurs. We therefore anchor the textarea\n\t\t\t// in terms of distance to a certain line start and line end.\n\t\t\t//\n\t\t\t// (2) Also, we should not make \\t characters visible, because their rendering\n\t\t\t// inside the <textarea> will not align nicely with our rendering. We therefore\n\t\t\t// will hide (if necessary) some of the leading text on the current line.\n\n\t\t\tconst ta = this.textArea.domNode;\n\t\t\tconst modelSelection = this._modelSelections[0];\n\n\t\t\tconst { distanceToModelLineStart, widthOfHiddenTextBefore } = (() => {\n\t\t\t\t// Find the text that is on the current line before the selection\n\t\t\t\tconst textBeforeSelection = ta.value.substring(0, Math.min(ta.selectionStart, ta.selectionEnd));\n\t\t\t\tconst lineFeedOffset1 = textBeforeSelection.lastIndexOf('\\n');\n\t\t\t\tconst lineTextBeforeSelection = textBeforeSelection.substring(lineFeedOffset1 + 1);\n\n\t\t\t\t// We now search to see if we should hide some part of it (if it contains \\t)\n\t\t\t\tconst tabOffset1 = lineTextBeforeSelection.lastIndexOf('\\t');\n\t\t\t\tconst desiredVisibleBeforeCharCount = lineTextBeforeSelection.length - tabOffset1 - 1;\n\t\t\t\tconst startModelPosition = modelSelection.getStartPosition();\n\t\t\t\tconst visibleBeforeCharCount = Math.min(startModelPosition.column - 1, desiredVisibleBeforeCharCount);\n\t\t\t\tconst distanceToModelLineStart = startModelPosition.column - 1 - visibleBeforeCharCount;\n\t\t\t\tconst hiddenLineTextBefore = lineTextBeforeSelection.substring(0, lineTextBeforeSelection.length - visibleBeforeCharCount);\n\t\t\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\t\t\tconst widthOfHiddenTextBefore = measureText(this.textArea.domNode.ownerDocument, hiddenLineTextBefore, this._fontInfo, tabSize);\n\n\t\t\t\treturn { distanceToModelLineStart, widthOfHiddenTextBefore };\n\t\t\t})();\n\n\t\t\tconst { distanceToModelLineEnd } = (() => {\n\t\t\t\t// Find the text that is on the current line after the selection\n\t\t\t\tconst textAfterSelection = ta.value.substring(Math.max(ta.selectionStart, ta.selectionEnd));\n\t\t\t\tconst lineFeedOffset2 = textAfterSelection.indexOf('\\n');\n\t\t\t\tconst lineTextAfterSelection = lineFeedOffset2 === -1 ? textAfterSelection : textAfterSelection.substring(0, lineFeedOffset2);\n\n\t\t\t\tconst tabOffset2 = lineTextAfterSelection.indexOf('\\t');\n\t\t\t\tconst desiredVisibleAfterCharCount = (tabOffset2 === -1 ? lineTextAfterSelection.length : lineTextAfterSelection.length - tabOffset2 - 1);\n\t\t\t\tconst endModelPosition = modelSelection.getEndPosition();\n\t\t\t\tconst visibleAfterCharCount = Math.min(this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber) - endModelPosition.column, desiredVisibleAfterCharCount);\n\t\t\t\tconst distanceToModelLineEnd = this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber) - endModelPosition.column - visibleAfterCharCount;\n\n\t\t\t\treturn { distanceToModelLineEnd };\n\t\t\t})();\n\n\t\t\t// Scroll to reveal the location in the editor where composition occurs\n\t\t\tthis._context.viewModel.revealRange(\n\t\t\t\t'keyboard',\n\t\t\t\ttrue,\n\t\t\t\tRange.fromPositions(this._selections[0].getStartPosition()),\n\t\t\t\tviewEvents.VerticalRevealType.Simple,\n\t\t\t\tScrollType.Immediate\n\t\t\t);\n\n\t\t\tthis._visibleTextArea = new VisibleTextAreaData(\n\t\t\t\tthis._context,\n\t\t\t\tmodelSelection.startLineNumber,\n\t\t\t\tdistanceToModelLineStart,\n\t\t\t\twidthOfHiddenTextBefore,\n\t\t\t\tdistanceToModelLineEnd,\n\t\t\t);\n\n\t\t\t// We turn off wrapping if the <textarea> becomes visible for composition\n\t\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\n\t\t\tthis._visibleTextArea.prepareRender(this._visibleRangeProvider);\n\t\t\tthis._render();\n\n\t\t\t// Show the textarea\n\t\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`);\n\n\t\t\tthis._viewController.compositionStart();\n\t\t\tthis._context.viewModel.onCompositionStart();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionUpdate((e: ICompositionData) => {\n\t\t\tif (!this._visibleTextArea) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._visibleTextArea.prepareRender(this._visibleRangeProvider);\n\t\t\tthis._render();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onCompositionEnd(() => {\n\n\t\t\tthis._visibleTextArea = null;\n\n\t\t\t// We turn on wrapping as necessary if the <textarea> hides after composition\n\t\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\n\t\t\tthis._render();\n\n\t\t\tthis.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\n\t\t\tthis._viewController.compositionEnd();\n\t\t\tthis._context.viewModel.onCompositionEnd();\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onFocus(() => {\n\t\t\tthis._context.viewModel.setHasFocus(true);\n\t\t}));\n\n\t\tthis._register(this._textAreaInput.onBlur(() => {\n\t\t\tthis._context.viewModel.setHasFocus(false);\n\t\t}));\n\n\t\tthis._register(IME.onDidChange(() => {\n\t\t\tthis._ensureReadOnlyAttribute();\n\t\t}));\n\n\t\tthis._register(TextAreaEditContextRegistry.register(ownerID, this));\n\t}\n\n\tpublic get domNode() {\n\t\treturn this.textArea;\n\t}\n\n\tpublic writeScreenReaderContent(reason: string): void {\n\t\tthis._textAreaInput.writeNativeTextAreaContent(reason);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t\tthis.textArea.domNode.remove();\n\t\tthis.textAreaCover.domNode.remove();\n\t}\n\n\tprivate _getAndroidWordAtPosition(position: Position): [string, number] {\n\t\tconst ANDROID_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\",.<>/?';\n\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\tconst wordSeparators = getMapForWordSeparators(ANDROID_WORD_SEPARATORS, []);\n\n\t\tlet goingLeft = true;\n\t\tlet startColumn = position.column;\n\t\tlet goingRight = true;\n\t\tlet endColumn = position.column;\n\t\tlet distance = 0;\n\t\twhile (distance < 50 && (goingLeft || goingRight)) {\n\t\t\tif (goingLeft && startColumn <= 1) {\n\t\t\t\tgoingLeft = false;\n\t\t\t}\n\t\t\tif (goingLeft) {\n\t\t\t\tconst charCode = lineContent.charCodeAt(startColumn - 2);\n\t\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\t\tif (charClass !== WordCharacterClass.Regular) {\n\t\t\t\t\tgoingLeft = false;\n\t\t\t\t} else {\n\t\t\t\t\tstartColumn--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (goingRight && endColumn > lineContent.length) {\n\t\t\t\tgoingRight = false;\n\t\t\t}\n\t\t\tif (goingRight) {\n\t\t\t\tconst charCode = lineContent.charCodeAt(endColumn - 1);\n\t\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\t\tif (charClass !== WordCharacterClass.Regular) {\n\t\t\t\t\tgoingRight = false;\n\t\t\t\t} else {\n\t\t\t\t\tendColumn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdistance++;\n\t\t}\n\n\t\treturn [lineContent.substring(startColumn - 1, endColumn - 1), position.column - startColumn];\n\t}\n\n\tprivate _getWordBeforePosition(position: Position): string {\n\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\tconst wordSeparators = getMapForWordSeparators(this._context.configuration.options.get(EditorOption.wordSeparators), []);\n\n\t\tlet column = position.column;\n\t\tlet distance = 0;\n\t\twhile (column > 1) {\n\t\t\tconst charCode = lineContent.charCodeAt(column - 2);\n\t\t\tconst charClass = wordSeparators.get(charCode);\n\t\t\tif (charClass !== WordCharacterClass.Regular || distance > 50) {\n\t\t\t\treturn lineContent.substring(column - 1, position.column - 1);\n\t\t\t}\n\t\t\tdistance++;\n\t\t\tcolumn--;\n\t\t}\n\t\treturn lineContent.substring(0, position.column - 1);\n\t}\n\n\tprivate _getCharacterBeforePosition(position: Position): string {\n\t\tif (position.column > 1) {\n\t\t\tconst lineContent = this._context.viewModel.getLineContent(position.lineNumber);\n\t\t\tconst charBefore = lineContent.charAt(position.column - 2);\n\t\t\tif (!strings.isHighSurrogate(charBefore.charCodeAt(0))) {\n\t\t\t\treturn charBefore;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n\n\tprivate _setAccessibilityOptions(options: IComputedEditorOptions): void {\n\t\tthis._accessibilitySupport = options.get(EditorOption.accessibilitySupport);\n\t\tconst accessibilityPageSize = options.get(EditorOption.accessibilityPageSize);\n\t\tif (this._accessibilitySupport === AccessibilitySupport.Enabled && accessibilityPageSize === EditorOptions.accessibilityPageSize.defaultValue) {\n\t\t\t// If a screen reader is attached and the default value is not set we should automatically increase the page size to 500 for a better experience\n\t\t\tthis._accessibilityPageSize = 500;\n\t\t} else {\n\t\t\tthis._accessibilityPageSize = accessibilityPageSize;\n\t\t}\n\n\t\t// When wrapping is enabled and a screen reader might be attached,\n\t\t// we will size the textarea to match the width used for wrapping points computation (see `domLineBreaksComputer.ts`).\n\t\t// This is because screen readers will read the text in the textarea and we'd like that the\n\t\t// wrapping points in the textarea match the wrapping points in the editor.\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\t\tconst wrappingColumn = layoutInfo.wrappingColumn;\n\t\tif (wrappingColumn !== -1 && this._accessibilitySupport !== AccessibilitySupport.Disabled) {\n\t\t\tconst fontInfo = options.get(EditorOption.fontInfo);\n\t\t\tthis._textAreaWrapping = true;\n\t\t\tthis._textAreaWidth = Math.round(wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\n\t\t} else {\n\t\t\tthis._textAreaWrapping = false;\n\t\t\tthis._textAreaWidth = (canUseZeroSizeTextarea ? 0 : 1);\n\t\t}\n\t}\n\n\t// --- begin event handlers\n\n\tpublic override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {\n\t\tconst options = this._context.configuration.options;\n\t\tconst layoutInfo = options.get(EditorOption.layoutInfo);\n\n\t\tthis._setAccessibilityOptions(options);\n\t\tthis._contentLeft = layoutInfo.contentLeft;\n\t\tthis._contentWidth = layoutInfo.contentWidth;\n\t\tthis._contentHeight = layoutInfo.height;\n\t\tthis._fontInfo = options.get(EditorOption.fontInfo);\n\t\tthis.textArea.setAttribute('wrap', this._textAreaWrapping && !this._visibleTextArea ? 'on' : 'off');\n\t\tconst { tabSize } = this._context.viewModel.model.getOptions();\n\t\tthis.textArea.domNode.style.tabSize = `${tabSize * this._fontInfo.spaceWidth}px`;\n\t\tthis.textArea.setAttribute('aria-label', ariaLabelForScreenReaderContent(options, this._keybindingService));\n\t\tthis.textArea.setAttribute('aria-required', options.get(EditorOption.ariaRequired) ? 'true' : 'false');\n\t\tthis.textArea.setAttribute('tabindex', String(options.get(EditorOption.tabIndex)));\n\n\t\tif (e.hasChanged(EditorOption.domReadOnly) || e.hasChanged(EditorOption.readOnly)) {\n\t\t\tthis._ensureReadOnlyAttribute();\n\t\t}\n\n\t\tif (e.hasChanged(EditorOption.accessibilitySupport)) {\n\t\t\tthis._textAreaInput.writeNativeTextAreaContent('strategy changed');\n\t\t}\n\n\t\treturn true;\n\t}\n\tpublic override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {\n\t\tthis._selections = e.selections.slice(0);\n\t\tthis._modelSelections = e.modelSelections.slice(0);\n\t\t// We must update the <textarea> synchronously, otherwise long press IME on macos breaks.\n\t\t// See https://github.com/microsoft/vscode/issues/165821\n\t\tthis._textAreaInput.writeNativeTextAreaContent('selection changed');\n\t\treturn true;\n\t}\n\tpublic override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {\n\t\t// true for inline decorations that can end up relayouting text\n\t\treturn true;\n\t}\n\tpublic override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {\n\t\treturn true;\n\t}\n\tpublic override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {\n\t\tthis._scrollLeft = e.scrollLeft;\n\t\tthis._scrollTop = e.scrollTop;\n\t\treturn true;\n\t}\n\tpublic override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {\n\t\treturn true;\n\t}\n\n\t// --- end event handlers\n\n\t// --- begin view API\n\n\tpublic isFocused(): boolean {\n\t\treturn this._textAreaInput.isFocused();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._textAreaInput.focusTextArea();\n\t}\n\n\tpublic refreshFocusState() {\n\t\tthis._textAreaInput.refreshFocusState();\n\t}\n\n\tpublic getLastRenderData(): Position | null {\n\t\treturn this._lastRenderPosition;\n\t}\n\n\tpublic setAriaOptions(options: IEditorAriaOptions): void {\n\t\tif (options.activeDescendant) {\n\t\t\tthis.textArea.setAttribute('aria-haspopup', 'true');\n\t\t\tthis.textArea.setAttribute('aria-autocomplete', 'list');\n\t\t\tthis.textArea.setAttribute('aria-activedescendant', options.activeDescendant);\n\t\t} else {\n\t\t\tthis.textArea.setAttribute('aria-haspopup', 'false');\n\t\t\tthis.textArea.setAttribute('aria-autocomplete', 'both');\n\t\t\tthis.textArea.removeAttribute('aria-activedescendant');\n\t\t}\n\t\tif (options.role) {\n\t\t\tthis.textArea.setAttribute('role', options.role);\n\t\t}\n\t}\n\n\t// --- end view API\n\n\tprivate _ensureReadOnlyAttribute(): void {\n\t\tconst options = this._context.configuration.options;\n\t\t// When someone requests to disable IME, we set the \"readonly\" attribute on the <textarea>.\n\t\t// This will prevent composition.\n\t\tconst useReadOnly = !IME.enabled || (options.get(EditorOption.domReadOnly) && options.get(EditorOption.readOnly));\n\t\tif (useReadOnly) {\n\t\t\tthis.textArea.setAttribute('readonly', 'true');\n\t\t} else {\n\t\t\tthis.textArea.removeAttribute('readonly');\n\t\t}\n\t}\n\n\tprivate _primaryCursorPosition: Position = new Position(1, 1);\n\tprivate _primaryCursorVisibleRange: HorizontalPosition | null = null;\n\n\tpublic prepareRender(ctx: RenderingContext): void {\n\t\tthis._primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn);\n\t\tthis._primaryCursorVisibleRange = ctx.visibleRangeForPosition(this._primaryCursorPosition);\n\t\tthis._visibleTextArea?.prepareRender(ctx);\n\t}\n\n\tpublic render(ctx: RestrictedRenderingContext): void {\n\t\tthis._textAreaInput.writeNativeTextAreaContent('render');\n\t\tthis._render();\n\t}\n\n\tprivate _render(): void {\n\t\tif (this._visibleTextArea) {\n\t\t\t// The text area is visible for composition reasons\n\n\t\t\tconst visibleStart = this._visibleTextArea.visibleTextareaStart;\n\t\t\tconst visibleEnd = this._visibleTextArea.visibleTextareaEnd;\n\t\t\tconst startPosition = this._visibleTextArea.startPosition;\n\t\t\tconst endPosition = this._visibleTextArea.endPosition;\n\t\t\tif (startPosition && endPosition && visibleStart && visibleEnd && visibleEnd.left >= this._scrollLeft && visibleStart.left <= this._scrollLeft + this._contentWidth) {\n\t\t\t\tconst top = (this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber) - this._scrollTop);\n\t\t\t\tconst lineCount = newlinecount(this.textArea.domNode.value.substr(0, this.textArea.domNode.selectionStart));\n\n\t\t\t\tlet scrollLeft = this._visibleTextArea.widthOfHiddenLineTextBefore;\n\t\t\t\tlet left = (this._contentLeft + visibleStart.left - this._scrollLeft);\n\t\t\t\t// See https://github.com/microsoft/vscode/issues/141725#issuecomment-1050670841\n\t\t\t\t// Here we are adding +1 to avoid flickering that might be caused by having a width that is too small.\n\t\t\t\t// This could be caused by rounding errors that might only show up with certain font families.\n\t\t\t\t// In other words, a pixel might be lost when doing something like\n\t\t\t\t// `Math.round(end) - Math.round(start)`\n\t\t\t\t// vs\n\t\t\t\t// `Math.round(end - start)`\n\t\t\t\tlet width = visibleEnd.left - visibleStart.left + 1;\n\t\t\t\tif (left < this._contentLeft) {\n\t\t\t\t\t// the textarea would be rendered on top of the margin,\n\t\t\t\t\t// so reduce its width. We use the same technique as\n\t\t\t\t\t// for hiding text before\n\t\t\t\t\tconst delta = (this._contentLeft - left);\n\t\t\t\t\tleft += delta;\n\t\t\t\t\tscrollLeft += delta;\n\t\t\t\t\twidth -= delta;\n\t\t\t\t}\n\t\t\t\tif (width > this._contentWidth) {\n\t\t\t\t\t// the textarea would be wider than the content width,\n\t\t\t\t\t// so reduce its width.\n\t\t\t\t\twidth = this._contentWidth;\n\t\t\t\t}\n\n\t\t\t\t// Try to render the textarea with the color/font style to match the text under it\n\t\t\t\tconst lineHeight = this._context.viewLayout.getLineHeightForLineNumber(startPosition.lineNumber);\n\t\t\t\tconst fontSize = this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition);\n\t\t\t\tconst viewLineData = this._context.viewModel.getViewLineData(startPosition.lineNumber);\n\t\t\t\tconst startTokenIndex = viewLineData.tokens.findTokenIndexAtOffset(startPosition.column - 1);\n\t\t\t\tconst endTokenIndex = viewLineData.tokens.findTokenIndexAtOffset(endPosition.column - 1);\n\t\t\t\tconst textareaSpansSingleToken = (startTokenIndex === endTokenIndex);\n\t\t\t\tconst presentation = this._visibleTextArea.definePresentation(\n\t\t\t\t\t(textareaSpansSingleToken ? viewLineData.tokens.getPresentation(startTokenIndex) : null)\n\t\t\t\t);\n\n\t\t\t\tthis.textArea.domNode.scrollTop = lineCount * lineHeight;\n\t\t\t\tthis.textArea.domNode.scrollLeft = scrollLeft;\n\n\t\t\t\tthis._doRender({\n\t\t\t\t\tlastRenderPosition: null,\n\t\t\t\t\ttop: top,\n\t\t\t\t\tleft: left,\n\t\t\t\t\twidth: width,\n\t\t\t\t\theight: lineHeight,\n\t\t\t\t\tuseCover: false,\n\t\t\t\t\tcolor: (TokenizationRegistry.getColorMap() || [])[presentation.foreground],\n\t\t\t\t\titalic: presentation.italic,\n\t\t\t\t\tbold: presentation.bold,\n\t\t\t\t\tunderline: presentation.underline,\n\t\t\t\t\tstrikethrough: presentation.strikethrough,\n\t\t\t\t\tfontSize\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._primaryCursorVisibleRange) {\n\t\t\t// The primary cursor is outside the viewport => place textarea to the top left\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\tconst left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;\n\t\tif (left < this._contentLeft || left > this._contentLeft + this._contentWidth) {\n\t\t\t// cursor is outside the viewport\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\tconst top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;\n\t\tif (top < 0 || top > this._contentHeight) {\n\t\t\t// cursor is outside the viewport\n\t\t\tthis._renderAtTopLeft();\n\t\t\treturn;\n\t\t}\n\n\t\t// The primary cursor is in the viewport (at least vertically) => place textarea on the cursor\n\n\t\tif (platform.isMacintosh || this._accessibilitySupport === AccessibilitySupport.Enabled) {\n\t\t\t// For the popup emoji input, we will make the text area as high as the line height\n\t\t\t// We will also make the fontSize and lineHeight the correct dimensions to help with the placement of these pickers\n\t\t\tconst lineNumber = this._primaryCursorPosition.lineNumber;\n\t\t\tconst lineHeight = this._context.viewLayout.getLineHeightForLineNumber(lineNumber);\n\t\t\tthis._doRender({\n\t\t\t\tlastRenderPosition: this._primaryCursorPosition,\n\t\t\t\ttop,\n\t\t\t\tleft: this._textAreaWrapping ? this._contentLeft : left,\n\t\t\t\twidth: this._textAreaWidth,\n\t\t\t\theight: lineHeight,\n\t\t\t\tuseCover: false\n\t\t\t});\n\t\t\t// In case the textarea contains a word, we're going to try to align the textarea's cursor\n\t\t\t// with our cursor by scrolling the textarea as much as possible\n\t\t\tthis.textArea.domNode.scrollLeft = this._primaryCursorVisibleRange.left;\n\t\t\tconst lineCount = this._textAreaInput.textAreaState.newlineCountBeforeSelection ?? newlinecount(this.textArea.domNode.value.substring(0, this.textArea.domNode.selectionStart));\n\t\t\tthis.textArea.domNode.scrollTop = lineCount * lineHeight;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._doRender({\n\t\t\tlastRenderPosition: this._primaryCursorPosition,\n\t\t\ttop: top,\n\t\t\tleft: this._textAreaWrapping ? this._contentLeft : left,\n\t\t\twidth: this._textAreaWidth,\n\t\t\theight: (canUseZeroSizeTextarea ? 0 : 1),\n\t\t\tuseCover: false\n\t\t});\n\t}\n\n\tprivate _renderAtTopLeft(): void {\n\t\t// (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea)\n\t\t// specifically, when doing Korean IME, setting the textarea to 0x0 breaks IME badly.\n\t\tthis._doRender({\n\t\t\tlastRenderPosition: null,\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: this._textAreaWidth,\n\t\t\theight: (canUseZeroSizeTextarea ? 0 : 1),\n\t\t\tuseCover: true\n\t\t});\n\t}\n\n\tprivate _doRender(renderData: IRenderData): void {\n\t\tthis._lastRenderPosition = renderData.lastRenderPosition;\n\n\t\tconst ta = this.textArea;\n\t\tconst tac = this.textAreaCover;\n\n\t\tapplyFontInfo(ta, this._fontInfo);\n\t\tta.setTop(renderData.top);\n\t\tta.setLeft(renderData.left);\n\t\tta.setWidth(renderData.width);\n\t\tta.setHeight(renderData.height);\n\t\tta.setLineHeight(renderData.height);\n\n\t\tta.setFontSize(renderData.fontSize ?? this._fontInfo.fontSize);\n\t\tta.setColor(renderData.color ? Color.Format.CSS.formatHex(renderData.color) : '');\n\t\tta.setFontStyle(renderData.italic ? 'italic' : '');\n\t\tif (renderData.bold) {\n\t\t\t// fontWeight is also set by `applyFontInfo`, so only overwrite it if necessary\n\t\t\tta.setFontWeight('bold');\n\t\t}\n\t\tta.setTextDecoration(`${renderData.underline ? ' underline' : ''}${renderData.strikethrough ? ' line-through' : ''}`);\n\n\t\ttac.setTop(renderData.useCover ? renderData.top : 0);\n\t\ttac.setLeft(renderData.useCover ? renderData.left : 0);\n\t\ttac.setWidth(renderData.useCover ? renderData.width : 0);\n\t\ttac.setHeight(renderData.useCover ? renderData.height : 0);\n\n\t\tconst options = this._context.configuration.options;\n\n\t\tif (options.get(EditorOption.glyphMargin)) {\n\t\t\ttac.setClassName('monaco-editor-background textAreaCover ' + Margin.OUTER_CLASS_NAME);\n\t\t} else {\n\t\t\tif (options.get(EditorOption.lineNumbers).renderType !== RenderLineNumbersType.Off) {\n\t\t\t\ttac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME);\n\t\t\t} else {\n\t\t\t\ttac.setClassName('monaco-editor-background textAreaCover');\n\t\t\t}\n\t\t}\n\t}\n}\n\ninterface IRenderData {\n\tlastRenderPosition: Position | null;\n\ttop: number;\n\tleft: number;\n\twidth: number;\n\theight: number;\n\tuseCover: boolean;\n\n\tfontSize?: string | null;\n\tcolor?: Color | null;\n\titalic?: boolean;\n\tbold?: boolean;\n\tunderline?: boolean;\n\tstrikethrough?: boolean;\n}\n\nfunction measureText(targetDocument: Document, text: string, fontInfo: FontInfo, tabSize: number): number {\n\tif (text.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst container = targetDocument.createElement('div');\n\tcontainer.style.position = 'absolute';\n\tcontainer.style.top = '-50000px';\n\tcontainer.style.width = '50000px';\n\n\tconst regularDomNode = targetDocument.createElement('span');\n\tapplyFontInfo(regularDomNode, fontInfo);\n\tregularDomNode.style.whiteSpace = 'pre'; // just like the textarea\n\tregularDomNode.style.tabSize = `${tabSize * fontInfo.spaceWidth}px`; // just like the textarea\n\tregularDomNode.append(text);\n\tcontainer.appendChild(regularDomNode);\n\n\ttargetDocument.body.appendChild(container);\n\n\tconst res = regularDomNode.offsetWidth;\n\n\tcontainer.remove();\n\n\treturn res;\n}\n"]}
@@ -22,10 +22,9 @@ import { Disposable, MutableDisposable } from '../../../../../base/common/lifecy
22
22
  import * as strings from '../../../../../base/common/strings.js';
23
23
  import { Selection } from '../../../../common/core/selection.js';
24
24
  import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.js';
25
- import { ILogService, LogLevel } from '../../../../../platform/log/common/log.js';
26
- import { ClipboardEventUtils, InMemoryClipboardMetadataManager } from '../clipboardUtils.js';
25
+ import { ILogService } from '../../../../../platform/log/common/log.js';
26
+ import { ensureClipboardGetsEditorSelection, computePasteData, InMemoryClipboardMetadataManager, getPasteDataFromMetadata } from '../clipboardUtils.js';
27
27
  import { _debugComposition, TextAreaState } from './textAreaEditContextState.js';
28
- import { generateUuid } from '../../../../../base/common/uuid.js';
29
28
  export var TextAreaSyntethicEvents;
30
29
  (function (TextAreaSyntethicEvents) {
31
30
  TextAreaSyntethicEvents.Tap = '-monaco-textarea-synthetic-tap';
@@ -240,11 +239,8 @@ let TextAreaInput = class TextAreaInput extends Disposable {
240
239
  || typeInput.replaceNextCharCnt !== 0
241
240
  || typeInput.positionDelta !== 0) {
242
241
  // https://w3c.github.io/input-events/#interface-InputEvent-Attributes
243
- if (e.inputType === 'insertFromPaste') {
244
- this._onPaste.fire({
245
- text: typeInput.text,
246
- metadata: InMemoryClipboardMetadataManager.INSTANCE.get(typeInput.text)
247
- });
242
+ if (this._host.context && e.inputType === 'insertFromPaste') {
243
+ this._onPaste.fire(getPasteDataFromMetadata(typeInput.text, InMemoryClipboardMetadataManager.INSTANCE.get(typeInput.text), this._host.context));
248
244
  }
249
245
  else {
250
246
  this._onType.fire(typeInput);
@@ -257,34 +253,31 @@ let TextAreaInput = class TextAreaInput extends Disposable {
257
253
  // Pretend here we touched the text area, as the `cut` event will most likely
258
254
  // result in a `selectionchange` event which we want to ignore
259
255
  this._textArea.setIgnoreSelectionChangeTime('received cut event');
260
- this._ensureClipboardGetsEditorSelection(e);
256
+ if (this._host.context) {
257
+ ensureClipboardGetsEditorSelection(e, this._host.context, this._logService, this._browser.isFirefox);
258
+ }
261
259
  this._asyncTriggerCut.schedule();
262
260
  }));
263
261
  this._register(this._textArea.onCopy((e) => {
264
262
  this._logService.trace(`TextAreaInput#onCopy`, e);
265
- this._ensureClipboardGetsEditorSelection(e);
263
+ if (this._host.context) {
264
+ ensureClipboardGetsEditorSelection(e, this._host.context, this._logService, this._browser.isFirefox);
265
+ }
266
266
  }));
267
267
  this._register(this._textArea.onPaste((e) => {
268
268
  this._logService.trace(`TextAreaInput#onPaste`, e);
269
269
  // Pretend here we touched the text area, as the `paste` event will most likely
270
270
  // result in a `selectionchange` event which we want to ignore
271
271
  this._textArea.setIgnoreSelectionChangeTime('received paste event');
272
- e.preventDefault();
273
- if (!e.clipboardData) {
272
+ if (!this._host.context) {
274
273
  return;
275
274
  }
276
- let [text, metadata] = ClipboardEventUtils.getTextData(e.clipboardData);
277
- this._logService.trace(`TextAreaInput#onPaste with id : `, metadata?.id, ' with text.length: ', text.length);
278
- if (!text) {
275
+ const pasteData = computePasteData(e, this._host.context, this._logService);
276
+ if (!pasteData) {
279
277
  return;
280
278
  }
281
- // try the in-memory store
282
- metadata = metadata || InMemoryClipboardMetadataManager.INSTANCE.get(text);
283
279
  this._logService.trace(`TextAreaInput#onPaste (before onPaste)`);
284
- this._onPaste.fire({
285
- text: text,
286
- metadata: metadata
287
- });
280
+ this._onPaste.fire(pasteData);
288
281
  }));
289
282
  this._register(this._textArea.onFocus(() => {
290
283
  const hadFocus = this._hasFocus;
@@ -455,29 +448,6 @@ let TextAreaInput = class TextAreaInput extends Disposable {
455
448
  }
456
449
  this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent());
457
450
  }
458
- _ensureClipboardGetsEditorSelection(e) {
459
- const dataToCopy = this._host.getDataToCopy();
460
- let id = undefined;
461
- if (this._logService.getLevel() === LogLevel.Trace) {
462
- id = generateUuid();
463
- }
464
- const storedMetadata = {
465
- version: 1,
466
- id,
467
- isFromEmptySelection: dataToCopy.isFromEmptySelection,
468
- multicursorText: dataToCopy.multicursorText,
469
- mode: dataToCopy.mode
470
- };
471
- InMemoryClipboardMetadataManager.INSTANCE.set(
472
- // When writing "LINE\r\n" to the clipboard and then pasting,
473
- // Firefox pastes "LINE\n", so let's work around this quirk
474
- (this._browser.isFirefox ? dataToCopy.text.replace(/\r\n/g, '\n') : dataToCopy.text), storedMetadata);
475
- e.preventDefault();
476
- if (e.clipboardData) {
477
- ClipboardEventUtils.setTextData(e.clipboardData, dataToCopy.text, dataToCopy.html, storedMetadata);
478
- }
479
- this._logService.trace('TextAreaEditContextInput#_ensureClipboardGetsEditorSelection with id : ', id, ' with text.length: ', dataToCopy.text.length);
480
- }
481
451
  };
482
452
  TextAreaInput = __decorate([
483
453
  __param(4, IAccessibilityService),