monaco-editor-core 0.54.0 → 0.55.0-dev-20251007

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 (251) 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/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -3
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -0
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -0
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  33. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  34. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  35. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  36. package/esm/vs/base/common/buffer.js.map +1 -1
  37. package/esm/vs/base/common/decorators.js +1 -0
  38. package/esm/vs/base/common/decorators.js.map +1 -1
  39. package/esm/vs/base/common/errors.js +1 -0
  40. package/esm/vs/base/common/errors.js.map +1 -1
  41. package/esm/vs/base/common/glob.js +1 -1
  42. package/esm/vs/base/common/glob.js.map +1 -1
  43. package/esm/vs/base/common/hash.js.map +1 -1
  44. package/esm/vs/base/common/hotReload.js +2 -0
  45. package/esm/vs/base/common/hotReload.js.map +1 -1
  46. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  47. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  48. package/esm/vs/base/common/lifecycle.js +19 -0
  49. package/esm/vs/base/common/lifecycle.js.map +1 -1
  50. package/esm/vs/base/common/map.js.map +1 -1
  51. package/esm/vs/base/common/marshalling.js +4 -0
  52. package/esm/vs/base/common/marshalling.js.map +1 -1
  53. package/esm/vs/base/common/network.js +1 -0
  54. package/esm/vs/base/common/network.js.map +1 -1
  55. package/esm/vs/base/common/objects.js +1 -0
  56. package/esm/vs/base/common/objects.js.map +1 -1
  57. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  58. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  59. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  60. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  62. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  64. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  66. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  70. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  72. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  74. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  76. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  77. package/esm/vs/base/common/process.js +1 -0
  78. package/esm/vs/base/common/process.js.map +1 -1
  79. package/esm/vs/base/common/product.js.map +1 -1
  80. package/esm/vs/base/common/types.js +2 -0
  81. package/esm/vs/base/common/types.js.map +1 -1
  82. package/esm/vs/base/common/worker/webWorker.js +26 -14
  83. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  84. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  85. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  86. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  87. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  88. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  89. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  90. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  91. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  92. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  94. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  95. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  96. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  97. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  99. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  100. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  101. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  102. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  103. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  104. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  105. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  106. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  107. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  108. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  109. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  111. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  114. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  115. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  116. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  117. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  118. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  119. package/esm/vs/editor/browser/view.js.map +1 -1
  120. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  121. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  122. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  123. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  124. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  125. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  126. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  128. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  129. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  134. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  135. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  136. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  137. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  138. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  139. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  140. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  141. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  142. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  143. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  144. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  145. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  146. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  147. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  148. package/esm/vs/editor/common/core/position.js +1 -1
  149. package/esm/vs/editor/common/core/position.js.map +1 -1
  150. package/esm/vs/editor/common/core/range.js +1 -1
  151. package/esm/vs/editor/common/core/range.js.map +1 -1
  152. package/esm/vs/editor/common/core/selection.js +1 -1
  153. package/esm/vs/editor/common/core/selection.js.map +1 -1
  154. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  155. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  156. package/esm/vs/editor/common/languages.js +1 -1
  157. package/esm/vs/editor/common/languages.js.map +1 -1
  158. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  159. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  160. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  162. package/esm/vs/editor/common/model/textModel.js +1 -1
  163. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  164. package/esm/vs/editor/common/model.js +1 -1
  165. package/esm/vs/editor/common/model.js.map +1 -1
  166. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  167. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  168. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  170. package/esm/vs/editor/common/services/modelService.js +14 -21
  171. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  175. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  176. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  177. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  178. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  179. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  180. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  181. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  182. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  183. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  184. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  185. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  186. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  187. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  188. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  189. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  190. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  191. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  192. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  194. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +4 -3
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  205. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  206. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  207. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  208. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  209. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  210. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  211. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  212. package/esm/vs/editor/editor.api.d.ts +8 -8
  213. package/esm/vs/editor/editor.api.js +4 -0
  214. package/esm/vs/editor/editor.api.js.map +1 -1
  215. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  216. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  217. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  218. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  219. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  220. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  221. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  222. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  223. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  224. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  225. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  226. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  227. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  228. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  229. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  230. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -0
  231. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  232. package/esm/vs/platform/dnd/browser/dnd.js +2 -0
  233. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  234. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  235. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  236. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  237. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  238. package/esm/vs/platform/list/browser/listService.js +5 -0
  239. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  240. package/esm/vs/platform/log/common/log.js.map +1 -1
  241. package/esm/vs/platform/log/common/logService.js.map +1 -1
  242. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  243. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  244. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  245. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  246. package/esm/vs/platform/product/common/product.js +69 -0
  247. package/esm/vs/platform/product/common/product.js.map +1 -0
  248. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  249. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  250. package/monaco.d.ts +8 -8
  251. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;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CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,eAAe,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AgB,CAAC;YAC7C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO;YAC7B,OAAO,EAAE,OAAO,CAAC,OAAO;SACxB,CAA4B,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC;YACP,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACxC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjF,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;gBACzC,eAAe,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACP,eAAe,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;IACF,CAAC;CAKD,CAAA;AAjeY,0BAA0B;IAkBpC,WAAA,aAAa,CAAA;IACb,WAAA,qBAAqB,CAAA;IACrB,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GArBH,0BAA0B,CAietC;;AAED,SAAS,wBAAwB,CAAC,SAAqC;IACtE,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, this._store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
