@codingame/monaco-vscode-api 1.79.0-next.0 → 1.79.1

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 (284) hide show
  1. package/README.md +7 -5
  2. package/dist/activity.d.ts +8 -108
  3. package/dist/api.js +3 -3
  4. package/dist/colorRegistry.d.ts +2 -2
  5. package/dist/contextkey.d.ts +2 -2
  6. package/dist/default-extension.js +23 -0
  7. package/dist/editor.d.ts +4 -320
  8. package/dist/editorBrowser.d.ts +327 -10
  9. package/dist/event.d.ts +1 -1
  10. package/dist/{extension-tools-d0cfdea1.js → extension-tools-0c4c1ad7.js} +345 -210
  11. package/dist/extensions.d.ts +3 -4
  12. package/dist/extensions.d2.ts +1 -1
  13. package/dist/extensions.js +4 -37
  14. package/dist/extensionsRegistry.d.ts +1 -1
  15. package/dist/files.d.ts +2 -2
  16. package/dist/keybinding.d.ts +1 -1
  17. package/dist/languageFeatures.d.ts +6 -7
  18. package/dist/log.d.ts +1 -1
  19. package/dist/monaco-treemending.js +15 -1
  20. package/dist/monaco.d.ts +31 -32
  21. package/dist/monaco.js +62 -6
  22. package/dist/node_modules/rollup-plugin-styles/dist/runtime/inject-css.js +2 -0
  23. package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +4 -0
  24. package/dist/rollup-extension-directory-plugin.js +1 -2
  25. package/dist/rollup-vsix-plugin.js +1 -2
  26. package/dist/service-override/configuration.d.ts +2 -2
  27. package/dist/service-override/editor.d.ts +13 -0
  28. package/dist/service-override/{modelEditor.js → editor.js} +6 -62
  29. package/dist/service-override/files.d.ts +5 -5
  30. package/dist/service-override/files.js +14 -2
  31. package/dist/service-override/keybindings.js +3 -79
  32. package/dist/service-override/layout.js +6 -2
  33. package/dist/service-override/model.d.ts +7 -0
  34. package/dist/service-override/model.js +10 -0
  35. package/dist/service-override/quickaccess.d.ts +7 -0
  36. package/dist/service-override/quickaccess.js +80 -0
  37. package/dist/service-override/snippets.js +5 -1
  38. package/dist/service-override/textmate.js +7 -2
  39. package/dist/service-override/theme.d.ts +1 -1
  40. package/dist/service-override/tools/editor.js +73 -0
  41. package/dist/service-override/views.d.ts +63 -201
  42. package/dist/service-override/views.js +102 -8
  43. package/dist/services.d.ts +116 -19
  44. package/dist/vscode/vs/base/browser/ui/centered/centeredViewLayout.js +178 -0
  45. package/dist/vscode/vs/base/browser/ui/grid/grid.js +452 -0
  46. package/dist/vscode/vs/base/browser/ui/grid/gridview.css.js +4 -0
  47. package/dist/vscode/vs/base/browser/ui/grid/gridview.js +999 -0
  48. package/dist/vscode/vs/base/browser/ui/iconLabel/simpleIconLabel.js +14 -0
  49. package/dist/vscode/vs/base/browser/ui/menu/menubar.css.js +4 -0
  50. package/dist/vscode/vs/base/browser/ui/menu/menubar.js +1 -1
  51. package/dist/vscode/vs/base/browser/ui/splitview/paneview.css.js +4 -0
  52. package/dist/vscode/vs/base/browser/ui/splitview/paneview.js +1 -1
  53. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
  54. package/dist/vscode/vs/platform/extensionManagement/common/extensionStorage.js +1 -1
  55. package/dist/vscode/vs/platform/product/common/product.js +48 -0
  56. package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +94 -0
  57. package/dist/vscode/vs/platform/terminal/common/terminal.js +3 -0
  58. package/dist/vscode/vs/platform/update/common/update.js +11 -1
  59. package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
  60. package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +68 -0
  61. package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +234 -0
  62. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +6 -1
  63. package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +20 -17
  64. package/dist/vscode/vs/workbench/browser/actions/quickAccessActions.js +204 -0
  65. package/dist/vscode/vs/workbench/browser/dnd.js +27 -2
  66. package/dist/vscode/vs/workbench/browser/editor.js +94 -0
  67. package/dist/vscode/vs/workbench/browser/labels.js +23 -2
  68. package/dist/vscode/vs/workbench/browser/media/part.css.js +4 -0
  69. package/dist/vscode/vs/workbench/browser/part.js +1 -1
  70. package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarActions.js +1 -1
  71. package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarPart.js +3 -3
  72. package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +4 -0
  73. package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +4 -0
  74. package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +14 -26
  75. package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
  76. package/dist/vscode/vs/workbench/browser/parts/editor/binaryDiffEditor.js +43 -0
  77. package/dist/vscode/vs/workbench/browser/parts/editor/binaryEditor.js +55 -0
  78. package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbs.js +330 -0
  79. package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsControl.js +690 -0
  80. package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsModel.js +142 -0
  81. package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +414 -0
  82. package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +800 -6
  83. package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +56 -1
  84. package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +1484 -107
  85. package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +1121 -4
  86. package/dist/vscode/vs/workbench/browser/parts/editor/editorDropTarget.js +499 -0
  87. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +1219 -0
  88. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +137 -0
  89. package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +242 -0
  90. package/dist/vscode/vs/workbench/browser/parts/editor/editorPanes.js +297 -0
  91. package/dist/vscode/vs/workbench/browser/parts/editor/editorPart.js +841 -0
  92. package/dist/vscode/vs/workbench/browser/parts/editor/editorPlaceholder.js +235 -0
  93. package/dist/vscode/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
  94. package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1152 -0
  95. package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +139 -0
  96. package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +339 -0
  97. package/dist/vscode/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
  98. package/dist/vscode/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +4 -0
  99. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
  100. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorplaceholder.css.js +4 -0
  101. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +4 -0
  102. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorstatus.css.js +4 -0
  103. package/dist/vscode/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +4 -0
  104. package/dist/vscode/vs/workbench/browser/parts/editor/media/sidebysideeditor.css.js +4 -0
  105. package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +4 -0
  106. package/dist/vscode/vs/workbench/browser/parts/editor/media/titlecontrol.css.js +4 -0
  107. package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +243 -0
  108. package/dist/vscode/vs/workbench/browser/parts/editor/sideBySideEditor.js +387 -0
  109. package/dist/vscode/vs/workbench/browser/parts/editor/tabFocus.js +77 -0
  110. package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +1504 -0
  111. package/dist/vscode/vs/workbench/browser/parts/editor/textCodeEditor.js +79 -0
  112. package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +304 -0
  113. package/dist/vscode/vs/workbench/browser/parts/editor/textEditor.js +220 -0
  114. package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +149 -0
  115. package/dist/vscode/vs/workbench/browser/parts/editor/titleControl.js +284 -0
  116. package/dist/vscode/vs/workbench/browser/parts/media/compositepart.css.js +4 -0
  117. package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +4 -0
  118. package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +4 -0
  119. package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +4 -0
  120. package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +4 -0
  121. package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsActions.js +8 -8
  122. package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsCenter.js +2 -2
  123. package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsList.js +1 -1
  124. package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
  125. package/dist/vscode/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +4 -0
  126. package/dist/vscode/vs/workbench/browser/parts/panel/media/panelpart.css.js +4 -0
  127. package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +19 -5
  128. package/dist/vscode/vs/workbench/browser/parts/panel/panelPart.js +2 -2
  129. package/dist/vscode/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +4 -0
  130. package/dist/vscode/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
  131. package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +4 -0
  132. package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarActions.js +109 -0
  133. package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarItem.js +224 -0
  134. package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarModel.js +251 -0
  135. package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarPart.js +439 -0
  136. package/dist/vscode/vs/workbench/browser/parts/titlebar/media/menubarControl.css.js +4 -0
  137. package/dist/vscode/vs/workbench/browser/parts/titlebar/menubarControl.js +76 -3
  138. package/dist/vscode/vs/workbench/browser/parts/views/media/paneviewlet.css.js +4 -0
  139. package/dist/vscode/vs/workbench/browser/parts/views/media/views.css.js +4 -0
  140. package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +1 -1
  141. package/dist/vscode/vs/workbench/browser/parts/views/viewPane.js +5 -5
  142. package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
  143. package/dist/vscode/vs/workbench/browser/parts/views/viewsService.js +4 -4
  144. package/dist/vscode/vs/workbench/browser/quickaccess.js +6 -2
  145. package/dist/vscode/vs/workbench/browser/workbench.contribution.js +1108 -0
  146. package/dist/vscode/vs/workbench/common/contextkeys.js +34 -1
  147. package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +674 -0
  148. package/dist/vscode/vs/workbench/common/editor.js +57 -1
  149. package/dist/vscode/vs/workbench/common/theme.js +35 -35
  150. package/dist/vscode/vs/workbench/common/views.js +1 -1
  151. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +4 -4
  152. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +1 -1
  153. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +4 -0
  154. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +77 -0
  155. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +217 -0
  156. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js +24 -0
  157. package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointWidget.js +1 -1
  158. package/dist/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +1 -1
  159. package/dist/vscode/vs/workbench/contrib/debug/browser/debug.contribution.js +30 -4
  160. package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +13 -1
  161. package/dist/vscode/vs/workbench/contrib/debug/browser/debugIcons.js +77 -127
  162. package/dist/vscode/vs/workbench/contrib/debug/browser/debugToolBar.js +1 -1
  163. package/dist/vscode/vs/workbench/contrib/debug/browser/debugViewlet.js +1 -1
  164. package/dist/vscode/vs/workbench/contrib/debug/browser/disassemblyView.js +620 -0
  165. package/dist/vscode/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
  166. package/dist/vscode/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
  167. package/dist/vscode/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
  168. package/dist/vscode/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +4 -0
  169. package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugHover.css.js +4 -0
  170. package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +4 -0
  171. package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +4 -0
  172. package/dist/vscode/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +4 -0
  173. package/dist/vscode/vs/workbench/contrib/debug/browser/media/repl.css.js +4 -0
  174. package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +1 -1
  175. package/dist/vscode/vs/workbench/contrib/debug/common/debug.js +2 -1
  176. package/dist/vscode/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +71 -0
  177. package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileEditor.js +225 -0
  178. package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +5 -4
  179. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +270 -4
  180. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +4 -1
  181. package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +24 -6
  182. package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +8 -1
  183. package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +10 -0
  184. package/dist/vscode/vs/workbench/contrib/files/browser/media/explorerviewlet.css.js +4 -0
  185. package/dist/vscode/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +4 -0
  186. package/dist/vscode/vs/workbench/contrib/files/browser/views/openEditorsView.js +608 -0
  187. package/dist/vscode/vs/workbench/contrib/files/common/files.js +2 -1
  188. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +1 -1
  189. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +1 -1
  190. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +4 -0
  191. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +9 -1
  192. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +305 -0
  193. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +6 -1
  194. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +379 -0
  195. package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +2 -2
  196. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +33 -1
  197. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +130 -0
  198. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +225 -0
  199. package/dist/vscode/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
  200. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteIcons.js +21 -17
  201. package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +1 -1
  202. package/dist/vscode/vs/workbench/contrib/search/browser/anythingQuickAccess.js +757 -0
  203. package/dist/vscode/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +4 -0
  204. package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +428 -0
  205. package/dist/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +219 -0
  206. package/dist/vscode/vs/workbench/contrib/search/common/cacheState.js +85 -0
  207. package/dist/vscode/vs/workbench/contrib/search/common/constants.js +2 -0
  208. package/dist/vscode/vs/workbench/contrib/search/common/search.js +119 -1
  209. package/dist/vscode/vs/workbench/contrib/tasks/browser/taskQuickPick.js +385 -0
  210. package/dist/vscode/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +108 -0
  211. package/dist/vscode/vs/workbench/contrib/tasks/common/tasks.js +351 -0
  212. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -0
  213. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +44 -0
  214. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +147 -1
  215. package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +4 -0
  216. package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +1 -1
  217. package/dist/vscode/vs/workbench/services/editor/browser/editorDropService.js +3 -0
  218. package/dist/vscode/vs/workbench/services/editor/browser/editorResolverService.js +619 -0
  219. package/dist/vscode/vs/workbench/services/editor/browser/editorService.js +720 -0
  220. package/dist/vscode/vs/workbench/services/editor/common/editorGroupFinder.js +116 -0
  221. package/dist/vscode/vs/workbench/services/editor/common/editorGroupsService.js +6 -1
  222. package/dist/vscode/vs/workbench/services/editor/common/editorResolverService.js +34 -1
  223. package/dist/vscode/vs/workbench/services/history/browser/historyService.js +1451 -0
  224. package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
  225. package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +4 -0
  226. package/dist/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +2 -1
  227. package/dist/vscode/vs/workbench/services/outline/browser/outline.js +3 -0
  228. package/dist/vscode/vs/workbench/services/progress/browser/progressIndicator.js +72 -1
  229. package/dist/vscode/vs/workbench/services/quickinput/browser/quickInputService.js +67 -0
  230. package/dist/vscode/vs/workbench/services/search/common/search.js +2 -112
  231. package/dist/vscode/vs/workbench/services/semanticSimilarity/common/semanticSimilarityService.js +54 -1
  232. package/dist/vscode/vs/workbench/services/statusbar/browser/statusbar.js +15 -0
  233. package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMate.worker.js +90 -0
  234. package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMateWorkerModel.js +133 -0
  235. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +110 -3
  236. package/dist/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.js +1 -1
  237. package/dist/vscode-services/extHost.js +12 -5
  238. package/dist/vscode-services/missing-services.js +117 -3
  239. package/dist/vscode-services/window.js +21 -2
  240. package/dist/vscode-services/workspace.js +2 -1
  241. package/dist/workbenchThemeService.d.ts +1 -1
  242. package/dist/workers/textMate.worker.d.ts +2 -0
  243. package/dist/workers/textMate.worker.js +3 -0
  244. package/dist/workspace.d.ts +1 -1
  245. package/monaco-editor-treemending.patch +784 -784
  246. package/package.json +42 -22
  247. package/dist/assets/activityaction.css +0 -224
  248. package/dist/assets/activitybarpart.css +0 -65
  249. package/dist/assets/basepanelpart.css +0 -221
  250. package/dist/assets/breakpointWidget.css +0 -31
  251. package/dist/assets/callHierarchy.css +0 -62
  252. package/dist/assets/callStackEditorContribution.css +0 -12
  253. package/dist/assets/compositepart.css +0 -17
  254. package/dist/assets/debug.contribution.css +0 -138
  255. package/dist/assets/debugHover.css +0 -80
  256. package/dist/assets/debugToolBar.css +0 -49
  257. package/dist/assets/debugViewlet.css +0 -337
  258. package/dist/assets/editorquickaccess.css +0 -8
  259. package/dist/assets/exceptionWidget.css +0 -52
  260. package/dist/assets/explorerviewlet.css +0 -129
  261. package/dist/assets/hover.css +0 -127
  262. package/dist/assets/interactiveSession.css +0 -340
  263. package/dist/assets/menubar.css +0 -111
  264. package/dist/assets/menubarControl.css +0 -61
  265. package/dist/assets/notificationsActions.css +0 -14
  266. package/dist/assets/notificationsCenter.css +0 -69
  267. package/dist/assets/notificationsList.css +0 -152
  268. package/dist/assets/notificationsToasts.css +0 -63
  269. package/dist/assets/panelpart.css +0 -75
  270. package/dist/assets/paneview.css +0 -148
  271. package/dist/assets/paneviewlet.css +0 -79
  272. package/dist/assets/part.css +0 -109
  273. package/dist/assets/repl.css +0 -145
  274. package/dist/assets/sidebarpart.css +0 -61
  275. package/dist/assets/tunnelView.css +0 -107
  276. package/dist/assets/typeHierarchy.css +0 -62
  277. package/dist/assets/views.css +0 -297
  278. package/dist/override/vs/workbench/browser/parts/editor/textEditor.js +0 -2
  279. package/dist/override/vs/workbench/contrib/files/browser/views/openEditorsView.js +0 -2
  280. package/dist/service-override/modelEditor.d.ts +0 -14
  281. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -249
  282. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +0 -10
  283. package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +0 -72
  284. package/dist/vscode/vs/workbench/services/search/common/searchService.js +0 -355
