monaco-editor-core 0.54.0-dev-20251004 → 0.54.0-dev-20251005

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 (129) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/dom.js.map +1 -1
  11. package/esm/vs/base/browser/fastDomNode.js +0 -1
  12. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  13. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  14. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  15. package/esm/vs/base/common/buffer.js.map +1 -1
  16. package/esm/vs/base/common/errors.js.map +1 -1
  17. package/esm/vs/base/common/hash.js.map +1 -1
  18. package/esm/vs/base/common/worker/webWorker.js +26 -22
  19. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  20. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -6
  21. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  22. package/esm/vs/editor/browser/config/migrateOptions.js +1 -2
  23. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  24. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js +0 -1
  25. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  26. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -2
  27. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  28. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -2
  29. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  30. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -8
  31. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  32. package/esm/vs/editor/browser/controller/pointerHandler.js +0 -2
  33. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  34. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  35. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  36. package/esm/vs/editor/browser/editorDom.js +0 -2
  37. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  38. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  39. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -1
  40. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  41. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  42. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  43. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  44. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  45. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  46. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  47. package/esm/vs/editor/browser/services/hoverService/hoverService.js +1 -1
  48. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  49. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  50. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  51. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  52. package/esm/vs/editor/browser/view.js.map +1 -1
  53. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  54. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  55. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  56. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  57. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  58. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -2
  59. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  60. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  61. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  62. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  63. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
  64. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  65. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -1
  66. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  67. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -2
  68. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  69. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
  70. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  71. package/esm/vs/editor/common/config/editorOptions.js +121 -72
  72. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  73. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  74. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  75. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  76. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  77. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  78. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  79. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  80. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  81. package/esm/vs/editor/common/core/position.js +1 -1
  82. package/esm/vs/editor/common/core/position.js.map +1 -1
  83. package/esm/vs/editor/common/core/range.js +1 -1
  84. package/esm/vs/editor/common/core/range.js.map +1 -1
  85. package/esm/vs/editor/common/core/selection.js +1 -1
  86. package/esm/vs/editor/common/core/selection.js.map +1 -1
  87. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  88. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  89. package/esm/vs/editor/common/languages.js +1 -2
  90. package/esm/vs/editor/common/languages.js.map +1 -1
  91. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -13
  92. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  93. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  94. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  95. package/esm/vs/editor/common/model/textModel.js +1 -1
  96. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  97. package/esm/vs/editor/common/model.js +1 -1
  98. package/esm/vs/editor/common/model.js.map +1 -1
  99. package/esm/vs/editor/common/services/editorBaseApi.js +0 -2
  100. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  101. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  102. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  103. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  104. package/esm/vs/editor/common/services/modelService.js +14 -21
  105. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  106. package/esm/vs/editor/common/textModelEditSource.js +2 -1
  107. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  108. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  109. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  110. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  111. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  112. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -0
  113. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  114. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  115. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  116. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  117. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  118. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  119. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -1
  120. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  121. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -0
  122. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  123. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  124. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  125. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  126. package/esm/vs/editor/editor.api.d.ts +8 -8
  127. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  128. package/monaco.d.ts +8 -8
  129. package/package.json +2 -2
@@ -43,7 +43,6 @@ export class PointerEventHandler extends MouseHandler {
43
43
  this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));
44
44
  }
45
45
  onTap(event) {
46
- // eslint-disable-next-line local/code-no-any-casts
47
46
  if (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget)) {
48
47
  return;
49
48
  }
@@ -80,7 +79,6 @@ export class PointerEventHandler extends MouseHandler {
80
79
  }
81
80
  }
