claude-flow-novice 2.0.3 → 2.0.5

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 (228) hide show
  1. package/dist/src/cli/commands/swarm.js +1 -1
  2. package/dist/src/cli/main.js +1 -1
  3. package/dist/src/coordination/byzantine-memory-channels.js +25 -1
  4. package/dist/src/index.js +384 -35
  5. package/dist/src/utils/error-handler.js +2 -36
  6. package/dist/src/web/api/apm-routes.js +353 -0
  7. package/dist/src/web/api/config/api-config.js +184 -0
  8. package/dist/src/web/api/middleware/auth.js +203 -0
  9. package/dist/src/web/api/middleware/cache.js +273 -0
  10. package/dist/src/web/api/middleware/error-handler.js +257 -0
  11. package/dist/src/web/api/middleware/request-logger.js +215 -0
  12. package/dist/src/web/api/middleware/validation.js +323 -0
  13. package/dist/src/web/api/routes/events.js +463 -0
  14. package/dist/src/web/api/routes/hierarchy.js +300 -0
  15. package/dist/src/web/api/routes/index.js +12 -0
  16. package/dist/src/web/api/routes/metrics.js +559 -0
  17. package/dist/src/web/api/routes/parallel-status.js +359 -0
  18. package/dist/src/web/api/routes/status.js +448 -0
  19. package/dist/src/web/api/server.js +462 -0
  20. package/dist/src/web/dashboard/hooks/useWebSocket.js +383 -0
  21. package/dist/src/web/dashboard/index.js +85 -0
  22. package/dist/src/web/dashboard/realtime/CustomSyncManager.js +439 -0
  23. package/dist/src/web/dashboard/realtime/NativeWebSocketManager.js +323 -0
  24. package/dist/src/web/dashboard/realtime/PerformanceBenchmark.js +527 -0
  25. package/dist/src/web/dashboard/realtime/RealtimeCommunicationManager.js +474 -0
  26. package/dist/src/web/dashboard/realtime/RealtimeServer.js +666 -0
  27. package/dist/src/web/dashboard/realtime/SSEManager.js +426 -0
  28. package/dist/src/web/dashboard/types.js +4 -0
  29. package/dist/src/web/messaging/agent-status-tracker.js +453 -0
  30. package/dist/src/web/messaging/human-intervention-system.js +305 -0
  31. package/dist/src/web/messaging/message-filter.js +302 -0
  32. package/dist/src/web/messaging/swarm-message-router.js +324 -0
  33. package/dist/src/web/messaging/transparency-logger.js +421 -0
  34. package/dist/src/web/portal-server.js +460 -0
  35. package/dist/src/web/server.js +322 -0
  36. package/dist/src/web/websocket/apm-websocket-handler.js +453 -0
  37. package/dist/src/web/websocket/websocket-manager.js +780 -0
  38. package/package.json +6 -4
  39. package/dist/src/cli/minimal-main.js +0 -22
  40. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +0 -23
  41. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +0 -57
  42. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +0 -401
  43. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +0 -181
  44. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +0 -44
  45. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +0 -157
  46. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js +0 -71
  47. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/editorState/browser/editorState.js +0 -112
  48. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findController.js +0 -990
  49. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findDecorations.js +0 -296
  50. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findModel.js +0 -488
  51. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +0 -138
  52. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findState.js +0 -243
  53. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findWidget.js +0 -1177
  54. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/folding.js +0 -1093
  55. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +0 -133
  56. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingModel.js +0 -538
  57. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingRanges.js +0 -351
  58. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +0 -49
  59. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/format.js +0 -360
  60. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formatActions.js +0 -263
  61. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formattingEdit.js +0 -54
  62. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +0 -149
  63. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/hover/browser/contentHover.js +0 -874
  64. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js +0 -7
  65. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commands.js +0 -199
  66. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +0 -70
  67. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -26
  68. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +0 -153
  69. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +0 -33
  70. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +0 -354
  71. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js +0 -146
  72. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/suggest/browser/completionModel.js +0 -224
  73. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +0 -119
  74. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/edcore.main.js +0 -14
  75. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.all.js +0 -63
  76. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.api.js +0 -55
  77. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.main.js +0 -7
  78. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.worker.js +0 -25
  79. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/standalone/browser/colorizer.js +0 -118
  80. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/css.worker.js +0 -36869
  81. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js +0 -2035
  82. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
  83. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
  84. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
  85. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
  86. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
  87. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
  88. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
  89. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
  90. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
  91. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
  92. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
  93. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
  94. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
  95. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
  96. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
  97. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
  98. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
  99. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
  100. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
  101. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
  102. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
  103. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
  104. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
  105. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
  106. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
  107. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
  108. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
  109. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
  110. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
  111. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
  112. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
  113. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
  114. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
  115. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
  116. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
  117. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
  118. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
  119. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
  120. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
  121. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
  122. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
  123. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
  124. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cameligo/cameligo.js +0 -10
  125. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/clojure/clojure.js +0 -10
  126. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/coffee/coffee.js +0 -10
  127. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cpp/cpp.js +0 -10
  128. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csharp/csharp.js +0 -10
  129. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csp/csp.js +0 -10
  130. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/css/css.js +0 -12
  131. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cypher/cypher.js +0 -10
  132. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dart/dart.js +0 -10
  133. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dockerfile/dockerfile.js +0 -10
  134. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/ecl/ecl.js +0 -10
  135. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/elixir/elixir.js +0 -10
  136. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/flow9/flow9.js +0 -10
  137. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.js +0 -745
  138. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.de.js +0 -31
  139. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.es.js +0 -31
  140. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.fr.js +0 -29
  141. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.it.js +0 -29
  142. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ja.js +0 -31
  143. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.js +0 -29
  144. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ko.js +0 -29
  145. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ru.js +0 -31
  146. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-cn.js +0 -31
  147. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-tw.js +0 -29
  148. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssMode.js +0 -13
  149. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssWorker.js +0 -81
  150. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/cli.js +0 -64
  151. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/example.js +0 -36
  152. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/index.js +0 -205
  153. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/test.js +0 -260
  154. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.browser.js +0 -34
  155. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.js +0 -35
  156. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.native.js +0 -26
  157. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.browser.js +0 -34
  158. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.js +0 -45
  159. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/nanoid.js +0 -1
  160. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/non-secure/index.js +0 -21
  161. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/url-alphabet/index.js +0 -3
  162. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/bin/nodemon.js +0 -16
  163. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/index.js +0 -49
  164. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/parse.js +0 -230
  165. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/command.js +0 -43
  166. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/defaults.js +0 -34
  167. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/exec.js +0 -234
  168. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/index.js +0 -93
  169. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/load.js +0 -225
  170. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/help/index.js +0 -27
  171. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/index.js +0 -1
  172. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/index.js +0 -4
  173. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/match.js +0 -287
  174. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/run.js +0 -562
  175. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/signals.js +0 -34
  176. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/watch.js +0 -244
  177. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/nodemon.js +0 -317
  178. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/add.js +0 -89
  179. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/index.js +0 -53
  180. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/parse.js +0 -43
  181. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/spawn.js +0 -74
  182. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/bus.js +0 -44
  183. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/clone.js +0 -40
  184. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/colour.js +0 -26
  185. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/index.js +0 -103
  186. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/log.js +0 -82
  187. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/merge.js +0 -47
  188. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/version.js +0 -100
  189. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/brace-expansion/index.js +0 -201
  190. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/has-flag/index.js +0 -8
  191. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/minimatch/minimatch.js +0 -947
  192. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/browser.js +0 -5
  193. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js +0 -131
  194. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/bin/pidtree.js +0 -128
  195. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/index.js +0 -49
  196. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/bin.js +0 -61
  197. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/get.js +0 -45
  198. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/pidtree.js +0 -104
  199. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/ps.js +0 -47
  200. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/wmic.js +0 -49
  201. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/doc.js +0 -1270
  202. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/acorn.js +0 -15
  203. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/angular.js +0 -2
  204. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/babel.js +0 -15
  205. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/estree.js +0 -36
  206. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/flow.js +0 -19
  207. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/glimmer.js +0 -29
  208. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/graphql.js +0 -29
  209. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/html.js +0 -22
  210. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/markdown.js +0 -63
  211. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/meriyah.js +0 -4
  212. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/postcss.js +0 -54
  213. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/typescript.js +0 -20
  214. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/yaml.js +0 -160
  215. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/standalone.js +0 -34
  216. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/bin/react-scripts.js +0 -58
  217. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/env.js +0 -112
  218. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/getHttpsConfig.js +0 -74
  219. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/babelTransform.js +0 -37
  220. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/cssTransform.js +0 -22
  221. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/fileTransform.js +0 -40
  222. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/modules.js +0 -142
  223. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/paths.js +0 -153
  224. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
  225. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack.config.js +0 -796
  226. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpackDevServer.config.js +0 -135
  227. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/build.js +0 -225
  228. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/eject.js +0 -340