@@ -0,0 +1,999 @@
1
+ import { $ } from 'monaco-editor/esm/vs/base/browser/dom.js';
2
+ import { Sizing, SplitView } from 'monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js';
3
+ export { Sizing } from 'monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js';
4
+ import { tail2, equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
5
+ import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
6
+ import { Event, Relay, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
7
+ import { Disposable, toDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
+ import { rot } from 'monaco-editor/esm/vs/base/common/numbers.js';
9
+ import { isUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
10
+ import './gridview.css.js';
11
+ const defaultStyles = {
12
+ separatorBorder: Color.transparent
13
+ };
14
+ function orthogonal(orientation) {
15
+ return orientation === 0 ? 1 : 0 ;
16
+ }
17
+ class LayoutController {
18
+ constructor(isLayoutEnabled) {
19
+ this.isLayoutEnabled = isLayoutEnabled;
20
+ }
21
+ }
22
+ function toAbsoluteBoundarySashes(sashes, orientation) {
23
+ if (orientation === 1 ) {
24
+ return { left: sashes.start, right: sashes.end, top: sashes.orthogonalStart, bottom: sashes.orthogonalEnd };
25
+ }
26
+ else {
27
+ return { top: sashes.start, bottom: sashes.end, left: sashes.orthogonalStart, right: sashes.orthogonalEnd };
28
+ }
29
+ }
30
+ function fromAbsoluteBoundarySashes(sashes, orientation) {
31
+ if (orientation === 1 ) {
32
+ return { start: sashes.left, end: sashes.right, orthogonalStart: sashes.top, orthogonalEnd: sashes.bottom };
33
+ }
34
+ else {
35
+ return { start: sashes.top, end: sashes.bottom, orthogonalStart: sashes.left, orthogonalEnd: sashes.right };
36
+ }
37
+ }
38
+ function validateIndex(index, numChildren) {
39
+ if (Math.abs(index) > numChildren) {
40
+ throw new Error('Invalid index');
41
+ }
42
+ return rot(index, numChildren + 1);
43
+ }
44
+ class BranchNode {
45
+ get size() { return this._size; }
46
+ get orthogonalSize() { return this._orthogonalSize; }
47
+ get absoluteOffset() { return this._absoluteOffset; }
48
+ get absoluteOrthogonalOffset() { return this._absoluteOrthogonalOffset; }
49
+ get styles() { return this._styles; }
50
+ get width() {
51
+ return this.orientation === 1 ? this.size : this.orthogonalSize;
52
+ }
53
+ get height() {
54
+ return this.orientation === 1 ? this.orthogonalSize : this.size;
55
+ }
56
+ get top() {
57
+ return this.orientation === 1 ? this._absoluteOffset : this._absoluteOrthogonalOffset;
58
+ }
59
+ get left() {
60
+ return this.orientation === 1 ? this._absoluteOrthogonalOffset : this._absoluteOffset;
61
+ }
62
+ get minimumSize() {
63
+ return this.children.length === 0 ? 0 : Math.max(...( this.children.map(c => c.minimumOrthogonalSize)));
64
+ }
65
+ get maximumSize() {
66
+ return Math.min(...( this.children.map(c => c.maximumOrthogonalSize)));
67
+ }
68
+ get priority() {
69
+ if (this.children.length === 0) {
70
+ return 0 ;
71
+ }
72
+ const priorities = ( this.children.map(
73
+ c => typeof c.priority === 'undefined' ? 0 : c.priority
74
+ ));
75
+ if (( priorities.some(p => p === 2 ))) {
76
+ return 2 ;
77
+ }
78
+ else if (( priorities.some(p => p === 1 ))) {
79
+ return 1 ;
80
+ }
81
+ return 0 ;
82
+ }
83
+ get proportionalLayout() {
84
+ if (this.children.length === 0) {
85
+ return true;
86
+ }
87
+ return this.children.every(c => c.proportionalLayout);
88
+ }
89
+ get minimumOrthogonalSize() {
90
+ return this.splitview.minimumSize;
91
+ }
92
+ get maximumOrthogonalSize() {
93
+ return this.splitview.maximumSize;
94
+ }
95
+ get minimumWidth() {
96
+ return this.orientation === 1 ? this.minimumOrthogonalSize : this.minimumSize;
97
+ }
98
+ get minimumHeight() {
99
+ return this.orientation === 1 ? this.minimumSize : this.minimumOrthogonalSize;
100
+ }
101
+ get maximumWidth() {
102
+ return this.orientation === 1 ? this.maximumOrthogonalSize : this.maximumSize;
103
+ }
104
+ get maximumHeight() {
105
+ return this.orientation === 1 ? this.maximumSize : this.maximumOrthogonalSize;
106
+ }
107
+ get boundarySashes() { return this._boundarySashes; }
108
+ set boundarySashes(boundarySashes) {
109
+ this._boundarySashes = boundarySashes;
110
+ this.splitview.orthogonalStartSash = boundarySashes.orthogonalStart;
111
+ this.splitview.orthogonalEndSash = boundarySashes.orthogonalEnd;
112
+ for (let index = 0; index < this.children.length; index++) {
113
+ const child = this.children[index];
114
+ const first = index === 0;
115
+ const last = index === this.children.length - 1;
116
+ child.boundarySashes = {
117
+ start: boundarySashes.orthogonalStart,
118
+ end: boundarySashes.orthogonalEnd,
119
+ orthogonalStart: first ? boundarySashes.start : child.boundarySashes.orthogonalStart,
120
+ orthogonalEnd: last ? boundarySashes.end : child.boundarySashes.orthogonalEnd,
121
+ };
122
+ }
123
+ }
124
+ get edgeSnapping() { return this._edgeSnapping; }
125
+ set edgeSnapping(edgeSnapping) {
126
+ if (this._edgeSnapping === edgeSnapping) {
127
+ return;
128
+ }
129
+ this._edgeSnapping = edgeSnapping;
130
+ for (const child of this.children) {
131
+ if (child instanceof BranchNode) {
132
+ child.edgeSnapping = edgeSnapping;
133
+ }
134
+ }
135
+ this.updateSplitviewEdgeSnappingEnablement();
136
+ }
137
+ constructor(orientation, layoutController, styles, splitviewProportionalLayout, size = 0, orthogonalSize = 0, edgeSnapping = false, childDescriptors) {
138
+ this.orientation = orientation;
139
+ this.layoutController = layoutController;
140
+ this.splitviewProportionalLayout = splitviewProportionalLayout;
141
+ this.children = [];
142
+ this._absoluteOffset = 0;
143
+ this._absoluteOrthogonalOffset = 0;
144
+ this.absoluteOrthogonalSize = 0;
145
+ this._onDidChange = ( new Emitter());
146
+ this.onDidChange = this._onDidChange.event;
147
+ this._onDidScroll = ( new Emitter());
148
+ this.onDidScrollDisposable = Disposable.None;
149
+ this.onDidScroll = this._onDidScroll.event;
150
+ this.childrenChangeDisposable = Disposable.None;
151
+ this._onDidSashReset = ( new Emitter());
152
+ this.onDidSashReset = this._onDidSashReset.event;
153
+ this.splitviewSashResetDisposable = Disposable.None;
154
+ this.childrenSashResetDisposable = Disposable.None;
155
+ this._boundarySashes = {};
156
+ this._edgeSnapping = false;
157
+ this._styles = styles;
158
+ this._size = size;
159
+ this._orthogonalSize = orthogonalSize;
160
+ this.element = $('.monaco-grid-branch-node');
161
+ if (!childDescriptors) {
162
+ this.splitview = ( new SplitView(
163
+ this.element,
164
+ { orientation, styles, proportionalLayout: splitviewProportionalLayout }
165
+ ));
166
+ this.splitview.layout(size, { orthogonalSize, absoluteOffset: 0, absoluteOrthogonalOffset: 0, absoluteSize: size, absoluteOrthogonalSize: orthogonalSize });
167
+ }
168
+ else {
169
+ const descriptor = {
170
+ views: ( childDescriptors.map(childDescriptor => {
171
+ return {
172
+ view: childDescriptor.node,
173
+ size: childDescriptor.node.size,
174
+ visible: childDescriptor.node instanceof LeafNode && childDescriptor.visible !== undefined ? childDescriptor.visible : true
175
+ };
176
+ })),
177
+ size: this.orthogonalSize
178
+ };
179
+ const options = { proportionalLayout: splitviewProportionalLayout, orientation, styles };
180
+ this.children = ( childDescriptors.map(c => c.node));
181
+ this.splitview = ( new SplitView(this.element, { ...options, descriptor }));
182
+ this.children.forEach((node, index) => {
183
+ const first = index === 0;
184
+ const last = index === this.children.length;
185
+ node.boundarySashes = {
186
+ start: this.boundarySashes.orthogonalStart,
187
+ end: this.boundarySashes.orthogonalEnd,
188
+ orthogonalStart: first ? this.boundarySashes.start : this.splitview.sashes[index - 1],
189
+ orthogonalEnd: last ? this.boundarySashes.end : this.splitview.sashes[index],
190
+ };
191
+ });
192
+ }
193
+ const onDidSashReset = ( Event.map(this.splitview.onDidSashReset, i => [i]));
194
+ this.splitviewSashResetDisposable = onDidSashReset(this._onDidSashReset.fire, this._onDidSashReset);
195
+ this.updateChildrenEvents();
196
+ }
197
+ style(styles) {
198
+ this._styles = styles;
199
+ this.splitview.style(styles);
200
+ for (const child of this.children) {
201
+ if (child instanceof BranchNode) {
202
+ child.style(styles);
203
+ }
204
+ }
205
+ }
206
+ layout(size, offset, ctx) {
207
+ if (!this.layoutController.isLayoutEnabled) {
208
+ return;
209
+ }
210
+ if (typeof ctx === 'undefined') {
211
+ throw new Error('Invalid state');
212
+ }
213
+ this._size = ctx.orthogonalSize;
214
+ this._orthogonalSize = size;
215
+ this._absoluteOffset = ctx.absoluteOffset + offset;
216
+ this._absoluteOrthogonalOffset = ctx.absoluteOrthogonalOffset;
217
+ this.absoluteOrthogonalSize = ctx.absoluteOrthogonalSize;
218
+ this.splitview.layout(ctx.orthogonalSize, {
219
+ orthogonalSize: size,
220
+ absoluteOffset: this._absoluteOrthogonalOffset,
221
+ absoluteOrthogonalOffset: this._absoluteOffset,
222
+ absoluteSize: ctx.absoluteOrthogonalSize,
223
+ absoluteOrthogonalSize: ctx.absoluteSize
224
+ });
225
+ this.updateSplitviewEdgeSnappingEnablement();
226
+ }
227
+ setVisible(visible) {
228
+ for (const child of this.children) {
229
+ child.setVisible(visible);
230
+ }
231
+ }
232
+ addChild(node, size, index, skipLayout) {
233
+ index = validateIndex(index, this.children.length);
234
+ this.splitview.addView(node, size, index, skipLayout);
235
+ this._addChild(node, index);
236
+ this.onDidChildrenChange();
237
+ }
238
+ _addChild(node, index) {
239
+ const first = index === 0;
240
+ const last = index === this.children.length;
241
+ this.children.splice(index, 0, node);
242
+ node.boundarySashes = {
243
+ start: this.boundarySashes.orthogonalStart,
244
+ end: this.boundarySashes.orthogonalEnd,
245
+ orthogonalStart: first ? this.boundarySashes.start : this.splitview.sashes[index - 1],
246
+ orthogonalEnd: last ? this.boundarySashes.end : this.splitview.sashes[index],
247
+ };
248
+ if (!first) {
249
+ this.children[index - 1].boundarySashes = {
250
+ ...this.children[index - 1].boundarySashes,
251
+ orthogonalEnd: this.splitview.sashes[index - 1]
252
+ };
253
+ }
254
+ if (!last) {
255
+ this.children[index + 1].boundarySashes = {
256
+ ...this.children[index + 1].boundarySashes,
257
+ orthogonalStart: this.splitview.sashes[index]
258
+ };
259
+ }
260
+ }
261
+ removeChild(index, sizing) {
262
+ index = validateIndex(index, this.children.length);
263
+ this.splitview.removeView(index, sizing);
264
+ this._removeChild(index);
265
+ this.onDidChildrenChange();
266
+ }
267
+ _removeChild(index) {
268
+ const first = index === 0;
269
+ const last = index === this.children.length - 1;
270
+ const [child] = this.children.splice(index, 1);
271
+ if (!first) {
272
+ this.children[index - 1].boundarySashes = {
273
+ ...this.children[index - 1].boundarySashes,
274
+ orthogonalEnd: this.splitview.sashes[index - 1]
275
+ };
276
+ }
277
+ if (!last) {
278
+ this.children[index].boundarySashes = {
279
+ ...this.children[index].boundarySashes,
280
+ orthogonalStart: this.splitview.sashes[Math.max(index - 1, 0)]
281
+ };
282
+ }
283
+ return child;
284
+ }
285
+ moveChild(from, to) {
286
+ from = validateIndex(from, this.children.length);
287
+ to = validateIndex(to, this.children.length);
288
+ if (from === to) {
289
+ return;
290
+ }
291
+ if (from < to) {
292
+ to--;
293
+ }
294
+ this.splitview.moveView(from, to);
295
+ const child = this._removeChild(from);
296
+ this._addChild(child, to);
297
+ this.onDidChildrenChange();
298
+ }
299
+ swapChildren(from, to) {
300
+ from = validateIndex(from, this.children.length);
301
+ to = validateIndex(to, this.children.length);
302
+ if (from === to) {
303
+ return;
304
+ }
305
+ this.splitview.swapViews(from, to);
306
+ [this.children[from].boundarySashes, this.children[to].boundarySashes]
307
+ = [this.children[from].boundarySashes, this.children[to].boundarySashes];
308
+ [this.children[from], this.children[to]] = [this.children[to], this.children[from]];
309
+ this.onDidChildrenChange();
310
+ }
311
+ resizeChild(index, size) {
312
+ index = validateIndex(index, this.children.length);
313
+ this.splitview.resizeView(index, size);
314
+ }
315
+ isChildSizeMaximized(index) {
316
+ return this.splitview.isViewSizeMaximized(index);
317
+ }
318
+ distributeViewSizes(recursive = false) {
319
+ this.splitview.distributeViewSizes();
320
+ if (recursive) {
321
+ for (const child of this.children) {
322
+ if (child instanceof BranchNode) {
323
+ child.distributeViewSizes(true);
324
+ }
325
+ }
326
+ }
327
+ }
328
+ getChildSize(index) {
329
+ index = validateIndex(index, this.children.length);
330
+ return this.splitview.getViewSize(index);
331
+ }
332
+ isChildVisible(index) {
333
+ index = validateIndex(index, this.children.length);
334
+ return this.splitview.isViewVisible(index);
335
+ }
336
+ setChildVisible(index, visible) {
337
+ index = validateIndex(index, this.children.length);
338
+ if (this.splitview.isViewVisible(index) === visible) {
339
+ return;
340
+ }
341
+ this.splitview.setViewVisible(index, visible);
342
+ }
343
+ getChildCachedVisibleSize(index) {
344
+ index = validateIndex(index, this.children.length);
345
+ return this.splitview.getViewCachedVisibleSize(index);
346
+ }
347
+ onDidChildrenChange() {
348
+ this.updateChildrenEvents();
349
+ this._onDidChange.fire(undefined);
350
+ }
351
+ updateChildrenEvents() {
352
+ const onDidChildrenChange = ( Event.map(Event.any(...( this.children.map(c => c.onDidChange))), () => undefined));
353
+ this.childrenChangeDisposable.dispose();
354
+ this.childrenChangeDisposable = onDidChildrenChange(this._onDidChange.fire, this._onDidChange);
355
+ const onDidChildrenSashReset = Event.any(...( this.children.map((c, i) => ( Event.map(c.onDidSashReset, location => [i, ...location])))));
356
+ this.childrenSashResetDisposable.dispose();
357
+ this.childrenSashResetDisposable = onDidChildrenSashReset(this._onDidSashReset.fire, this._onDidSashReset);
358
+ const onDidScroll = Event.any(Event.signal(this.splitview.onDidScroll), ...( this.children.map(c => c.onDidScroll)));
359
+ this.onDidScrollDisposable.dispose();
360
+ this.onDidScrollDisposable = onDidScroll(this._onDidScroll.fire, this._onDidScroll);
361
+ }
362
+ trySet2x2(other) {
363
+ if (this.children.length !== 2 || other.children.length !== 2) {
364
+ return Disposable.None;
365
+ }
366
+ if (this.getChildSize(0) !== other.getChildSize(0)) {
367
+ return Disposable.None;
368
+ }
369
+ const [firstChild, secondChild] = this.children;
370
+ const [otherFirstChild, otherSecondChild] = other.children;
371
+ if (!(firstChild instanceof LeafNode) || !(secondChild instanceof LeafNode)) {
372
+ return Disposable.None;
373
+ }
374
+ if (!(otherFirstChild instanceof LeafNode) || !(otherSecondChild instanceof LeafNode)) {
375
+ return Disposable.None;
376
+ }
377
+ if (this.orientation === 0 ) {
378
+ secondChild.linkedWidthNode = otherFirstChild.linkedHeightNode = firstChild;
379
+ firstChild.linkedWidthNode = otherSecondChild.linkedHeightNode = secondChild;
380
+ otherSecondChild.linkedWidthNode = firstChild.linkedHeightNode = otherFirstChild;
381
+ otherFirstChild.linkedWidthNode = secondChild.linkedHeightNode = otherSecondChild;
382
+ }
383
+ else {
384
+ otherFirstChild.linkedWidthNode = secondChild.linkedHeightNode = firstChild;
385
+ otherSecondChild.linkedWidthNode = firstChild.linkedHeightNode = secondChild;
386
+ firstChild.linkedWidthNode = otherSecondChild.linkedHeightNode = otherFirstChild;
387
+ secondChild.linkedWidthNode = otherFirstChild.linkedHeightNode = otherSecondChild;
388
+ }
389
+ const mySash = this.splitview.sashes[0];
390
+ const otherSash = other.splitview.sashes[0];
391
+ mySash.linkedSash = otherSash;
392
+ otherSash.linkedSash = mySash;
393
+ this._onDidChange.fire(undefined);
394
+ other._onDidChange.fire(undefined);
395
+ return toDisposable(() => {
396
+ mySash.linkedSash = otherSash.linkedSash = undefined;
397
+ firstChild.linkedHeightNode = firstChild.linkedWidthNode = undefined;
398
+ secondChild.linkedHeightNode = secondChild.linkedWidthNode = undefined;
399
+ otherFirstChild.linkedHeightNode = otherFirstChild.linkedWidthNode = undefined;
400
+ otherSecondChild.linkedHeightNode = otherSecondChild.linkedWidthNode = undefined;
401
+ });
402
+ }
403
+ updateSplitviewEdgeSnappingEnablement() {
404
+ this.splitview.startSnappingEnabled = this._edgeSnapping || this._absoluteOrthogonalOffset > 0;
405
+ this.splitview.endSnappingEnabled = this._edgeSnapping || this._absoluteOrthogonalOffset + this._size < this.absoluteOrthogonalSize;
406
+ }
407
+ dispose() {
408
+ for (const child of this.children) {
409
+ child.dispose();
410
+ }
411
+ this._onDidChange.dispose();
412
+ this._onDidSashReset.dispose();
413
+ this.splitviewSashResetDisposable.dispose();
414
+ this.childrenSashResetDisposable.dispose();
415
+ this.childrenChangeDisposable.dispose();
416
+ this.splitview.dispose();
417
+ }
418
+ }
419
+ function createLatchedOnDidChangeViewEvent(view) {
420
+ const [onDidChangeViewConstraints, onDidSetViewSize] = Event.split(view.onDidChange, isUndefined);
421
+ return Event.any(onDidSetViewSize, ( Event.map(Event.latch(( Event.map(
422
+ onDidChangeViewConstraints,
423
+ _ => ([view.minimumWidth, view.maximumWidth, view.minimumHeight, view.maximumHeight])
424
+ )), equals), _ => undefined)));
425
+ }
426
+ class LeafNode {
427
+ get size() { return this._size; }
428
+ get orthogonalSize() { return this._orthogonalSize; }
429
+ get linkedWidthNode() { return this._linkedWidthNode; }
430
+ set linkedWidthNode(node) {
431
+ this._onDidLinkedWidthNodeChange.input = node ? node._onDidViewChange : Event.None;
432
+ this._linkedWidthNode = node;
433
+ this._onDidSetLinkedNode.fire(undefined);
434
+ }
435
+ get linkedHeightNode() { return this._linkedHeightNode; }
436
+ set linkedHeightNode(node) {
437
+ this._onDidLinkedHeightNodeChange.input = node ? node._onDidViewChange : Event.None;
438
+ this._linkedHeightNode = node;
439
+ this._onDidSetLinkedNode.fire(undefined);
440
+ }
441
+ constructor(view, orientation, layoutController, orthogonalSize, size = 0) {
442
+ this.view = view;
443
+ this.orientation = orientation;
444
+ this.layoutController = layoutController;
445
+ this._size = 0;
446
+ this.absoluteOffset = 0;
447
+ this.absoluteOrthogonalOffset = 0;
448
+ this.onDidScroll = Event.None;
449
+ this.onDidSashReset = Event.None;
450
+ this._onDidLinkedWidthNodeChange = ( new Relay());
451
+ this._linkedWidthNode = undefined;
452
+ this._onDidLinkedHeightNodeChange = ( new Relay());
453
+ this._linkedHeightNode = undefined;
454
+ this._onDidSetLinkedNode = ( new Emitter());
455
+ this.disposables = ( new DisposableStore());
456
+ this._boundarySashes = {};
457
+ this.cachedWidth = 0;
458
+ this.cachedHeight = 0;
459
+ this.cachedTop = 0;
460
+ this.cachedLeft = 0;
461
+ this._orthogonalSize = orthogonalSize;
462
+ this._size = size;
463
+ const onDidChange = createLatchedOnDidChangeViewEvent(view);
464
+ this._onDidViewChange = ( Event.map(
465
+ onDidChange,
466
+ e => e && (this.orientation === 0 ? e.width : e.height),
467
+ this.disposables
468
+ ));
469
+ this.onDidChange = Event.any(this._onDidViewChange, this._onDidSetLinkedNode.event, this._onDidLinkedWidthNodeChange.event, this._onDidLinkedHeightNodeChange.event);
470
+ }
471
+ get width() {
472
+ return this.orientation === 1 ? this.orthogonalSize : this.size;
473
+ }
474
+ get height() {
475
+ return this.orientation === 1 ? this.size : this.orthogonalSize;
476
+ }
477
+ get top() {
478
+ return this.orientation === 1 ? this.absoluteOffset : this.absoluteOrthogonalOffset;
479
+ }
480
+ get left() {
481
+ return this.orientation === 1 ? this.absoluteOrthogonalOffset : this.absoluteOffset;
482
+ }
483
+ get element() {
484
+ return this.view.element;
485
+ }
486
+ get minimumWidth() {
487
+ return this.linkedWidthNode ? Math.max(this.linkedWidthNode.view.minimumWidth, this.view.minimumWidth) : this.view.minimumWidth;
488
+ }
489
+ get maximumWidth() {
490
+ return this.linkedWidthNode ? Math.min(this.linkedWidthNode.view.maximumWidth, this.view.maximumWidth) : this.view.maximumWidth;
491
+ }
492
+ get minimumHeight() {
493
+ return this.linkedHeightNode ? Math.max(this.linkedHeightNode.view.minimumHeight, this.view.minimumHeight) : this.view.minimumHeight;
494
+ }
495
+ get maximumHeight() {
496
+ return this.linkedHeightNode ? Math.min(this.linkedHeightNode.view.maximumHeight, this.view.maximumHeight) : this.view.maximumHeight;
497
+ }
498
+ get minimumSize() {
499
+ return this.orientation === 1 ? this.minimumHeight : this.minimumWidth;
500
+ }
501
+ get maximumSize() {
502
+ return this.orientation === 1 ? this.maximumHeight : this.maximumWidth;
503
+ }
504
+ get priority() {
505
+ return this.view.priority;
506
+ }
507
+ get proportionalLayout() {
508
+ return this.view.proportionalLayout ?? true;
509
+ }
510
+ get snap() {
511
+ return this.view.snap;
512
+ }
513
+ get minimumOrthogonalSize() {
514
+ return this.orientation === 1 ? this.minimumWidth : this.minimumHeight;
515
+ }
516
+ get maximumOrthogonalSize() {
517
+ return this.orientation === 1 ? this.maximumWidth : this.maximumHeight;
518
+ }
519
+ get boundarySashes() { return this._boundarySashes; }
520
+ set boundarySashes(boundarySashes) {
521
+ this._boundarySashes = boundarySashes;
522
+ this.view.setBoundarySashes?.(toAbsoluteBoundarySashes(boundarySashes, this.orientation));
523
+ }
524
+ layout(size, offset, ctx) {
525
+ if (!this.layoutController.isLayoutEnabled) {
526
+ return;
527
+ }
528
+ if (typeof ctx === 'undefined') {
529
+ throw new Error('Invalid state');
530
+ }
531
+ this._size = size;
532
+ this._orthogonalSize = ctx.orthogonalSize;
533
+ this.absoluteOffset = ctx.absoluteOffset + offset;
534
+ this.absoluteOrthogonalOffset = ctx.absoluteOrthogonalOffset;
535
+ this._layout(this.width, this.height, this.top, this.left);
536
+ }
537
+ _layout(width, height, top, left) {
538
+ if (this.cachedWidth === width && this.cachedHeight === height && this.cachedTop === top && this.cachedLeft === left) {
539
+ return;
540
+ }
541
+ this.cachedWidth = width;
542
+ this.cachedHeight = height;
543
+ this.cachedTop = top;
544
+ this.cachedLeft = left;
545
+ this.view.layout(width, height, top, left);
546
+ }
547
+ setVisible(visible) {
548
+ this.view.setVisible?.(visible);
549
+ }
550
+ dispose() {
551
+ this.disposables.dispose();
552
+ }
553
+ }
554
+ function flipNode(node, size, orthogonalSize) {
555
+ if (node instanceof BranchNode) {
556
+ const result = ( new BranchNode(
557
+ orthogonal(node.orientation),
558
+ node.layoutController,
559
+ node.styles,
560
+ node.splitviewProportionalLayout,
561
+ size,
562
+ orthogonalSize,
563
+ node.edgeSnapping
564
+ ));
565
+ let totalSize = 0;
566
+ for (let i = node.children.length - 1; i >= 0; i--) {
567
+ const child = node.children[i];
568
+ const childSize = child instanceof BranchNode ? child.orthogonalSize : child.size;
569
+ let newSize = node.size === 0 ? 0 : Math.round((size * childSize) / node.size);
570
+ totalSize += newSize;
571
+ if (i === 0) {
572
+ newSize += size - totalSize;
573
+ }
574
+ result.addChild(flipNode(child, orthogonalSize, newSize), newSize, 0, true);
575
+ }
576
+ return result;
577
+ }
578
+ else {
579
+ return ( new LeafNode(
580
+ node.view,
581
+ orthogonal(node.orientation),
582
+ node.layoutController,
583
+ orthogonalSize
584
+ ));
585
+ }
586
+ }
587
+ class GridView {
588
+ get root() { return this._root; }
589
+ set root(root) {
590
+ const oldRoot = this._root;
591
+ if (oldRoot) {
592
+ this.element.removeChild(oldRoot.element);
593
+ oldRoot.dispose();
594
+ }
595
+ this._root = root;
596
+ this.element.appendChild(root.element);
597
+ this.onDidSashResetRelay.input = root.onDidSashReset;
598
+ this._onDidChange.input = ( Event.map(root.onDidChange, () => undefined));
599
+ this._onDidScroll.input = root.onDidScroll;
600
+ }
601
+ get width() { return this.root.width; }
602
+ get height() { return this.root.height; }
603
+ get minimumWidth() { return this.root.minimumWidth; }
604
+ get minimumHeight() { return this.root.minimumHeight; }
605
+ get maximumWidth() { return this.root.maximumHeight; }
606
+ get maximumHeight() { return this.root.maximumHeight; }
607
+ get orientation() { return this._root.orientation; }
608
+ get boundarySashes() { return this._boundarySashes; }
609
+ set orientation(orientation) {
610
+ if (this._root.orientation === orientation) {
611
+ return;
612
+ }
613
+ const { size, orthogonalSize, absoluteOffset, absoluteOrthogonalOffset } = this._root;
614
+ this.root = flipNode(this._root, orthogonalSize, size);
615
+ this.root.layout(size, 0, { orthogonalSize, absoluteOffset: absoluteOrthogonalOffset, absoluteOrthogonalOffset: absoluteOffset, absoluteSize: size, absoluteOrthogonalSize: orthogonalSize });
616
+ this.boundarySashes = this.boundarySashes;
617
+ }
618
+ set boundarySashes(boundarySashes) {
619
+ this._boundarySashes = boundarySashes;
620
+ this.root.boundarySashes = fromAbsoluteBoundarySashes(boundarySashes, this.orientation);
621
+ }
622
+ set edgeSnapping(edgeSnapping) {
623
+ this.root.edgeSnapping = edgeSnapping;
624
+ }
625
+ constructor(options = {}) {
626
+ this.onDidSashResetRelay = ( new Relay());
627
+ this._onDidScroll = ( new Relay());
628
+ this._onDidChange = ( new Relay());
629
+ this._boundarySashes = {};
630
+ this.disposable2x2 = Disposable.None;
631
+ this.onDidSashReset = this.onDidSashResetRelay.event;
632
+ this.onDidScroll = this._onDidScroll.event;
633
+ this.onDidChange = this._onDidChange.event;
634
+ this.element = $('.monaco-grid-view');
635
+ this.styles = options.styles || defaultStyles;
636
+ this.proportionalLayout = typeof options.proportionalLayout !== 'undefined' ? !!options.proportionalLayout : true;
637
+ this.layoutController = ( new LayoutController(false));
638
+ this.root = ( new BranchNode(
639
+ 0 ,
640
+ this.layoutController,
641
+ this.styles,
642
+ this.proportionalLayout
643
+ ));
644
+ }
645
+ style(styles) {
646
+ this.styles = styles;
647
+ this.root.style(styles);
648
+ }
649
+ layout(width, height, top = 0, left = 0) {
650
+ this.layoutController.isLayoutEnabled = true;
651
+ const [size, orthogonalSize, offset, orthogonalOffset] = this.root.orientation === 1 ? [height, width, top, left] : [width, height, left, top];
652
+ this.root.layout(size, 0, { orthogonalSize, absoluteOffset: offset, absoluteOrthogonalOffset: orthogonalOffset, absoluteSize: size, absoluteOrthogonalSize: orthogonalSize });
653
+ }
654
+ addView(view, size, location) {
655
+ this.disposable2x2.dispose();
656
+ this.disposable2x2 = Disposable.None;
657
+ const [rest, index] = tail2(location);
658
+ const [pathToParent, parent] = this.getNode(rest);
659
+ if (parent instanceof BranchNode) {
660
+ const node = ( new LeafNode(
661
+ view,
662
+ orthogonal(parent.orientation),
663
+ this.layoutController,
664
+ parent.orthogonalSize
665
+ ));
666
+ parent.addChild(node, size, index);
667
+ }
668
+ else {
669
+ const [, grandParent] = tail2(pathToParent);
670
+ const [, parentIndex] = tail2(rest);
671
+ let newSiblingSize = 0;
672
+ const newSiblingCachedVisibleSize = grandParent.getChildCachedVisibleSize(parentIndex);
673
+ if (typeof newSiblingCachedVisibleSize === 'number') {
674
+ newSiblingSize = Sizing.Invisible(newSiblingCachedVisibleSize);
675
+ }
676
+ grandParent.removeChild(parentIndex);
677
+ const newParent = ( new BranchNode(
678
+ parent.orientation,
679
+ parent.layoutController,
680
+ this.styles,
681
+ this.proportionalLayout,
682
+ parent.size,
683
+ parent.orthogonalSize,
684
+ grandParent.edgeSnapping
685
+ ));
686
+ grandParent.addChild(newParent, parent.size, parentIndex);
687
+ const newSibling = ( new LeafNode(parent.view, grandParent.orientation, this.layoutController, parent.size));
688
+ newParent.addChild(newSibling, newSiblingSize, 0);
689
+ if (typeof size !== 'number' && size.type === 'split') {
690
+ size = Sizing.Split(0);
691
+ }
692
+ const node = ( new LeafNode(view, grandParent.orientation, this.layoutController, parent.size));
693
+ newParent.addChild(node, size, index);
694
+ }
695
+ this.trySet2x2();
696
+ }
697
+ removeView(location, sizing) {
698
+ this.disposable2x2.dispose();
699
+ this.disposable2x2 = Disposable.None;
700
+ const [rest, index] = tail2(location);
701
+ const [pathToParent, parent] = this.getNode(rest);
702
+ if (!(parent instanceof BranchNode)) {
703
+ throw new Error('Invalid location');
704
+ }
705
+ const node = parent.children[index];
706
+ if (!(node instanceof LeafNode)) {
707
+ throw new Error('Invalid location');
708
+ }
709
+ parent.removeChild(index, sizing);
710
+ if (parent.children.length === 0) {
711
+ throw new Error('Invalid grid state');
712
+ }
713
+ if (parent.children.length > 1) {
714
+ this.trySet2x2();
715
+ return node.view;
716
+ }
717
+ if (pathToParent.length === 0) {
718
+ const sibling = parent.children[0];
719
+ if (sibling instanceof LeafNode) {
720
+ return node.view;
721
+ }
722
+ parent.removeChild(0);
723
+ this.root = sibling;
724
+ this.boundarySashes = this.boundarySashes;
725
+ this.trySet2x2();
726
+ return node.view;
727
+ }
728
+ const [, grandParent] = tail2(pathToParent);
729
+ const [, parentIndex] = tail2(rest);
730
+ const sibling = parent.children[0];
731
+ const isSiblingVisible = parent.isChildVisible(0);
732
+ parent.removeChild(0);
733
+ const sizes = ( grandParent.children.map((_, i) => grandParent.getChildSize(i)));
734
+ grandParent.removeChild(parentIndex, sizing);
735
+ if (sibling instanceof BranchNode) {
736
+ sizes.splice(parentIndex, 1, ...( sibling.children.map(c => c.size)));
737
+ for (let i = 0; i < sibling.children.length; i++) {
738
+ const child = sibling.children[i];
739
+ grandParent.addChild(child, child.size, parentIndex + i);
740
+ }
741
+ }
742
+ else {
743
+ const newSibling = ( new LeafNode(
744
+ sibling.view,
745
+ orthogonal(sibling.orientation),
746
+ this.layoutController,
747
+ sibling.size
748
+ ));
749
+ const sizing = isSiblingVisible ? sibling.orthogonalSize : Sizing.Invisible(sibling.orthogonalSize);
750
+ grandParent.addChild(newSibling, sizing, parentIndex);
751
+ }
752
+ for (let i = 0; i < sizes.length; i++) {
753
+ grandParent.resizeChild(i, sizes[i]);
754
+ }
755
+ this.trySet2x2();
756
+ return node.view;
757
+ }
758
+ moveView(parentLocation, from, to) {
759
+ const [, parent] = this.getNode(parentLocation);
760
+ if (!(parent instanceof BranchNode)) {
761
+ throw new Error('Invalid location');
762
+ }
763
+ parent.moveChild(from, to);
764
+ this.trySet2x2();
765
+ }
766
+ swapViews(from, to) {
767
+ const [fromRest, fromIndex] = tail2(from);
768
+ const [, fromParent] = this.getNode(fromRest);
769
+ if (!(fromParent instanceof BranchNode)) {
770
+ throw new Error('Invalid from location');
771
+ }
772
+ const fromSize = fromParent.getChildSize(fromIndex);
773
+ const fromNode = fromParent.children[fromIndex];
774
+ if (!(fromNode instanceof LeafNode)) {
775
+ throw new Error('Invalid from location');
776
+ }
777
+ const [toRest, toIndex] = tail2(to);
778
+ const [, toParent] = this.getNode(toRest);
779
+ if (!(toParent instanceof BranchNode)) {
780
+ throw new Error('Invalid to location');
781
+ }
782
+ const toSize = toParent.getChildSize(toIndex);
783
+ const toNode = toParent.children[toIndex];
784
+ if (!(toNode instanceof LeafNode)) {
785
+ throw new Error('Invalid to location');
786
+ }
787
+ if (fromParent === toParent) {
788
+ fromParent.swapChildren(fromIndex, toIndex);
789
+ }
790
+ else {
791
+ fromParent.removeChild(fromIndex);
792
+ toParent.removeChild(toIndex);
793
+ fromParent.addChild(toNode, fromSize, fromIndex);
794
+ toParent.addChild(fromNode, toSize, toIndex);
795
+ }
796
+ this.trySet2x2();
797
+ }
798
+ resizeView(location, size) {
799
+ const [rest, index] = tail2(location);
800
+ const [pathToParent, parent] = this.getNode(rest);
801
+ if (!(parent instanceof BranchNode)) {
802
+ throw new Error('Invalid location');
803
+ }
804
+ if (!size.width && !size.height) {
805
+ return;
806
+ }
807
+ const [parentSize, grandParentSize] = parent.orientation === 1 ? [size.width, size.height] : [size.height, size.width];
808
+ if (typeof grandParentSize === 'number' && pathToParent.length > 0) {
809
+ const [, grandParent] = tail2(pathToParent);
810
+ const [, parentIndex] = tail2(rest);
811
+ grandParent.resizeChild(parentIndex, grandParentSize);
812
+ }
813
+ if (typeof parentSize === 'number') {
814
+ parent.resizeChild(index, parentSize);
815
+ }
816
+ this.trySet2x2();
817
+ }
818
+ getViewSize(location) {
819
+ if (!location) {
820
+ return { width: this.root.width, height: this.root.height };
821
+ }
822
+ const [, node] = this.getNode(location);
823
+ return { width: node.width, height: node.height };
824
+ }
825
+ getViewCachedVisibleSize(location) {
826
+ const [rest, index] = tail2(location);
827
+ const [, parent] = this.getNode(rest);
828
+ if (!(parent instanceof BranchNode)) {
829
+ throw new Error('Invalid location');
830
+ }
831
+ return parent.getChildCachedVisibleSize(index);
832
+ }
833
+ maximizeViewSize(location) {
834
+ const [ancestors, node] = this.getNode(location);
835
+ if (!(node instanceof LeafNode)) {
836
+ throw new Error('Invalid location');
837
+ }
838
+ for (let i = 0; i < ancestors.length; i++) {
839
+ ancestors[i].resizeChild(location[i], Number.POSITIVE_INFINITY);
840
+ }
841
+ }
842
+ isViewSizeMaximized(location) {
843
+ const [ancestors, node] = this.getNode(location);
844
+ if (!(node instanceof LeafNode)) {
845
+ throw new Error('Invalid location');
846
+ }
847
+ for (let i = 0; i < ancestors.length; i++) {
848
+ if (!ancestors[i].isChildSizeMaximized(location[i])) {
849
+ return false;
850
+ }
851
+ }
852
+ return true;
853
+ }
854
+ distributeViewSizes(location) {
855
+ if (!location) {
856
+ this.root.distributeViewSizes(true);
857
+ return;
858
+ }
859
+ const [, node] = this.getNode(location);
860
+ if (!(node instanceof BranchNode)) {
861
+ throw new Error('Invalid location');
862
+ }
863
+ node.distributeViewSizes();
864
+ this.trySet2x2();
865
+ }
866
+ isViewVisible(location) {
867
+ const [rest, index] = tail2(location);
868
+ const [, parent] = this.getNode(rest);
869
+ if (!(parent instanceof BranchNode)) {
870
+ throw new Error('Invalid from location');
871
+ }
872
+ return parent.isChildVisible(index);
873
+ }
874
+ setViewVisible(location, visible) {
875
+ const [rest, index] = tail2(location);
876
+ const [, parent] = this.getNode(rest);
877
+ if (!(parent instanceof BranchNode)) {
878
+ throw new Error('Invalid from location');
879
+ }
880
+ parent.setChildVisible(index, visible);
881
+ }
882
+ getView(location) {
883
+ const node = location ? this.getNode(location)[1] : this._root;
884
+ return this._getViews(node, this.orientation);
885
+ }
886
+ static deserialize(json, deserializer, options = {}) {
887
+ if (typeof json.orientation !== 'number') {
888
+ throw new Error('Invalid JSON: \'orientation\' property must be a number.');
889
+ }
890
+ else if (typeof json.width !== 'number') {
891
+ throw new Error('Invalid JSON: \'width\' property must be a number.');
892
+ }
893
+ else if (typeof json.height !== 'number') {
894
+ throw new Error('Invalid JSON: \'height\' property must be a number.');
895
+ }
896
+ else if (json.root?.type !== 'branch') {
897
+ throw new Error('Invalid JSON: \'root\' property must have \'type\' value of branch.');
898
+ }
899
+ const orientation = json.orientation;
900
+ const height = json.height;
901
+ const result = ( new GridView(options));
902
+ result._deserialize(json.root, orientation, deserializer, height);
903
+ return result;
904
+ }
905
+ _deserialize(root, orientation, deserializer, orthogonalSize) {
906
+ this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
907
+ }
908
+ _deserializeNode(node, orientation, deserializer, orthogonalSize) {
909
+ let result;
910
+ if (node.type === 'branch') {
911
+ const serializedChildren = node.data;
912
+ const children = ( serializedChildren.map(serializedChild => {
913
+ return {
914
+ node: this._deserializeNode(serializedChild, orthogonal(orientation), deserializer, node.size),
915
+ visible: serializedChild.visible
916
+ };
917
+ }));
918
+ result = ( new BranchNode(
919
+ orientation,
920
+ this.layoutController,
921
+ this.styles,
922
+ this.proportionalLayout,
923
+ node.size,
924
+ orthogonalSize,
925
+ undefined,
926
+ children
927
+ ));
928
+ }
929
+ else {
930
+ result = ( new LeafNode(
931
+ deserializer.fromJSON(node.data),
932
+ orientation,
933
+ this.layoutController,
934
+ orthogonalSize,
935
+ node.size
936
+ ));
937
+ }
938
+ return result;
939
+ }
940
+ _getViews(node, orientation, cachedVisibleSize) {
941
+ const box = { top: node.top, left: node.left, width: node.width, height: node.height };
942
+ if (node instanceof LeafNode) {
943
+ return { view: node.view, box, cachedVisibleSize };
944
+ }
945
+ const children = [];
946
+ for (let i = 0; i < node.children.length; i++) {
947
+ const child = node.children[i];
948
+ const cachedVisibleSize = node.getChildCachedVisibleSize(i);
949
+ children.push(this._getViews(child, orthogonal(orientation), cachedVisibleSize));
950
+ }
951
+ return { children, box };
952
+ }
953
+ getNode(location, node = this.root, path = []) {
954
+ if (location.length === 0) {
955
+ return [path, node];
956
+ }
957
+ if (!(node instanceof BranchNode)) {
958
+ throw new Error('Invalid location');
959
+ }
960
+ const [index, ...rest] = location;
961
+ if (index < 0 || index >= node.children.length) {
962
+ throw new Error('Invalid location');
963
+ }
964
+ const child = node.children[index];
965
+ path.push(node);
966
+ return this.getNode(rest, child, path);
967
+ }
968
+ trySet2x2() {
969
+ this.disposable2x2.dispose();
970
+ this.disposable2x2 = Disposable.None;
971
+ if (this.root.children.length !== 2) {
972
+ return;
973
+ }
974
+ const [first, second] = this.root.children;
975
+ if (!(first instanceof BranchNode) || !(second instanceof BranchNode)) {
976
+ return;
977
+ }
978
+ this.disposable2x2 = first.trySet2x2(second);
979
+ }
980
+ getViewMap(map, node) {
981
+ if (!node) {
982
+ node = this.root;
983
+ }
984
+ if (node instanceof BranchNode) {
985
+ node.children.forEach(child => this.getViewMap(map, child));
986
+ }
987
+ else {
988
+ map.set(node.view, node.element);
989
+ }
990
+ }
991
+ dispose() {
992
+ this.onDidSashResetRelay.dispose();
993
+ this.root.dispose();
994
+ if (this.element && this.element.parentElement) {
995
+ this.element.parentElement.removeChild(this.element);
996
+ }
997
+ }
998
+ }
999
+ export { GridView, orthogonal };