@@ -21,7 +21,7 @@ import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.j
21
21
  import { escapeRegExpCharacters } from '../../../../base/common/strings.js';
22
22
  import { assertReturnsDefined } from '../../../../base/common/types.js';
23
23
  import './parameterHints.css';
24
- import { EDITOR_FONT_DEFAULTS } from '../../../common/config/editorOptions.js';
24
+ import { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';
25
25
  import { ILanguageService } from '../../../common/languages/language.js';
26
26
  import { MarkdownRenderer } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';
27
27
  import { Context } from './provideSignatureHelp.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,IAAI,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4D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CAAC;IAED,UAAU;QACT,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACpC,CAAC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,KAAK;QACJ,OAAO,sBAAoB,CAAC,EAAE,CAAC;IAChC,CAAC;IAEO,eAAe;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAkC,CAAC;QAC3G,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QACxC,CAAC;IACF,CAAC;;AA3UW,oBAAoB;IA0B9B,WAAA,kBAAkB,CAAA;IAClB,WAAA,cAAc,CAAA;IACd,WAAA,gBAAgB,CAAA;GA5BN,oBAAoB,CA4UhC;;AAED,aAAa,CAAC,uCAAuC,EAAE,uBAAuB,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAsC,EAAE,4DAA4D,CAAC,CAAC,CAAC","file":"parameterHintsWidget.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 * as dom from '../../../../base/browser/dom.js';\nimport * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Event } from '../../../../base/common/event.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { escapeRegExpCharacters } from '../../../../base/common/strings.js';\nimport { assertReturnsDefined } from '../../../../base/common/types.js';\nimport './parameterHints.css';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EDITOR_FONT_DEFAULTS, EditorOption } from '../../../common/config/editorOptions.js';\nimport * as languages from '../../../common/languages.js';\nimport { ILanguageService } from '../../../common/languages/language.js';\nimport { IMarkdownRenderResult, MarkdownRenderer } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';\nimport { ParameterHintsModel } from './parameterHintsModel.js';\nimport { Context } from './provideSignatureHelp.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { listHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst $ = dom.$;\n\nconst parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\nconst parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\n\nexport class ParameterHintsWidget extends Disposable implements IContentWidget {\n\n\tprivate static readonly ID = 'editor.widget.parameterHintsWidget';\n\n\tprivate readonly markdownRenderer: MarkdownRenderer;\n\tprivate readonly renderDisposeables = this._register(new DisposableStore());\n\tprivate readonly keyVisible: IContextKey<boolean>;\n\tprivate readonly keyMultipleSignatures: IContextKey<boolean>;\n\n\tprivate domNodes?: {\n\t\treadonly element: HTMLElement;\n\t\treadonly signature: HTMLElement;\n\t\treadonly docs: HTMLElement;\n\t\treadonly overloads: HTMLElement;\n\t\treadonly scrollbar: DomScrollableElement;\n\t};\n\n\tprivate visible: boolean = false;\n\tprivate announcedLabel: string | null = null;\n\n\t// Editor.IContentWidget.allowEditorOverflow\n\tallowEditorOverflow = true;\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\tprivate readonly model: ParameterHintsModel,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IOpenerService openerService: IOpenerService,\n\t\t@ILanguageService languageService: ILanguageService\n\t) {\n\t\tsuper();\n\n\t\tthis.markdownRenderer = new MarkdownRenderer({ editor }, languageService, openerService);\n\n\t\tthis.keyVisible = Context.Visible.bindTo(contextKeyService);\n\t\tthis.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\n\t}\n\n\tprivate createParameterHintDOMNodes() {\n\t\tconst element = $('.editor-widget.parameter-hints-widget');\n\t\tconst wrapper = dom.append(element, $('.phwrapper'));\n\t\twrapper.tabIndex = -1;\n\n\t\tconst controls = dom.append(wrapper, $('.controls'));\n\t\tconst previous = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\n\t\tconst overloads = dom.append(controls, $('.overloads'));\n\t\tconst next = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\n\n\t\tthis._register(dom.addDisposableListener(previous, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.previous();\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(next, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.next();\n\t\t}));\n\n\t\tconst body = $('.body');\n\t\tconst scrollbar = new DomScrollableElement(body, {\n\t\t\talwaysConsumeMouseWheel: true,\n\t\t});\n\t\tthis._register(scrollbar);\n\t\twrapper.appendChild(scrollbar.getDomNode());\n\n\t\tconst signature = dom.append(body, $('.signature'));\n\t\tconst docs = dom.append(body, $('.docs'));\n\n\t\telement.style.userSelect = 'text';\n\n\t\tthis.domNodes = {\n\t\t\telement,\n\t\t\tsignature,\n\t\t\toverloads,\n\t\t\tdocs,\n\t\t\tscrollbar,\n\t\t};\n\n\t\tthis.editor.addContentWidget(this);\n\t\tthis.hide();\n\n\t\tthis._register(this.editor.onDidChangeCursorSelection(e => {\n\t\t\tif (this.visible) {\n\t\t\t\tthis.editor.layoutContentWidget(this);\n\t\t\t}\n\t\t}));\n\n\t\tconst updateFont = () => {\n\t\t\tif (!this.domNodes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fontInfo = this.editor.getOption(EditorOption.fontInfo);\n\t\t\tconst element = this.domNodes.element;\n\t\t\telement.style.fontSize = `${fontInfo.fontSize}px`;\n\t\t\telement.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`;\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamily', fontInfo.fontFamily);\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamilyDefault', EDITOR_FONT_DEFAULTS.fontFamily);\n\t\t};\n\n\t\tupdateFont();\n\n\t\tthis._register(Event.chain(\n\t\t\tthis.editor.onDidChangeConfiguration.bind(this.editor),\n\t\t\t$ => $.filter(e => e.hasChanged(EditorOption.fontInfo))\n\t\t)(updateFont));\n\n\t\tthis._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\n\t\tthis.updateMaxHeight();\n\t}\n\n\tpublic show(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\n\t\tthis.keyVisible.set(true);\n\t\tthis.visible = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.domNodes?.element.classList.add('visible');\n\t\t}, 100);\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tpublic hide(): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyVisible.reset();\n\t\tthis.visible = false;\n\t\tthis.announcedLabel = null;\n\t\tthis.domNodes?.element.classList.remove('visible');\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (this.visible) {\n\t\t\treturn {\n\t\t\t\tposition: this.editor.getPosition(),\n\t\t\t\tpreference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW]\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic render(hints: languages.SignatureHelp): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst multiple = hints.signatures.length > 1;\n\t\tthis.domNodes.element.classList.toggle('multiple', multiple);\n\t\tthis.keyMultipleSignatures.set(multiple);\n\n\t\tthis.domNodes.signature.innerText = '';\n\t\tthis.domNodes.docs.innerText = '';\n\n\t\tconst signature = hints.signatures[hints.activeSignature];\n\t\tif (!signature) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst code = dom.append(this.domNodes.signature, $('.code'));\n\t\tconst hasParameters = signature.parameters.length > 0;\n\t\tconst activeParameterIndex = signature.activeParameter ?? hints.activeParameter;\n\n\t\tif (!hasParameters) {\n\t\t\tconst label = dom.append(code, $('span'));\n\t\t\tlabel.textContent = signature.label;\n\t\t} else {\n\t\t\tthis.renderParameters(code, signature, activeParameterIndex);\n\t\t}\n\n\t\tconst activeParameter: languages.ParameterInformation | undefined = signature.parameters[activeParameterIndex];\n\t\tif (activeParameter?.documentation) {\n\t\t\tconst documentation = $('span.documentation');\n\t\t\tif (typeof activeParameter.documentation === 'string') {\n\t\t\t\tdocumentation.textContent = activeParameter.documentation;\n\t\t\t} else {\n\t\t\t\tconst renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\n\t\t\t\tdocumentation.appendChild(renderedContents.element);\n\t\t\t}\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, documentation));\n\t\t}\n\n\t\tif (signature.documentation === undefined) {\n\t\t\t/** no op */\n\t\t} else if (typeof signature.documentation === 'string') {\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, signature.documentation));\n\t\t} else {\n\t\t\tconst renderedContents = this.renderMarkdownDocs(signature.documentation);\n\t\t\tdom.append(this.domNodes.docs, renderedContents.element);\n\t\t}\n\n\t\tconst hasDocs = this.hasDocs(signature, activeParameter);\n\n\t\tthis.domNodes.signature.classList.toggle('has-docs', hasDocs);\n\t\tthis.domNodes.docs.classList.toggle('empty', !hasDocs);\n\n\t\tthis.domNodes.overloads.textContent =\n\t\t\tString(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\n\n\t\tif (activeParameter) {\n\t\t\tlet labelToAnnounce = '';\n\t\t\tconst param = signature.parameters[activeParameterIndex];\n\t\t\tif (Array.isArray(param.label)) {\n\t\t\t\tlabelToAnnounce = signature.label.substring(param.label[0], param.label[1]);\n\t\t\t} else {\n\t\t\t\tlabelToAnnounce = param.label;\n\t\t\t}\n\t\t\tif (param.documentation) {\n\t\t\t\tlabelToAnnounce += typeof param.documentation === 'string' ? `, ${param.documentation}` : `, ${param.documentation.value}`;\n\t\t\t}\n\t\t\tif (signature.documentation) {\n\t\t\t\tlabelToAnnounce += typeof signature.documentation === 'string' ? `, ${signature.documentation}` : `, ${signature.documentation.value}`;\n\t\t\t}\n\n\t\t\t// Select method gets called on every user type while parameter hints are visible.\n\t\t\t// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n\n\t\t\tif (this.announcedLabel !== labelToAnnounce) {\n\t\t\t\taria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n\t\t\t\tthis.announcedLabel = labelToAnnounce;\n\t\t\t}\n\t\t}\n\n\t\tthis.editor.layoutContentWidget(this);\n\t\tthis.domNodes.scrollbar.scanDomNode();\n\t}\n\n\tprivate renderMarkdownDocs(markdown: IMarkdownString): IMarkdownRenderResult {\n\t\tconst renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {\n\t\t\tasyncRenderCallback: () => {\n\t\t\t\tthis.domNodes?.scrollbar.scanDomNode();\n\t\t\t}\n\t\t}));\n\t\trenderedContents.element.classList.add('markdown-docs');\n\t\treturn renderedContents;\n\t}\n\n\tprivate hasDocs(signature: languages.SignatureInformation, activeParameter: languages.ParameterInformation | undefined): boolean {\n\t\tif (activeParameter && typeof activeParameter.documentation === 'string' && assertReturnsDefined(activeParameter.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (activeParameter && typeof activeParameter.documentation === 'object' && assertReturnsDefined(activeParameter.documentation).value.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'string' && assertReturnsDefined(signature.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'object' && assertReturnsDefined(signature.documentation.value).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate renderParameters(parent: HTMLElement, signature: languages.SignatureInformation, activeParameterIndex: number): void {\n\t\tconst [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\n\n\t\tconst beforeSpan = document.createElement('span');\n\t\tbeforeSpan.textContent = signature.label.substring(0, start);\n\n\t\tconst paramSpan = document.createElement('span');\n\t\tparamSpan.textContent = signature.label.substring(start, end);\n\t\tparamSpan.className = 'parameter active';\n\n\t\tconst afterSpan = document.createElement('span');\n\t\tafterSpan.textContent = signature.label.substring(end);\n\n\t\tdom.append(parent, beforeSpan, paramSpan, afterSpan);\n\t}\n\n\tprivate getParameterLabelOffsets(signature: languages.SignatureInformation, paramIdx: number): [number, number] {\n\t\tconst param = signature.parameters[paramIdx];\n\t\tif (!param) {\n\t\t\treturn [0, 0];\n\t\t} else if (Array.isArray(param.label)) {\n\t\t\treturn param.label;\n\t\t} else if (!param.label.length) {\n\t\t\treturn [0, 0];\n\t\t} else {\n\t\t\tconst regex = new RegExp(`(\\\\W|^)${escapeRegExpCharacters(param.label)}(?=\\\\W|$)`, 'g');\n\t\t\tregex.test(signature.label);\n\t\t\tconst idx = regex.lastIndex - param.label.length;\n\t\t\treturn idx >= 0\n\t\t\t\t? [idx, regex.lastIndex]\n\t\t\t\t: [0, 0];\n\t\t}\n\t}\n\n\tnext(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.next();\n\t}\n\n\tprevious(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.previous();\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\t\treturn this.domNodes!.element;\n\t}\n\n\tgetId(): string {\n\t\treturn ParameterHintsWidget.ID;\n\t}\n\n\tprivate updateMaxHeight(): void {\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\t\tconst height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\n\t\tconst maxHeight = `${height}px`;\n\t\tthis.domNodes.element.style.maxHeight = maxHeight;\n\t\tconst wrapper = this.domNodes.element.getElementsByClassName('phwrapper') as HTMLCollectionOf<HTMLElement>;\n\t\tif (wrapper.length) {\n\t\t\twrapper[0].style.maxHeight = maxHeight;\n\t\t}\n\t}\n}\n\nregisterColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize('editorHoverWidgetHighlightForeground', 'Foreground color of the active item in the parameter hint.'));\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,IAAI,MAAM,0CAA0C,CAAC;AACjE,OAA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AAC,QAAQ,EAAE,CAAC;IACvB,CAAC;IAED,UAAU;QACT,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACpC,CAAC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,KAAK;QACJ,OAAO,sBAAoB,CAAC,EAAE,CAAC;IAChC,CAAC;IAEO,eAAe;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAkC,CAAC;QAC3G,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QACxC,CAAC;IACF,CAAC;;AA3UW,oBAAoB;IA0B9B,WAAA,kBAAkB,CAAA;IAClB,WAAA,cAAc,CAAA;IACd,WAAA,gBAAgB,CAAA;GA5BN,oBAAoB,CA4UhC;;AAED,aAAa,CAAC,uCAAuC,EAAE,uBAAuB,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAsC,EAAE,4DAA4D,CAAC,CAAC,CAAC","file":"parameterHintsWidget.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 * as dom from '../../../../base/browser/dom.js';\nimport * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Event } from '../../../../base/common/event.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { escapeRegExpCharacters } from '../../../../base/common/strings.js';\nimport { assertReturnsDefined } from '../../../../base/common/types.js';\nimport './parameterHints.css';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';\nimport * as languages from '../../../common/languages.js';\nimport { ILanguageService } from '../../../common/languages/language.js';\nimport { IMarkdownRenderResult, MarkdownRenderer } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';\nimport { ParameterHintsModel } from './parameterHintsModel.js';\nimport { Context } from './provideSignatureHelp.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { listHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst $ = dom.$;\n\nconst parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\nconst parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\n\nexport class ParameterHintsWidget extends Disposable implements IContentWidget {\n\n\tprivate static readonly ID = 'editor.widget.parameterHintsWidget';\n\n\tprivate readonly markdownRenderer: MarkdownRenderer;\n\tprivate readonly renderDisposeables = this._register(new DisposableStore());\n\tprivate readonly keyVisible: IContextKey<boolean>;\n\tprivate readonly keyMultipleSignatures: IContextKey<boolean>;\n\n\tprivate domNodes?: {\n\t\treadonly element: HTMLElement;\n\t\treadonly signature: HTMLElement;\n\t\treadonly docs: HTMLElement;\n\t\treadonly overloads: HTMLElement;\n\t\treadonly scrollbar: DomScrollableElement;\n\t};\n\n\tprivate visible: boolean = false;\n\tprivate announcedLabel: string | null = null;\n\n\t// Editor.IContentWidget.allowEditorOverflow\n\tallowEditorOverflow = true;\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\tprivate readonly model: ParameterHintsModel,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IOpenerService openerService: IOpenerService,\n\t\t@ILanguageService languageService: ILanguageService\n\t) {\n\t\tsuper();\n\n\t\tthis.markdownRenderer = new MarkdownRenderer({ editor }, languageService, openerService);\n\n\t\tthis.keyVisible = Context.Visible.bindTo(contextKeyService);\n\t\tthis.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\n\t}\n\n\tprivate createParameterHintDOMNodes() {\n\t\tconst element = $('.editor-widget.parameter-hints-widget');\n\t\tconst wrapper = dom.append(element, $('.phwrapper'));\n\t\twrapper.tabIndex = -1;\n\n\t\tconst controls = dom.append(wrapper, $('.controls'));\n\t\tconst previous = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\n\t\tconst overloads = dom.append(controls, $('.overloads'));\n\t\tconst next = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\n\n\t\tthis._register(dom.addDisposableListener(previous, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.previous();\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(next, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.next();\n\t\t}));\n\n\t\tconst body = $('.body');\n\t\tconst scrollbar = new DomScrollableElement(body, {\n\t\t\talwaysConsumeMouseWheel: true,\n\t\t});\n\t\tthis._register(scrollbar);\n\t\twrapper.appendChild(scrollbar.getDomNode());\n\n\t\tconst signature = dom.append(body, $('.signature'));\n\t\tconst docs = dom.append(body, $('.docs'));\n\n\t\telement.style.userSelect = 'text';\n\n\t\tthis.domNodes = {\n\t\t\telement,\n\t\t\tsignature,\n\t\t\toverloads,\n\t\t\tdocs,\n\t\t\tscrollbar,\n\t\t};\n\n\t\tthis.editor.addContentWidget(this);\n\t\tthis.hide();\n\n\t\tthis._register(this.editor.onDidChangeCursorSelection(e => {\n\t\t\tif (this.visible) {\n\t\t\t\tthis.editor.layoutContentWidget(this);\n\t\t\t}\n\t\t}));\n\n\t\tconst updateFont = () => {\n\t\t\tif (!this.domNodes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fontInfo = this.editor.getOption(EditorOption.fontInfo);\n\t\t\tconst element = this.domNodes.element;\n\t\t\telement.style.fontSize = `${fontInfo.fontSize}px`;\n\t\t\telement.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`;\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamily', fontInfo.fontFamily);\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamilyDefault', EDITOR_FONT_DEFAULTS.fontFamily);\n\t\t};\n\n\t\tupdateFont();\n\n\t\tthis._register(Event.chain(\n\t\t\tthis.editor.onDidChangeConfiguration.bind(this.editor),\n\t\t\t$ => $.filter(e => e.hasChanged(EditorOption.fontInfo))\n\t\t)(updateFont));\n\n\t\tthis._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\n\t\tthis.updateMaxHeight();\n\t}\n\n\tpublic show(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\n\t\tthis.keyVisible.set(true);\n\t\tthis.visible = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.domNodes?.element.classList.add('visible');\n\t\t}, 100);\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tpublic hide(): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyVisible.reset();\n\t\tthis.visible = false;\n\t\tthis.announcedLabel = null;\n\t\tthis.domNodes?.element.classList.remove('visible');\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (this.visible) {\n\t\t\treturn {\n\t\t\t\tposition: this.editor.getPosition(),\n\t\t\t\tpreference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW]\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic render(hints: languages.SignatureHelp): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst multiple = hints.signatures.length > 1;\n\t\tthis.domNodes.element.classList.toggle('multiple', multiple);\n\t\tthis.keyMultipleSignatures.set(multiple);\n\n\t\tthis.domNodes.signature.innerText = '';\n\t\tthis.domNodes.docs.innerText = '';\n\n\t\tconst signature = hints.signatures[hints.activeSignature];\n\t\tif (!signature) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst code = dom.append(this.domNodes.signature, $('.code'));\n\t\tconst hasParameters = signature.parameters.length > 0;\n\t\tconst activeParameterIndex = signature.activeParameter ?? hints.activeParameter;\n\n\t\tif (!hasParameters) {\n\t\t\tconst label = dom.append(code, $('span'));\n\t\t\tlabel.textContent = signature.label;\n\t\t} else {\n\t\t\tthis.renderParameters(code, signature, activeParameterIndex);\n\t\t}\n\n\t\tconst activeParameter: languages.ParameterInformation | undefined = signature.parameters[activeParameterIndex];\n\t\tif (activeParameter?.documentation) {\n\t\t\tconst documentation = $('span.documentation');\n\t\t\tif (typeof activeParameter.documentation === 'string') {\n\t\t\t\tdocumentation.textContent = activeParameter.documentation;\n\t\t\t} else {\n\t\t\t\tconst renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\n\t\t\t\tdocumentation.appendChild(renderedContents.element);\n\t\t\t}\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, documentation));\n\t\t}\n\n\t\tif (signature.documentation === undefined) {\n\t\t\t/** no op */\n\t\t} else if (typeof signature.documentation === 'string') {\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, signature.documentation));\n\t\t} else {\n\t\t\tconst renderedContents = this.renderMarkdownDocs(signature.documentation);\n\t\t\tdom.append(this.domNodes.docs, renderedContents.element);\n\t\t}\n\n\t\tconst hasDocs = this.hasDocs(signature, activeParameter);\n\n\t\tthis.domNodes.signature.classList.toggle('has-docs', hasDocs);\n\t\tthis.domNodes.docs.classList.toggle('empty', !hasDocs);\n\n\t\tthis.domNodes.overloads.textContent =\n\t\t\tString(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\n\n\t\tif (activeParameter) {\n\t\t\tlet labelToAnnounce = '';\n\t\t\tconst param = signature.parameters[activeParameterIndex];\n\t\t\tif (Array.isArray(param.label)) {\n\t\t\t\tlabelToAnnounce = signature.label.substring(param.label[0], param.label[1]);\n\t\t\t} else {\n\t\t\t\tlabelToAnnounce = param.label;\n\t\t\t}\n\t\t\tif (param.documentation) {\n\t\t\t\tlabelToAnnounce += typeof param.documentation === 'string' ? `, ${param.documentation}` : `, ${param.documentation.value}`;\n\t\t\t}\n\t\t\tif (signature.documentation) {\n\t\t\t\tlabelToAnnounce += typeof signature.documentation === 'string' ? `, ${signature.documentation}` : `, ${signature.documentation.value}`;\n\t\t\t}\n\n\t\t\t// Select method gets called on every user type while parameter hints are visible.\n\t\t\t// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n\n\t\t\tif (this.announcedLabel !== labelToAnnounce) {\n\t\t\t\taria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n\t\t\t\tthis.announcedLabel = labelToAnnounce;\n\t\t\t}\n\t\t}\n\n\t\tthis.editor.layoutContentWidget(this);\n\t\tthis.domNodes.scrollbar.scanDomNode();\n\t}\n\n\tprivate renderMarkdownDocs(markdown: IMarkdownString): IMarkdownRenderResult {\n\t\tconst renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {\n\t\t\tasyncRenderCallback: () => {\n\t\t\t\tthis.domNodes?.scrollbar.scanDomNode();\n\t\t\t}\n\t\t}));\n\t\trenderedContents.element.classList.add('markdown-docs');\n\t\treturn renderedContents;\n\t}\n\n\tprivate hasDocs(signature: languages.SignatureInformation, activeParameter: languages.ParameterInformation | undefined): boolean {\n\t\tif (activeParameter && typeof activeParameter.documentation === 'string' && assertReturnsDefined(activeParameter.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (activeParameter && typeof activeParameter.documentation === 'object' && assertReturnsDefined(activeParameter.documentation).value.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'string' && assertReturnsDefined(signature.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'object' && assertReturnsDefined(signature.documentation.value).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate renderParameters(parent: HTMLElement, signature: languages.SignatureInformation, activeParameterIndex: number): void {\n\t\tconst [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\n\n\t\tconst beforeSpan = document.createElement('span');\n\t\tbeforeSpan.textContent = signature.label.substring(0, start);\n\n\t\tconst paramSpan = document.createElement('span');\n\t\tparamSpan.textContent = signature.label.substring(start, end);\n\t\tparamSpan.className = 'parameter active';\n\n\t\tconst afterSpan = document.createElement('span');\n\t\tafterSpan.textContent = signature.label.substring(end);\n\n\t\tdom.append(parent, beforeSpan, paramSpan, afterSpan);\n\t}\n\n\tprivate getParameterLabelOffsets(signature: languages.SignatureInformation, paramIdx: number): [number, number] {\n\t\tconst param = signature.parameters[paramIdx];\n\t\tif (!param) {\n\t\t\treturn [0, 0];\n\t\t} else if (Array.isArray(param.label)) {\n\t\t\treturn param.label;\n\t\t} else if (!param.label.length) {\n\t\t\treturn [0, 0];\n\t\t} else {\n\t\t\tconst regex = new RegExp(`(\\\\W|^)${escapeRegExpCharacters(param.label)}(?=\\\\W|$)`, 'g');\n\t\t\tregex.test(signature.label);\n\t\t\tconst idx = regex.lastIndex - param.label.length;\n\t\t\treturn idx >= 0\n\t\t\t\t? [idx, regex.lastIndex]\n\t\t\t\t: [0, 0];\n\t\t}\n\t}\n\n\tnext(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.next();\n\t}\n\n\tprevious(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.previous();\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\t\treturn this.domNodes!.element;\n\t}\n\n\tgetId(): string {\n\t\treturn ParameterHintsWidget.ID;\n\t}\n\n\tprivate updateMaxHeight(): void {\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\t\tconst height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\n\t\tconst maxHeight = `${height}px`;\n\t\tthis.domNodes.element.style.maxHeight = maxHeight;\n\t\tconst wrapper = this.domNodes.element.getElementsByClassName('phwrapper') as HTMLCollectionOf<HTMLElement>;\n\t\tif (wrapper.length) {\n\t\t\twrapper[0].style.maxHeight = maxHeight;\n\t\t}\n\t}\n}\n\nregisterColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize('editorHoverWidgetHighlightForeground', 'Foreground color of the active item in the parameter hint.'));\n"]}