@@ -1,874 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
6
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
- return c > 3 && r && Object.defineProperty(target, key, r), r;
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var ContentHoverController_1, ContentHoverWidget_1;
15
- import * as dom from '../../../../base/browser/dom.js';
16
- import { HoverAction, HoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';
17
- import { coalesce } from '../../../../base/common/arrays.js';
18
- import { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
19
- import { Position } from '../../../common/core/position.js';
20
- import { Range } from '../../../common/core/range.js';
21
- import { ModelDecorationOptions } from '../../../common/model/textModel.js';
22
- import { TokenizationRegistry } from '../../../common/languages.js';
23
- import { HoverOperation } from './hoverOperation.js';
24
- import { HoverParticipantRegistry, HoverRangeAnchor } from './hoverTypes.js';
25
- import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
26
- import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
27
- import { AsyncIterableObject } from '../../../../base/common/async.js';
28
- import { EditorContextKeys } from '../../../common/editorContextKeys.js';
29
- import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
30
- import { ResizableContentWidget } from './resizableContentWidget.js';
31
- import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
32
- import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';
33
- const $ = dom.$;
34
- let ContentHoverController = ContentHoverController_1 = class ContentHoverController extends Disposable {
35
- constructor(_editor, _instantiationService, _keybindingService) {
36
- super();
37
- this._editor = _editor;
38
- this._instantiationService = _instantiationService;
39
- this._keybindingService = _keybindingService;
40
- this._currentResult = null;
41
- this._widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));
42
- // Instantiate participants and sort them by `hoverOrdinal` which is relevant for rendering order.
43
- this._participants = [];
44
- for (const participant of HoverParticipantRegistry.getAll()) {
45
- this._participants.push(this._instantiationService.createInstance(participant, this._editor));
46
- }
47
- this._participants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);
48
- this._computer = new ContentHoverComputer(this._editor, this._participants);
49
- this._hoverOperation = this._register(new HoverOperation(this._editor, this._computer));
50
- this._register(this._hoverOperation.onResult((result) => {
51
- if (!this._computer.anchor) {
52
- // invalid state, ignore result
53
- return;
54
- }
55
- const messages = (result.hasLoadingMessage ? this._addLoadingMessage(result.value) : result.value);
56
- this._withResult(new HoverResult(this._computer.anchor, messages, result.isComplete));
57
- }));
58
- this._register(dom.addStandardDisposableListener(this._widget.getDomNode(), 'keydown', (e) => {
59
- if (e.equals(9 /* KeyCode.Escape */)) {
60
- this.hide();
61
- }
62
- }));
63
- this._register(TokenizationRegistry.onDidChange(() => {
64
- if (this._widget.position && this._currentResult) {
65
- this._setCurrentResult(this._currentResult); // render again
66
- }
67
- }));
68
- }
69
- get widget() {
70
- return this._widget;
71
- }
72
- /**
73
- * Returns true if the hover shows now or will show.
74
- */
75
- maybeShowAt(mouseEvent) {
76
- if (this._widget.isResizing) {
77
- return true;
78
- }
79
- const anchorCandidates = [];
80
- for (const participant of this._participants) {
81
- if (participant.suggestHoverAnchor) {
82
- const anchor = participant.suggestHoverAnchor(mouseEvent);
83
- if (anchor) {
84
- anchorCandidates.push(anchor);
85
- }
86
- }
87
- }
88
- const target = mouseEvent.target;
89
- if (target.type === 6 /* MouseTargetType.CONTENT_TEXT */) {
90
- anchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));
91
- }
92
- if (target.type === 7 /* MouseTargetType.CONTENT_EMPTY */) {
93
- const epsilon = this._editor.getOption(50 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth / 2;
94
- if (!target.detail.isAfterLines && typeof target.detail.horizontalDistanceToText === 'number' && target.detail.horizontalDistanceToText < epsilon) {
95
- // Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough
96
- anchorCandidates.push(new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy));
97
- }
98
- }
99
- if (anchorCandidates.length === 0) {
100
- return this._startShowingOrUpdateHover(null, 0 /* HoverStartMode.Delayed */, 0 /* HoverStartSource.Mouse */, false, mouseEvent);
101
- }
102
- anchorCandidates.sort((a, b) => b.priority - a.priority);
103
- return this._startShowingOrUpdateHover(anchorCandidates[0], 0 /* HoverStartMode.Delayed */, 0 /* HoverStartSource.Mouse */, false, mouseEvent);
104
- }
105
- startShowingAtRange(range, mode, source, focus) {
106
- this._startShowingOrUpdateHover(new HoverRangeAnchor(0, range, undefined, undefined), mode, source, focus, null);
107
- }
108
- /**
109
- * Returns true if the hover shows now or will show.
110
- */
111
- _startShowingOrUpdateHover(anchor, mode, source, focus, mouseEvent) {
112
- if (!this._widget.position || !this._currentResult) {
113
- // The hover is not visible
114
- if (anchor) {
115
- this._startHoverOperationIfNecessary(anchor, mode, source, focus, false);
116
- return true;
117
- }
118
- return false;
119
- }
120
- // The hover is currently visible
121
- const hoverIsSticky = this._editor.getOption(60 /* EditorOption.hover */).sticky;
122
- const isGettingCloser = (hoverIsSticky && mouseEvent && this._widget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy));
123
- if (isGettingCloser) {
124
- // The mouse is getting closer to the hover, so we will keep the hover untouched
125
- // But we will kick off a hover update at the new anchor, insisting on keeping the hover visible.
126
- if (anchor) {
127
- this._startHoverOperationIfNecessary(anchor, mode, source, focus, true);
128
- }
129
- return true;
130
- }
131
- if (!anchor) {
132
- this._setCurrentResult(null);
133
- return false;
134
- }
135
- if (anchor && this._currentResult.anchor.equals(anchor)) {
136
- // The widget is currently showing results for the exact same anchor, so no update is needed
137
- return true;
138
- }
139
- if (!anchor.canAdoptVisibleHover(this._currentResult.anchor, this._widget.position)) {
140
- // The new anchor is not compatible with the previous anchor
141
- this._setCurrentResult(null);
142
- this._startHoverOperationIfNecessary(anchor, mode, source, focus, false);
143
- return true;
144
- }
145
- // We aren't getting any closer to the hover, so we will filter existing results
146
- // and keep those which also apply to the new anchor.
147
- this._setCurrentResult(this._currentResult.filter(anchor));
148
- this._startHoverOperationIfNecessary(anchor, mode, source, focus, false);
149
- return true;
150
- }
151
- _startHoverOperationIfNecessary(anchor, mode, source, focus, insistOnKeepingHoverVisible) {
152
- if (this._computer.anchor && this._computer.anchor.equals(anchor)) {
153
- // We have to start a hover operation at the exact same anchor as before, so no work is needed
154
- return;
155
- }
156
- this._hoverOperation.cancel();
157
- this._computer.anchor = anchor;
158
- this._computer.shouldFocus = focus;
159
- this._computer.source = source;
160
- this._computer.insistOnKeepingHoverVisible = insistOnKeepingHoverVisible;
161
- this._hoverOperation.start(mode);
162
- }
163
- _setCurrentResult(hoverResult) {
164
- if (this._currentResult === hoverResult) {
165
- // avoid updating the DOM to avoid resetting the user selection
166
- return;
167
- }
168
- if (hoverResult && hoverResult.messages.length === 0) {
169
- hoverResult = null;
170
- }
171
- this._currentResult = hoverResult;
172
- if (this._currentResult) {
173
- this._renderMessages(this._currentResult.anchor, this._currentResult.messages);
174
- }
175
- else {
176
- this._widget.hide();
177
- }
178
- }
179
- hide() {
180
- this._computer.anchor = null;
181
- this._hoverOperation.cancel();
182
- this._setCurrentResult(null);
183
- }
184
- get isColorPickerVisible() {
185
- return this._widget.isColorPickerVisible;
186
- }
187
- get isVisibleFromKeyboard() {
188
- return this._widget.isVisibleFromKeyboard;
189
- }
190
- get isVisible() {
191
- return this._widget.isVisible;
192
- }
193
- get isFocused() {
194
- return this._widget.isFocused;
195
- }
196
- get isResizing() {
197
- return this._widget.isResizing;
198
- }
199
- containsNode(node) {
200
- return (node ? this._widget.getDomNode().contains(node) : false);
201
- }
202
- _addLoadingMessage(result) {
203
- if (this._computer.anchor) {
204
- for (const participant of this._participants) {
205
- if (participant.createLoadingMessage) {
206
- const loadingMessage = participant.createLoadingMessage(this._computer.anchor);
207
- if (loadingMessage) {
208
- return result.slice(0).concat([loadingMessage]);
209
- }
210
- }
211
- }
212
- }
213
- return result;
214
- }
215
- _withResult(hoverResult) {
216
- if (this._widget.position && this._currentResult && this._currentResult.isComplete) {
217
- // The hover is visible with a previous complete result.
218
- if (!hoverResult.isComplete) {
219
- // Instead of rendering the new partial result, we wait for the result to be complete.
220
- return;
221
- }
222
- if (this._computer.insistOnKeepingHoverVisible && hoverResult.messages.length === 0) {
223
- // The hover would now hide normally, so we'll keep the previous messages
224
- return;
225
- }
226
- }
227
- this._setCurrentResult(hoverResult);
228
- }
229
- _renderMessages(anchor, messages) {
230
- const { showAtPosition, showAtSecondaryPosition, highlightRange } = ContentHoverController_1.computeHoverRanges(this._editor, anchor.range, messages);
231
- const disposables = new DisposableStore();
232
- const statusBar = disposables.add(new EditorHoverStatusBar(this._keybindingService));
233
- const fragment = document.createDocumentFragment();
234
- let colorPicker = null;
235
- const context = {
236
- fragment,
237
- statusBar,
238
- setColorPicker: (widget) => colorPicker = widget,
239
- onContentsChanged: () => this._widget.onContentsChanged(),
240
- setMinimumDimensions: (dimensions) => this._widget.setMinimumDimensions(dimensions),
241
- hide: () => this.hide()
242
- };
243
- for (const participant of this._participants) {
244
- const hoverParts = messages.filter(msg => msg.owner === participant);
245
- if (hoverParts.length > 0) {
246
- disposables.add(participant.renderHoverParts(context, hoverParts));
247
- }
248
- }
249
- const isBeforeContent = messages.some(m => m.isBeforeContent);
250
- if (statusBar.hasContent) {
251
- fragment.appendChild(statusBar.hoverElement);
252
- }
253
- if (fragment.hasChildNodes()) {
254
- if (highlightRange) {
255
- const highlightDecoration = this._editor.createDecorationsCollection();
256
- highlightDecoration.set([{
257
- range: highlightRange,
258
- options: ContentHoverController_1._DECORATION_OPTIONS
259
- }]);
260
- disposables.add(toDisposable(() => {
261
- highlightDecoration.clear();
262
- }));
263
- }
264
- this._widget.showAt(fragment, new ContentHoverVisibleData(colorPicker, showAtPosition, showAtSecondaryPosition, this._editor.getOption(60 /* EditorOption.hover */).above, this._computer.shouldFocus, this._computer.source, isBeforeContent, anchor.initialMousePosX, anchor.initialMousePosY, disposables));
265
- }
266
- else {
267
- disposables.dispose();
268
- }
269
- }
270
- static computeHoverRanges(editor, anchorRange, messages) {
271
- let startColumnBoundary = 1;
272
- if (editor.hasModel()) {
273
- // Ensure the range is on the current view line
274
- const viewModel = editor._getViewModel();
275
- const coordinatesConverter = viewModel.coordinatesConverter;
276
- const anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);
277
- const anchorViewRangeStart = new Position(anchorViewRange.startLineNumber, viewModel.getLineMinColumn(anchorViewRange.startLineNumber));
278
- startColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;
279
- }
280
- // The anchor range is always on a single line
281
- const anchorLineNumber = anchorRange.startLineNumber;
282
- let renderStartColumn = anchorRange.startColumn;
283
- let highlightRange = messages[0].range;
284
- let forceShowAtRange = null;
285
- for (const msg of messages) {
286
- highlightRange = Range.plusRange(highlightRange, msg.range);
287
- if (msg.range.startLineNumber === anchorLineNumber && msg.range.endLineNumber === anchorLineNumber) {
288
- // this message has a range that is completely sitting on the line of the anchor
289
- renderStartColumn = Math.max(Math.min(renderStartColumn, msg.range.startColumn), startColumnBoundary);
290
- }
291
- if (msg.forceShowAtRange) {
292
- forceShowAtRange = msg.range;
293
- }
294
- }
295
- return {
296
- showAtPosition: forceShowAtRange ? forceShowAtRange.getStartPosition() : new Position(anchorLineNumber, anchorRange.startColumn),
297
- showAtSecondaryPosition: forceShowAtRange ? forceShowAtRange.getStartPosition() : new Position(anchorLineNumber, renderStartColumn),
298
- highlightRange
299
- };
300
- }
301
- focus() {
302
- this._widget.focus();
303
- }
304
- scrollUp() {
305
- this._widget.scrollUp();
306
- }
307
- scrollDown() {
308
- this._widget.scrollDown();
309
- }
310
- scrollLeft() {
311
- this._widget.scrollLeft();
312
- }
313
- scrollRight() {
314
- this._widget.scrollRight();
315
- }
316
- pageUp() {
317
- this._widget.pageUp();
318
- }
319
- pageDown() {
320
- this._widget.pageDown();
321
- }
322
- goToTop() {
323
- this._widget.goToTop();
324
- }
325
- goToBottom() {
326
- this._widget.goToBottom();
327
- }
328
- };
329
- ContentHoverController._DECORATION_OPTIONS = ModelDecorationOptions.register({
330
- description: 'content-hover-highlight',
331
- className: 'hoverHighlight'
332
- });
333
- ContentHoverController = ContentHoverController_1 = __decorate([
334
- __param(1, IInstantiationService),
335
- __param(2, IKeybindingService)
336
- ], ContentHoverController);
337
- export { ContentHoverController };
338
- class HoverResult {
339
- constructor(anchor, messages, isComplete) {
340
- this.anchor = anchor;
341
- this.messages = messages;
342
- this.isComplete = isComplete;
343
- }
344
- filter(anchor) {
345
- const filteredMessages = this.messages.filter((m) => m.isValidForHoverAnchor(anchor));
346
- if (filteredMessages.length === this.messages.length) {
347
- return this;
348
- }
349
- return new FilteredHoverResult(this, this.anchor, filteredMessages, this.isComplete);
350
- }
351
- }
352
- class FilteredHoverResult extends HoverResult {
353
- constructor(original, anchor, messages, isComplete) {
354
- super(anchor, messages, isComplete);
355
- this.original = original;
356
- }
357
- filter(anchor) {
358
- return this.original.filter(anchor);
359
- }
360
- }
361
- class ContentHoverVisibleData {
362
- constructor(colorPicker, showAtPosition, showAtSecondaryPosition, preferAbove, stoleFocus, source, isBeforeContent, initialMousePosX, initialMousePosY, disposables) {
363
- this.colorPicker = colorPicker;
364
- this.showAtPosition = showAtPosition;
365
- this.showAtSecondaryPosition = showAtSecondaryPosition;
366
- this.preferAbove = preferAbove;
367
- this.stoleFocus = stoleFocus;
368
- this.source = source;
369
- this.isBeforeContent = isBeforeContent;
370
- this.initialMousePosX = initialMousePosX;
371
- this.initialMousePosY = initialMousePosY;
372
- this.disposables = disposables;
373
- this.closestMouseDistance = undefined;
374
- }
375
- }
376
- const HORIZONTAL_SCROLLING_BY = 30;
377
- const SCROLLBAR_WIDTH = 10;
378
- const CONTAINER_HEIGHT_PADDING = 6;
379
- let ContentHoverWidget = ContentHoverWidget_1 = class ContentHoverWidget extends ResizableContentWidget {
380
- get isColorPickerVisible() {
381
- var _a;
382
- return Boolean((_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.colorPicker);
383
- }
384
- get isVisibleFromKeyboard() {
385
- var _a;
386
- return (((_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.source) === 1 /* HoverStartSource.Keyboard */);
387
- }
388
- get isVisible() {
389
- var _a;
390
- return (_a = this._hoverVisibleKey.get()) !== null && _a !== void 0 ? _a : false;
391
- }
392
- get isFocused() {
393
- var _a;
394
- return (_a = this._hoverFocusedKey.get()) !== null && _a !== void 0 ? _a : false;
395
- }
396
- constructor(editor, contextKeyService, _configurationService, _accessibilityService, _keybindingService) {
397
- const minimumHeight = editor.getOption(66 /* EditorOption.lineHeight */) + 8;
398
- const minimumWidth = 150;
399
- const minimumSize = new dom.Dimension(minimumWidth, minimumHeight);
400
- super(editor, minimumSize);
401
- this._configurationService = _configurationService;
402
- this._accessibilityService = _accessibilityService;
403
- this._keybindingService = _keybindingService;
404
- this._hover = this._register(new HoverWidget());
405
- this._minimumSize = minimumSize;
406
- this._hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(contextKeyService);
407
- this._hoverFocusedKey = EditorContextKeys.hoverFocused.bindTo(contextKeyService);
408
- dom.append(this._resizableNode.domNode, this._hover.containerDomNode);
409
- this._resizableNode.domNode.style.zIndex = '50';
410
- this._register(this._editor.onDidLayoutChange(() => {
411
- if (this.isVisible) {
412
- this._updateMaxDimensions();
413
- }
414
- }));
415
- this._register(this._editor.onDidChangeConfiguration((e) => {
416
- if (e.hasChanged(50 /* EditorOption.fontInfo */)) {
417
- this._updateFont();
418
- }
419
- }));
420
- const focusTracker = this._register(dom.trackFocus(this._resizableNode.domNode));
421
- this._register(focusTracker.onDidFocus(() => {
422
- this._hoverFocusedKey.set(true);
423
- }));
424
- this._register(focusTracker.onDidBlur(() => {
425
- this._hoverFocusedKey.set(false);
426
- }));
427
- this._setHoverData(undefined);
428
- this._editor.addContentWidget(this);
429
- }
430
- dispose() {
431
- var _a;
432
- super.dispose();
433
- (_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.disposables.dispose();
434
- this._editor.removeContentWidget(this);
435
- }
436
- getId() {
437
- return ContentHoverWidget_1.ID;
438
- }
439
- static _applyDimensions(container, width, height) {
440
- const transformedWidth = typeof width === 'number' ? `${width}px` : width;
441
- const transformedHeight = typeof height === 'number' ? `${height}px` : height;
442
- container.style.width = transformedWidth;
443
- container.style.height = transformedHeight;
444
- }
445
- _setContentsDomNodeDimensions(width, height) {
446
- const contentsDomNode = this._hover.contentsDomNode;
447
- return ContentHoverWidget_1._applyDimensions(contentsDomNode, width, height);
448
- }
449
- _setContainerDomNodeDimensions(width, height) {
450
- const containerDomNode = this._hover.containerDomNode;
451
- return ContentHoverWidget_1._applyDimensions(containerDomNode, width, height);
452
- }
453
- _setHoverWidgetDimensions(width, height) {
454
- this._setContentsDomNodeDimensions(width, height);
455
- this._setContainerDomNodeDimensions(width, height);
456
- this._layoutContentWidget();
457
- }
458
- static _applyMaxDimensions(container, width, height) {
459
- const transformedWidth = typeof width === 'number' ? `${width}px` : width;
460
- const transformedHeight = typeof height === 'number' ? `${height}px` : height;
461
- container.style.maxWidth = transformedWidth;
462
- container.style.maxHeight = transformedHeight;
463
- }
464
- _setHoverWidgetMaxDimensions(width, height) {
465
- ContentHoverWidget_1._applyMaxDimensions(this._hover.contentsDomNode, width, height);
466
- ContentHoverWidget_1._applyMaxDimensions(this._hover.containerDomNode, width, height);
467
- this._hover.containerDomNode.style.setProperty('--vscode-hover-maxWidth', typeof width === 'number' ? `${width}px` : width);
468
- this._layoutContentWidget();
469
- }
470
- _hasHorizontalScrollbar() {
471
- const scrollDimensions = this._hover.scrollbar.getScrollDimensions();
472
- const hasHorizontalScrollbar = scrollDimensions.scrollWidth > scrollDimensions.width;
473
- return hasHorizontalScrollbar;
474
- }
475
- _adjustContentsBottomPadding() {
476
- const contentsDomNode = this._hover.contentsDomNode;
477
- const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`;
478
- if (contentsDomNode.style.paddingBottom !== extraBottomPadding) {
479
- contentsDomNode.style.paddingBottom = extraBottomPadding;
480
- }
481
- }
482
- _setAdjustedHoverWidgetDimensions(size) {
483
- this._setHoverWidgetMaxDimensions('none', 'none');
484
- const width = size.width;
485
- const height = size.height;
486
- this._setHoverWidgetDimensions(width, height);
487
- // measure if widget has horizontal scrollbar after setting the dimensions
488
- if (this._hasHorizontalScrollbar()) {
489
- this._adjustContentsBottomPadding();
490
- this._setContentsDomNodeDimensions(width, height - SCROLLBAR_WIDTH);
491
- }
492
- }
493
- _updateResizableNodeMaxDimensions() {
494
- var _a, _b;
495
- const maxRenderingWidth = (_a = this._findMaximumRenderingWidth()) !== null && _a !== void 0 ? _a : Infinity;
496
- const maxRenderingHeight = (_b = this._findMaximumRenderingHeight()) !== null && _b !== void 0 ? _b : Infinity;
497
- this._resizableNode.maxSize = new dom.Dimension(maxRenderingWidth, maxRenderingHeight);
498
- this._setHoverWidgetMaxDimensions(maxRenderingWidth, maxRenderingHeight);
499
- }
500
- _resize(size) {
501
- var _a, _b;
502
- ContentHoverWidget_1._lastDimensions = new dom.Dimension(size.width, size.height);
503
- this._setAdjustedHoverWidgetDimensions(size);
504
- this._resizableNode.layout(size.height, size.width);
505
- this._updateResizableNodeMaxDimensions();
506
- this._hover.scrollbar.scanDomNode();
507
- this._editor.layoutContentWidget(this);
508
- (_b = (_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.colorPicker) === null || _b === void 0 ? void 0 : _b.layout();
509
- }
510
- _findAvailableSpaceVertically() {
511
- var _a;
512
- const position = (_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.showAtPosition;
513
- if (!position) {
514
- return;
515
- }
516
- return this._positionPreference === 1 /* ContentWidgetPositionPreference.ABOVE */ ? this._availableVerticalSpaceAbove(position) : this._availableVerticalSpaceBelow(position);
517
- }
518
- _findMaximumRenderingHeight() {
519
- const availableSpace = this._findAvailableSpaceVertically();
520
- if (!availableSpace) {
521
- return;
522
- }
523
- // Padding needed in order to stop the resizing down to a smaller height
524
- let maximumHeight = CONTAINER_HEIGHT_PADDING;
525
- Array.from(this._hover.contentsDomNode.children).forEach((hoverPart) => {
526
- maximumHeight += hoverPart.clientHeight;
527
- });
528
- if (this._hasHorizontalScrollbar()) {
529
- maximumHeight += SCROLLBAR_WIDTH;
530
- }
531
- return Math.min(availableSpace, maximumHeight);
532
- }
533
- _isHoverTextOverflowing() {
534
- // To find out if the text is overflowing, we will disable wrapping, check the widths, and then re-enable wrapping
535
- this._hover.containerDomNode.style.setProperty('--vscode-hover-whiteSpace', 'nowrap');
536
- this._hover.containerDomNode.style.setProperty('--vscode-hover-sourceWhiteSpace', 'nowrap');
537
- const overflowing = Array.from(this._hover.contentsDomNode.children).some((hoverElement) => {
538
- return hoverElement.scrollWidth > hoverElement.clientWidth;
539
- });
540
- this._hover.containerDomNode.style.removeProperty('--vscode-hover-whiteSpace');
541
- this._hover.containerDomNode.style.removeProperty('--vscode-hover-sourceWhiteSpace');
542
- return overflowing;
543
- }
544
- _findMaximumRenderingWidth() {
545
- if (!this._editor || !this._editor.hasModel()) {
546
- return;
547
- }
548
- const overflowing = this._isHoverTextOverflowing();
549
- const initialWidth = (typeof this._contentWidth === 'undefined'
550
- ? 0
551
- : this._contentWidth - 2 // - 2 for the borders
552
- );
553
- if (overflowing || this._hover.containerDomNode.clientWidth < initialWidth) {
554
- const bodyBoxWidth = dom.getClientArea(this._hover.containerDomNode.ownerDocument.body).width;
555
- const horizontalPadding = 14;
556
- return bodyBoxWidth - horizontalPadding;
557
- }
558
- else {
559
- return this._hover.containerDomNode.clientWidth + 2;
560
- }
561
- }
562
- isMouseGettingCloser(posx, posy) {
563
- if (!this._visibleData) {
564
- return false;
565
- }
566
- if (typeof this._visibleData.initialMousePosX === 'undefined' || typeof this._visibleData.initialMousePosY === 'undefined') {
567
- this._visibleData.initialMousePosX = posx;
568
- this._visibleData.initialMousePosY = posy;
569
- return false;
570
- }
571
- const widgetRect = dom.getDomNodePagePosition(this.getDomNode());
572
- if (typeof this._visibleData.closestMouseDistance === 'undefined') {
573
- this._visibleData.closestMouseDistance = computeDistanceFromPointToRectangle(this._visibleData.initialMousePosX, this._visibleData.initialMousePosY, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height);
574
- }
575
- const distance = computeDistanceFromPointToRectangle(posx, posy, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height);
576
- if (distance > this._visibleData.closestMouseDistance + 4 /* tolerance of 4 pixels */) {
577
- // The mouse is getting farther away
578
- return false;
579
- }
580
- this._visibleData.closestMouseDistance = Math.min(this._visibleData.closestMouseDistance, distance);
581
- return true;
582
- }
583
- _setHoverData(hoverData) {
584
- var _a;
585
- (_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.disposables.dispose();
586
- this._visibleData = hoverData;
587
- this._hoverVisibleKey.set(!!hoverData);
588
- this._hover.containerDomNode.classList.toggle('hidden', !hoverData);
589
- }
590
- _updateFont() {
591
- const { fontSize, lineHeight } = this._editor.getOption(50 /* EditorOption.fontInfo */);
592
- const contentsDomNode = this._hover.contentsDomNode;
593
- contentsDomNode.style.fontSize = `${fontSize}px`;
594
- contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`;
595
- const codeClasses = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));
596
- codeClasses.forEach(node => this._editor.applyFontInfo(node));
597
- }
598
- _updateContent(node) {
599
- const contentsDomNode = this._hover.contentsDomNode;
600
- contentsDomNode.style.paddingBottom = '';
601
- contentsDomNode.textContent = '';
602
- contentsDomNode.appendChild(node);
603
- }
604
- _layoutContentWidget() {
605
- this._editor.layoutContentWidget(this);
606
- this._hover.onContentsChanged();
607
- }
608
- _updateMaxDimensions() {
609
- const height = Math.max(this._editor.getLayoutInfo().height / 4, 250, ContentHoverWidget_1._lastDimensions.height);
610
- const width = Math.max(this._editor.getLayoutInfo().width * 0.66, 500, ContentHoverWidget_1._lastDimensions.width);
611
- this._setHoverWidgetMaxDimensions(width, height);
612
- }
613
- _render(node, hoverData) {
614
- this._setHoverData(hoverData);
615
- this._updateFont();
616
- this._updateContent(node);
617
- this._updateMaxDimensions();
618
- this.onContentsChanged();
619
- // Simply force a synchronous render on the editor
620
- // such that the widget does not really render with left = '0px'
621
- this._editor.render();
622
- }
623
- getPosition() {
624
- var _a;
625
- if (!this._visibleData) {
626
- return null;
627
- }
628
- return {
629
- position: this._visibleData.showAtPosition,
630
- secondaryPosition: this._visibleData.showAtSecondaryPosition,
631
- positionAffinity: this._visibleData.isBeforeContent ? 3 /* PositionAffinity.LeftOfInjectedText */ : undefined,
632
- preference: [(_a = this._positionPreference) !== null && _a !== void 0 ? _a : 1 /* ContentWidgetPositionPreference.ABOVE */]
633
- };
634
- }
635
- showAt(node, hoverData) {
636
- var _a, _b, _c, _d;
637
- if (!this._editor || !this._editor.hasModel()) {
638
- return;
639
- }
640
- this._render(node, hoverData);
641
- const widgetHeight = dom.getTotalHeight(this._hover.containerDomNode);
642
- const widgetPosition = hoverData.showAtPosition;
643
- this._positionPreference = (_a = this._findPositionPreference(widgetHeight, widgetPosition)) !== null && _a !== void 0 ? _a : 1 /* ContentWidgetPositionPreference.ABOVE */;
644
- // See https://github.com/microsoft/vscode/issues/140339
645
- // TODO: Doing a second layout of the hover after force rendering the editor
646
- this.onContentsChanged();
647
- if (hoverData.stoleFocus) {
648
- this._hover.containerDomNode.focus();
649
- }
650
- (_b = hoverData.colorPicker) === null || _b === void 0 ? void 0 : _b.layout();
651
- // The aria label overrides the label, so if we add to it, add the contents of the hover
652
- const hoverFocused = this._hover.containerDomNode.ownerDocument.activeElement === this._hover.containerDomNode;
653
- const accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), (_d = (_c = this._keybindingService.lookupKeybinding('editor.action.accessibleView')) === null || _c === void 0 ? void 0 : _c.getAriaLabel()) !== null && _d !== void 0 ? _d : '');
654
- if (accessibleViewHint) {
655
- this._hover.contentsDomNode.ariaLabel = this._hover.contentsDomNode.textContent + ', ' + accessibleViewHint;
656
- }
657
- }
658
- hide() {
659
- if (!this._visibleData) {
660
- return;
661
- }
662
- const stoleFocus = this._visibleData.stoleFocus || this._hoverFocusedKey.get();
663
- this._setHoverData(undefined);
664
- this._resizableNode.maxSize = new dom.Dimension(Infinity, Infinity);
665
- this._resizableNode.clearSashHoverState();
666
- this._hoverFocusedKey.set(false);
667
- this._editor.layoutContentWidget(this);
668
- if (stoleFocus) {
669
- this._editor.focus();
670
- }
671
- }
672
- _removeConstraintsRenderNormally() {
673
- // Added because otherwise the initial size of the hover content is smaller than should be
674
- const layoutInfo = this._editor.getLayoutInfo();
675
- this._resizableNode.layout(layoutInfo.height, layoutInfo.width);
676
- this._setHoverWidgetDimensions('auto', 'auto');
677
- }
678
- _adjustHoverHeightForScrollbar(height) {
679
- var _a;
680
- const containerDomNode = this._hover.containerDomNode;
681
- const contentsDomNode = this._hover.contentsDomNode;
682
- const maxRenderingHeight = (_a = this._findMaximumRenderingHeight()) !== null && _a !== void 0 ? _a : Infinity;
683
- this._setContainerDomNodeDimensions(dom.getTotalWidth(containerDomNode), Math.min(maxRenderingHeight, height));
684
- this._setContentsDomNodeDimensions(dom.getTotalWidth(contentsDomNode), Math.min(maxRenderingHeight, height - SCROLLBAR_WIDTH));
685
- }
686
- setMinimumDimensions(dimensions) {
687
- // We combine the new minimum dimensions with the previous ones
688
- this._minimumSize = new dom.Dimension(Math.max(this._minimumSize.width, dimensions.width), Math.max(this._minimumSize.height, dimensions.height));
689
- this._updateMinimumWidth();
690
- }
691
- _updateMinimumWidth() {
692
- const width = (typeof this._contentWidth === 'undefined'
693
- ? this._minimumSize.width
694
- : Math.min(this._contentWidth, this._minimumSize.width));
695
- // We want to avoid that the hover is artificially large, so we use the content width as minimum width
696
- this._resizableNode.minSize = new dom.Dimension(width, this._minimumSize.height);
697
- }
698
- onContentsChanged() {
699
- var _a;
700
- this._removeConstraintsRenderNormally();
701
- const containerDomNode = this._hover.containerDomNode;
702
- let height = dom.getTotalHeight(containerDomNode);
703
- let width = dom.getTotalWidth(containerDomNode);
704
- this._resizableNode.layout(height, width);
705
- this._setHoverWidgetDimensions(width, height);
706
- height = dom.getTotalHeight(containerDomNode);
707
- width = dom.getTotalWidth(containerDomNode);
708
- this._contentWidth = width;
709
- this._updateMinimumWidth();
710
- this._resizableNode.layout(height, width);
711
- if (this._hasHorizontalScrollbar()) {
712
- this._adjustContentsBottomPadding();
713
- this._adjustHoverHeightForScrollbar(height);
714
- }
715
- if ((_a = this._visibleData) === null || _a === void 0 ? void 0 : _a.showAtPosition) {
716
- const widgetHeight = dom.getTotalHeight(this._hover.containerDomNode);
717
- this._positionPreference = this._findPositionPreference(widgetHeight, this._visibleData.showAtPosition);
718
- }
719
- this._layoutContentWidget();
720
- }
721
- focus() {
722
- this._hover.containerDomNode.focus();
723
- }
724
- scrollUp() {
725
- const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop;
726
- const fontInfo = this._editor.getOption(50 /* EditorOption.fontInfo */);
727
- this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - fontInfo.lineHeight });
728
- }
729
- scrollDown() {
730
- const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop;
731
- const fontInfo = this._editor.getOption(50 /* EditorOption.fontInfo */);
732
- this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + fontInfo.lineHeight });
733
- }
734
- scrollLeft() {
735
- const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft;
736
- this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft - HORIZONTAL_SCROLLING_BY });
737
- }
738
- scrollRight() {
739
- const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft;
740
- this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft + HORIZONTAL_SCROLLING_BY });
741
- }
742
- pageUp() {
743
- const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop;
744
- const scrollHeight = this._hover.scrollbar.getScrollDimensions().height;
745
- this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - scrollHeight });
746
- }
747
- pageDown() {
748
- const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop;
749
- const scrollHeight = this._hover.scrollbar.getScrollDimensions().height;
750
- this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + scrollHeight });
751
- }
752
- goToTop() {
753
- this._hover.scrollbar.setScrollPosition({ scrollTop: 0 });
754
- }
755
- goToBottom() {
756
- this._hover.scrollbar.setScrollPosition({ scrollTop: this._hover.scrollbar.getScrollDimensions().scrollHeight });
757
- }
758
- };
759
- ContentHoverWidget.ID = 'editor.contrib.resizableContentHoverWidget';
760
- ContentHoverWidget._lastDimensions = new dom.Dimension(0, 0);
761
- ContentHoverWidget = ContentHoverWidget_1 = __decorate([
762
- __param(1, IContextKeyService),
763
- __param(2, IConfigurationService),
764
- __param(3, IAccessibilityService),
765
- __param(4, IKeybindingService)
766
- ], ContentHoverWidget);
767
- export { ContentHoverWidget };
768
- let EditorHoverStatusBar = class EditorHoverStatusBar extends Disposable {
769
- get hasContent() {
770
- return this._hasContent;
771
- }
772
- constructor(_keybindingService) {
773
- super();
774
- this._keybindingService = _keybindingService;
775
- this._hasContent = false;
776
- this.hoverElement = $('div.hover-row.status-bar');
777
- this.actionsElement = dom.append(this.hoverElement, $('div.actions'));
778
- }
779
- addAction(actionOptions) {
780
- const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId);
781
- const keybindingLabel = keybinding ? keybinding.getLabel() : null;
782
- this._hasContent = true;
783
- return this._register(HoverAction.render(this.actionsElement, actionOptions, keybindingLabel));
784
- }
785
- append(element) {
786
- const result = dom.append(this.actionsElement, element);
787
- this._hasContent = true;
788
- return result;
789
- }
790
- };
791
- EditorHoverStatusBar = __decorate([
792
- __param(0, IKeybindingService)
793
- ], EditorHoverStatusBar);
794
- export { EditorHoverStatusBar };
795
- class ContentHoverComputer {
796
- get anchor() { return this._anchor; }
797
- set anchor(value) { this._anchor = value; }
798
- get shouldFocus() { return this._shouldFocus; }
799
- set shouldFocus(value) { this._shouldFocus = value; }
800
- get source() { return this._source; }
801
- set source(value) { this._source = value; }
802
- get insistOnKeepingHoverVisible() { return this._insistOnKeepingHoverVisible; }
803
- set insistOnKeepingHoverVisible(value) { this._insistOnKeepingHoverVisible = value; }
804
- constructor(_editor, _participants) {
805
- this._editor = _editor;
806
- this._participants = _participants;
807
- this._anchor = null;
808
- this._shouldFocus = false;
809
- this._source = 0 /* HoverStartSource.Mouse */;
810
- this._insistOnKeepingHoverVisible = false;
811
- }
812
- static _getLineDecorations(editor, anchor) {
813
- if (anchor.type !== 1 /* HoverAnchorType.Range */ && !anchor.supportsMarkerHover) {
814
- return [];
815
- }
816
- const model = editor.getModel();
817
- const lineNumber = anchor.range.startLineNumber;
818
- if (lineNumber > model.getLineCount()) {
819
- // invalid line
820
- return [];
821
- }
822
- const maxColumn = model.getLineMaxColumn(lineNumber);
823
- return editor.getLineDecorations(lineNumber).filter((d) => {
824
- if (d.options.isWholeLine) {
825
- return true;
826
- }
827
- const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;
828
- const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;
829
- if (d.options.showIfCollapsed) {
830
- // Relax check around `showIfCollapsed` decorations to also include +/- 1 character
831
- if (startColumn > anchor.range.startColumn + 1 || anchor.range.endColumn - 1 > endColumn) {
832
- return false;
833
- }
834
- }
835
- else {
836
- if (startColumn > anchor.range.startColumn || anchor.range.endColumn > endColumn) {
837
- return false;
838
- }
839
- }
840
- return true;
841
- });
842
- }
843
- computeAsync(token) {
844
- const anchor = this._anchor;
845
- if (!this._editor.hasModel() || !anchor) {
846
- return AsyncIterableObject.EMPTY;
847
- }
848
- const lineDecorations = ContentHoverComputer._getLineDecorations(this._editor, anchor);
849
- return AsyncIterableObject.merge(this._participants.map((participant) => {
850
- if (!participant.computeAsync) {
851
- return AsyncIterableObject.EMPTY;
852
- }
853
- return participant.computeAsync(anchor, lineDecorations, token);
854
- }));
855
- }
856
- computeSync() {
857
- if (!this._editor.hasModel() || !this._anchor) {
858
- return [];
859
- }
860
- const lineDecorations = ContentHoverComputer._getLineDecorations(this._editor, this._anchor);
861
- let result = [];
862
- for (const participant of this._participants) {
863
- result = result.concat(participant.computeSync(this._anchor, lineDecorations));
864
- }
865
- return coalesce(result);
866
- }
867
- }
868
- function computeDistanceFromPointToRectangle(pointX, pointY, left, top, width, height) {
869
- const x = (left + width / 2); // x center of rectangle
870
- const y = (top + height / 2); // y center of rectangle
871
- const dx = Math.max(Math.abs(pointX - x) - width / 2, 0);
872
- const dy = Math.max(Math.abs(pointY - y) - height / 2, 0);
873
- return Math.sqrt(dx * dx + dy * dy);
874
- }