82
81
  _onMouseDown(e, pointerId) {
83
- // eslint-disable-next-line local/code-no-any-casts
84
82
  if (e.browserEvent.pointerType === 'touch') {
85
83
  return;
86
84
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///m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-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 { BrowserFeatures } from '../../../base/browser/canIUse.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { EventType, Gesture, GestureEvent } from '../../../base/browser/touch.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { IPointerHandlerHelper, MouseHandler } from './mouseHandler.js';\nimport { NavigationCommandRevealType } from '../coreCommands.js';\nimport { IMouseTarget, MouseTargetType } from '../editorBrowser.js';\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\nimport { ViewController } from '../view/viewController.js';\nimport { ViewContext } from '../../common/viewModel/viewContext.js';\nimport { TextAreaSyntethicEvents } from './editContext/textArea/textAreaEditContextInput.js';\n\n/**\n * Currently only tested on iOS 13/ iPadOS.\n */\nexport class PointerEventHandler extends MouseHandler {\n\tprivate _lastPointerType: string;\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\n\t\tthis._lastPointerType = 'mouse';\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e: any) => {\n\t\t\tconst pointerType = e.pointerType;\n\t\t\tif (pointerType === 'mouse') {\n\t\t\t\tthis._lastPointerType = 'mouse';\n\t\t\t\treturn;\n\t\t\t} else if (pointerType === 'touch') {\n\t\t\t\tthis._lastPointerType = 'touch';\n\t\t\t} else {\n\t\t\t\tthis._lastPointerType = 'pen';\n\t\t\t}\n\t\t}));\n\n\t\t// PonterEvents\n\t\tconst pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\n\n\t\tthis._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e)));\n\t\tthis._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n\t\tthis._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n\t\tthis._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(<any>event.initialTarget)) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.viewHelper.focusTextArea();\n\t\tthis._dispatchGesture(event, /*inSelectionMode*/false);\n\t}\n\n\tprivate onChange(event: GestureEvent): void {\n\t\tif (this._lastPointerType === 'touch') {\n\t\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-event.translationX, -event.translationY);\n\t\t}\n\t\tif (this._lastPointerType === 'pen') {\n\t\t\tthis._dispatchGesture(event, /*inSelectionMode*/true);\n\t\t}\n\t}\n\n\tprivate _dispatchGesture(event: GestureEvent, inSelectionMode: boolean): void {\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\t\tif (target.position) {\n\t\t\tthis.viewController.dispatchMouse({\n\t\t\t\tposition: target.position,\n\t\t\t\tmouseColumn: target.position.column,\n\t\t\t\tstartedOnLineNumbers: false,\n\t\t\t\trevealType: NavigationCommandRevealType.Minimal,\n\t\t\t\tmouseDownCount: event.tapCount,\n\t\t\t\tinSelectionMode,\n\t\t\t\taltKey: false,\n\t\t\t\tctrlKey: false,\n\t\t\t\tmetaKey: false,\n\t\t\t\tshiftKey: false,\n\t\t\t\tleftButton: false,\n\t\t\t\tmiddleButton: false,\n\t\t\t\tonInjectedText: target.type === MouseTargetType.CONTENT_TEXT && target.detail.injectedText !== null\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected override _onMouseDown(e: EditorMouseEvent, pointerId: number): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif ((e.browserEvent as any).pointerType === 'touch') {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onMouseDown(e, pointerId);\n\t}\n}\n\nclass TouchHandler extends MouseHandler {\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tevent.preventDefault();\n\n\t\tthis.viewHelper.focusTextArea();\n\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\n\t\tif (target.position) {\n\t\t\t// Send the tap event also to the <textarea> (for input purposes)\n\t\t\tconst event = document.createEvent('CustomEvent');\n\t\t\tevent.initEvent(TextAreaSyntethicEvents.Tap, false, true);\n\t\t\tthis.viewHelper.dispatchTextAreaEvent(event);\n\n\t\t\tthis.viewController.moveTo(target.position, NavigationCommandRevealType.Minimal);\n\t\t}\n\t}\n\n\tprivate onChange(e: GestureEvent): void {\n\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n\t}\n}\n\nexport class PointerHandler extends Disposable {\n\tprivate readonly handler: MouseHandler;\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper();\n\t\tconst isPhone = platform.isIOS || (platform.isAndroid && platform.isMobile);\n\t\tif (isPhone && BrowserFeatures.pointerEvents) {\n\t\t\tthis.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\n\t\t} else if (mainWindow.TouchEvent) {\n\t\t\tthis.handler = this._register(new TouchHandler(context, viewController, viewHelper));\n\t\t} else {\n\t\t\tthis.handler = this._register(new MouseHandler(context, viewController, viewHelper));\n\t\t}\n\t}\n\n\tpublic getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null {\n\t\treturn this.handler.getTargetAtClientPoint(clientX, clientY);\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { BrowserFeatures } from '../../../base/browser/canIUse.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { EventType, Gesture, GestureEvent } from '../../../base/browser/touch.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { IPointerHandlerHelper, MouseHandler } from './mouseHandler.js';\nimport { NavigationCommandRevealType } from '../coreCommands.js';\nimport { IMouseTarget, MouseTargetType } from '../editorBrowser.js';\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\nimport { ViewController } from '../view/viewController.js';\nimport { ViewContext } from '../../common/viewModel/viewContext.js';\nimport { TextAreaSyntethicEvents } from './editContext/textArea/textAreaEditContextInput.js';\n\n/**\n * Currently only tested on iOS 13/ iPadOS.\n */\nexport class PointerEventHandler extends MouseHandler {\n\tprivate _lastPointerType: string;\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\n\t\tthis._lastPointerType = 'mouse';\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e: any) => {\n\t\t\tconst pointerType = e.pointerType;\n\t\t\tif (pointerType === 'mouse') {\n\t\t\t\tthis._lastPointerType = 'mouse';\n\t\t\t\treturn;\n\t\t\t} else if (pointerType === 'touch') {\n\t\t\t\tthis._lastPointerType = 'touch';\n\t\t\t} else {\n\t\t\t\tthis._lastPointerType = 'pen';\n\t\t\t}\n\t\t}));\n\n\t\t// PonterEvents\n\t\tconst pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\n\n\t\tthis._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e)));\n\t\tthis._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n\t\tthis._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n\t\tthis._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(<any>event.initialTarget)) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.viewHelper.focusTextArea();\n\t\tthis._dispatchGesture(event, /*inSelectionMode*/false);\n\t}\n\n\tprivate onChange(event: GestureEvent): void {\n\t\tif (this._lastPointerType === 'touch') {\n\t\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-event.translationX, -event.translationY);\n\t\t}\n\t\tif (this._lastPointerType === 'pen') {\n\t\t\tthis._dispatchGesture(event, /*inSelectionMode*/true);\n\t\t}\n\t}\n\n\tprivate _dispatchGesture(event: GestureEvent, inSelectionMode: boolean): void {\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\t\tif (target.position) {\n\t\t\tthis.viewController.dispatchMouse({\n\t\t\t\tposition: target.position,\n\t\t\t\tmouseColumn: target.position.column,\n\t\t\t\tstartedOnLineNumbers: false,\n\t\t\t\trevealType: NavigationCommandRevealType.Minimal,\n\t\t\t\tmouseDownCount: event.tapCount,\n\t\t\t\tinSelectionMode,\n\t\t\t\taltKey: false,\n\t\t\t\tctrlKey: false,\n\t\t\t\tmetaKey: false,\n\t\t\t\tshiftKey: false,\n\t\t\t\tleftButton: false,\n\t\t\t\tmiddleButton: false,\n\t\t\t\tonInjectedText: target.type === MouseTargetType.CONTENT_TEXT && target.detail.injectedText !== null\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected override _onMouseDown(e: EditorMouseEvent, pointerId: number): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif ((e.browserEvent as any).pointerType === 'touch') {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onMouseDown(e, pointerId);\n\t}\n}\n\nclass TouchHandler extends MouseHandler {\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tevent.preventDefault();\n\n\t\tthis.viewHelper.focusTextArea();\n\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\n\t\tif (target.position) {\n\t\t\t// Send the tap event also to the <textarea> (for input purposes)\n\t\t\tconst event = document.createEvent('CustomEvent');\n\t\t\tevent.initEvent(TextAreaSyntethicEvents.Tap, false, true);\n\t\t\tthis.viewHelper.dispatchTextAreaEvent(event);\n\n\t\t\tthis.viewController.moveTo(target.position, NavigationCommandRevealType.Minimal);\n\t\t}\n\t}\n\n\tprivate onChange(e: GestureEvent): void {\n\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n\t}\n}\n\nexport class PointerHandler extends Disposable {\n\tprivate readonly handler: MouseHandler;\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper();\n\t\tconst isPhone = platform.isIOS || (platform.isAndroid && platform.isMobile);\n\t\tif (isPhone && BrowserFeatures.pointerEvents) {\n\t\t\tthis.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\n\t\t} else if (mainWindow.TouchEvent) {\n\t\t\tthis.handler = this._register(new TouchHandler(context, viewController, viewHelper));\n\t\t} else {\n\t\t\tthis.handler = this._register(new MouseHandler(context, viewController, viewHelper));\n\t\t}\n\t}\n\n\tpublic getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null {\n\t\treturn this.handler.getTargetAtClientPoint(clientX, clientY);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/controller/pointerHandler.ts","vs/editor/browser/controller/pointerHandler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,QAAQ,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAyB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGxE,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAE7F;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IAEpD,YAAY,OAAoB,EAAE,cAA8B,EAAE,UAAiC;QAClG,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpH,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC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*---------------------------------------------------------------------------------------------\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 { BrowserFeatures } from '../../../base/browser/canIUse.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { EventType, Gesture, GestureEvent } from '../../../base/browser/touch.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { IPointerHandlerHelper, MouseHandler } from './mouseHandler.js';\nimport { NavigationCommandRevealType } from '../coreCommands.js';\nimport { IMouseTarget, MouseTargetType } from '../editorBrowser.js';\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\nimport { ViewController } from '../view/viewController.js';\nimport { ViewContext } from '../../common/viewModel/viewContext.js';\nimport { TextAreaSyntethicEvents } from './editContext/textArea/textAreaEditContextInput.js';\n\n/**\n * Currently only tested on iOS 13/ iPadOS.\n */\nexport class PointerEventHandler extends MouseHandler {\n\tprivate _lastPointerType: string;\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\n\t\tthis._lastPointerType = 'mouse';\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e: PointerEvent) => {\n\t\t\tconst pointerType = e.pointerType;\n\t\t\tif (pointerType === 'mouse') {\n\t\t\t\tthis._lastPointerType = 'mouse';\n\t\t\t\treturn;\n\t\t\t} else if (pointerType === 'touch') {\n\t\t\t\tthis._lastPointerType = 'touch';\n\t\t\t} else {\n\t\t\t\tthis._lastPointerType = 'pen';\n\t\t\t}\n\t\t}));\n\n\t\t// PonterEvents\n\t\tconst pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\n\n\t\tthis._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e)));\n\t\tthis._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n\t\tthis._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n\t\tthis._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tif (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.viewHelper.focusTextArea();\n\t\tthis._dispatchGesture(event, /*inSelectionMode*/false);\n\t}\n\n\tprivate onChange(event: GestureEvent): void {\n\t\tif (this._lastPointerType === 'touch') {\n\t\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-event.translationX, -event.translationY);\n\t\t}\n\t\tif (this._lastPointerType === 'pen') {\n\t\t\tthis._dispatchGesture(event, /*inSelectionMode*/true);\n\t\t}\n\t}\n\n\tprivate _dispatchGesture(event: GestureEvent, inSelectionMode: boolean): void {\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\t\tif (target.position) {\n\t\t\tthis.viewController.dispatchMouse({\n\t\t\t\tposition: target.position,\n\t\t\t\tmouseColumn: target.position.column,\n\t\t\t\tstartedOnLineNumbers: false,\n\t\t\t\trevealType: NavigationCommandRevealType.Minimal,\n\t\t\t\tmouseDownCount: event.tapCount,\n\t\t\t\tinSelectionMode,\n\t\t\t\taltKey: false,\n\t\t\t\tctrlKey: false,\n\t\t\t\tmetaKey: false,\n\t\t\t\tshiftKey: false,\n\t\t\t\tleftButton: false,\n\t\t\t\tmiddleButton: false,\n\t\t\t\tonInjectedText: target.type === MouseTargetType.CONTENT_TEXT && target.detail.injectedText !== null\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected override _onMouseDown(e: EditorMouseEvent, pointerId: number): void {\n\t\tif ((e.browserEvent as PointerEvent).pointerType === 'touch') {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onMouseDown(e, pointerId);\n\t}\n}\n\nclass TouchHandler extends MouseHandler {\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tevent.preventDefault();\n\n\t\tthis.viewHelper.focusTextArea();\n\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\n\t\tif (target.position) {\n\t\t\t// Send the tap event also to the <textarea> (for input purposes)\n\t\t\tconst event = document.createEvent('CustomEvent');\n\t\t\tevent.initEvent(TextAreaSyntethicEvents.Tap, false, true);\n\t\t\tthis.viewHelper.dispatchTextAreaEvent(event);\n\n\t\t\tthis.viewController.moveTo(target.position, NavigationCommandRevealType.Minimal);\n\t\t}\n\t}\n\n\tprivate onChange(e: GestureEvent): void {\n\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n\t}\n}\n\nexport class PointerHandler extends Disposable {\n\tprivate readonly handler: MouseHandler;\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper();\n\t\tconst isPhone = platform.isIOS || (platform.isAndroid && platform.isMobile);\n\t\tif (isPhone && BrowserFeatures.pointerEvents) {\n\t\t\tthis.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\n\t\t} else if (mainWindow.TouchEvent) {\n\t\t\tthis.handler = this._register(new TouchHandler(context, viewController, viewHelper));\n\t\t} else {\n\t\t\tthis.handler = this._register(new MouseHandler(context, viewController, viewHelper));\n\t\t}\n\t}\n\n\tpublic getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null {\n\t\treturn this.handler.getTargetAtClientPoint(clientX, clientY);\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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 { BrowserFeatures } from '../../../base/browser/canIUse.js';\nimport * as dom from '../../../base/browser/dom.js';\nimport { EventType, Gesture, GestureEvent } from '../../../base/browser/touch.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { IPointerHandlerHelper, MouseHandler } from './mouseHandler.js';\nimport { NavigationCommandRevealType } from '../coreCommands.js';\nimport { IMouseTarget, MouseTargetType } from '../editorBrowser.js';\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\nimport { ViewController } from '../view/viewController.js';\nimport { ViewContext } from '../../common/viewModel/viewContext.js';\nimport { TextAreaSyntethicEvents } from './editContext/textArea/textAreaEditContextInput.js';\n\n/**\n * Currently only tested on iOS 13/ iPadOS.\n */\nexport class PointerEventHandler extends MouseHandler {\n\tprivate _lastPointerType: string;\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\n\t\tthis._lastPointerType = 'mouse';\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e: PointerEvent) => {\n\t\t\tconst pointerType = e.pointerType;\n\t\t\tif (pointerType === 'mouse') {\n\t\t\t\tthis._lastPointerType = 'mouse';\n\t\t\t\treturn;\n\t\t\t} else if (pointerType === 'touch') {\n\t\t\t\tthis._lastPointerType = 'touch';\n\t\t\t} else {\n\t\t\t\tthis._lastPointerType = 'pen';\n\t\t\t}\n\t\t}));\n\n\t\t// PonterEvents\n\t\tconst pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\n\n\t\tthis._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e)));\n\t\tthis._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\n\t\tthis._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\n\t\tthis._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => this._onMouseDown(e, pointerId)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tif (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.viewHelper.focusTextArea();\n\t\tthis._dispatchGesture(event, /*inSelectionMode*/false);\n\t}\n\n\tprivate onChange(event: GestureEvent): void {\n\t\tif (this._lastPointerType === 'touch') {\n\t\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-event.translationX, -event.translationY);\n\t\t}\n\t\tif (this._lastPointerType === 'pen') {\n\t\t\tthis._dispatchGesture(event, /*inSelectionMode*/true);\n\t\t}\n\t}\n\n\tprivate _dispatchGesture(event: GestureEvent, inSelectionMode: boolean): void {\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\t\tif (target.position) {\n\t\t\tthis.viewController.dispatchMouse({\n\t\t\t\tposition: target.position,\n\t\t\t\tmouseColumn: target.position.column,\n\t\t\t\tstartedOnLineNumbers: false,\n\t\t\t\trevealType: NavigationCommandRevealType.Minimal,\n\t\t\t\tmouseDownCount: event.tapCount,\n\t\t\t\tinSelectionMode,\n\t\t\t\taltKey: false,\n\t\t\t\tctrlKey: false,\n\t\t\t\tmetaKey: false,\n\t\t\t\tshiftKey: false,\n\t\t\t\tleftButton: false,\n\t\t\t\tmiddleButton: false,\n\t\t\t\tonInjectedText: target.type === MouseTargetType.CONTENT_TEXT && target.detail.injectedText !== null\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected override _onMouseDown(e: EditorMouseEvent, pointerId: number): void {\n\t\tif ((e.browserEvent as PointerEvent).pointerType === 'touch') {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onMouseDown(e, pointerId);\n\t}\n}\n\nclass TouchHandler extends MouseHandler {\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper(context, viewController, viewHelper);\n\n\t\tthis._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\n\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\n\t\tthis._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e: MouseEvent) => this._onContextMenu(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode), false)));\n\t}\n\n\tprivate onTap(event: GestureEvent): void {\n\t\tevent.preventDefault();\n\n\t\tthis.viewHelper.focusTextArea();\n\n\t\tconst target = this._createMouseTarget(new EditorMouseEvent(event, false, this.viewHelper.viewDomNode), false);\n\n\t\tif (target.position) {\n\t\t\t// Send the tap event also to the <textarea> (for input purposes)\n\t\t\tconst event = document.createEvent('CustomEvent');\n\t\t\tevent.initEvent(TextAreaSyntethicEvents.Tap, false, true);\n\t\t\tthis.viewHelper.dispatchTextAreaEvent(event);\n\n\t\t\tthis.viewController.moveTo(target.position, NavigationCommandRevealType.Minimal);\n\t\t}\n\t}\n\n\tprivate onChange(e: GestureEvent): void {\n\t\tthis._context.viewModel.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n\t}\n}\n\nexport class PointerHandler extends Disposable {\n\tprivate readonly handler: MouseHandler;\n\n\tconstructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {\n\t\tsuper();\n\t\tconst isPhone = platform.isIOS || (platform.isAndroid && platform.isMobile);\n\t\tif (isPhone && BrowserFeatures.pointerEvents) {\n\t\t\tthis.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\n\t\t} else if (mainWindow.TouchEvent) {\n\t\t\tthis.handler = this._register(new TouchHandler(context, viewController, viewHelper));\n\t\t} else {\n\t\t\tthis.handler = this._register(new MouseHandler(context, viewController, viewHelper));\n\t\t}\n\t}\n\n\tpublic getTargetAtClientPoint(clientX: number, clientY: number): IMouseTarget | null {\n\t\treturn this.handler.getTargetAtClientPoint(clientX, clientY);\n\t}\n}\n"]}