dockview-core 1.9.2 → 1.10.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 (536) hide show
  1. package/dist/cjs/api/component.api.d.ts +35 -8
  2. package/dist/cjs/api/component.api.js +37 -7
  3. package/dist/cjs/api/dockviewGroupPanelApi.d.ts +7 -1
  4. package/dist/cjs/api/dockviewGroupPanelApi.js +22 -3
  5. package/dist/cjs/api/dockviewPanelApi.d.ts +24 -7
  6. package/dist/cjs/api/dockviewPanelApi.js +60 -14
  7. package/dist/cjs/api/gridviewPanelApi.d.ts +0 -1
  8. package/dist/cjs/api/gridviewPanelApi.js +1 -4
  9. package/dist/cjs/api/panelApi.d.ts +10 -8
  10. package/dist/cjs/api/panelApi.js +19 -29
  11. package/dist/cjs/api/paneviewPanelApi.d.ts +0 -1
  12. package/dist/cjs/api/paneviewPanelApi.js +0 -1
  13. package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
  14. package/dist/cjs/api/splitviewPanelApi.js +0 -1
  15. package/dist/cjs/array.d.ts +0 -1
  16. package/dist/cjs/array.js +0 -1
  17. package/dist/cjs/constants.d.ts +0 -1
  18. package/dist/cjs/constants.js +0 -1
  19. package/dist/cjs/dnd/abstractDragHandler.d.ts +0 -1
  20. package/dist/cjs/dnd/abstractDragHandler.js +0 -1
  21. package/dist/cjs/dnd/dataTransfer.d.ts +0 -1
  22. package/dist/cjs/dnd/dataTransfer.js +0 -1
  23. package/dist/cjs/dnd/dnd.d.ts +0 -1
  24. package/dist/cjs/dnd/dnd.js +0 -1
  25. package/dist/cjs/dnd/droptarget.d.ts +20 -9
  26. package/dist/cjs/dnd/droptarget.js +71 -14
  27. package/dist/cjs/dnd/ghost.d.ts +0 -1
  28. package/dist/cjs/dnd/ghost.js +0 -1
  29. package/dist/cjs/dnd/groupDragHandler.d.ts +0 -1
  30. package/dist/cjs/dnd/groupDragHandler.js +1 -2
  31. package/dist/cjs/dnd/overlay.d.ts +0 -1
  32. package/dist/cjs/dnd/overlay.js +0 -1
  33. package/dist/cjs/dockview/components/panel/content.d.ts +0 -1
  34. package/dist/cjs/dockview/components/panel/content.js +6 -7
  35. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
  36. package/dist/cjs/dockview/components/tab/defaultTab.js +0 -1
  37. package/dist/cjs/dockview/components/tab/tab.d.ts +5 -13
  38. package/dist/cjs/dockview/components/tab/tab.js +5 -6
  39. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +17 -14
  40. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +26 -22
  41. package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +3 -3
  42. package/dist/cjs/dockview/components/titlebar/voidContainer.js +5 -6
  43. package/dist/cjs/dockview/components/watermark/watermark.d.ts +0 -1
  44. package/dist/cjs/dockview/components/watermark/watermark.js +0 -1
  45. package/dist/cjs/dockview/deserializer.d.ts +0 -1
  46. package/dist/cjs/dockview/deserializer.js +0 -1
  47. package/dist/cjs/dockview/dockviewComponent.d.ts +86 -25
  48. package/dist/cjs/dockview/dockviewComponent.js +586 -198
  49. package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +0 -1
  50. package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -1
  51. package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -1
  52. package/dist/cjs/dockview/dockviewGroupPanel.js +6 -1
  53. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +81 -37
  54. package/dist/cjs/dockview/dockviewGroupPanelModel.js +226 -57
  55. package/dist/cjs/dockview/dockviewPanel.d.ts +8 -3
  56. package/dist/cjs/dockview/dockviewPanel.js +39 -12
  57. package/dist/cjs/dockview/dockviewPanelModel.d.ts +1 -4
  58. package/dist/cjs/dockview/dockviewPanelModel.js +2 -22
  59. package/dist/cjs/dockview/options.d.ts +10 -6
  60. package/dist/cjs/dockview/options.js +0 -1
  61. package/dist/cjs/dockview/types.d.ts +0 -11
  62. package/dist/cjs/dockview/types.js +0 -9
  63. package/dist/cjs/dom.d.ts +0 -1
  64. package/dist/cjs/dom.js +0 -1
  65. package/dist/cjs/events.d.ts +10 -1
  66. package/dist/cjs/events.js +25 -2
  67. package/dist/cjs/gridview/baseComponentGridview.d.ts +15 -16
  68. package/dist/cjs/gridview/baseComponentGridview.js +37 -27
  69. package/dist/cjs/gridview/basePanelView.d.ts +0 -1
  70. package/dist/cjs/gridview/basePanelView.js +7 -2
  71. package/dist/cjs/gridview/branchNode.d.ts +3 -2
  72. package/dist/cjs/gridview/branchNode.js +12 -2
  73. package/dist/cjs/gridview/gridview.d.ts +5 -3
  74. package/dist/cjs/gridview/gridview.js +54 -21
  75. package/dist/cjs/gridview/gridviewComponent.d.ts +10 -2
  76. package/dist/cjs/gridview/gridviewComponent.js +14 -1
  77. package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
  78. package/dist/cjs/gridview/gridviewPanel.js +2 -3
  79. package/dist/cjs/gridview/leafNode.d.ts +0 -1
  80. package/dist/cjs/gridview/leafNode.js +0 -1
  81. package/dist/cjs/gridview/options.d.ts +1 -2
  82. package/dist/cjs/gridview/options.js +0 -1
  83. package/dist/cjs/gridview/types.d.ts +0 -1
  84. package/dist/cjs/gridview/types.js +0 -1
  85. package/dist/cjs/index.d.ts +2 -2
  86. package/dist/cjs/index.js +0 -2
  87. package/dist/cjs/lifecycle.d.ts +3 -4
  88. package/dist/cjs/lifecycle.js +5 -2
  89. package/dist/cjs/math.d.ts +0 -1
  90. package/dist/cjs/math.js +0 -1
  91. package/dist/cjs/overlayRenderContainer.d.ts +1 -1
  92. package/dist/cjs/overlayRenderContainer.js +8 -4
  93. package/dist/cjs/panel/componentFactory.d.ts +0 -1
  94. package/dist/cjs/panel/componentFactory.js +0 -1
  95. package/dist/cjs/panel/types.d.ts +1 -2
  96. package/dist/cjs/panel/types.js +0 -1
  97. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +0 -1
  98. package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -1
  99. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +0 -1
  100. package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -1
  101. package/dist/cjs/paneview/options.d.ts +1 -2
  102. package/dist/cjs/paneview/options.js +0 -1
  103. package/dist/cjs/paneview/paneview.d.ts +1 -1
  104. package/dist/cjs/paneview/paneview.js +3 -1
  105. package/dist/cjs/paneview/paneviewComponent.d.ts +2 -1
  106. package/dist/cjs/paneview/paneviewComponent.js +6 -1
  107. package/dist/cjs/paneview/paneviewPanel.d.ts +2 -1
  108. package/dist/cjs/paneview/paneviewPanel.js +5 -2
  109. package/dist/cjs/popoutWindow.d.ts +15 -4
  110. package/dist/cjs/popoutWindow.js +140 -56
  111. package/dist/cjs/resizable.d.ts +1 -2
  112. package/dist/cjs/resizable.js +1 -10
  113. package/dist/cjs/splitview/options.d.ts +3 -7
  114. package/dist/cjs/splitview/options.js +0 -1
  115. package/dist/cjs/splitview/splitview.d.ts +3 -1
  116. package/dist/cjs/splitview/splitview.js +12 -1
  117. package/dist/cjs/splitview/splitviewComponent.d.ts +1 -2
  118. package/dist/cjs/splitview/splitviewComponent.js +5 -6
  119. package/dist/cjs/splitview/splitviewPanel.d.ts +2 -3
  120. package/dist/cjs/splitview/splitviewPanel.js +1 -2
  121. package/dist/cjs/splitview/viewItem.d.ts +0 -1
  122. package/dist/cjs/splitview/viewItem.js +0 -1
  123. package/dist/cjs/svg.d.ts +0 -1
  124. package/dist/cjs/svg.js +0 -1
  125. package/dist/cjs/types.d.ts +0 -1
  126. package/dist/cjs/types.js +0 -1
  127. package/dist/dockview-core.amd.js +1298 -531
  128. package/dist/dockview-core.amd.js.map +1 -1
  129. package/dist/dockview-core.amd.min.js +2 -2
  130. package/dist/dockview-core.amd.min.js.map +1 -1
  131. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  132. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  133. package/dist/dockview-core.amd.noStyle.js +1297 -530
  134. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  135. package/dist/dockview-core.cjs.js +1298 -531
  136. package/dist/dockview-core.cjs.js.map +1 -1
  137. package/dist/dockview-core.esm.js +1296 -532
  138. package/dist/dockview-core.esm.js.map +1 -1
  139. package/dist/dockview-core.esm.min.js +2 -2
  140. package/dist/dockview-core.esm.min.js.map +1 -1
  141. package/dist/dockview-core.js +1298 -531
  142. package/dist/dockview-core.js.map +1 -1
  143. package/dist/dockview-core.min.js +2 -2
  144. package/dist/dockview-core.min.js.map +1 -1
  145. package/dist/dockview-core.min.noStyle.js +2 -2
  146. package/dist/dockview-core.min.noStyle.js.map +1 -1
  147. package/dist/dockview-core.noStyle.js +1297 -530
  148. package/dist/dockview-core.noStyle.js.map +1 -1
  149. package/dist/esm/api/component.api.d.ts +35 -8
  150. package/dist/esm/api/component.api.js +29 -7
  151. package/dist/esm/api/dockviewGroupPanelApi.d.ts +7 -1
  152. package/dist/esm/api/dockviewGroupPanelApi.js +22 -3
  153. package/dist/esm/api/dockviewPanelApi.d.ts +24 -7
  154. package/dist/esm/api/dockviewPanelApi.js +56 -14
  155. package/dist/esm/api/gridviewPanelApi.d.ts +0 -1
  156. package/dist/esm/api/gridviewPanelApi.js +1 -4
  157. package/dist/esm/api/panelApi.d.ts +10 -8
  158. package/dist/esm/api/panelApi.js +16 -29
  159. package/dist/esm/api/paneviewPanelApi.d.ts +0 -1
  160. package/dist/esm/api/paneviewPanelApi.js +0 -1
  161. package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
  162. package/dist/esm/api/splitviewPanelApi.js +0 -1
  163. package/dist/esm/array.d.ts +0 -1
  164. package/dist/esm/array.js +0 -1
  165. package/dist/esm/constants.d.ts +0 -1
  166. package/dist/esm/constants.js +0 -1
  167. package/dist/esm/dnd/abstractDragHandler.d.ts +0 -1
  168. package/dist/esm/dnd/abstractDragHandler.js +0 -1
  169. package/dist/esm/dnd/dataTransfer.d.ts +0 -1
  170. package/dist/esm/dnd/dataTransfer.js +0 -1
  171. package/dist/esm/dnd/dnd.d.ts +0 -1
  172. package/dist/esm/dnd/dnd.js +0 -1
  173. package/dist/esm/dnd/droptarget.d.ts +20 -9
  174. package/dist/esm/dnd/droptarget.js +59 -14
  175. package/dist/esm/dnd/ghost.d.ts +0 -1
  176. package/dist/esm/dnd/ghost.js +0 -1
  177. package/dist/esm/dnd/groupDragHandler.d.ts +0 -1
  178. package/dist/esm/dnd/groupDragHandler.js +1 -2
  179. package/dist/esm/dnd/overlay.d.ts +0 -1
  180. package/dist/esm/dnd/overlay.js +0 -1
  181. package/dist/esm/dockview/components/panel/content.d.ts +0 -1
  182. package/dist/esm/dockview/components/panel/content.js +6 -7
  183. package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
  184. package/dist/esm/dockview/components/tab/defaultTab.js +0 -1
  185. package/dist/esm/dockview/components/tab/tab.d.ts +5 -13
  186. package/dist/esm/dockview/components/tab/tab.js +6 -7
  187. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +17 -14
  188. package/dist/esm/dockview/components/titlebar/tabsContainer.js +24 -20
  189. package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +3 -3
  190. package/dist/esm/dockview/components/titlebar/voidContainer.js +6 -7
  191. package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -1
  192. package/dist/esm/dockview/components/watermark/watermark.js +0 -1
  193. package/dist/esm/dockview/deserializer.d.ts +0 -1
  194. package/dist/esm/dockview/deserializer.js +0 -1
  195. package/dist/esm/dockview/dockviewComponent.d.ts +86 -25
  196. package/dist/esm/dockview/dockviewComponent.js +529 -163
  197. package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -1
  198. package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -1
  199. package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -1
  200. package/dist/esm/dockview/dockviewGroupPanel.js +6 -1
  201. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +81 -37
  202. package/dist/esm/dockview/dockviewGroupPanelModel.js +169 -53
  203. package/dist/esm/dockview/dockviewPanel.d.ts +8 -3
  204. package/dist/esm/dockview/dockviewPanel.js +39 -12
  205. package/dist/esm/dockview/dockviewPanelModel.d.ts +1 -4
  206. package/dist/esm/dockview/dockviewPanelModel.js +2 -22
  207. package/dist/esm/dockview/options.d.ts +10 -6
  208. package/dist/esm/dockview/options.js +0 -1
  209. package/dist/esm/dockview/types.d.ts +0 -11
  210. package/dist/esm/dockview/types.js +1 -8
  211. package/dist/esm/dom.d.ts +0 -1
  212. package/dist/esm/dom.js +0 -1
  213. package/dist/esm/events.d.ts +10 -1
  214. package/dist/esm/events.js +14 -1
  215. package/dist/esm/gridview/baseComponentGridview.d.ts +15 -16
  216. package/dist/esm/gridview/baseComponentGridview.js +33 -27
  217. package/dist/esm/gridview/basePanelView.d.ts +0 -1
  218. package/dist/esm/gridview/basePanelView.js +7 -2
  219. package/dist/esm/gridview/branchNode.d.ts +3 -2
  220. package/dist/esm/gridview/branchNode.js +8 -2
  221. package/dist/esm/gridview/gridview.d.ts +5 -3
  222. package/dist/esm/gridview/gridview.js +49 -20
  223. package/dist/esm/gridview/gridviewComponent.d.ts +10 -2
  224. package/dist/esm/gridview/gridviewComponent.js +14 -1
  225. package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
  226. package/dist/esm/gridview/gridviewPanel.js +2 -3
  227. package/dist/esm/gridview/leafNode.d.ts +0 -1
  228. package/dist/esm/gridview/leafNode.js +0 -1
  229. package/dist/esm/gridview/options.d.ts +1 -2
  230. package/dist/esm/gridview/options.js +0 -1
  231. package/dist/esm/gridview/types.d.ts +0 -1
  232. package/dist/esm/gridview/types.js +0 -1
  233. package/dist/esm/index.d.ts +2 -2
  234. package/dist/esm/index.js +0 -2
  235. package/dist/esm/lifecycle.d.ts +3 -4
  236. package/dist/esm/lifecycle.js +5 -2
  237. package/dist/esm/math.d.ts +0 -1
  238. package/dist/esm/math.js +0 -1
  239. package/dist/esm/overlayRenderContainer.d.ts +1 -1
  240. package/dist/esm/overlayRenderContainer.js +8 -4
  241. package/dist/esm/panel/componentFactory.d.ts +0 -1
  242. package/dist/esm/panel/componentFactory.js +0 -1
  243. package/dist/esm/panel/types.d.ts +1 -2
  244. package/dist/esm/panel/types.js +0 -1
  245. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -1
  246. package/dist/esm/paneview/defaultPaneviewHeader.js +0 -1
  247. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -1
  248. package/dist/esm/paneview/draggablePaneviewPanel.js +0 -1
  249. package/dist/esm/paneview/options.d.ts +1 -2
  250. package/dist/esm/paneview/options.js +0 -1
  251. package/dist/esm/paneview/paneview.d.ts +1 -1
  252. package/dist/esm/paneview/paneview.js +3 -1
  253. package/dist/esm/paneview/paneviewComponent.d.ts +2 -1
  254. package/dist/esm/paneview/paneviewComponent.js +6 -1
  255. package/dist/esm/paneview/paneviewPanel.d.ts +2 -1
  256. package/dist/esm/paneview/paneviewPanel.js +5 -2
  257. package/dist/esm/popoutWindow.d.ts +15 -4
  258. package/dist/esm/popoutWindow.js +105 -52
  259. package/dist/esm/resizable.d.ts +1 -2
  260. package/dist/esm/resizable.js +1 -10
  261. package/dist/esm/splitview/options.d.ts +3 -7
  262. package/dist/esm/splitview/options.js +0 -1
  263. package/dist/esm/splitview/splitview.d.ts +3 -1
  264. package/dist/esm/splitview/splitview.js +8 -1
  265. package/dist/esm/splitview/splitviewComponent.d.ts +1 -2
  266. package/dist/esm/splitview/splitviewComponent.js +5 -6
  267. package/dist/esm/splitview/splitviewPanel.d.ts +2 -3
  268. package/dist/esm/splitview/splitviewPanel.js +1 -2
  269. package/dist/esm/splitview/viewItem.d.ts +0 -1
  270. package/dist/esm/splitview/viewItem.js +0 -1
  271. package/dist/esm/svg.d.ts +0 -1
  272. package/dist/esm/svg.js +0 -1
  273. package/dist/esm/types.d.ts +0 -1
  274. package/dist/esm/types.js +0 -1
  275. package/dist/styles/dockview.css +20 -6
  276. package/package.json +3 -3
  277. package/dist/cjs/api/component.api.d.ts.map +0 -1
  278. package/dist/cjs/api/component.api.js.map +0 -1
  279. package/dist/cjs/api/dockviewGroupPanelApi.d.ts.map +0 -1
  280. package/dist/cjs/api/dockviewGroupPanelApi.js.map +0 -1
  281. package/dist/cjs/api/dockviewPanelApi.d.ts.map +0 -1
  282. package/dist/cjs/api/dockviewPanelApi.js.map +0 -1
  283. package/dist/cjs/api/gridviewPanelApi.d.ts.map +0 -1
  284. package/dist/cjs/api/gridviewPanelApi.js.map +0 -1
  285. package/dist/cjs/api/panelApi.d.ts.map +0 -1
  286. package/dist/cjs/api/panelApi.js.map +0 -1
  287. package/dist/cjs/api/paneviewPanelApi.d.ts.map +0 -1
  288. package/dist/cjs/api/paneviewPanelApi.js.map +0 -1
  289. package/dist/cjs/api/splitviewPanelApi.d.ts.map +0 -1
  290. package/dist/cjs/api/splitviewPanelApi.js.map +0 -1
  291. package/dist/cjs/array.d.ts.map +0 -1
  292. package/dist/cjs/array.js.map +0 -1
  293. package/dist/cjs/constants.d.ts.map +0 -1
  294. package/dist/cjs/constants.js.map +0 -1
  295. package/dist/cjs/dnd/abstractDragHandler.d.ts.map +0 -1
  296. package/dist/cjs/dnd/abstractDragHandler.js.map +0 -1
  297. package/dist/cjs/dnd/dataTransfer.d.ts.map +0 -1
  298. package/dist/cjs/dnd/dataTransfer.js.map +0 -1
  299. package/dist/cjs/dnd/dnd.d.ts.map +0 -1
  300. package/dist/cjs/dnd/dnd.js.map +0 -1
  301. package/dist/cjs/dnd/droptarget.d.ts.map +0 -1
  302. package/dist/cjs/dnd/droptarget.js.map +0 -1
  303. package/dist/cjs/dnd/ghost.d.ts.map +0 -1
  304. package/dist/cjs/dnd/ghost.js.map +0 -1
  305. package/dist/cjs/dnd/groupDragHandler.d.ts.map +0 -1
  306. package/dist/cjs/dnd/groupDragHandler.js.map +0 -1
  307. package/dist/cjs/dnd/overlay.d.ts.map +0 -1
  308. package/dist/cjs/dnd/overlay.js.map +0 -1
  309. package/dist/cjs/dockview/components/panel/content.d.ts.map +0 -1
  310. package/dist/cjs/dockview/components/panel/content.js.map +0 -1
  311. package/dist/cjs/dockview/components/tab/defaultTab.d.ts.map +0 -1
  312. package/dist/cjs/dockview/components/tab/defaultTab.js.map +0 -1
  313. package/dist/cjs/dockview/components/tab/tab.d.ts.map +0 -1
  314. package/dist/cjs/dockview/components/tab/tab.js.map +0 -1
  315. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts.map +0 -1
  316. package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +0 -1
  317. package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts.map +0 -1
  318. package/dist/cjs/dockview/components/titlebar/voidContainer.js.map +0 -1
  319. package/dist/cjs/dockview/components/watermark/watermark.d.ts.map +0 -1
  320. package/dist/cjs/dockview/components/watermark/watermark.js.map +0 -1
  321. package/dist/cjs/dockview/deserializer.d.ts.map +0 -1
  322. package/dist/cjs/dockview/deserializer.js.map +0 -1
  323. package/dist/cjs/dockview/dockviewComponent.d.ts.map +0 -1
  324. package/dist/cjs/dockview/dockviewComponent.js.map +0 -1
  325. package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts.map +0 -1
  326. package/dist/cjs/dockview/dockviewFloatingGroupPanel.js.map +0 -1
  327. package/dist/cjs/dockview/dockviewGroupPanel.d.ts.map +0 -1
  328. package/dist/cjs/dockview/dockviewGroupPanel.js.map +0 -1
  329. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts.map +0 -1
  330. package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +0 -1
  331. package/dist/cjs/dockview/dockviewPanel.d.ts.map +0 -1
  332. package/dist/cjs/dockview/dockviewPanel.js.map +0 -1
  333. package/dist/cjs/dockview/dockviewPanelModel.d.ts.map +0 -1
  334. package/dist/cjs/dockview/dockviewPanelModel.js.map +0 -1
  335. package/dist/cjs/dockview/dockviewPopoutGroupPanel.d.ts +0 -16
  336. package/dist/cjs/dockview/dockviewPopoutGroupPanel.d.ts.map +0 -1
  337. package/dist/cjs/dockview/dockviewPopoutGroupPanel.js +0 -50
  338. package/dist/cjs/dockview/dockviewPopoutGroupPanel.js.map +0 -1
  339. package/dist/cjs/dockview/options.d.ts.map +0 -1
  340. package/dist/cjs/dockview/options.js.map +0 -1
  341. package/dist/cjs/dockview/types.d.ts.map +0 -1
  342. package/dist/cjs/dockview/types.js.map +0 -1
  343. package/dist/cjs/dom.d.ts.map +0 -1
  344. package/dist/cjs/dom.js.map +0 -1
  345. package/dist/cjs/events.d.ts.map +0 -1
  346. package/dist/cjs/events.js.map +0 -1
  347. package/dist/cjs/gridview/baseComponentGridview.d.ts.map +0 -1
  348. package/dist/cjs/gridview/baseComponentGridview.js.map +0 -1
  349. package/dist/cjs/gridview/basePanelView.d.ts.map +0 -1
  350. package/dist/cjs/gridview/basePanelView.js.map +0 -1
  351. package/dist/cjs/gridview/branchNode.d.ts.map +0 -1
  352. package/dist/cjs/gridview/branchNode.js.map +0 -1
  353. package/dist/cjs/gridview/gridview.d.ts.map +0 -1
  354. package/dist/cjs/gridview/gridview.js.map +0 -1
  355. package/dist/cjs/gridview/gridviewComponent.d.ts.map +0 -1
  356. package/dist/cjs/gridview/gridviewComponent.js.map +0 -1
  357. package/dist/cjs/gridview/gridviewPanel.d.ts.map +0 -1
  358. package/dist/cjs/gridview/gridviewPanel.js.map +0 -1
  359. package/dist/cjs/gridview/leafNode.d.ts.map +0 -1
  360. package/dist/cjs/gridview/leafNode.js.map +0 -1
  361. package/dist/cjs/gridview/options.d.ts.map +0 -1
  362. package/dist/cjs/gridview/options.js.map +0 -1
  363. package/dist/cjs/gridview/types.d.ts.map +0 -1
  364. package/dist/cjs/gridview/types.js.map +0 -1
  365. package/dist/cjs/index.d.ts.map +0 -1
  366. package/dist/cjs/index.js.map +0 -1
  367. package/dist/cjs/lifecycle.d.ts.map +0 -1
  368. package/dist/cjs/lifecycle.js.map +0 -1
  369. package/dist/cjs/math.d.ts.map +0 -1
  370. package/dist/cjs/math.js.map +0 -1
  371. package/dist/cjs/overlayRenderContainer.d.ts.map +0 -1
  372. package/dist/cjs/overlayRenderContainer.js.map +0 -1
  373. package/dist/cjs/panel/componentFactory.d.ts.map +0 -1
  374. package/dist/cjs/panel/componentFactory.js.map +0 -1
  375. package/dist/cjs/panel/types.d.ts.map +0 -1
  376. package/dist/cjs/panel/types.js.map +0 -1
  377. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts.map +0 -1
  378. package/dist/cjs/paneview/defaultPaneviewHeader.js.map +0 -1
  379. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts.map +0 -1
  380. package/dist/cjs/paneview/draggablePaneviewPanel.js.map +0 -1
  381. package/dist/cjs/paneview/options.d.ts.map +0 -1
  382. package/dist/cjs/paneview/options.js.map +0 -1
  383. package/dist/cjs/paneview/paneview.d.ts.map +0 -1
  384. package/dist/cjs/paneview/paneview.js.map +0 -1
  385. package/dist/cjs/paneview/paneviewComponent.d.ts.map +0 -1
  386. package/dist/cjs/paneview/paneviewComponent.js.map +0 -1
  387. package/dist/cjs/paneview/paneviewPanel.d.ts.map +0 -1
  388. package/dist/cjs/paneview/paneviewPanel.js.map +0 -1
  389. package/dist/cjs/popoutWindow.d.ts.map +0 -1
  390. package/dist/cjs/popoutWindow.js.map +0 -1
  391. package/dist/cjs/resizable.d.ts.map +0 -1
  392. package/dist/cjs/resizable.js.map +0 -1
  393. package/dist/cjs/splitview/options.d.ts.map +0 -1
  394. package/dist/cjs/splitview/options.js.map +0 -1
  395. package/dist/cjs/splitview/splitview.d.ts.map +0 -1
  396. package/dist/cjs/splitview/splitview.js.map +0 -1
  397. package/dist/cjs/splitview/splitviewComponent.d.ts.map +0 -1
  398. package/dist/cjs/splitview/splitviewComponent.js.map +0 -1
  399. package/dist/cjs/splitview/splitviewPanel.d.ts.map +0 -1
  400. package/dist/cjs/splitview/splitviewPanel.js.map +0 -1
  401. package/dist/cjs/splitview/viewItem.d.ts.map +0 -1
  402. package/dist/cjs/splitview/viewItem.js.map +0 -1
  403. package/dist/cjs/svg.d.ts.map +0 -1
  404. package/dist/cjs/svg.js.map +0 -1
  405. package/dist/cjs/types.d.ts.map +0 -1
  406. package/dist/cjs/types.js.map +0 -1
  407. package/dist/esm/api/component.api.d.ts.map +0 -1
  408. package/dist/esm/api/component.api.js.map +0 -1
  409. package/dist/esm/api/dockviewGroupPanelApi.d.ts.map +0 -1
  410. package/dist/esm/api/dockviewGroupPanelApi.js.map +0 -1
  411. package/dist/esm/api/dockviewPanelApi.d.ts.map +0 -1
  412. package/dist/esm/api/dockviewPanelApi.js.map +0 -1
  413. package/dist/esm/api/gridviewPanelApi.d.ts.map +0 -1
  414. package/dist/esm/api/gridviewPanelApi.js.map +0 -1
  415. package/dist/esm/api/panelApi.d.ts.map +0 -1
  416. package/dist/esm/api/panelApi.js.map +0 -1
  417. package/dist/esm/api/paneviewPanelApi.d.ts.map +0 -1
  418. package/dist/esm/api/paneviewPanelApi.js.map +0 -1
  419. package/dist/esm/api/splitviewPanelApi.d.ts.map +0 -1
  420. package/dist/esm/api/splitviewPanelApi.js.map +0 -1
  421. package/dist/esm/array.d.ts.map +0 -1
  422. package/dist/esm/array.js.map +0 -1
  423. package/dist/esm/constants.d.ts.map +0 -1
  424. package/dist/esm/constants.js.map +0 -1
  425. package/dist/esm/dnd/abstractDragHandler.d.ts.map +0 -1
  426. package/dist/esm/dnd/abstractDragHandler.js.map +0 -1
  427. package/dist/esm/dnd/dataTransfer.d.ts.map +0 -1
  428. package/dist/esm/dnd/dataTransfer.js.map +0 -1
  429. package/dist/esm/dnd/dnd.d.ts.map +0 -1
  430. package/dist/esm/dnd/dnd.js.map +0 -1
  431. package/dist/esm/dnd/droptarget.d.ts.map +0 -1
  432. package/dist/esm/dnd/droptarget.js.map +0 -1
  433. package/dist/esm/dnd/ghost.d.ts.map +0 -1
  434. package/dist/esm/dnd/ghost.js.map +0 -1
  435. package/dist/esm/dnd/groupDragHandler.d.ts.map +0 -1
  436. package/dist/esm/dnd/groupDragHandler.js.map +0 -1
  437. package/dist/esm/dnd/overlay.d.ts.map +0 -1
  438. package/dist/esm/dnd/overlay.js.map +0 -1
  439. package/dist/esm/dockview/components/panel/content.d.ts.map +0 -1
  440. package/dist/esm/dockview/components/panel/content.js.map +0 -1
  441. package/dist/esm/dockview/components/tab/defaultTab.d.ts.map +0 -1
  442. package/dist/esm/dockview/components/tab/defaultTab.js.map +0 -1
  443. package/dist/esm/dockview/components/tab/tab.d.ts.map +0 -1
  444. package/dist/esm/dockview/components/tab/tab.js.map +0 -1
  445. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts.map +0 -1
  446. package/dist/esm/dockview/components/titlebar/tabsContainer.js.map +0 -1
  447. package/dist/esm/dockview/components/titlebar/voidContainer.d.ts.map +0 -1
  448. package/dist/esm/dockview/components/titlebar/voidContainer.js.map +0 -1
  449. package/dist/esm/dockview/components/watermark/watermark.d.ts.map +0 -1
  450. package/dist/esm/dockview/components/watermark/watermark.js.map +0 -1
  451. package/dist/esm/dockview/deserializer.d.ts.map +0 -1
  452. package/dist/esm/dockview/deserializer.js.map +0 -1
  453. package/dist/esm/dockview/dockviewComponent.d.ts.map +0 -1
  454. package/dist/esm/dockview/dockviewComponent.js.map +0 -1
  455. package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts.map +0 -1
  456. package/dist/esm/dockview/dockviewFloatingGroupPanel.js.map +0 -1
  457. package/dist/esm/dockview/dockviewGroupPanel.d.ts.map +0 -1
  458. package/dist/esm/dockview/dockviewGroupPanel.js.map +0 -1
  459. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts.map +0 -1
  460. package/dist/esm/dockview/dockviewGroupPanelModel.js.map +0 -1
  461. package/dist/esm/dockview/dockviewPanel.d.ts.map +0 -1
  462. package/dist/esm/dockview/dockviewPanel.js.map +0 -1
  463. package/dist/esm/dockview/dockviewPanelModel.d.ts.map +0 -1
  464. package/dist/esm/dockview/dockviewPanelModel.js.map +0 -1
  465. package/dist/esm/dockview/dockviewPopoutGroupPanel.d.ts +0 -16
  466. package/dist/esm/dockview/dockviewPopoutGroupPanel.d.ts.map +0 -1
  467. package/dist/esm/dockview/dockviewPopoutGroupPanel.js +0 -28
  468. package/dist/esm/dockview/dockviewPopoutGroupPanel.js.map +0 -1
  469. package/dist/esm/dockview/options.d.ts.map +0 -1
  470. package/dist/esm/dockview/options.js.map +0 -1
  471. package/dist/esm/dockview/types.d.ts.map +0 -1
  472. package/dist/esm/dockview/types.js.map +0 -1
  473. package/dist/esm/dom.d.ts.map +0 -1
  474. package/dist/esm/dom.js.map +0 -1
  475. package/dist/esm/events.d.ts.map +0 -1
  476. package/dist/esm/events.js.map +0 -1
  477. package/dist/esm/gridview/baseComponentGridview.d.ts.map +0 -1
  478. package/dist/esm/gridview/baseComponentGridview.js.map +0 -1
  479. package/dist/esm/gridview/basePanelView.d.ts.map +0 -1
  480. package/dist/esm/gridview/basePanelView.js.map +0 -1
  481. package/dist/esm/gridview/branchNode.d.ts.map +0 -1
  482. package/dist/esm/gridview/branchNode.js.map +0 -1
  483. package/dist/esm/gridview/gridview.d.ts.map +0 -1
  484. package/dist/esm/gridview/gridview.js.map +0 -1
  485. package/dist/esm/gridview/gridviewComponent.d.ts.map +0 -1
  486. package/dist/esm/gridview/gridviewComponent.js.map +0 -1
  487. package/dist/esm/gridview/gridviewPanel.d.ts.map +0 -1
  488. package/dist/esm/gridview/gridviewPanel.js.map +0 -1
  489. package/dist/esm/gridview/leafNode.d.ts.map +0 -1
  490. package/dist/esm/gridview/leafNode.js.map +0 -1
  491. package/dist/esm/gridview/options.d.ts.map +0 -1
  492. package/dist/esm/gridview/options.js.map +0 -1
  493. package/dist/esm/gridview/types.d.ts.map +0 -1
  494. package/dist/esm/gridview/types.js.map +0 -1
  495. package/dist/esm/index.d.ts.map +0 -1
  496. package/dist/esm/index.js.map +0 -1
  497. package/dist/esm/lifecycle.d.ts.map +0 -1
  498. package/dist/esm/lifecycle.js.map +0 -1
  499. package/dist/esm/math.d.ts.map +0 -1
  500. package/dist/esm/math.js.map +0 -1
  501. package/dist/esm/overlayRenderContainer.d.ts.map +0 -1
  502. package/dist/esm/overlayRenderContainer.js.map +0 -1
  503. package/dist/esm/panel/componentFactory.d.ts.map +0 -1
  504. package/dist/esm/panel/componentFactory.js.map +0 -1
  505. package/dist/esm/panel/types.d.ts.map +0 -1
  506. package/dist/esm/panel/types.js.map +0 -1
  507. package/dist/esm/paneview/defaultPaneviewHeader.d.ts.map +0 -1
  508. package/dist/esm/paneview/defaultPaneviewHeader.js.map +0 -1
  509. package/dist/esm/paneview/draggablePaneviewPanel.d.ts.map +0 -1
  510. package/dist/esm/paneview/draggablePaneviewPanel.js.map +0 -1
  511. package/dist/esm/paneview/options.d.ts.map +0 -1
  512. package/dist/esm/paneview/options.js.map +0 -1
  513. package/dist/esm/paneview/paneview.d.ts.map +0 -1
  514. package/dist/esm/paneview/paneview.js.map +0 -1
  515. package/dist/esm/paneview/paneviewComponent.d.ts.map +0 -1
  516. package/dist/esm/paneview/paneviewComponent.js.map +0 -1
  517. package/dist/esm/paneview/paneviewPanel.d.ts.map +0 -1
  518. package/dist/esm/paneview/paneviewPanel.js.map +0 -1
  519. package/dist/esm/popoutWindow.d.ts.map +0 -1
  520. package/dist/esm/popoutWindow.js.map +0 -1
  521. package/dist/esm/resizable.d.ts.map +0 -1
  522. package/dist/esm/resizable.js.map +0 -1
  523. package/dist/esm/splitview/options.d.ts.map +0 -1
  524. package/dist/esm/splitview/options.js.map +0 -1
  525. package/dist/esm/splitview/splitview.d.ts.map +0 -1
  526. package/dist/esm/splitview/splitview.js.map +0 -1
  527. package/dist/esm/splitview/splitviewComponent.d.ts.map +0 -1
  528. package/dist/esm/splitview/splitviewComponent.js.map +0 -1
  529. package/dist/esm/splitview/splitviewPanel.d.ts.map +0 -1
  530. package/dist/esm/splitview/splitviewPanel.js.map +0 -1
  531. package/dist/esm/splitview/viewItem.d.ts.map +0 -1
  532. package/dist/esm/splitview/viewItem.js.map +0 -1
  533. package/dist/esm/svg.d.ts.map +0 -1
  534. package/dist/esm/svg.js.map +0 -1
  535. package/dist/esm/types.d.ts.map +0 -1
  536. package/dist/esm/types.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 1.9.2
3
+ * @version 1.10.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -33,7 +33,7 @@ define(['exports'], (function (exports) { 'use strict';
33
33
  }
34
34
  }
35
35
 
36
- var css_248z = ".dv-render-overlay {\n position: absolute;\n z-index: 1;\n height: 100%;\n}\n.dv-render-overlay.dv-render-overlay-float {\n z-index: 999;\n}\n\n.dv-debug .dv-render-overlay {\n outline: 1px solid red;\n outline-offset: -1;\n}\n.dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.dockview-theme-dark {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\n}\n\n.dockview-theme-replit {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #ebeced;\n --dv-tabs-and-actions-container-background-color: #fcfcfc;\n --dv-activegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-activegroup-hiddenpanel-tab-background-color: ##fcfcfc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #fcfcfc;\n --dv-tab-divider-color: transparent;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-separator-border: transparent;\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n --dv-background-color: #ebeced;\n --dv-separator-handle-background-color: #cfd1d3;\n --dv-separator-handle-hover-background-color: #babbbb;\n}\n.dockview-theme-replit.dv-dockview {\n padding: 3px;\n}\n.dockview-theme-replit .view:has(> .groupview) {\n padding: 3px;\n}\n.dockview-theme-replit .dv-resize-container:has(> .groupview) {\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview {\n overflow: hidden;\n border-radius: 10px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container {\n border-bottom: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab {\n margin: 4px;\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab .dockview-svg {\n height: 8px;\n width: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab:hover {\n background-color: #e4e5e6 !important;\n}\n.dockview-theme-replit .groupview .content-container {\n background-color: #fcfcfc;\n}\n.dockview-theme-replit .groupview.active-group {\n border: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview.inactive-group {\n border: 1px solid transparent;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash::after {\n content: \"\";\n height: 4px;\n width: 40px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash::after {\n content: \"\";\n height: 40px;\n width: 4px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 1000;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-top.dv-drop-target-small-vertical {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-bottom.dv-drop-target-small-vertical {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-left.dv-drop-target-small-horizontal {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-right.dv-drop-target-small-horizontal {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.dv-debug .dv-resize-container .dv-resize-handle-top {\n background-color: red;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-bottom {\n background-color: green;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-left {\n background-color: yellow;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-right {\n background-color: blue;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-topleft,\n.dv-debug .dv-resize-container .dv-resize-handle-topright,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomleft,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomright {\n background-color: cyan;\n}\n\n.dv-resize-container {\n position: absolute;\n z-index: 997;\n border: 1px solid var(--dv-tab-divider-color);\n box-shadow: var(--dv-floating-box-shadow);\n}\n.dv-resize-container.dv-bring-to-front {\n z-index: 998;\n}\n.dv-resize-container.dv-resize-container-dragging {\n opacity: 0.5;\n}\n.dv-resize-container .dv-resize-handle-top {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-bottom {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-left {\n height: calc(100% - 8px);\n width: 4px;\n left: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-right {\n height: calc(100% - 8px);\n width: 4px;\n right: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-topleft {\n height: 4px;\n width: 4px;\n top: -2px;\n left: -2px;\n z-index: 999;\n position: absolute;\n cursor: nw-resize;\n}\n.dv-resize-container .dv-resize-handle-topright {\n height: 4px;\n width: 4px;\n right: -2px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ne-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomleft {\n height: 4px;\n width: 4px;\n left: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: sw-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomright {\n height: 4px;\n width: 4px;\n right: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: se-resize;\n}\n.dv-dockview {\n position: relative;\n background-color: var(--dv-group-view-background-color);\n}\n.dv-dockview .dv-watermark-container {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n z-index: 1;\n}\n.dv-dockview .dv-overlay-render-container {\n position: relative;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dv-tab-dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n min-height: 0;\n outline: none;\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.dv-debug .split-view-container .sash-container .sash.enabled {\n background-color: black;\n}\n.dv-debug .split-view-container .sash-container .sash.disabled {\n background-color: orange;\n}\n.dv-debug .split-view-container .sash-container .sash.maximum {\n background-color: green;\n}\n.dv-debug .split-view-container .sash-container .sash.minimum {\n background-color: red;\n}\n\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n}\n.split-view-container .sash-container .sash:not(.disabled):active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:not(.disabled):hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n background-color: var(--dv-background-color);\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dv-dragged {\n transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab:focus-within, .tab:focus {\n position: relative;\n}\n.tab:focus-within::after, .tab:focus::after {\n position: absolute;\n content: \"\";\n height: 100%;\n width: 100%;\n top: 0px;\n left: 0px;\n pointer-events: none;\n outline: 1px solid var(--dv-tab-divider-color) !important;\n outline-offset: -1px;\n z-index: 5;\n}\n.tab.dv-tab-dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container .tab {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .void-container {\n flex-grow: 0;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n cursor: grab;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-container {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}\n.watermark .actions-container {\n display: flex;\n align-items: center;\n padding: 0px 8px;\n}\n.watermark .actions-container .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.watermark .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}";
36
+ var css_248z = ".dv-render-overlay {\n position: absolute;\n z-index: 1;\n height: 100%;\n}\n.dv-render-overlay.dv-render-overlay-float {\n z-index: 999;\n}\n\n.dv-debug .dv-render-overlay {\n outline: 1px solid red;\n outline-offset: -1;\n}\n.dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.dockview-theme-dark {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\n}\n\n.dockview-theme-replit {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-gap-size: 3px;\n --dv-group-view-background-color: #ebeced;\n --dv-tabs-and-actions-container-background-color: #fcfcfc;\n --dv-activegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-activegroup-hiddenpanel-tab-background-color: ##fcfcfc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #fcfcfc;\n --dv-tab-divider-color: transparent;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-separator-border: transparent;\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n --dv-background-color: #ebeced;\n --dv-separator-handle-background-color: #cfd1d3;\n --dv-separator-handle-hover-background-color: #babbbb;\n}\n.dockview-theme-replit .dv-resize-container:has(> .groupview) {\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview {\n overflow: hidden;\n border-radius: 10px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container {\n border-bottom: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab {\n margin: 4px;\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab .dockview-svg {\n height: 8px;\n width: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab:hover {\n background-color: #e4e5e6 !important;\n}\n.dockview-theme-replit .groupview .content-container {\n background-color: #fcfcfc;\n}\n.dockview-theme-replit .groupview.active-group {\n border: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview.inactive-group {\n border: 1px solid transparent;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash::after {\n content: \"\";\n height: 4px;\n width: 40px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash::after {\n content: \"\";\n height: 40px;\n width: 4px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 1000;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-top.dv-drop-target-small-vertical {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-bottom.dv-drop-target-small-vertical {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-left.dv-drop-target-small-horizontal {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-right.dv-drop-target-small-horizontal {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.dv-debug .dv-resize-container .dv-resize-handle-top {\n background-color: red;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-bottom {\n background-color: green;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-left {\n background-color: yellow;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-right {\n background-color: blue;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-topleft,\n.dv-debug .dv-resize-container .dv-resize-handle-topright,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomleft,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomright {\n background-color: cyan;\n}\n\n.dv-resize-container {\n position: absolute;\n z-index: 997;\n border: 1px solid var(--dv-tab-divider-color);\n box-shadow: var(--dv-floating-box-shadow);\n}\n.dv-resize-container.dv-bring-to-front {\n z-index: 998;\n}\n.dv-resize-container.dv-resize-container-dragging {\n opacity: 0.5;\n}\n.dv-resize-container .dv-resize-handle-top {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-bottom {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-left {\n height: calc(100% - 8px);\n width: 4px;\n left: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-right {\n height: calc(100% - 8px);\n width: 4px;\n right: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-topleft {\n height: 4px;\n width: 4px;\n top: -2px;\n left: -2px;\n z-index: 999;\n position: absolute;\n cursor: nw-resize;\n}\n.dv-resize-container .dv-resize-handle-topright {\n height: 4px;\n width: 4px;\n right: -2px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ne-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomleft {\n height: 4px;\n width: 4px;\n left: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: sw-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomright {\n height: 4px;\n width: 4px;\n right: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: se-resize;\n}\n.dv-dockview {\n position: relative;\n background-color: var(--dv-group-view-background-color);\n}\n.dv-dockview .dv-watermark-container {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n z-index: 1;\n}\n.dv-dockview .dv-overlay-render-container {\n position: relative;\n}\n.dv-dockview .split-view-container.horizontal > .view-container > .view:not(:last-child) {\n border-right: var(--dv-group-gap-size) solid transparent;\n}\n.dv-dockview .split-view-container.horizontal > .view-container > .view:not(:first-child) {\n border-left: var(--dv-group-gap-size) solid transparent;\n}\n.dv-dockview .split-view-container.vertical > .view-container > .view:not(:last-child) {\n border-bottom: var(--dv-group-gap-size) solid transparent;\n}\n.dv-dockview .split-view-container.vertical > .view-container > .view:not(:first-child) {\n border-top: var(--dv-group-gap-size) solid transparent;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dv-tab-dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n min-height: 0;\n outline: none;\n}\n.dv-root-wrapper {\n height: 100%;\n width: 100%;\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.dv-debug .split-view-container .sash-container .sash.enabled {\n background-color: black;\n}\n.dv-debug .split-view-container .sash-container .sash.disabled {\n background-color: orange;\n}\n.dv-debug .split-view-container .sash-container .sash.maximum {\n background-color: green;\n}\n.dv-debug .split-view-container .sash-container .sash.minimum {\n background-color: red;\n}\n\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.dv-splitview-disabled > .sash-container > .sash {\n pointer-events: none;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n}\n.split-view-container .sash-container .sash:not(.disabled):active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:not(.disabled):hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n background-color: var(--dv-background-color);\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dv-dragged {\n transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab:focus-within, .tab:focus {\n position: relative;\n}\n.tab:focus-within::after, .tab:focus::after {\n position: absolute;\n content: \"\";\n height: 100%;\n width: 100%;\n top: 0px;\n left: 0px;\n pointer-events: none;\n outline: 1px solid var(--dv-tab-divider-color) !important;\n outline-offset: -1px;\n z-index: 5;\n}\n.tab.dv-tab-dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container .tab {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .void-container {\n flex-grow: 0;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n cursor: grab;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-container {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}\n.watermark .actions-container {\n display: flex;\n align-items: center;\n padding: 0px 8px;\n}\n.watermark .actions-container .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.watermark .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}";
37
37
  styleInject(css_248z);
38
38
 
39
39
  class TransferObject {
@@ -118,6 +118,17 @@ define(['exports'], (function (exports) { 'use strict';
118
118
  };
119
119
  };
120
120
  })(exports.DockviewEvent || (exports.DockviewEvent = {}));
121
+ class DockviewEvent {
122
+ constructor() {
123
+ this._defaultPrevented = false;
124
+ }
125
+ get defaultPrevented() {
126
+ return this._defaultPrevented;
127
+ }
128
+ preventDefault() {
129
+ this._defaultPrevented = true;
130
+ }
131
+ }
121
132
  class LeakageMonitor {
122
133
  constructor() {
123
134
  this.events = new Map();
@@ -161,6 +172,9 @@ define(['exports'], (function (exports) { 'use strict';
161
172
  }
162
173
  Emitter.ENABLE_TRACKING = isEnabled;
163
174
  }
175
+ get value() {
176
+ return this._last;
177
+ }
164
178
  constructor(options) {
165
179
  this.options = options;
166
180
  this._listeners = [];
@@ -283,8 +297,12 @@ define(['exports'], (function (exports) { 'use strict';
283
297
  args.forEach((arg) => this._disposables.push(arg));
284
298
  }
285
299
  dispose() {
286
- this._disposables.forEach((arg) => arg.dispose());
300
+ if (this._isDisposed) {
301
+ return;
302
+ }
287
303
  this._isDisposed = true;
304
+ this._disposables.forEach((arg) => arg.dispose());
305
+ this._disposables = [];
288
306
  }
289
307
  }
290
308
  class MutableDisposable {
@@ -768,6 +786,13 @@ define(['exports'], (function (exports) { 'use strict';
768
786
  this._endSnappingEnabled = endSnappingEnabled;
769
787
  this.updateSashEnablement();
770
788
  }
789
+ get disabled() {
790
+ return this._disabled;
791
+ }
792
+ set disabled(value) {
793
+ this._disabled = value;
794
+ toggleClass(this.element, 'dv-splitview-disabled', value);
795
+ }
771
796
  constructor(container, options) {
772
797
  this.container = container;
773
798
  this.viewItems = [];
@@ -778,6 +803,7 @@ define(['exports'], (function (exports) { 'use strict';
778
803
  this._proportions = undefined;
779
804
  this._startSnappingEnabled = true;
780
805
  this._endSnappingEnabled = true;
806
+ this._disabled = false;
781
807
  this._onDidSashEnd = new Emitter();
782
808
  this.onDidSashEnd = this._onDidSashEnd.event;
783
809
  this._onDidAddView = new Emitter();
@@ -1452,6 +1478,9 @@ define(['exports'], (function (exports) { 'use strict';
1452
1478
  this._onDidChange.fire();
1453
1479
  }));
1454
1480
  }
1481
+ setViewVisible(index, visible) {
1482
+ this.splitview.setViewVisible(index, visible);
1483
+ }
1455
1484
  addPane(pane, size, index = this.splitview.length, skipLayout = false) {
1456
1485
  const disposable = pane.onDidChangeExpansionState(() => {
1457
1486
  this.setupAnimation();
@@ -1705,7 +1734,13 @@ define(['exports'], (function (exports) { 'use strict';
1705
1734
  }
1706
1735
  return exports.LayoutPriority.Normal;
1707
1736
  }
1708
- constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
1737
+ get disabled() {
1738
+ return this.splitview.disabled;
1739
+ }
1740
+ set disabled(value) {
1741
+ this.splitview.disabled = value;
1742
+ }
1743
+ constructor(orientation, proportionalLayout, styles, size, orthogonalSize, disabled, childDescriptors) {
1709
1744
  super();
1710
1745
  this.orientation = orientation;
1711
1746
  this.proportionalLayout = proportionalLayout;
@@ -1750,6 +1785,7 @@ define(['exports'], (function (exports) { 'use strict';
1750
1785
  styles,
1751
1786
  });
1752
1787
  }
1788
+ this.disabled = disabled;
1753
1789
  this.addDisposables(this._onDidChange, this._onDidVisibilityChange, this.splitview.onDidSashEnd(() => {
1754
1790
  this._onDidChange.fire({});
1755
1791
  }));
@@ -1883,7 +1919,7 @@ define(['exports'], (function (exports) { 'use strict';
1883
1919
  }
1884
1920
  function flipNode(node, size, orthogonalSize) {
1885
1921
  if (node instanceof BranchNode) {
1886
- const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
1922
+ const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize, node.disabled);
1887
1923
  let totalSize = 0;
1888
1924
  for (let i = node.children.length - 1; i >= 0; i--) {
1889
1925
  const child = node.children[i];
@@ -2019,31 +2055,57 @@ define(['exports'], (function (exports) { 'use strict';
2019
2055
  get maximumHeight() {
2020
2056
  return this.root.maximumHeight;
2021
2057
  }
2058
+ get locked() {
2059
+ return this._locked;
2060
+ }
2061
+ set locked(value) {
2062
+ this._locked = value;
2063
+ const branch = [this.root];
2064
+ /**
2065
+ * simple depth-first-search to cover all nodes
2066
+ *
2067
+ * @see https://en.wikipedia.org/wiki/Depth-first_search
2068
+ */
2069
+ while (branch.length > 0) {
2070
+ const node = branch.pop();
2071
+ if (node instanceof BranchNode) {
2072
+ node.disabled = value;
2073
+ branch.push(...node.children);
2074
+ }
2075
+ }
2076
+ }
2022
2077
  maximizedView() {
2023
2078
  var _a;
2024
- return (_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.view;
2079
+ return (_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.leaf.view;
2025
2080
  }
2026
2081
  hasMaximizedView() {
2027
2082
  return this._maximizedNode !== undefined;
2028
2083
  }
2029
2084
  maximizeView(view) {
2085
+ var _a;
2030
2086
  const location = getGridLocation(view.element);
2031
2087
  const [_, node] = this.getNode(location);
2032
2088
  if (!(node instanceof LeafNode)) {
2033
2089
  return;
2034
2090
  }
2035
- if (this._maximizedNode === node) {
2091
+ if (((_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.leaf) === node) {
2036
2092
  return;
2037
2093
  }
2038
2094
  if (this.hasMaximizedView()) {
2039
2095
  this.exitMaximizedView();
2040
2096
  }
2097
+ const hiddenOnMaximize = [];
2041
2098
  function hideAllViewsBut(parent, exclude) {
2042
2099
  for (let i = 0; i < parent.children.length; i++) {
2043
2100
  const child = parent.children[i];
2044
2101
  if (child instanceof LeafNode) {
2045
2102
  if (child !== exclude) {
2046
- parent.setChildVisible(i, false);
2103
+ if (parent.isChildVisible(i)) {
2104
+ parent.setChildVisible(i, false);
2105
+ }
2106
+ else {
2107
+ hiddenOnMaximize.push(child);
2108
+ }
2047
2109
  }
2048
2110
  }
2049
2111
  else {
@@ -2052,18 +2114,21 @@ define(['exports'], (function (exports) { 'use strict';
2052
2114
  }
2053
2115
  }
2054
2116
  hideAllViewsBut(this.root, node);
2055
- this._maximizedNode = node;
2056
- this._onDidMaxmizedNodeChange.fire();
2117
+ this._maximizedNode = { leaf: node, hiddenOnMaximize };
2118
+ this._onDidMaximizedNodeChange.fire();
2057
2119
  }
2058
2120
  exitMaximizedView() {
2059
2121
  if (!this._maximizedNode) {
2060
2122
  return;
2061
2123
  }
2124
+ const hiddenOnMaximize = this._maximizedNode.hiddenOnMaximize;
2062
2125
  function showViewsInReverseOrder(parent) {
2063
2126
  for (let index = parent.children.length - 1; index >= 0; index--) {
2064
2127
  const child = parent.children[index];
2065
2128
  if (child instanceof LeafNode) {
2066
- parent.setChildVisible(index, true);
2129
+ if (!hiddenOnMaximize.includes(child)) {
2130
+ parent.setChildVisible(index, true);
2131
+ }
2067
2132
  }
2068
2133
  else {
2069
2134
  showViewsInReverseOrder(child);
@@ -2072,13 +2137,13 @@ define(['exports'], (function (exports) { 'use strict';
2072
2137
  }
2073
2138
  showViewsInReverseOrder(this.root);
2074
2139
  this._maximizedNode = undefined;
2075
- this._onDidMaxmizedNodeChange.fire();
2140
+ this._onDidMaximizedNodeChange.fire();
2076
2141
  }
2077
2142
  serialize() {
2078
2143
  if (this.hasMaximizedView()) {
2079
2144
  /**
2080
- * do not persist maximized view state but we must first exit any maximized views
2081
- * before serialization to ensure the correct dimensions are persisted
2145
+ * do not persist maximized view state
2146
+ * firstly exit any maximized views to ensure the correct dimensions are persisted
2082
2147
  */
2083
2148
  this.exitMaximizedView();
2084
2149
  }
@@ -2093,14 +2158,14 @@ define(['exports'], (function (exports) { 'use strict';
2093
2158
  dispose() {
2094
2159
  this.disposable.dispose();
2095
2160
  this._onDidChange.dispose();
2096
- this._onDidMaxmizedNodeChange.dispose();
2161
+ this._onDidMaximizedNodeChange.dispose();
2097
2162
  this.root.dispose();
2098
2163
  this._maximizedNode = undefined;
2099
2164
  this.element.remove();
2100
2165
  }
2101
2166
  clear() {
2102
2167
  const orientation = this.root.orientation;
2103
- this.root = new BranchNode(orientation, this.proportionalLayout, this.styles, this.root.size, this.root.orthogonalSize);
2168
+ this.root = new BranchNode(orientation, this.proportionalLayout, this.styles, this.root.size, this.root.orthogonalSize, this._locked);
2104
2169
  }
2105
2170
  deserialize(json, deserializer) {
2106
2171
  const orientation = json.orientation;
@@ -2121,8 +2186,8 @@ define(['exports'], (function (exports) { 'use strict';
2121
2186
  };
2122
2187
  });
2123
2188
  result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, // <- orthogonal size - flips at each depth
2124
- orthogonalSize, // <- size - flips at each depth
2125
- children);
2189
+ orthogonalSize, // <- size - flips at each depth,
2190
+ this._locked, children);
2126
2191
  }
2127
2192
  else {
2128
2193
  result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
@@ -2155,7 +2220,7 @@ define(['exports'], (function (exports) { 'use strict';
2155
2220
  }
2156
2221
  const oldRoot = this.root;
2157
2222
  oldRoot.element.remove();
2158
- this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
2223
+ this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size, this._locked);
2159
2224
  if (oldRoot.children.length === 0) ;
2160
2225
  else if (oldRoot.children.length === 1) {
2161
2226
  // can remove one level of redundant branching if there is only a single child
@@ -2223,15 +2288,16 @@ define(['exports'], (function (exports) { 'use strict';
2223
2288
  constructor(proportionalLayout, styles, orientation) {
2224
2289
  this.proportionalLayout = proportionalLayout;
2225
2290
  this.styles = styles;
2291
+ this._locked = false;
2226
2292
  this._maximizedNode = undefined;
2227
2293
  this.disposable = new MutableDisposable();
2228
2294
  this._onDidChange = new Emitter();
2229
2295
  this.onDidChange = this._onDidChange.event;
2230
- this._onDidMaxmizedNodeChange = new Emitter();
2231
- this.onDidMaxmizedNodeChange = this._onDidMaxmizedNodeChange.event;
2296
+ this._onDidMaximizedNodeChange = new Emitter();
2297
+ this.onDidMaximizedNodeChange = this._onDidMaximizedNodeChange.event;
2232
2298
  this.element = document.createElement('div');
2233
2299
  this.element.className = 'grid-view';
2234
- this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
2300
+ this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0, this._locked);
2235
2301
  }
2236
2302
  isViewVisible(location) {
2237
2303
  const [rest, index] = tail(location);
@@ -2282,7 +2348,7 @@ define(['exports'], (function (exports) { 'use strict';
2282
2348
  }
2283
2349
  const child = grandParent.removeChild(parentIndex);
2284
2350
  child.dispose();
2285
- const newParent = new BranchNode(parent.orientation, this.proportionalLayout, this.styles, parent.size, parent.orthogonalSize);
2351
+ const newParent = new BranchNode(parent.orientation, this.proportionalLayout, this.styles, parent.size, parent.orthogonalSize, this._locked);
2286
2352
  grandParent.addChild(newParent, parent.size, parentIndex);
2287
2353
  const newSibling = new LeafNode(parent.view, grandParent.orientation, parent.size);
2288
2354
  newParent.addChild(newSibling, newSiblingSize, 0);
@@ -2910,13 +2976,36 @@ define(['exports'], (function (exports) { 'use strict';
2910
2976
  return this.component.onDidDrop;
2911
2977
  }
2912
2978
  /**
2913
- * Invoked before a group is dragged. Exposed for custom Drag'n'Drop functionality.
2979
+ * Invoked when a Drag'n'Drop event occurs but before dockview handles it giving the user an opportunity to intecept and
2980
+ * prevent the event from occuring using the standard `preventDefault()` syntax.
2981
+ *
2982
+ * Preventing certain events may causes unexpected behaviours, use carefully.
2983
+ */
2984
+ get onWillDrop() {
2985
+ return this.component.onWillDrop;
2986
+ }
2987
+ /**
2988
+ * Invoked before an overlay is shown indicating a drop target.
2989
+ *
2990
+ * Calling `event.preventDefault()` will prevent the overlay being shown and prevent
2991
+ * the any subsequent drop event.
2992
+ */
2993
+ get onWillShowOverlay() {
2994
+ return this.component.onWillShowOverlay;
2995
+ }
2996
+ /**
2997
+ * Invoked before a group is dragged.
2998
+ *
2999
+ * Calling `event.nativeEvent.preventDefault()` will prevent the group drag starting.
3000
+ *
2914
3001
  */
2915
3002
  get onWillDragGroup() {
2916
3003
  return this.component.onWillDragGroup;
2917
3004
  }
2918
3005
  /**
2919
- * Invoked before a panel is dragged. Exposed for custom Drag'n'Drop functionality.
3006
+ * Invoked before a panel is dragged.
3007
+ *
3008
+ * Calling `event.nativeEvent.preventDefault()` will prevent the panel drag starting.
2920
3009
  */
2921
3010
  get onWillDragPanel() {
2922
3011
  return this.component.onWillDragPanel;
@@ -3044,17 +3133,17 @@ define(['exports'], (function (exports) { 'use strict';
3044
3133
  hasMaximizedGroup() {
3045
3134
  return this.component.hasMaximizedGroup();
3046
3135
  }
3047
- exitMaxmizedGroup() {
3136
+ exitMaximizedGroup() {
3048
3137
  this.component.exitMaximizedGroup();
3049
3138
  }
3050
- get onDidMaxmizedGroupChange() {
3051
- return this.component.onDidMaxmizedGroupChange;
3139
+ get onDidMaximizedGroupChange() {
3140
+ return this.component.onDidMaximizedGroupChange;
3052
3141
  }
3053
3142
  /**
3054
3143
  * Add a popout group in a new Window
3055
3144
  */
3056
3145
  addPopoutGroup(item, options) {
3057
- this.component.addPopoutGroup(item, options);
3146
+ return this.component.addPopoutGroup(item, options);
3058
3147
  }
3059
3148
  }
3060
3149
 
@@ -3108,6 +3197,18 @@ define(['exports'], (function (exports) { 'use strict';
3108
3197
  }
3109
3198
  }
3110
3199
 
3200
+ class WillShowOverlayEvent extends DockviewEvent {
3201
+ get nativeEvent() {
3202
+ return this.options.nativeEvent;
3203
+ }
3204
+ get position() {
3205
+ return this.options.position;
3206
+ }
3207
+ constructor(options) {
3208
+ super();
3209
+ this.options = options;
3210
+ }
3211
+ }
3111
3212
  function directionToPosition(direction) {
3112
3213
  switch (direction) {
3113
3214
  case 'above':
@@ -3160,6 +3261,8 @@ define(['exports'], (function (exports) { 'use strict';
3160
3261
  this.options = options;
3161
3262
  this._onDrop = new Emitter();
3162
3263
  this.onDrop = this._onDrop.event;
3264
+ this._onWillShowOverlay = new Emitter();
3265
+ this.onWillShowOverlay = this._onWillShowOverlay.event;
3163
3266
  // use a set to take advantage of #<set>.has
3164
3267
  this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
3165
3268
  this.dnd = new DragAndDropObserver(this.element, {
@@ -3188,6 +3291,19 @@ define(['exports'], (function (exports) { 'use strict';
3188
3291
  this.removeDropTarget();
3189
3292
  return;
3190
3293
  }
3294
+ const willShowOverlayEvent = new WillShowOverlayEvent({
3295
+ nativeEvent: e,
3296
+ position: quadrant,
3297
+ });
3298
+ /**
3299
+ * Provide an opportunity to prevent the overlay appearing and in turn
3300
+ * any dnd behaviours
3301
+ */
3302
+ this._onWillShowOverlay.fire(willShowOverlayEvent);
3303
+ if (willShowOverlayEvent.defaultPrevented) {
3304
+ this.removeDropTarget();
3305
+ return;
3306
+ }
3191
3307
  if (typeof this.options.canDisplayOverlay === 'boolean') {
3192
3308
  if (!this.options.canDisplayOverlay) {
3193
3309
  this.removeDropTarget();
@@ -3230,7 +3346,7 @@ define(['exports'], (function (exports) { 'use strict';
3230
3346
  }
3231
3347
  },
3232
3348
  });
3233
- this.addDisposables(this._onDrop, this.dnd);
3349
+ this.addDisposables(this._onDrop, this._onWillShowOverlay, this.dnd);
3234
3350
  }
3235
3351
  setTargetZones(acceptedTargetZones) {
3236
3352
  this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
@@ -3283,25 +3399,44 @@ define(['exports'], (function (exports) { 'use strict';
3283
3399
  size = clamp(0, sizeOptions.value, height) / height;
3284
3400
  }
3285
3401
  }
3286
- const translate = (1 - size) / 2;
3287
- const scale = size;
3288
- let transform;
3402
+ const box = { top: '0px', left: '0px', width: '100%', height: '100%' };
3403
+ /**
3404
+ * You can also achieve the overlay placement using the transform CSS property
3405
+ * to translate and scale the element however this has the undesired effect of
3406
+ * 'skewing' the element. Comment left here for anybody that ever revisits this.
3407
+ *
3408
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform
3409
+ *
3410
+ * right
3411
+ * translateX(${100 * (1 - size) / 2}%) scaleX(${scale})
3412
+ *
3413
+ * left
3414
+ * translateX(-${100 * (1 - size) / 2}%) scaleX(${scale})
3415
+ *
3416
+ * top
3417
+ * translateY(-${100 * (1 - size) / 2}%) scaleY(${scale})
3418
+ *
3419
+ * bottom
3420
+ * translateY(${100 * (1 - size) / 2}%) scaleY(${scale})
3421
+ */
3289
3422
  if (rightClass) {
3290
- transform = `translateX(${100 * translate}%) scaleX(${scale})`;
3423
+ box.left = `${100 * (1 - size)}%`;
3424
+ box.width = `${100 * size}%`;
3291
3425
  }
3292
3426
  else if (leftClass) {
3293
- transform = `translateX(-${100 * translate}%) scaleX(${scale})`;
3427
+ box.width = `${100 * size}%`;
3294
3428
  }
3295
3429
  else if (topClass) {
3296
- transform = `translateY(-${100 * translate}%) scaleY(${scale})`;
3430
+ box.height = `${100 * size}%`;
3297
3431
  }
3298
3432
  else if (bottomClass) {
3299
- transform = `translateY(${100 * translate}%) scaleY(${scale})`;
3300
- }
3301
- else {
3302
- transform = '';
3433
+ box.top = `${100 * (1 - size)}%`;
3434
+ box.height = `${100 * size}%`;
3303
3435
  }
3304
- this.overlayElement.style.transform = transform;
3436
+ this.overlayElement.style.top = box.top;
3437
+ this.overlayElement.style.left = box.left;
3438
+ this.overlayElement.style.width = box.width;
3439
+ this.overlayElement.style.height = box.height;
3305
3440
  toggleClass(this.overlayElement, 'dv-drop-target-small-vertical', isSmallY);
3306
3441
  toggleClass(this.overlayElement, 'dv-drop-target-small-horizontal', isSmallX);
3307
3442
  toggleClass(this.overlayElement, 'dv-drop-target-left', isLeft);
@@ -3369,14 +3504,6 @@ define(['exports'], (function (exports) { 'use strict';
3369
3504
  return 'center';
3370
3505
  }
3371
3506
 
3372
- exports.DockviewDropTargets = void 0;
3373
- (function (DockviewDropTargets) {
3374
- DockviewDropTargets[DockviewDropTargets["Tab"] = 0] = "Tab";
3375
- DockviewDropTargets[DockviewDropTargets["Panel"] = 1] = "Panel";
3376
- DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
3377
- DockviewDropTargets[DockviewDropTargets["Edge"] = 3] = "Edge";
3378
- })(exports.DockviewDropTargets || (exports.DockviewDropTargets = {}));
3379
-
3380
3507
  class ContentContainer extends CompositeDisposable {
3381
3508
  get element() {
3382
3509
  return this._element;
@@ -3404,7 +3531,7 @@ define(['exports'], (function (exports) { 'use strict';
3404
3531
  const data = getPanelData();
3405
3532
  if (!data &&
3406
3533
  event.shiftKey &&
3407
- this.group.location !== 'floating') {
3534
+ this.group.location.type !== 'floating') {
3408
3535
  return false;
3409
3536
  }
3410
3537
  if (data && data.viewId === this.accessor.id) {
@@ -3422,7 +3549,7 @@ define(['exports'], (function (exports) { 'use strict';
3422
3549
  data.groupId === this.group.id;
3423
3550
  return !groupHasOnePanelAndIsActiveDragElement;
3424
3551
  }
3425
- return this.group.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
3552
+ return this.group.canDisplayOverlay(event, position, 'content');
3426
3553
  },
3427
3554
  });
3428
3555
  this.addDisposables(this.dropTarget);
@@ -3447,7 +3574,7 @@ define(['exports'], (function (exports) { 'use strict';
3447
3574
  let container;
3448
3575
  switch (panel.api.renderer) {
3449
3576
  case 'onlyWhenVisibile':
3450
- this.accessor.overlayRenderContainer.detatch(panel);
3577
+ this.group.renderContainer.detatch(panel);
3451
3578
  if (this.panel) {
3452
3579
  if (doRender) {
3453
3580
  this._element.appendChild(this.panel.view.content.element);
@@ -3459,7 +3586,7 @@ define(['exports'], (function (exports) { 'use strict';
3459
3586
  if (panel.view.content.element.parentElement === this._element) {
3460
3587
  this._element.removeChild(panel.view.content.element);
3461
3588
  }
3462
- container = this.accessor.overlayRenderContainer.attach({
3589
+ container = this.group.renderContainer.attach({
3463
3590
  panel,
3464
3591
  referenceContainer: this,
3465
3592
  });
@@ -3490,9 +3617,10 @@ define(['exports'], (function (exports) { 'use strict';
3490
3617
  // noop
3491
3618
  }
3492
3619
  closePanel() {
3620
+ var _a;
3493
3621
  if (this.panel) {
3494
3622
  if (this.panel.api.renderer === 'onlyWhenVisibile') {
3495
- this._element.removeChild(this.panel.view.content.element);
3623
+ (_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
3496
3624
  }
3497
3625
  }
3498
3626
  this.panel = undefined;
@@ -3603,7 +3731,7 @@ define(['exports'], (function (exports) { 'use strict';
3603
3731
  this._element.draggable = true;
3604
3732
  toggleClass(this.element, 'inactive-tab', true);
3605
3733
  const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
3606
- this.droptarget = new Droptarget(this._element, {
3734
+ this.dropTarget = new Droptarget(this._element, {
3607
3735
  acceptedTargetZones: ['center'],
3608
3736
  canDisplayOverlay: (event, position) => {
3609
3737
  if (this.group.locked) {
@@ -3618,9 +3746,10 @@ define(['exports'], (function (exports) { 'use strict';
3618
3746
  }
3619
3747
  return this.panel.id !== data.panelId;
3620
3748
  }
3621
- return this.group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Tab);
3749
+ return this.group.model.canDisplayOverlay(event, position, 'tab');
3622
3750
  },
3623
3751
  });
3752
+ this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
3624
3753
  this.addDisposables(this._onChanged, this._onDropped, this._onDragStart, dragHandler.onDragStart((event) => {
3625
3754
  this._onDragStart.fire(event);
3626
3755
  }), dragHandler, addDisposableListener(this._element, 'mousedown', (event) => {
@@ -3628,9 +3757,9 @@ define(['exports'], (function (exports) { 'use strict';
3628
3757
  return;
3629
3758
  }
3630
3759
  this._onChanged.fire(event);
3631
- }), this.droptarget.onDrop((event) => {
3760
+ }), this.dropTarget.onDrop((event) => {
3632
3761
  this._onDropped.fire(event);
3633
- }), this.droptarget);
3762
+ }), this.dropTarget);
3634
3763
  }
3635
3764
  setActive(isActive) {
3636
3765
  toggleClass(this.element, 'active-tab', isActive);
@@ -3677,7 +3806,7 @@ define(['exports'], (function (exports) { 'use strict';
3677
3806
  }, true));
3678
3807
  }
3679
3808
  isCancelled(_event) {
3680
- if (this.group.api.location === 'floating' && !_event.shiftKey) {
3809
+ if (this.group.api.location.type === 'floating' && !_event.shiftKey) {
3681
3810
  return true;
3682
3811
  }
3683
3812
  return false;
@@ -3729,7 +3858,7 @@ define(['exports'], (function (exports) { 'use strict';
3729
3858
  this.accessor.doSetGroupActive(this.group);
3730
3859
  }));
3731
3860
  const handler = new GroupDragHandler(this._element, accessor, group);
3732
- this.voidDropTarget = new Droptarget(this._element, {
3861
+ this.dropTraget = new Droptarget(this._element, {
3733
3862
  acceptedTargetZones: ['center'],
3734
3863
  canDisplayOverlay: (event, position) => {
3735
3864
  var _a;
@@ -3743,14 +3872,15 @@ define(['exports'], (function (exports) { 'use strict';
3743
3872
  // don't show the overlay if the tab being dragged is the last panel of this group
3744
3873
  return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
3745
3874
  }
3746
- return group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
3875
+ return group.model.canDisplayOverlay(event, position, 'header_space');
3747
3876
  },
3748
3877
  });
3878
+ this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
3749
3879
  this.addDisposables(handler, handler.onDragStart((event) => {
3750
3880
  this._onDragStart.fire(event);
3751
- }), this.voidDropTarget.onDrop((event) => {
3881
+ }), this.dropTraget.onDrop((event) => {
3752
3882
  this._onDrop.fire(event);
3753
- }), this.voidDropTarget);
3883
+ }), this.dropTraget);
3754
3884
  }
3755
3885
  }
3756
3886
 
@@ -3838,19 +3968,11 @@ define(['exports'], (function (exports) { 'use strict';
3838
3968
  this.onTabDragStart = this._onTabDragStart.event;
3839
3969
  this._onGroupDragStart = new Emitter();
3840
3970
  this.onGroupDragStart = this._onGroupDragStart.event;
3841
- this.addDisposables(this._onDrop, this._onTabDragStart, this._onGroupDragStart);
3971
+ this._onWillShowOverlay = new Emitter();
3972
+ this.onWillShowOverlay = this._onWillShowOverlay.event;
3842
3973
  this._element = document.createElement('div');
3843
3974
  this._element.className = 'tabs-and-actions-container';
3844
3975
  toggleClass(this._element, 'dv-full-width-single-tab', this.accessor.options.singleTabMode === 'fullwidth');
3845
- this.addDisposables(this.accessor.onDidAddPanel((e) => {
3846
- if (e.api.group === this.group) {
3847
- toggleClass(this._element, 'dv-single-tab', this.size === 1);
3848
- }
3849
- }), this.accessor.onDidRemovePanel((e) => {
3850
- if (e.api.group === this.group) {
3851
- toggleClass(this._element, 'dv-single-tab', this.size === 1);
3852
- }
3853
- }));
3854
3976
  this.rightActionsContainer = document.createElement('div');
3855
3977
  this.rightActionsContainer.className = 'right-actions-container';
3856
3978
  this.leftActionsContainer = document.createElement('div');
@@ -3865,7 +3987,15 @@ define(['exports'], (function (exports) { 'use strict';
3865
3987
  this._element.appendChild(this.leftActionsContainer);
3866
3988
  this._element.appendChild(this.voidContainer.element);
3867
3989
  this._element.appendChild(this.rightActionsContainer);
3868
- this.addDisposables(this.voidContainer, this.voidContainer.onDragStart((event) => {
3990
+ this.addDisposables(this.accessor.onDidAddPanel((e) => {
3991
+ if (e.api.group === this.group) {
3992
+ toggleClass(this._element, 'dv-single-tab', this.size === 1);
3993
+ }
3994
+ }), this.accessor.onDidRemovePanel((e) => {
3995
+ if (e.api.group === this.group) {
3996
+ toggleClass(this._element, 'dv-single-tab', this.size === 1);
3997
+ }
3998
+ }), this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
3869
3999
  this._onGroupDragStart.fire({
3870
4000
  nativeEvent: event,
3871
4001
  group: this.group,
@@ -3875,11 +4005,15 @@ define(['exports'], (function (exports) { 'use strict';
3875
4005
  event: event.nativeEvent,
3876
4006
  index: this.tabs.length,
3877
4007
  });
4008
+ }), this.voidContainer.onWillShowOverlay((event) => {
4009
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4010
+ kind: 'header_space',
4011
+ }));
3878
4012
  }), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
3879
4013
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
3880
4014
  if (isFloatingGroupsEnabled &&
3881
4015
  event.shiftKey &&
3882
- this.group.api.location !== 'floating') {
4016
+ this.group.api.location.type !== 'floating') {
3883
4017
  event.preventDefault();
3884
4018
  const { top, left } = this.element.getBoundingClientRect();
3885
4019
  const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
@@ -3942,9 +4076,9 @@ define(['exports'], (function (exports) { 'use strict';
3942
4076
  const disposable = new CompositeDisposable(tab.onDragStart((event) => {
3943
4077
  this._onTabDragStart.fire({ nativeEvent: event, panel });
3944
4078
  }), tab.onChanged((event) => {
3945
- var _a;
3946
4079
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
3947
- const isFloatingWithOnePanel = this.group.api.location === 'floating' && this.size === 1;
4080
+ const isFloatingWithOnePanel = this.group.api.location.type === 'floating' &&
4081
+ this.size === 1;
3948
4082
  if (isFloatingGroupsEnabled &&
3949
4083
  !isFloatingWithOnePanel &&
3950
4084
  event.shiftKey) {
@@ -3958,20 +4092,20 @@ define(['exports'], (function (exports) { 'use strict';
3958
4092
  }, { inDragMode: true });
3959
4093
  return;
3960
4094
  }
3961
- const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
3962
- this.group.model.isContentFocused;
3963
4095
  const isLeftClick = event.button === 0;
3964
4096
  if (!isLeftClick || event.defaultPrevented) {
3965
4097
  return;
3966
4098
  }
3967
- this.group.model.openPanel(panel, {
3968
- skipFocus: alreadyFocused,
3969
- });
4099
+ if (this.group.activePanel !== panel) {
4100
+ this.group.model.openPanel(panel);
4101
+ }
3970
4102
  }), tab.onDrop((event) => {
3971
4103
  this._onDrop.fire({
3972
4104
  event: event.nativeEvent,
3973
4105
  index: this.tabs.findIndex((x) => x.value === tab),
3974
4106
  });
4107
+ }), tab.onWillShowOverlay((event) => {
4108
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
3975
4109
  }));
3976
4110
  const value = { value: tab, disposable };
3977
4111
  this.addTab(value, index);
@@ -3989,6 +4123,60 @@ define(['exports'], (function (exports) { 'use strict';
3989
4123
  }
3990
4124
  }
3991
4125
 
4126
+ class DockviewDidDropEvent extends DockviewEvent {
4127
+ get nativeEvent() {
4128
+ return this.options.nativeEvent;
4129
+ }
4130
+ get position() {
4131
+ return this.options.position;
4132
+ }
4133
+ get panel() {
4134
+ return this.options.panel;
4135
+ }
4136
+ get group() {
4137
+ return this.options.group;
4138
+ }
4139
+ get api() {
4140
+ return this.options.api;
4141
+ }
4142
+ constructor(options) {
4143
+ super();
4144
+ this.options = options;
4145
+ }
4146
+ getData() {
4147
+ return this.options.getData();
4148
+ }
4149
+ }
4150
+ class DockviewWillDropEvent extends DockviewDidDropEvent {
4151
+ get kind() {
4152
+ return this._kind;
4153
+ }
4154
+ constructor(options) {
4155
+ super(options);
4156
+ this._kind = options.kind;
4157
+ }
4158
+ }
4159
+ class WillShowOverlayLocationEvent {
4160
+ get kind() {
4161
+ return this._kind;
4162
+ }
4163
+ get nativeEvent() {
4164
+ return this.event.nativeEvent;
4165
+ }
4166
+ get position() {
4167
+ return this.event.position;
4168
+ }
4169
+ get defaultPrevented() {
4170
+ return this.event.defaultPrevented;
4171
+ }
4172
+ preventDefault() {
4173
+ this.event.preventDefault();
4174
+ }
4175
+ constructor(event, options) {
4176
+ this.event = event;
4177
+ this._kind = options.kind;
4178
+ }
4179
+ }
3992
4180
  class DockviewGroupPanelModel extends CompositeDisposable {
3993
4181
  get element() {
3994
4182
  throw new Error('not supported');
@@ -4034,7 +4222,7 @@ define(['exports'], (function (exports) { 'use strict';
4034
4222
  this._location = value;
4035
4223
  toggleClass(this.container, 'dv-groupview-floating', false);
4036
4224
  toggleClass(this.container, 'dv-groupview-popout', false);
4037
- switch (value) {
4225
+ switch (value.type) {
4038
4226
  case 'grid':
4039
4227
  this.contentContainer.dropTarget.setTargetZones([
4040
4228
  'top',
@@ -4070,7 +4258,7 @@ define(['exports'], (function (exports) { 'use strict';
4070
4258
  this.groupPanel = groupPanel;
4071
4259
  this._isGroupActive = false;
4072
4260
  this._locked = false;
4073
- this._location = 'grid';
4261
+ this._location = { type: 'grid' };
4074
4262
  this.mostRecentlyUsed = [];
4075
4263
  this._onDidChange = new Emitter();
4076
4264
  this.onDidChange = this._onDidChange.event;
@@ -4081,6 +4269,10 @@ define(['exports'], (function (exports) { 'use strict';
4081
4269
  this.onMove = this._onMove.event;
4082
4270
  this._onDidDrop = new Emitter();
4083
4271
  this.onDidDrop = this._onDidDrop.event;
4272
+ this._onWillDrop = new Emitter();
4273
+ this.onWillDrop = this._onWillDrop.event;
4274
+ this._onWillShowOverlay = new Emitter();
4275
+ this.onWillShowOverlay = this._onWillShowOverlay.event;
4084
4276
  this._onTabDragStart = new Emitter();
4085
4277
  this.onTabDragStart = this._onTabDragStart.event;
4086
4278
  this._onGroupDragStart = new Emitter();
@@ -4091,46 +4283,69 @@ define(['exports'], (function (exports) { 'use strict';
4091
4283
  this.onDidRemovePanel = this._onDidRemovePanel.event;
4092
4284
  this._onDidActivePanelChange = new Emitter();
4093
4285
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
4286
+ this._overwriteRenderContainer = null;
4094
4287
  toggleClass(this.container, 'groupview', true);
4288
+ this._api = new DockviewApi(this.accessor);
4095
4289
  this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
4096
4290
  this.contentContainer = new ContentContainer(this.accessor, this);
4097
4291
  container.append(this.tabsContainer.element, this.contentContainer.element);
4098
4292
  this.header.hidden = !!options.hideHeader;
4099
4293
  this.locked = (_a = options.locked) !== null && _a !== void 0 ? _a : false;
4100
- this.addDisposables(this._onTabDragStart, this._onGroupDragStart, this.tabsContainer.onTabDragStart((event) => {
4294
+ this.addDisposables(this._onTabDragStart, this._onGroupDragStart, this._onWillShowOverlay, this.tabsContainer.onTabDragStart((event) => {
4101
4295
  this._onTabDragStart.fire(event);
4102
4296
  }), this.tabsContainer.onGroupDragStart((event) => {
4103
4297
  this._onGroupDragStart.fire(event);
4104
4298
  }), this.tabsContainer.onDrop((event) => {
4105
- this.handleDropEvent(event.event, 'center', event.index);
4299
+ this.handleDropEvent('header', event.event, 'center', event.index);
4106
4300
  }), this.contentContainer.onDidFocus(() => {
4107
- this.accessor.doSetGroupActive(this.groupPanel, true);
4301
+ this.accessor.doSetGroupActive(this.groupPanel);
4108
4302
  }), this.contentContainer.onDidBlur(() => {
4109
4303
  // noop
4110
4304
  }), this.contentContainer.dropTarget.onDrop((event) => {
4111
- this.handleDropEvent(event.nativeEvent, event.position);
4112
- }), this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4305
+ this.handleDropEvent('content', event.nativeEvent, event.position);
4306
+ }), this.tabsContainer.onWillShowOverlay((event) => {
4307
+ this._onWillShowOverlay.fire(event);
4308
+ }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
4309
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4310
+ kind: 'content',
4311
+ }));
4312
+ }), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4313
+ }
4314
+ focusContent() {
4315
+ this.contentContainer.element.focus();
4316
+ }
4317
+ set renderContainer(value) {
4318
+ this.panels.forEach((panel) => {
4319
+ this.renderContainer.detatch(panel);
4320
+ });
4321
+ this._overwriteRenderContainer = value;
4322
+ this.panels.forEach((panel) => {
4323
+ this.rerender(panel);
4324
+ });
4325
+ }
4326
+ get renderContainer() {
4327
+ var _a;
4328
+ return ((_a = this._overwriteRenderContainer) !== null && _a !== void 0 ? _a : this.accessor.overlayRenderContainer);
4113
4329
  }
4114
4330
  initialize() {
4115
- var _a, _b;
4116
- if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
4331
+ if (this.options.panels) {
4117
4332
  this.options.panels.forEach((panel) => {
4118
4333
  this.doAddPanel(panel);
4119
4334
  });
4120
4335
  }
4121
- if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.activePanel) {
4336
+ if (this.options.activePanel) {
4122
4337
  this.openPanel(this.options.activePanel);
4123
4338
  }
4124
4339
  // must be run after the constructor otherwise this.parent may not be
4125
4340
  // correctly initialized
4126
- this.setActive(this.isActive, true, true);
4341
+ this.setActive(this.isActive, true);
4127
4342
  this.updateContainer();
4128
4343
  if (this.accessor.options.createRightHeaderActionsElement) {
4129
4344
  this._rightHeaderActions =
4130
4345
  this.accessor.options.createRightHeaderActionsElement(this.groupPanel);
4131
4346
  this.addDisposables(this._rightHeaderActions);
4132
4347
  this._rightHeaderActions.init({
4133
- containerApi: new DockviewApi(this.accessor),
4348
+ containerApi: this._api,
4134
4349
  api: this.groupPanel.api,
4135
4350
  });
4136
4351
  this.tabsContainer.setRightActionsElement(this._rightHeaderActions.element);
@@ -4140,7 +4355,7 @@ define(['exports'], (function (exports) { 'use strict';
4140
4355
  this.accessor.options.createLeftHeaderActionsElement(this.groupPanel);
4141
4356
  this.addDisposables(this._leftHeaderActions);
4142
4357
  this._leftHeaderActions.init({
4143
- containerApi: new DockviewApi(this.accessor),
4358
+ containerApi: this._api,
4144
4359
  api: this.groupPanel.api,
4145
4360
  });
4146
4361
  this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
@@ -4150,7 +4365,7 @@ define(['exports'], (function (exports) { 'use strict';
4150
4365
  this.accessor.options.createPrefixHeaderActionsElement(this.groupPanel);
4151
4366
  this.addDisposables(this._prefixHeaderActions);
4152
4367
  this._prefixHeaderActions.init({
4153
- containerApi: new DockviewApi(this.accessor),
4368
+ containerApi: this._api,
4154
4369
  api: this.groupPanel.api,
4155
4370
  });
4156
4371
  this.tabsContainer.setPrefixActionsElement(this._prefixHeaderActions.element);
@@ -4230,35 +4445,45 @@ define(['exports'], (function (exports) { 'use strict';
4230
4445
  //noop
4231
4446
  }
4232
4447
  focus() {
4233
- var _a, _b;
4234
- (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
4448
+ var _a;
4449
+ (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
4235
4450
  }
4236
4451
  openPanel(panel, options = {}) {
4452
+ /**
4453
+ * set the panel group
4454
+ * add the panel
4455
+ * check if group active
4456
+ * check if panel active
4457
+ */
4237
4458
  if (typeof options.index !== 'number' ||
4238
4459
  options.index > this.panels.length) {
4239
4460
  options.index = this.panels.length;
4240
4461
  }
4241
- const skipSetPanelActive = !!options.skipSetPanelActive;
4242
- const skipSetGroupActive = !!options.skipSetGroupActive;
4462
+ const skipSetActive = !!options.skipSetActive;
4243
4463
  // ensure the group is updated before we fire any events
4244
- panel.updateParentGroup(this.groupPanel, true);
4464
+ panel.updateParentGroup(this.groupPanel, {
4465
+ skipSetActive: options.skipSetActive,
4466
+ });
4467
+ this.doAddPanel(panel, options.index, {
4468
+ skipSetActive: skipSetActive,
4469
+ });
4245
4470
  if (this._activePanel === panel) {
4246
- if (!skipSetGroupActive) {
4247
- this.accessor.doSetGroupActive(this.groupPanel);
4248
- }
4249
4471
  this.contentContainer.renderPanel(panel, { asActive: true });
4250
4472
  return;
4251
4473
  }
4252
- this.doAddPanel(panel, options.index, skipSetPanelActive);
4253
- if (!skipSetPanelActive) {
4474
+ if (!skipSetActive) {
4254
4475
  this.doSetActivePanel(panel);
4255
4476
  }
4256
- if (!skipSetGroupActive) {
4257
- this.accessor.doSetGroupActive(this.groupPanel, !!options.skipFocus);
4477
+ if (!options.skipSetGroupActive) {
4478
+ this.accessor.doSetGroupActive(this.groupPanel);
4479
+ }
4480
+ if (!options.skipSetActive) {
4481
+ this.updateContainer();
4258
4482
  }
4259
- this.updateContainer();
4260
4483
  }
4261
- removePanel(groupItemOrId) {
4484
+ removePanel(groupItemOrId, options = {
4485
+ skipSetActive: false,
4486
+ }) {
4262
4487
  const id = typeof groupItemOrId === 'string'
4263
4488
  ? groupItemOrId
4264
4489
  : groupItemOrId.id;
@@ -4266,7 +4491,7 @@ define(['exports'], (function (exports) { 'use strict';
4266
4491
  if (!panelToRemove) {
4267
4492
  throw new Error('invalid operation');
4268
4493
  }
4269
- return this._removePanel(panelToRemove);
4494
+ return this._removePanel(panelToRemove, options);
4270
4495
  }
4271
4496
  closeAllPanels() {
4272
4497
  if (this.panels.length > 0) {
@@ -4292,12 +4517,8 @@ define(['exports'], (function (exports) { 'use strict';
4292
4517
  updateActions(element) {
4293
4518
  this.tabsContainer.setRightActionsElement(element);
4294
4519
  }
4295
- setActive(isGroupActive, skipFocus = false, force = false) {
4296
- var _a, _b, _c, _d;
4520
+ setActive(isGroupActive, force = false) {
4297
4521
  if (!force && this.isActive === isGroupActive) {
4298
- if (!skipFocus) {
4299
- (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
4300
- }
4301
4522
  return;
4302
4523
  }
4303
4524
  this._isGroupActive = isGroupActive;
@@ -4308,11 +4529,6 @@ define(['exports'], (function (exports) { 'use strict';
4308
4529
  this.doSetActivePanel(this.panels[0]);
4309
4530
  }
4310
4531
  this.updateContainer();
4311
- if (isGroupActive) {
4312
- if (!skipFocus) {
4313
- (_d = (_c = this._activePanel) === null || _c === void 0 ? void 0 : _c.focus) === null || _d === void 0 ? void 0 : _d.call(_c);
4314
- }
4315
- }
4316
4532
  }
4317
4533
  layout(width, height) {
4318
4534
  var _a;
@@ -4323,17 +4539,22 @@ define(['exports'], (function (exports) { 'use strict';
4323
4539
  this._activePanel.layout(this._width, this._height);
4324
4540
  }
4325
4541
  }
4326
- _removePanel(panel) {
4542
+ _removePanel(panel, options) {
4327
4543
  const isActivePanel = this._activePanel === panel;
4328
4544
  this.doRemovePanel(panel);
4329
4545
  if (isActivePanel && this.panels.length > 0) {
4330
4546
  const nextPanel = this.mostRecentlyUsed[0];
4331
- this.openPanel(nextPanel);
4547
+ this.openPanel(nextPanel, {
4548
+ skipSetActive: options.skipSetActive,
4549
+ skipSetGroupActive: options.skipSetActiveGroup,
4550
+ });
4332
4551
  }
4333
4552
  if (this._activePanel && this.panels.length === 0) {
4334
4553
  this.doSetActivePanel(undefined);
4335
4554
  }
4336
- this.updateContainer();
4555
+ if (!options.skipSetActive) {
4556
+ this.updateContainer();
4557
+ }
4337
4558
  return panel;
4338
4559
  }
4339
4560
  doRemovePanel(panel) {
@@ -4348,13 +4569,13 @@ define(['exports'], (function (exports) { 'use strict';
4348
4569
  }
4349
4570
  this._onDidRemovePanel.fire({ panel });
4350
4571
  }
4351
- doAddPanel(panel, index = this.panels.length, skipSetActive = false) {
4572
+ doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
4352
4573
  const existingPanel = this._panels.indexOf(panel);
4353
4574
  const hasExistingPanel = existingPanel > -1;
4354
4575
  this.tabsContainer.show();
4355
4576
  this.contentContainer.show();
4356
4577
  this.tabsContainer.openPanel(panel, index);
4357
- if (!skipSetActive) {
4578
+ if (!options.skipSetActive) {
4358
4579
  this.contentContainer.openPanel(panel);
4359
4580
  }
4360
4581
  if (hasExistingPanel) {
@@ -4366,12 +4587,17 @@ define(['exports'], (function (exports) { 'use strict';
4366
4587
  this._onDidAddPanel.fire({ panel });
4367
4588
  }
4368
4589
  doSetActivePanel(panel) {
4590
+ if (this._activePanel === panel) {
4591
+ return;
4592
+ }
4369
4593
  this._activePanel = panel;
4370
4594
  if (panel) {
4371
4595
  this.tabsContainer.setActivePanel(panel);
4372
4596
  panel.layout(this._width, this._height);
4373
4597
  this.updateMru(panel);
4374
- this._onDidActivePanelChange.fire({ panel });
4598
+ this._onDidActivePanelChange.fire({
4599
+ panel,
4600
+ });
4375
4601
  }
4376
4602
  }
4377
4603
  updateMru(panel) {
@@ -4383,11 +4609,11 @@ define(['exports'], (function (exports) { 'use strict';
4383
4609
  updateContainer() {
4384
4610
  var _a, _b;
4385
4611
  toggleClass(this.container, 'empty', this.isEmpty);
4386
- this.panels.forEach((panel) => panel.updateParentGroup(this.groupPanel, this.isActive));
4612
+ this.panels.forEach((panel) => panel.runEvents());
4387
4613
  if (this.isEmpty && !this.watermark) {
4388
4614
  const watermark = this.accessor.createWatermarkComponent();
4389
4615
  watermark.init({
4390
- containerApi: new DockviewApi(this.accessor),
4616
+ containerApi: this._api,
4391
4617
  group: this.groupPanel,
4392
4618
  });
4393
4619
  this.watermark = watermark;
@@ -4420,10 +4646,32 @@ define(['exports'], (function (exports) { 'use strict';
4420
4646
  }
4421
4647
  return false;
4422
4648
  }
4423
- handleDropEvent(event, position, index) {
4649
+ handleDropEvent(type, event, position, index) {
4424
4650
  if (this.locked === 'no-drop-target') {
4425
4651
  return;
4426
4652
  }
4653
+ function getKind() {
4654
+ switch (type) {
4655
+ case 'header':
4656
+ return typeof index === 'number' ? 'tab' : 'header_space';
4657
+ case 'content':
4658
+ return 'content';
4659
+ }
4660
+ }
4661
+ const panel = typeof index === 'number' ? this.panels[index] : undefined;
4662
+ const willDropEvent = new DockviewWillDropEvent({
4663
+ nativeEvent: event,
4664
+ position,
4665
+ panel,
4666
+ getData: () => getPanelData(),
4667
+ kind: getKind(),
4668
+ group: this.groupPanel,
4669
+ api: this._api,
4670
+ });
4671
+ this._onWillDrop.fire(willDropEvent);
4672
+ if (willDropEvent.defaultPrevented) {
4673
+ return;
4674
+ }
4427
4675
  const data = getPanelData();
4428
4676
  if (data && data.viewId === this.accessor.id) {
4429
4677
  if (data.panelId === null) {
@@ -4456,12 +4704,14 @@ define(['exports'], (function (exports) { 'use strict';
4456
4704
  });
4457
4705
  }
4458
4706
  else {
4459
- this._onDidDrop.fire({
4707
+ this._onDidDrop.fire(new DockviewDidDropEvent({
4460
4708
  nativeEvent: event,
4461
4709
  position,
4462
- index,
4710
+ panel,
4463
4711
  getData: () => getPanelData(),
4464
- });
4712
+ group: this.groupPanel,
4713
+ api: this._api,
4714
+ }));
4465
4715
  }
4466
4716
  }
4467
4717
  dispose() {
@@ -4469,6 +4719,7 @@ define(['exports'], (function (exports) { 'use strict';
4469
4719
  super.dispose();
4470
4720
  (_a = this.watermark) === null || _a === void 0 ? void 0 : _a.element.remove();
4471
4721
  (_c = (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose) === null || _c === void 0 ? void 0 : _c.call(_b);
4722
+ this.watermark = undefined;
4472
4723
  for (const panel of this.panels) {
4473
4724
  panel.dispose();
4474
4725
  }
@@ -4490,15 +4741,7 @@ define(['exports'], (function (exports) { 'use strict';
4490
4741
  constructor(parentElement, disableResizing = false) {
4491
4742
  super();
4492
4743
  this._disableResizing = disableResizing;
4493
- if (parentElement) {
4494
- this._element = parentElement;
4495
- }
4496
- else {
4497
- this._element = document.createElement('div');
4498
- this._element.style.height = '100%';
4499
- this._element.style.width = '100%';
4500
- this._element.className = 'dv-resizable-container';
4501
- }
4744
+ this._element = parentElement;
4502
4745
  this.addDisposables(watchElementResize(this._element, (entry) => {
4503
4746
  if (this.isDisposed) {
4504
4747
  /**
@@ -4586,25 +4829,38 @@ define(['exports'], (function (exports) { 'use strict';
4586
4829
  get activeGroup() {
4587
4830
  return this._activeGroup;
4588
4831
  }
4832
+ get locked() {
4833
+ return this.gridview.locked;
4834
+ }
4835
+ set locked(value) {
4836
+ this.gridview.locked = value;
4837
+ }
4589
4838
  constructor(options) {
4590
- super(options.parentElement, options.disableAutoResizing);
4839
+ super(document.createElement('div'), options.disableAutoResizing);
4591
4840
  this._id = nextLayoutId$1.next();
4592
4841
  this._groups = new Map();
4593
4842
  this._onDidLayoutChange = new Emitter();
4594
4843
  this.onDidLayoutChange = this._onDidLayoutChange.event;
4595
- this._onDidRemoveGroup = new Emitter();
4596
- this.onDidRemoveGroup = this._onDidRemoveGroup.event;
4597
- this._onDidAddGroup = new Emitter();
4598
- this.onDidAddGroup = this._onDidAddGroup.event;
4599
- this._onDidActiveGroupChange = new Emitter();
4600
- this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
4844
+ this._onDidRemove = new Emitter();
4845
+ this.onDidRemove = this._onDidRemove.event;
4846
+ this._onDidAdd = new Emitter();
4847
+ this.onDidAdd = this._onDidAdd.event;
4848
+ this._onDidActiveChange = new Emitter();
4849
+ this.onDidActiveChange = this._onDidActiveChange.event;
4601
4850
  this._bufferOnDidLayoutChange = new TickDelayedEvent();
4851
+ this.element.style.height = '100%';
4852
+ this.element.style.width = '100%';
4853
+ options.parentElement.appendChild(this.element);
4602
4854
  this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
4855
+ this.gridview.locked = !!options.locked;
4603
4856
  this.element.appendChild(this.gridview.element);
4604
4857
  this.layout(0, 0, true); // set some elements height/widths
4605
- this.addDisposables(this.gridview.onDidChange(() => {
4858
+ this.addDisposables(Disposable.from(() => {
4859
+ var _a;
4860
+ (_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.element);
4861
+ }), this.gridview.onDidChange(() => {
4606
4862
  this._bufferOnDidLayoutChange.fire();
4607
- }), exports.DockviewEvent.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
4863
+ }), exports.DockviewEvent.any(this.onDidAdd, this.onDidRemove, this.onDidActiveChange)(() => {
4608
4864
  this._bufferOnDidLayoutChange.fire();
4609
4865
  }), this._bufferOnDidLayoutChange.onEvent(() => {
4610
4866
  this._onDidLayoutChange.fire();
@@ -4619,6 +4875,7 @@ define(['exports'], (function (exports) { 'use strict';
4619
4875
  }
4620
4876
  maximizeGroup(panel) {
4621
4877
  this.gridview.maximizeView(panel);
4878
+ this.doSetGroupActive(panel);
4622
4879
  }
4623
4880
  isMaximizedGroup(panel) {
4624
4881
  return this.gridview.maximizedView() === panel;
@@ -4629,13 +4886,12 @@ define(['exports'], (function (exports) { 'use strict';
4629
4886
  hasMaximizedGroup() {
4630
4887
  return this.gridview.hasMaximizedView();
4631
4888
  }
4632
- get onDidMaxmizedGroupChange() {
4633
- return this.gridview.onDidMaxmizedNodeChange;
4889
+ get onDidMaximizedGroupChange() {
4890
+ return this.gridview.onDidMaximizedNodeChange;
4634
4891
  }
4635
4892
  doAddGroup(group, location = [0], size) {
4636
4893
  this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
4637
- this._onDidAddGroup.fire(group);
4638
- this.doSetGroupActive(group);
4894
+ this._onDidAdd.fire(group);
4639
4895
  }
4640
4896
  doRemoveGroup(group, options) {
4641
4897
  if (!this._groups.has(group.id)) {
@@ -4647,8 +4903,8 @@ define(['exports'], (function (exports) { 'use strict';
4647
4903
  item.disposable.dispose();
4648
4904
  item.value.dispose();
4649
4905
  this._groups.delete(group.id);
4906
+ this._onDidRemove.fire(group);
4650
4907
  }
4651
- this._onDidRemoveGroup.fire(group);
4652
4908
  if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
4653
4909
  const groups = Array.from(this._groups.values());
4654
4910
  this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
@@ -4659,25 +4915,18 @@ define(['exports'], (function (exports) { 'use strict';
4659
4915
  var _a;
4660
4916
  return (_a = this._groups.get(id)) === null || _a === void 0 ? void 0 : _a.value;
4661
4917
  }
4662
- doSetGroupActive(group, skipFocus) {
4663
- var _a, _b, _c;
4918
+ doSetGroupActive(group) {
4664
4919
  if (this._activeGroup === group) {
4665
4920
  return;
4666
4921
  }
4667
4922
  if (this._activeGroup) {
4668
4923
  this._activeGroup.setActive(false);
4669
- if (!skipFocus) {
4670
- (_b = (_a = this._activeGroup).focus) === null || _b === void 0 ? void 0 : _b.call(_a);
4671
- }
4672
4924
  }
4673
4925
  if (group) {
4674
4926
  group.setActive(true);
4675
- if (!skipFocus) {
4676
- (_c = group.focus) === null || _c === void 0 ? void 0 : _c.call(group);
4677
- }
4678
4927
  }
4679
4928
  this._activeGroup = group;
4680
- this._onDidActiveGroupChange.fire(group);
4929
+ this._onDidActiveChange.fire(group);
4681
4930
  }
4682
4931
  removeGroup(group) {
4683
4932
  this.doRemoveGroup(group);
@@ -4722,9 +4971,9 @@ define(['exports'], (function (exports) { 'use strict';
4722
4971
  this.gridview.layout(width, height);
4723
4972
  }
4724
4973
  dispose() {
4725
- this._onDidActiveGroupChange.dispose();
4726
- this._onDidAddGroup.dispose();
4727
- this._onDidRemoveGroup.dispose();
4974
+ this._onDidActiveChange.dispose();
4975
+ this._onDidAdd.dispose();
4976
+ this._onDidRemove.dispose();
4728
4977
  this._onDidLayoutChange.dispose();
4729
4978
  for (const group of this.groups) {
4730
4979
  group.dispose();
@@ -4734,11 +4983,15 @@ define(['exports'], (function (exports) { 'use strict';
4734
4983
  }
4735
4984
  }
4736
4985
 
4986
+ class WillFocusEvent extends DockviewEvent {
4987
+ constructor() {
4988
+ super();
4989
+ }
4990
+ }
4737
4991
  /**
4738
4992
  * A core api implementation that should be used across all panel-like objects
4739
4993
  */
4740
4994
  class PanelApiImpl extends CompositeDisposable {
4741
- //
4742
4995
  get isFocused() {
4743
4996
  return this._isFocused;
4744
4997
  }
@@ -4763,35 +5016,22 @@ define(['exports'], (function (exports) { 'use strict';
4763
5016
  this._width = 0;
4764
5017
  this._height = 0;
4765
5018
  this.panelUpdatesDisposable = new MutableDisposable();
4766
- this._onDidDimensionChange = new Emitter({
4767
- replay: true,
4768
- });
5019
+ this._onDidDimensionChange = new Emitter();
4769
5020
  this.onDidDimensionsChange = this._onDidDimensionChange.event;
4770
- //
4771
- this._onDidChangeFocus = new Emitter({
4772
- replay: true,
4773
- });
5021
+ this._onDidChangeFocus = new Emitter();
4774
5022
  this.onDidFocusChange = this._onDidChangeFocus.event;
4775
5023
  //
4776
- this._onFocusEvent = new Emitter();
4777
- this.onFocusEvent = this._onFocusEvent.event;
5024
+ this._onWillFocus = new Emitter();
5025
+ this.onWillFocus = this._onWillFocus.event;
4778
5026
  //
4779
- this._onDidVisibilityChange = new Emitter({
4780
- replay: true,
4781
- });
5027
+ this._onDidVisibilityChange = new Emitter();
4782
5028
  this.onDidVisibilityChange = this._onDidVisibilityChange.event;
4783
- //
4784
- this._onVisibilityChange = new Emitter();
4785
- this.onVisibilityChange = this._onVisibilityChange.event;
4786
- //
4787
- this._onDidActiveChange = new Emitter({
4788
- replay: true,
4789
- });
5029
+ this._onWillVisibilityChange = new Emitter();
5030
+ this.onWillVisibilityChange = this._onWillVisibilityChange.event;
5031
+ this._onDidActiveChange = new Emitter();
4790
5032
  this.onDidActiveChange = this._onDidActiveChange.event;
4791
- //
4792
5033
  this._onActiveChange = new Emitter();
4793
5034
  this.onActiveChange = this._onActiveChange.event;
4794
- //
4795
5035
  this._onUpdateParameters = new Emitter();
4796
5036
  this.onUpdateParameters = this._onUpdateParameters.event;
4797
5037
  this.addDisposables(this.onDidFocusChange((event) => {
@@ -4803,7 +5043,7 @@ define(['exports'], (function (exports) { 'use strict';
4803
5043
  }), this.onDidDimensionsChange((event) => {
4804
5044
  this._width = event.width;
4805
5045
  this._height = event.height;
4806
- }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this._onUpdateParameters);
5046
+ }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onUpdateParameters, this._onWillFocus, this._onWillVisibilityChange, this._onUpdateParameters);
4807
5047
  }
4808
5048
  initialize(panel) {
4809
5049
  this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
@@ -4813,7 +5053,7 @@ define(['exports'], (function (exports) { 'use strict';
4813
5053
  });
4814
5054
  }
4815
5055
  setVisible(isVisible) {
4816
- this._onVisibilityChange.fire({ isVisible });
5056
+ this._onWillVisibilityChange.fire({ isVisible });
4817
5057
  }
4818
5058
  setActive() {
4819
5059
  this._onActiveChange.fire();
@@ -4821,9 +5061,6 @@ define(['exports'], (function (exports) { 'use strict';
4821
5061
  updateParameters(parameters) {
4822
5062
  this._onUpdateParameters.fire(parameters);
4823
5063
  }
4824
- dispose() {
4825
- super.dispose();
4826
- }
4827
5064
  }
4828
5065
 
4829
5066
  class SplitviewPanelApiImpl extends PanelApiImpl {
@@ -4911,7 +5148,12 @@ define(['exports'], (function (exports) { 'use strict';
4911
5148
  }), focusTracker);
4912
5149
  }
4913
5150
  focus() {
4914
- this.api._onFocusEvent.fire();
5151
+ const event = new WillFocusEvent();
5152
+ this.api._onWillFocus.fire(event);
5153
+ if (event.defaultPrevented) {
5154
+ return;
5155
+ }
5156
+ this._element.focus();
4915
5157
  }
4916
5158
  layout(width, height) {
4917
5159
  this._width = width;
@@ -5029,7 +5271,11 @@ define(['exports'], (function (exports) { 'use strict';
5029
5271
  this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
5030
5272
  this._orientation = orientation;
5031
5273
  this.element.classList.add('pane');
5032
- this.addDisposables(this.api.onDidSizeChange((event) => {
5274
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5275
+ const { isVisible } = event;
5276
+ const { accessor } = this._params;
5277
+ accessor.setVisible(this, isVisible);
5278
+ }), this.api.onDidSizeChange((event) => {
5033
5279
  this._onDidChange.fire({ size: event.size });
5034
5280
  }), addDisposableListener(this.element, 'mouseenter', (ev) => {
5035
5281
  this.api._onMouseEnter.fire(ev);
@@ -5240,9 +5486,7 @@ define(['exports'], (function (exports) { 'use strict';
5240
5486
  super(id);
5241
5487
  this._onDidConstraintsChangeInternal = new Emitter();
5242
5488
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
5243
- this._onDidConstraintsChange = new Emitter({
5244
- replay: true,
5245
- });
5489
+ this._onDidConstraintsChange = new Emitter();
5246
5490
  this.onDidConstraintsChange = this._onDidConstraintsChange.event;
5247
5491
  this._onDidSizeChange = new Emitter();
5248
5492
  this.onDidSizeChange = this._onDidSizeChange.event;
@@ -5335,13 +5579,13 @@ define(['exports'], (function (exports) { 'use strict';
5335
5579
  this._maximumHeight = options.maximumHeight;
5336
5580
  }
5337
5581
  this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
5338
- this.addDisposables(this.api.onVisibilityChange((event) => {
5582
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5339
5583
  const { isVisible } = event;
5340
5584
  const { accessor } = this._params;
5341
5585
  accessor.setVisible(this, isVisible);
5342
5586
  }), this.api.onActiveChange(() => {
5343
5587
  const { accessor } = this._params;
5344
- accessor.setActive(this);
5588
+ accessor.doSetGroupActive(this);
5345
5589
  }), this.api.onDidConstraintsChangeInternal((event) => {
5346
5590
  if (typeof event.minimumWidth === 'number' ||
5347
5591
  typeof event.minimumWidth === 'function') {
@@ -5424,6 +5668,17 @@ define(['exports'], (function (exports) { 'use strict';
5424
5668
  this.onDidLocationChange = this._onDidLocationChange.event;
5425
5669
  this.addDisposables(this._onDidLocationChange);
5426
5670
  }
5671
+ close() {
5672
+ if (!this._group) {
5673
+ return;
5674
+ }
5675
+ return this.accessor.removeGroup(this._group);
5676
+ }
5677
+ getWindow() {
5678
+ return this.location.type === 'popout'
5679
+ ? this.location.getWindow()
5680
+ : window;
5681
+ }
5427
5682
  moveTo(options) {
5428
5683
  var _a, _b, _c;
5429
5684
  if (!this._group) {
@@ -5431,14 +5686,23 @@ define(['exports'], (function (exports) { 'use strict';
5431
5686
  }
5432
5687
  const group = (_a = options.group) !== null && _a !== void 0 ? _a : this.accessor.addGroup({
5433
5688
  direction: positionToDirection((_b = options.position) !== null && _b !== void 0 ? _b : 'right'),
5689
+ skipSetActive: true,
5690
+ });
5691
+ this.accessor.moveGroupOrPanel({
5692
+ from: { groupId: this._group.id },
5693
+ to: {
5694
+ group,
5695
+ position: options.group
5696
+ ? (_c = options.position) !== null && _c !== void 0 ? _c : 'center'
5697
+ : 'center',
5698
+ },
5434
5699
  });
5435
- this.accessor.moveGroupOrPanel(group, this._group.id, undefined, options.group ? (_c = options.position) !== null && _c !== void 0 ? _c : 'center' : 'center');
5436
5700
  }
5437
5701
  maximize() {
5438
5702
  if (!this._group) {
5439
5703
  throw new Error(NOT_INITIALIZED_MESSAGE);
5440
5704
  }
5441
- if (this.location !== 'grid') {
5705
+ if (this.location.type !== 'grid') {
5442
5706
  // only grid groups can be maximized
5443
5707
  return;
5444
5708
  }
@@ -5495,6 +5759,12 @@ define(['exports'], (function (exports) { 'use strict';
5495
5759
  this.api.initialize(this); // cannot use 'this' after after 'super' call
5496
5760
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
5497
5761
  }
5762
+ focus() {
5763
+ if (!this.api.isActive) {
5764
+ this.api.setActive();
5765
+ }
5766
+ super.focus();
5767
+ }
5498
5768
  initialize() {
5499
5769
  this._model.initialize();
5500
5770
  }
@@ -5540,6 +5810,9 @@ define(['exports'], (function (exports) { 'use strict';
5540
5810
  }
5541
5811
 
5542
5812
  class DockviewPanelApiImpl extends GridviewPanelApiImpl {
5813
+ get location() {
5814
+ return this.group.api.location;
5815
+ }
5543
5816
  get title() {
5544
5817
  return this.panel.title;
5545
5818
  }
@@ -5550,16 +5823,14 @@ define(['exports'], (function (exports) { 'use strict';
5550
5823
  return this.panel.renderer;
5551
5824
  }
5552
5825
  set group(value) {
5553
- const isOldGroupActive = this.isGroupActive;
5554
- this._group = value;
5555
- this._onDidGroupChange.fire();
5556
- if (this._group) {
5557
- this.disposable.value = this._group.api.onDidActiveChange(() => {
5558
- this._onDidActiveGroupChange.fire();
5826
+ const oldGroup = this._group;
5827
+ if (this._group !== value) {
5828
+ this._group = value;
5829
+ this._onDidGroupChange.fire({});
5830
+ this.setupGroupEventListeners(oldGroup);
5831
+ this._onDidLocationChange.fire({
5832
+ location: this.group.api.location,
5559
5833
  });
5560
- if (this.isGroupActive !== isOldGroupActive) {
5561
- this._onDidActiveGroupChange.fire();
5562
- }
5563
5834
  }
5564
5835
  }
5565
5836
  get group() {
@@ -5577,14 +5848,27 @@ define(['exports'], (function (exports) { 'use strict';
5577
5848
  this.onDidGroupChange = this._onDidGroupChange.event;
5578
5849
  this._onDidRendererChange = new Emitter();
5579
5850
  this.onDidRendererChange = this._onDidRendererChange.event;
5580
- this.disposable = new MutableDisposable();
5851
+ this._onDidLocationChange = new Emitter();
5852
+ this.onDidLocationChange = this._onDidLocationChange.event;
5853
+ this.groupEventsDisposable = new MutableDisposable();
5581
5854
  this.initialize(panel);
5582
5855
  this._group = group;
5583
- this.addDisposables(this.disposable, this._onDidRendererChange, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
5856
+ this.setupGroupEventListeners();
5857
+ this.addDisposables(this.groupEventsDisposable, this._onDidRendererChange, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange, this._onDidLocationChange);
5858
+ }
5859
+ getWindow() {
5860
+ return this.group.api.getWindow();
5584
5861
  }
5585
5862
  moveTo(options) {
5586
5863
  var _a;
5587
- this.accessor.moveGroupOrPanel(options.group, this._group.id, this.panel.id, (_a = options.position) !== null && _a !== void 0 ? _a : 'center', options.index);
5864
+ this.accessor.moveGroupOrPanel({
5865
+ from: { groupId: this._group.id, panelId: this.panel.id },
5866
+ to: {
5867
+ group: options.group,
5868
+ position: (_a = options.position) !== null && _a !== void 0 ? _a : 'center',
5869
+ index: options.index,
5870
+ },
5871
+ });
5588
5872
  }
5589
5873
  setTitle(title) {
5590
5874
  this.panel.setTitle(title);
@@ -5604,6 +5888,35 @@ define(['exports'], (function (exports) { 'use strict';
5604
5888
  exitMaximized() {
5605
5889
  this.group.api.exitMaximized();
5606
5890
  }
5891
+ setupGroupEventListeners(previousGroup) {
5892
+ var _a;
5893
+ let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
5894
+ this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
5895
+ if (!event.isVisible && this.isVisible) {
5896
+ this._onDidVisibilityChange.fire(event);
5897
+ }
5898
+ else if (event.isVisible &&
5899
+ !this.isVisible &&
5900
+ this.group.model.isPanelActive(this.panel)) {
5901
+ this._onDidVisibilityChange.fire(event);
5902
+ }
5903
+ }), this.group.api.onDidLocationChange((event) => {
5904
+ if (this.group !== this.panel.group) {
5905
+ return;
5906
+ }
5907
+ this._onDidLocationChange.fire(event);
5908
+ }), this.group.api.onDidActiveChange(() => {
5909
+ if (this.group !== this.panel.group) {
5910
+ return;
5911
+ }
5912
+ if (_trackGroupActive !== this.isGroupActive) {
5913
+ _trackGroupActive = this.isGroupActive;
5914
+ this._onDidActiveGroupChange.fire({
5915
+ isActive: this.isGroupActive,
5916
+ });
5917
+ }
5918
+ }));
5919
+ }
5607
5920
  }
5608
5921
 
5609
5922
  class DockviewPanel extends CompositeDisposable {
@@ -5645,7 +5958,14 @@ define(['exports'], (function (exports) { 'use strict';
5645
5958
  this.setTitle(params.title);
5646
5959
  }
5647
5960
  focus() {
5648
- this.api._onFocusEvent.fire();
5961
+ const event = new WillFocusEvent();
5962
+ this.api._onWillFocus.fire(event);
5963
+ if (event.defaultPrevented) {
5964
+ return;
5965
+ }
5966
+ if (!this.api.isActive) {
5967
+ this.api.setActive();
5968
+ }
5649
5969
  }
5650
5970
  toJSON() {
5651
5971
  return {
@@ -5702,20 +6022,40 @@ define(['exports'], (function (exports) { 'use strict';
5702
6022
  },
5703
6023
  });
5704
6024
  }
5705
- updateParentGroup(group, isGroupActive) {
6025
+ updateParentGroup(group, options) {
5706
6026
  this._group = group;
5707
- this.api.group = group;
6027
+ this.api.group = this._group;
5708
6028
  const isPanelVisible = this._group.model.isPanelActive(this);
5709
- this.api._onDidActiveChange.fire({
5710
- isActive: isGroupActive && isPanelVisible,
5711
- });
5712
- this.api._onDidVisibilityChange.fire({
5713
- isVisible: isPanelVisible,
5714
- });
5715
- this.view.updateParentGroup(this._group, this._group.model.isPanelActive(this));
6029
+ const isActive = this.group.api.isActive && isPanelVisible;
6030
+ if (!(options === null || options === void 0 ? void 0 : options.skipSetActive)) {
6031
+ if (this.api.isActive !== isActive) {
6032
+ this.api._onDidActiveChange.fire({
6033
+ isActive: this.group.api.isActive && isPanelVisible,
6034
+ });
6035
+ }
6036
+ }
6037
+ if (this.api.isVisible !== isPanelVisible) {
6038
+ this.api._onDidVisibilityChange.fire({
6039
+ isVisible: isPanelVisible,
6040
+ });
6041
+ }
6042
+ }
6043
+ runEvents() {
6044
+ const isPanelVisible = this._group.model.isPanelActive(this);
6045
+ const isActive = this.group.api.isActive && isPanelVisible;
6046
+ if (this.api.isActive !== isActive) {
6047
+ this.api._onDidActiveChange.fire({
6048
+ isActive: this.group.api.isActive && isPanelVisible,
6049
+ });
6050
+ }
6051
+ if (this.api.isVisible !== isPanelVisible) {
6052
+ this.api._onDidVisibilityChange.fire({
6053
+ isVisible: isPanelVisible,
6054
+ });
6055
+ }
5716
6056
  }
5717
6057
  layout(width, height) {
5718
- // the obtain the correct dimensions of the content panel we must deduct the tab height
6058
+ // TODO: Can we somehow do height without header height or indicate what the header height is?
5719
6059
  this.api._onDidDimensionChange.fire({
5720
6060
  width,
5721
6061
  height: height,
@@ -5837,8 +6177,6 @@ define(['exports'], (function (exports) { 'use strict';
5837
6177
  this.id = id;
5838
6178
  this.contentComponent = contentComponent;
5839
6179
  this.tabComponent = tabComponent;
5840
- this._group = null;
5841
- this._isPanelVisible = null;
5842
6180
  this._content = this.createContentComponent(this.id, contentComponent);
5843
6181
  this._tab = this.createTabComponent(this.id, tabComponent);
5844
6182
  }
@@ -5846,25 +6184,8 @@ define(['exports'], (function (exports) { 'use strict';
5846
6184
  this.content.init(Object.assign(Object.assign({}, params), { tab: this.tab }));
5847
6185
  this.tab.init(params);
5848
6186
  }
5849
- updateParentGroup(group, isPanelVisible) {
5850
- if (group !== this._group) {
5851
- this._group = group;
5852
- if (this._content.onGroupChange) {
5853
- this._content.onGroupChange(group);
5854
- }
5855
- if (this._tab.onGroupChange) {
5856
- this._tab.onGroupChange(group);
5857
- }
5858
- }
5859
- if (isPanelVisible !== this._isPanelVisible) {
5860
- this._isPanelVisible = isPanelVisible;
5861
- if (this._content.onPanelVisibleChange) {
5862
- this._content.onPanelVisibleChange(isPanelVisible);
5863
- }
5864
- if (this._tab.onPanelVisibleChange) {
5865
- this._tab.onPanelVisibleChange(isPanelVisible);
5866
- }
5867
- }
6187
+ updateParentGroup(_group, _isPanelVisible) {
6188
+ // noop
5868
6189
  }
5869
6190
  layout(width, height) {
5870
6191
  var _a, _b;
@@ -6297,117 +6618,6 @@ define(['exports'], (function (exports) { 'use strict';
6297
6618
  }
6298
6619
  }
6299
6620
 
6300
- class PopoutWindow extends CompositeDisposable {
6301
- constructor(id, className, options) {
6302
- super();
6303
- this.id = id;
6304
- this.className = className;
6305
- this.options = options;
6306
- this._onDidClose = new Emitter();
6307
- this.onDidClose = this._onDidClose.event;
6308
- this._window = null;
6309
- this.addDisposables(this._onDidClose, {
6310
- dispose: () => {
6311
- this.close();
6312
- },
6313
- });
6314
- }
6315
- dimensions() {
6316
- if (!this._window) {
6317
- return null;
6318
- }
6319
- const left = this._window.value.screenX;
6320
- const top = this._window.value.screenY;
6321
- const width = this._window.value.innerWidth;
6322
- const height = this._window.value.innerHeight;
6323
- return { top, left, width, height };
6324
- }
6325
- close() {
6326
- if (this._window) {
6327
- this._window.disposable.dispose();
6328
- this._window.value.close();
6329
- this._window = null;
6330
- }
6331
- }
6332
- open(content) {
6333
- if (this._window) {
6334
- throw new Error('instance of popout window is already open');
6335
- }
6336
- const url = `${this.options.url}`;
6337
- const features = Object.entries({
6338
- top: this.options.top,
6339
- left: this.options.left,
6340
- width: this.options.width,
6341
- height: this.options.height,
6342
- })
6343
- .map(([key, value]) => `${key}=${value}`)
6344
- .join(',');
6345
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/open
6346
- const externalWindow = window.open(url, this.id, features);
6347
- if (!externalWindow) {
6348
- return;
6349
- }
6350
- const disposable = new CompositeDisposable();
6351
- this._window = { value: externalWindow, disposable };
6352
- const cleanUp = () => {
6353
- this._onDidClose.fire();
6354
- this._window = null;
6355
- };
6356
- // prevent any default content from loading
6357
- // externalWindow.document.body.replaceWith(document.createElement('div'));
6358
- disposable.addDisposables(addDisposableWindowListener(window, 'beforeunload', () => {
6359
- cleanUp();
6360
- this.close();
6361
- }));
6362
- externalWindow.addEventListener('load', () => {
6363
- const externalDocument = externalWindow.document;
6364
- externalDocument.title = document.title;
6365
- const div = document.createElement('div');
6366
- div.classList.add('dv-popout-window');
6367
- div.style.position = 'absolute';
6368
- div.style.width = '100%';
6369
- div.style.height = '100%';
6370
- div.style.top = '0px';
6371
- div.style.left = '0px';
6372
- div.classList.add(this.className);
6373
- div.appendChild(content);
6374
- externalDocument.body.replaceChildren(div);
6375
- externalDocument.body.classList.add(this.className);
6376
- addStyles(externalDocument, window.document.styleSheets);
6377
- externalWindow.addEventListener('beforeunload', () => {
6378
- // TODO: indicate external window is closing
6379
- cleanUp();
6380
- });
6381
- });
6382
- }
6383
- }
6384
-
6385
- class DockviewPopoutGroupPanel extends CompositeDisposable {
6386
- constructor(id, group, options) {
6387
- var _a;
6388
- super();
6389
- this.id = id;
6390
- this.group = group;
6391
- this.options = options;
6392
- this.window = new PopoutWindow(id, (_a = options.className) !== null && _a !== void 0 ? _a : '', {
6393
- url: this.options.popoutUrl,
6394
- left: this.options.box.left,
6395
- top: this.options.box.top,
6396
- width: this.options.box.width,
6397
- height: this.options.box.height,
6398
- });
6399
- group.model.location = 'popout';
6400
- this.addDisposables(this.window, {
6401
- dispose: () => {
6402
- group.model.location = 'grid';
6403
- },
6404
- }, this.window.onDidClose(() => {
6405
- this.dispose();
6406
- }));
6407
- this.window.open(group.element);
6408
- }
6409
- }
6410
-
6411
6621
  const DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE = 100;
6412
6622
  const DEFAULT_FLOATING_GROUP_POSITION = { left: 100, top: 100 };
6413
6623
 
@@ -6421,11 +6631,13 @@ define(['exports'], (function (exports) { 'use strict';
6421
6631
  super();
6422
6632
  this.element = element;
6423
6633
  this.map = {};
6634
+ this._disposed = false;
6424
6635
  this.addDisposables(Disposable.from(() => {
6425
6636
  for (const value of Object.values(this.map)) {
6426
6637
  value.disposable.dispose();
6427
6638
  value.destroy.dispose();
6428
6639
  }
6640
+ this._disposed = true;
6429
6641
  }));
6430
6642
  }
6431
6643
  detatch(panel) {
@@ -6465,7 +6677,7 @@ define(['exports'], (function (exports) { 'use strict';
6465
6677
  focusContainer.style.top = `${box.top - box2.top}px`;
6466
6678
  focusContainer.style.width = `${box.width}px`;
6467
6679
  focusContainer.style.height = `${box.height}px`;
6468
- toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location === 'floating');
6680
+ toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
6469
6681
  };
6470
6682
  const visibilityChanged = () => {
6471
6683
  if (panel.api.isVisible) {
@@ -6511,8 +6723,11 @@ define(['exports'], (function (exports) { 'use strict';
6511
6723
  resize();
6512
6724
  }));
6513
6725
  this.map[panel.api.id].destroy = Disposable.from(() => {
6514
- focusContainer.removeChild(panel.view.content.element);
6515
- this.element.removeChild(focusContainer);
6726
+ var _a;
6727
+ if (panel.view.content.element.parentElement === focusContainer) {
6728
+ focusContainer.removeChild(panel.view.content.element);
6729
+ }
6730
+ (_a = focusContainer.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(focusContainer);
6516
6731
  });
6517
6732
  queueMicrotask(() => {
6518
6733
  if (this.isDisposed) {
@@ -6533,11 +6748,187 @@ define(['exports'], (function (exports) { 'use strict';
6533
6748
  }
6534
6749
  }
6535
6750
 
6751
+ /******************************************************************************
6752
+ Copyright (c) Microsoft Corporation.
6753
+
6754
+ Permission to use, copy, modify, and/or distribute this software for any
6755
+ purpose with or without fee is hereby granted.
6756
+
6757
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
6758
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6759
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
6760
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6761
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6762
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6763
+ PERFORMANCE OF THIS SOFTWARE.
6764
+ ***************************************************************************** */
6765
+ /* global Reflect, Promise, SuppressedError, Symbol */
6766
+
6767
+
6768
+ function __awaiter(thisArg, _arguments, P, generator) {
6769
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6770
+ return new (P || (P = Promise))(function (resolve, reject) {
6771
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6772
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6773
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6774
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
6775
+ });
6776
+ }
6777
+
6778
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
6779
+ var e = new Error(message);
6780
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
6781
+ };
6782
+
6783
+ class PopoutWindow extends CompositeDisposable {
6784
+ get window() {
6785
+ var _a, _b;
6786
+ return (_b = (_a = this._window) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
6787
+ }
6788
+ constructor(target, className, options) {
6789
+ super();
6790
+ this.target = target;
6791
+ this.className = className;
6792
+ this.options = options;
6793
+ this._onWillClose = new Emitter();
6794
+ this.onWillClose = this._onWillClose.event;
6795
+ this._onDidClose = new Emitter();
6796
+ this.onDidClose = this._onDidClose.event;
6797
+ this._window = null;
6798
+ this.addDisposables(this._onWillClose, this._onDidClose, {
6799
+ dispose: () => {
6800
+ this.close();
6801
+ },
6802
+ });
6803
+ }
6804
+ dimensions() {
6805
+ if (!this._window) {
6806
+ return null;
6807
+ }
6808
+ const left = this._window.value.screenX;
6809
+ const top = this._window.value.screenY;
6810
+ const width = this._window.value.innerWidth;
6811
+ const height = this._window.value.innerHeight;
6812
+ return { top, left, width, height };
6813
+ }
6814
+ close() {
6815
+ var _a, _b;
6816
+ if (this._window) {
6817
+ this._onWillClose.fire();
6818
+ (_b = (_a = this.options).onWillClose) === null || _b === void 0 ? void 0 : _b.call(_a, {
6819
+ id: this.target,
6820
+ window: this._window.value,
6821
+ });
6822
+ this._window.disposable.dispose();
6823
+ this._window.value.close();
6824
+ this._window = null;
6825
+ this._onDidClose.fire();
6826
+ }
6827
+ }
6828
+ open() {
6829
+ var _a, _b;
6830
+ return __awaiter(this, void 0, void 0, function* () {
6831
+ if (this._window) {
6832
+ throw new Error('instance of popout window is already open');
6833
+ }
6834
+ const url = `${this.options.url}`;
6835
+ const features = Object.entries({
6836
+ top: this.options.top,
6837
+ left: this.options.left,
6838
+ width: this.options.width,
6839
+ height: this.options.height,
6840
+ })
6841
+ .map(([key, value]) => `${key}=${value}`)
6842
+ .join(',');
6843
+ /**
6844
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/open
6845
+ */
6846
+ const externalWindow = window.open(url, this.target, features);
6847
+ if (!externalWindow) {
6848
+ /**
6849
+ * Popup blocked
6850
+ */
6851
+ return null;
6852
+ }
6853
+ const disposable = new CompositeDisposable();
6854
+ this._window = { value: externalWindow, disposable };
6855
+ disposable.addDisposables(addDisposableWindowListener(window, 'beforeunload', () => {
6856
+ /**
6857
+ * before the main window closes we should close this popup too
6858
+ * to be good citizens
6859
+ *
6860
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
6861
+ */
6862
+ this.close();
6863
+ }));
6864
+ const container = this.createPopoutWindowContainer();
6865
+ if (this.className) {
6866
+ container.classList.add(this.className);
6867
+ }
6868
+ (_b = (_a = this.options).onDidOpen) === null || _b === void 0 ? void 0 : _b.call(_a, {
6869
+ id: this.target,
6870
+ window: externalWindow,
6871
+ });
6872
+ return new Promise((resolve) => {
6873
+ externalWindow.addEventListener('unload', (e) => {
6874
+ // if page fails to load before unloading
6875
+ // this.close();
6876
+ });
6877
+ externalWindow.addEventListener('load', () => {
6878
+ /**
6879
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
6880
+ */
6881
+ const externalDocument = externalWindow.document;
6882
+ externalDocument.title = document.title;
6883
+ externalDocument.body.appendChild(container);
6884
+ addStyles(externalDocument, window.document.styleSheets);
6885
+ /**
6886
+ * beforeunload must be registered after load for reasons I could not determine
6887
+ * otherwise the beforeunload event will not fire when the window is closed
6888
+ */
6889
+ addDisposableWindowListener(externalWindow, 'beforeunload', () => {
6890
+ /**
6891
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
6892
+ */
6893
+ this.close();
6894
+ });
6895
+ resolve(container);
6896
+ });
6897
+ });
6898
+ });
6899
+ }
6900
+ createPopoutWindowContainer() {
6901
+ const el = document.createElement('div');
6902
+ el.classList.add('dv-popout-window');
6903
+ el.id = 'dv-popout-window';
6904
+ el.style.position = 'absolute';
6905
+ el.style.width = '100%';
6906
+ el.style.height = '100%';
6907
+ el.style.top = '0px';
6908
+ el.style.left = '0px';
6909
+ return el;
6910
+ }
6911
+ }
6912
+
6536
6913
  const DEFAULT_ROOT_OVERLAY_MODEL = {
6537
6914
  activationSize: { type: 'pixels', value: 10 },
6538
6915
  size: { type: 'pixels', value: 20 },
6539
6916
  };
6540
- function getTheme(element) {
6917
+ function moveGroupWithoutDestroying(options) {
6918
+ const activePanel = options.from.activePanel;
6919
+ const panels = [...options.from.panels].map((panel) => {
6920
+ const removedPanel = options.from.model.removePanel(panel);
6921
+ options.from.model.renderContainer.detatch(panel);
6922
+ return removedPanel;
6923
+ });
6924
+ panels.forEach((panel) => {
6925
+ options.to.model.openPanel(panel, {
6926
+ skipSetActive: activePanel !== panel,
6927
+ skipSetGroupActive: true,
6928
+ });
6929
+ });
6930
+ }
6931
+ function getDockviewTheme(element) {
6541
6932
  function toClassList(element) {
6542
6933
  const list = [];
6543
6934
  for (let i = 0; i < element.classList.length; i++) {
@@ -6588,6 +6979,7 @@ define(['exports'], (function (exports) { 'use strict';
6588
6979
  styles: options.styles,
6589
6980
  parentElement: options.parentElement,
6590
6981
  disableAutoResizing: options.disableAutoResizing,
6982
+ locked: options.locked,
6591
6983
  });
6592
6984
  this.nextGroupId = sequentialNumberGenerator();
6593
6985
  this._deserializer = new DefaultDockviewDeserialzier(this);
@@ -6598,6 +6990,10 @@ define(['exports'], (function (exports) { 'use strict';
6598
6990
  this.onWillDragGroup = this._onWillDragGroup.event;
6599
6991
  this._onDidDrop = new Emitter();
6600
6992
  this.onDidDrop = this._onDidDrop.event;
6993
+ this._onWillDrop = new Emitter();
6994
+ this.onWillDrop = this._onWillDrop.event;
6995
+ this._onWillShowOverlay = new Emitter();
6996
+ this.onWillShowOverlay = this._onWillShowOverlay.event;
6601
6997
  this._onDidRemovePanel = new Emitter();
6602
6998
  this.onDidRemovePanel = this._onDidRemovePanel.event;
6603
6999
  this._onDidAddPanel = new Emitter();
@@ -6606,15 +7002,36 @@ define(['exports'], (function (exports) { 'use strict';
6606
7002
  this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
6607
7003
  this._onDidActivePanelChange = new Emitter();
6608
7004
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
7005
+ this._onDidMovePanel = new Emitter();
6609
7006
  this._floatingGroups = [];
6610
7007
  this._popoutGroups = [];
7008
+ this._ignoreEvents = 0;
7009
+ this._onDidRemoveGroup = new Emitter();
7010
+ this.onDidRemoveGroup = this._onDidRemoveGroup.event;
7011
+ this._onDidAddGroup = new Emitter();
7012
+ this.onDidAddGroup = this._onDidAddGroup.event;
7013
+ this._onDidActiveGroupChange = new Emitter();
7014
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
7015
+ this._moving = false;
6611
7016
  const gready = document.createElement('div');
6612
7017
  gready.className = 'dv-overlay-render-container';
6613
7018
  this.gridview.element.appendChild(gready);
6614
7019
  this.overlayRenderContainer = new OverlayRenderContainer(gready);
6615
7020
  toggleClass(this.gridview.element, 'dv-dockview', true);
6616
7021
  toggleClass(this.element, 'dv-debug', !!options.debug);
6617
- this.addDisposables(this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop, exports.DockviewEvent.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
7022
+ this.addDisposables(this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onWillShowOverlay, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop, this._onWillDrop, this._onDidMovePanel, this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this.onDidAdd((event) => {
7023
+ if (!this._moving) {
7024
+ this._onDidAddGroup.fire(event);
7025
+ }
7026
+ }), this.onDidRemove((event) => {
7027
+ if (!this._moving) {
7028
+ this._onDidRemoveGroup.fire(event);
7029
+ }
7030
+ }), this.onDidActiveChange((event) => {
7031
+ if (!this._moving) {
7032
+ this._onDidActiveGroupChange.fire(event);
7033
+ }
7034
+ }), exports.DockviewEvent.any(this.onDidAdd, this.onDidRemove)(() => {
6618
7035
  this.updateWatermark();
6619
7036
  }), exports.DockviewEvent.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
6620
7037
  this._bufferOnDidLayoutChange.fire();
@@ -6625,7 +7042,7 @@ define(['exports'], (function (exports) { 'use strict';
6625
7042
  }
6626
7043
  // iterate over a copy of the array since .dispose() mutates the original array
6627
7044
  for (const group of [...this._popoutGroups]) {
6628
- group.dispose();
7045
+ group.disposable.dispose();
6629
7046
  }
6630
7047
  }));
6631
7048
  this._options = options;
@@ -6671,7 +7088,7 @@ define(['exports'], (function (exports) { 'use strict';
6671
7088
  return this.options.showDndOverlay({
6672
7089
  nativeEvent: event,
6673
7090
  position: position,
6674
- target: exports.DockviewDropTargets.Edge,
7091
+ target: 'edge',
6675
7092
  getData: getPanelData,
6676
7093
  });
6677
7094
  }
@@ -6680,88 +7097,259 @@ define(['exports'], (function (exports) { 'use strict';
6680
7097
  acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
6681
7098
  overlayModel: (_b = this.options.rootOverlayModel) !== null && _b !== void 0 ? _b : DEFAULT_ROOT_OVERLAY_MODEL,
6682
7099
  });
6683
- this.addDisposables(this._rootDropTarget.onDrop((event) => {
7100
+ this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
7101
+ if (this.gridview.length > 0 && event.position === 'center') {
7102
+ // option only available when no panels in primary grid
7103
+ return;
7104
+ }
7105
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7106
+ kind: 'edge',
7107
+ }));
7108
+ }), this._rootDropTarget.onDrop((event) => {
6684
7109
  var _a;
7110
+ const willDropEvent = new DockviewWillDropEvent({
7111
+ nativeEvent: event.nativeEvent,
7112
+ position: event.position,
7113
+ panel: undefined,
7114
+ api: this._api,
7115
+ group: undefined,
7116
+ getData: getPanelData,
7117
+ kind: 'edge',
7118
+ });
7119
+ this._onWillDrop.fire(willDropEvent);
7120
+ if (willDropEvent.defaultPrevented) {
7121
+ return;
7122
+ }
6685
7123
  const data = getPanelData();
6686
7124
  if (data) {
6687
- this.moveGroupOrPanel(this.orthogonalize(event.position), data.groupId, (_a = data.panelId) !== null && _a !== void 0 ? _a : undefined, 'center');
7125
+ this.moveGroupOrPanel({
7126
+ from: {
7127
+ groupId: data.groupId,
7128
+ panelId: (_a = data.panelId) !== null && _a !== void 0 ? _a : undefined,
7129
+ },
7130
+ to: {
7131
+ group: this.orthogonalize(event.position),
7132
+ position: 'center',
7133
+ },
7134
+ });
6688
7135
  }
6689
7136
  else {
6690
- this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api, group: null, getData: getPanelData }));
7137
+ this._onDidDrop.fire(new DockviewDidDropEvent({
7138
+ nativeEvent: event.nativeEvent,
7139
+ position: event.position,
7140
+ panel: undefined,
7141
+ api: this._api,
7142
+ group: undefined,
7143
+ getData: getPanelData,
7144
+ }));
6691
7145
  }
6692
7146
  }), this._rootDropTarget);
6693
7147
  this._api = new DockviewApi(this);
6694
7148
  this.updateWatermark();
6695
7149
  }
6696
- addPopoutGroup(item, options) {
6697
- var _a;
6698
- let group;
6699
- let box = options === null || options === void 0 ? void 0 : options.position;
6700
- if (item instanceof DockviewPanel) {
6701
- group = this.createGroup();
6702
- this.removePanel(item, {
6703
- removeEmptyGroup: true,
6704
- skipDispose: true,
6705
- });
6706
- group.model.openPanel(item);
6707
- if (!box) {
6708
- box = this.element.getBoundingClientRect();
7150
+ addPopoutGroup(itemToPopout, options) {
7151
+ var _a, _b, _c;
7152
+ if (itemToPopout instanceof DockviewPanel &&
7153
+ itemToPopout.group.size === 1) {
7154
+ return this.addPopoutGroup(itemToPopout.group);
7155
+ }
7156
+ const theme = getDockviewTheme(this.gridview.element);
7157
+ const element = this.element;
7158
+ function getBox() {
7159
+ if (options === null || options === void 0 ? void 0 : options.position) {
7160
+ return options.position;
7161
+ }
7162
+ if (itemToPopout instanceof DockviewGroupPanel) {
7163
+ return itemToPopout.element.getBoundingClientRect();
7164
+ }
7165
+ if (itemToPopout.group) {
7166
+ return itemToPopout.group.element.getBoundingClientRect();
7167
+ }
7168
+ return element.getBoundingClientRect();
7169
+ }
7170
+ const box = getBox();
7171
+ const groupId = (_b = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.getNextGroupId(); //item.id;
7172
+ if (itemToPopout.api.location.type === 'grid') {
7173
+ itemToPopout.api.setVisible(false);
7174
+ }
7175
+ const _window = new PopoutWindow(`${this.id}-${groupId}`, // unique id
7176
+ theme !== null && theme !== void 0 ? theme : '', {
7177
+ url: (_c = options === null || options === void 0 ? void 0 : options.popoutUrl) !== null && _c !== void 0 ? _c : '/popout.html',
7178
+ left: window.screenX + box.left,
7179
+ top: window.screenY + box.top,
7180
+ width: box.width,
7181
+ height: box.height,
7182
+ onDidOpen: options === null || options === void 0 ? void 0 : options.onDidOpen,
7183
+ onWillClose: options === null || options === void 0 ? void 0 : options.onWillClose,
7184
+ });
7185
+ const popoutWindowDisposable = new CompositeDisposable(_window, _window.onDidClose(() => {
7186
+ popoutWindowDisposable.dispose();
7187
+ }));
7188
+ return _window
7189
+ .open()
7190
+ .then((popoutContainer) => {
7191
+ var _a;
7192
+ if (_window.isDisposed) {
7193
+ return;
6709
7194
  }
6710
- }
6711
- else {
6712
- group = item;
6713
- if (!box) {
6714
- box = group.element.getBoundingClientRect();
7195
+ if (popoutContainer === null) {
7196
+ popoutWindowDisposable.dispose();
7197
+ return;
6715
7198
  }
6716
- const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
6717
- options.skipRemoveGroup;
6718
- if (!skip) {
6719
- this.doRemoveGroup(item, { skipDispose: true });
6720
- }
6721
- }
6722
- const theme = getTheme(this.gridview.element);
6723
- const popoutWindow = new DockviewPopoutGroupPanel(`${this.id}-${group.id}`, // globally unique within dockview
6724
- group, {
6725
- className: theme !== null && theme !== void 0 ? theme : '',
6726
- popoutUrl: (_a = options === null || options === void 0 ? void 0 : options.popoutUrl) !== null && _a !== void 0 ? _a : '/popout.html',
6727
- box: {
6728
- left: window.screenX + box.left,
6729
- top: window.screenY + box.top,
6730
- width: box.width,
6731
- height: box.height,
6732
- },
7199
+ const gready = document.createElement('div');
7200
+ gready.className = 'dv-overlay-render-container';
7201
+ const overlayRenderContainer = new OverlayRenderContainer(gready);
7202
+ const referenceGroup = itemToPopout instanceof DockviewPanel
7203
+ ? itemToPopout.group
7204
+ : itemToPopout;
7205
+ const referenceLocation = itemToPopout.api.location.type;
7206
+ const group = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) !== null && _a !== void 0 ? _a : this.createGroup({ id: groupId });
7207
+ group.model.renderContainer = overlayRenderContainer;
7208
+ if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGroup)) {
7209
+ this._onDidAddGroup.fire(group);
7210
+ }
7211
+ if (itemToPopout instanceof DockviewPanel) {
7212
+ this.movingLock(() => {
7213
+ const panel = referenceGroup.model.removePanel(itemToPopout);
7214
+ group.model.openPanel(panel);
7215
+ });
7216
+ }
7217
+ else {
7218
+ this.movingLock(() => moveGroupWithoutDestroying({
7219
+ from: referenceGroup,
7220
+ to: group,
7221
+ }));
7222
+ switch (referenceLocation) {
7223
+ case 'grid':
7224
+ referenceGroup.api.setVisible(false);
7225
+ break;
7226
+ case 'floating':
7227
+ case 'popout':
7228
+ this.removeGroup(referenceGroup);
7229
+ break;
7230
+ }
7231
+ }
7232
+ popoutContainer.classList.add('dv-dockview');
7233
+ popoutContainer.style.overflow = 'hidden';
7234
+ popoutContainer.appendChild(gready);
7235
+ popoutContainer.appendChild(group.element);
7236
+ group.model.location = {
7237
+ type: 'popout',
7238
+ getWindow: () => _window.window,
7239
+ };
7240
+ this.doSetGroupAndPanelActive(group);
7241
+ popoutWindowDisposable.addDisposables(group.api.onDidActiveChange((event) => {
7242
+ var _a;
7243
+ if (event.isActive) {
7244
+ (_a = _window.window) === null || _a === void 0 ? void 0 : _a.focus();
7245
+ }
7246
+ }), group.api.onWillFocus(() => {
7247
+ var _a;
7248
+ (_a = _window.window) === null || _a === void 0 ? void 0 : _a.focus();
7249
+ }));
7250
+ let returnedGroup;
7251
+ const value = {
7252
+ window: _window,
7253
+ popoutGroup: group,
7254
+ referenceGroup: this.getPanel(referenceGroup.id)
7255
+ ? referenceGroup.id
7256
+ : undefined,
7257
+ disposable: {
7258
+ dispose: () => {
7259
+ popoutWindowDisposable.dispose();
7260
+ return returnedGroup;
7261
+ },
7262
+ },
7263
+ };
7264
+ popoutWindowDisposable.addDisposables(
7265
+ /**
7266
+ * ResizeObserver seems slow here, I do not know why but we don't need it
7267
+ * since we can reply on the window resize event as we will occupy the full
7268
+ * window dimensions
7269
+ */
7270
+ addDisposableWindowListener(_window.window, 'resize', () => {
7271
+ group.layout(window.innerWidth, window.innerHeight);
7272
+ }), overlayRenderContainer, Disposable.from(() => {
7273
+ if (this.getPanel(referenceGroup.id)) {
7274
+ this.movingLock(() => moveGroupWithoutDestroying({
7275
+ from: group,
7276
+ to: referenceGroup,
7277
+ }));
7278
+ if (!referenceGroup.api.isVisible) {
7279
+ referenceGroup.api.setVisible(true);
7280
+ }
7281
+ if (this.getPanel(group.id)) {
7282
+ this.doRemoveGroup(group, {
7283
+ skipPopoutAssociated: true,
7284
+ });
7285
+ }
7286
+ }
7287
+ else {
7288
+ if (this.getPanel(group.id)) {
7289
+ const removedGroup = this.doRemoveGroup(group, {
7290
+ skipDispose: true,
7291
+ skipActive: true,
7292
+ });
7293
+ removedGroup.model.renderContainer =
7294
+ this.overlayRenderContainer;
7295
+ removedGroup.model.location = { type: 'grid' };
7296
+ returnedGroup = removedGroup;
7297
+ }
7298
+ }
7299
+ }));
7300
+ this._popoutGroups.push(value);
7301
+ this.updateWatermark();
7302
+ })
7303
+ .catch((err) => {
7304
+ console.error(err);
6733
7305
  });
6734
- popoutWindow.addDisposables({
6735
- dispose: () => {
6736
- remove(this._popoutGroups, popoutWindow);
6737
- this.updateWatermark();
6738
- },
6739
- }, popoutWindow.window.onDidClose(() => {
6740
- this.doAddGroup(group, [0]);
6741
- }));
6742
- this._popoutGroups.push(popoutWindow);
6743
- this.updateWatermark();
6744
7306
  }
6745
7307
  addFloatingGroup(item, coord, options) {
6746
- var _a, _b, _c, _d, _e, _f;
7308
+ var _a, _b, _c, _d, _e, _f, _g;
6747
7309
  let group;
6748
7310
  if (item instanceof DockviewPanel) {
6749
7311
  group = this.createGroup();
6750
- this.removePanel(item, {
7312
+ this._onDidAddGroup.fire(group);
7313
+ this.movingLock(() => this.removePanel(item, {
6751
7314
  removeEmptyGroup: true,
6752
7315
  skipDispose: true,
6753
- });
6754
- group.model.openPanel(item);
7316
+ skipSetActiveGroup: true,
7317
+ }));
7318
+ group.model.openPanel(item, { skipSetGroupActive: true });
6755
7319
  }
6756
7320
  else {
6757
7321
  group = item;
7322
+ const popoutReferenceGroupId = (_a = this._popoutGroups.find((_) => _.popoutGroup === group)) === null || _a === void 0 ? void 0 : _a.referenceGroup;
7323
+ const popoutReferenceGroup = popoutReferenceGroupId
7324
+ ? this.getPanel(popoutReferenceGroupId)
7325
+ : undefined;
6758
7326
  const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
6759
7327
  options.skipRemoveGroup;
6760
7328
  if (!skip) {
6761
- this.doRemoveGroup(item, { skipDispose: true });
7329
+ if (popoutReferenceGroup) {
7330
+ this.movingLock(() => moveGroupWithoutDestroying({
7331
+ from: item,
7332
+ to: popoutReferenceGroup,
7333
+ }));
7334
+ this.doRemoveGroup(item, {
7335
+ skipPopoutReturn: true,
7336
+ skipPopoutAssociated: true,
7337
+ });
7338
+ this.doRemoveGroup(popoutReferenceGroup, {
7339
+ skipDispose: true,
7340
+ });
7341
+ group = popoutReferenceGroup;
7342
+ }
7343
+ else {
7344
+ this.doRemoveGroup(item, {
7345
+ skipDispose: true,
7346
+ skipPopoutReturn: true,
7347
+ skipPopoutAssociated: !!popoutReferenceGroup,
7348
+ });
7349
+ }
6762
7350
  }
6763
7351
  }
6764
- group.model.location = 'floating';
7352
+ group.model.location = { type: 'floating' };
6765
7353
  const overlayLeft = typeof (coord === null || coord === void 0 ? void 0 : coord.x) === 'number'
6766
7354
  ? Math.max(coord.x, 0)
6767
7355
  : DEFAULT_FLOATING_GROUP_POSITION.left;
@@ -6771,16 +7359,16 @@ define(['exports'], (function (exports) { 'use strict';
6771
7359
  const overlay = new Overlay({
6772
7360
  container: this.gridview.element,
6773
7361
  content: group.element,
6774
- height: (_a = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _a !== void 0 ? _a : 300,
6775
- width: (_b = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _b !== void 0 ? _b : 300,
7362
+ height: (_b = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _b !== void 0 ? _b : 300,
7363
+ width: (_c = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _c !== void 0 ? _c : 300,
6776
7364
  left: overlayLeft,
6777
7365
  top: overlayTop,
6778
7366
  minimumInViewportWidth: this.options.floatingGroupBounds === 'boundedWithinViewport'
6779
7367
  ? undefined
6780
- : (_d = (_c = this.options.floatingGroupBounds) === null || _c === void 0 ? void 0 : _c.minimumWidthWithinViewport) !== null && _d !== void 0 ? _d : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
7368
+ : (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumWidthWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
6781
7369
  minimumInViewportHeight: this.options.floatingGroupBounds === 'boundedWithinViewport'
6782
7370
  ? undefined
6783
- : (_f = (_e = this.options.floatingGroupBounds) === null || _e === void 0 ? void 0 : _e.minimumHeightWithinViewport) !== null && _f !== void 0 ? _f : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
7371
+ : (_g = (_f = this.options.floatingGroupBounds) === null || _f === void 0 ? void 0 : _f.minimumHeightWithinViewport) !== null && _g !== void 0 ? _g : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
6784
7372
  });
6785
7373
  const el = group.element.querySelector('.void-container');
6786
7374
  if (!el) {
@@ -6811,12 +7399,15 @@ define(['exports'], (function (exports) { 'use strict';
6811
7399
  }), {
6812
7400
  dispose: () => {
6813
7401
  disposable.dispose();
6814
- group.model.location = 'grid';
7402
+ group.model.location = { type: 'grid' };
6815
7403
  remove(this._floatingGroups, floatingGroupPanel);
6816
7404
  this.updateWatermark();
6817
7405
  },
6818
7406
  });
6819
7407
  this._floatingGroups.push(floatingGroupPanel);
7408
+ if (!(options === null || options === void 0 ? void 0 : options.skipActiveGroup)) {
7409
+ this.doSetGroupAndPanelActive(group);
7410
+ }
6820
7411
  this.updateWatermark();
6821
7412
  }
6822
7413
  orthogonalize(position) {
@@ -6906,8 +7497,8 @@ define(['exports'], (function (exports) { 'use strict';
6906
7497
  return this.panels.find((panel) => panel.id === id);
6907
7498
  }
6908
7499
  setActivePanel(panel) {
6909
- this.doSetGroupActive(panel.group);
6910
7500
  panel.group.model.openPanel(panel);
7501
+ this.doSetGroupAndPanelActive(panel.group);
6911
7502
  }
6912
7503
  moveToNext(options = {}) {
6913
7504
  var _a;
@@ -6968,7 +7559,8 @@ define(['exports'], (function (exports) { 'use strict';
6968
7559
  });
6969
7560
  const popoutGroups = this._popoutGroups.map((group) => {
6970
7561
  return {
6971
- data: group.group.toJSON(),
7562
+ data: group.popoutGroup.toJSON(),
7563
+ gridReferenceGroup: group.referenceGroup,
6972
7564
  position: group.window.dimensions(),
6973
7565
  };
6974
7566
  });
@@ -6986,7 +7578,7 @@ define(['exports'], (function (exports) { 'use strict';
6986
7578
  return result;
6987
7579
  }
6988
7580
  fromJSON(data) {
6989
- var _a, _b;
7581
+ var _a, _b, _c;
6990
7582
  this.clear();
6991
7583
  if (typeof data !== 'object' || data === null) {
6992
7584
  throw new Error('serialized layout must be a non-null object');
@@ -7025,7 +7617,7 @@ define(['exports'], (function (exports) { 'use strict';
7025
7617
  const isActive = typeof activeView === 'string' &&
7026
7618
  activeView === panel.id;
7027
7619
  group.model.openPanel(panel, {
7028
- skipSetPanelActive: !isActive,
7620
+ skipSetActive: !isActive,
7029
7621
  skipSetGroupActive: true,
7030
7622
  });
7031
7623
  }
@@ -7055,11 +7647,16 @@ define(['exports'], (function (exports) { 'use strict';
7055
7647
  }
7056
7648
  const serializedPopoutGroups = (_b = data.popoutGroups) !== null && _b !== void 0 ? _b : [];
7057
7649
  for (const serializedPopoutGroup of serializedPopoutGroups) {
7058
- const { data, position } = serializedPopoutGroup;
7650
+ const { data, position, gridReferenceGroup } = serializedPopoutGroup;
7059
7651
  const group = createGroupFromSerializedState(data);
7060
- this.addPopoutGroup(group, {
7652
+ this.addPopoutGroup((_c = (gridReferenceGroup
7653
+ ? this.getPanel(gridReferenceGroup)
7654
+ : undefined)) !== null && _c !== void 0 ? _c : group, {
7061
7655
  skipRemoveGroup: true,
7062
7656
  position: position !== null && position !== void 0 ? position : undefined,
7657
+ overridePopoutGroup: gridReferenceGroup
7658
+ ? group
7659
+ : undefined,
7063
7660
  });
7064
7661
  }
7065
7662
  for (const floatingGroup of this._floatingGroups) {
@@ -7106,12 +7703,13 @@ define(['exports'], (function (exports) { 'use strict';
7106
7703
  */
7107
7704
  throw err;
7108
7705
  }
7706
+ this.updateWatermark();
7109
7707
  this._onDidLayoutFromJSON.fire();
7110
7708
  }
7111
7709
  clear() {
7112
7710
  const groups = Array.from(this._groups.values()).map((_) => _.value);
7113
7711
  const hasActiveGroup = !!this.activeGroup;
7114
- const hasActivePanel = !!this.activePanel;
7712
+ !!this.activePanel;
7115
7713
  for (const group of groups) {
7116
7714
  // remove the group will automatically remove the panels
7117
7715
  this.removeGroup(group, { skipActive: true });
@@ -7119,9 +7717,6 @@ define(['exports'], (function (exports) { 'use strict';
7119
7717
  if (hasActiveGroup) {
7120
7718
  this.doSetGroupAndPanelActive(undefined);
7121
7719
  }
7122
- if (hasActivePanel) {
7123
- this._onDidActivePanelChange.fire(undefined);
7124
- }
7125
7720
  this.gridview.clear();
7126
7721
  }
7127
7722
  closeAllGroups() {
@@ -7162,6 +7757,7 @@ define(['exports'], (function (exports) { 'use strict';
7162
7757
  const group = this.orthogonalize(directionToPosition(options.position.direction));
7163
7758
  const panel = this.createPanel(options, group);
7164
7759
  group.model.openPanel(panel);
7760
+ this.doSetGroupAndPanelActive(group);
7165
7761
  return panel;
7166
7762
  }
7167
7763
  }
@@ -7173,6 +7769,7 @@ define(['exports'], (function (exports) { 'use strict';
7173
7769
  const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
7174
7770
  if (options.floating) {
7175
7771
  const group = this.createGroup();
7772
+ this._onDidAddGroup.fire(group);
7176
7773
  const o = typeof options.floating === 'object' &&
7177
7774
  options.floating !== null
7178
7775
  ? options.floating
@@ -7180,16 +7777,16 @@ define(['exports'], (function (exports) { 'use strict';
7180
7777
  this.addFloatingGroup(group, o, {
7181
7778
  inDragMode: false,
7182
7779
  skipRemoveGroup: true,
7780
+ skipActiveGroup: true,
7183
7781
  });
7184
- this._onDidAddGroup.fire(group);
7185
7782
  panel = this.createPanel(options, group);
7186
7783
  group.model.openPanel(panel);
7187
- this.doSetGroupAndPanelActive(group);
7188
7784
  }
7189
- else if (referenceGroup.api.location === 'floating' ||
7785
+ else if (referenceGroup.api.location.type === 'floating' ||
7190
7786
  target === 'center') {
7191
7787
  panel = this.createPanel(options, referenceGroup);
7192
7788
  referenceGroup.model.openPanel(panel);
7789
+ this.doSetGroupAndPanelActive(referenceGroup);
7193
7790
  }
7194
7791
  else {
7195
7792
  const location = getGridLocation(referenceGroup.element);
@@ -7197,10 +7794,12 @@ define(['exports'], (function (exports) { 'use strict';
7197
7794
  const group = this.createGroupAtLocation(relativeLocation);
7198
7795
  panel = this.createPanel(options, group);
7199
7796
  group.model.openPanel(panel);
7797
+ this.doSetGroupAndPanelActive(group);
7200
7798
  }
7201
7799
  }
7202
7800
  else if (options.floating) {
7203
7801
  const group = this.createGroup();
7802
+ this._onDidAddGroup.fire(group);
7204
7803
  const o = typeof options.floating === 'object' &&
7205
7804
  options.floating !== null
7206
7805
  ? options.floating
@@ -7208,16 +7807,16 @@ define(['exports'], (function (exports) { 'use strict';
7208
7807
  this.addFloatingGroup(group, o, {
7209
7808
  inDragMode: false,
7210
7809
  skipRemoveGroup: true,
7810
+ skipActiveGroup: true,
7211
7811
  });
7212
- this._onDidAddGroup.fire(group);
7213
7812
  panel = this.createPanel(options, group);
7214
7813
  group.model.openPanel(panel);
7215
- this.doSetGroupAndPanelActive(group);
7216
7814
  }
7217
7815
  else {
7218
7816
  const group = this.createGroupAtLocation();
7219
7817
  panel = this.createPanel(options, group);
7220
7818
  group.model.openPanel(panel);
7819
+ this.doSetGroupAndPanelActive(group);
7221
7820
  }
7222
7821
  return panel;
7223
7822
  }
@@ -7229,13 +7828,15 @@ define(['exports'], (function (exports) { 'use strict';
7229
7828
  if (!group) {
7230
7829
  throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
7231
7830
  }
7232
- group.model.removePanel(panel);
7831
+ group.model.removePanel(panel, {
7832
+ skipSetActiveGroup: options.skipSetActiveGroup,
7833
+ });
7233
7834
  if (!options.skipDispose) {
7234
- this.overlayRenderContainer.detatch(panel);
7835
+ panel.group.model.renderContainer.detatch(panel);
7235
7836
  panel.dispose();
7236
7837
  }
7237
7838
  if (group.size === 0 && options.removeEmptyGroup) {
7238
- this.removeGroup(group);
7839
+ this.removeGroup(group, { skipActive: options.skipSetActiveGroup });
7239
7840
  }
7240
7841
  }
7241
7842
  createWatermarkComponent() {
@@ -7248,7 +7849,7 @@ define(['exports'], (function (exports) { 'use strict';
7248
7849
  }
7249
7850
  updateWatermark() {
7250
7851
  var _a, _b;
7251
- if (this.groups.filter((x) => x.api.location === 'grid').length === 0) {
7852
+ if (this.groups.filter((x) => x.api.location.type === 'grid' && x.api.isVisible).length === 0) {
7252
7853
  if (!this.watermark) {
7253
7854
  this.watermark = this.createWatermarkComponent();
7254
7855
  this.watermark.init({
@@ -7294,36 +7895,42 @@ define(['exports'], (function (exports) { 'use strict';
7294
7895
  }
7295
7896
  else {
7296
7897
  const group = this.orthogonalize(directionToPosition(options.direction));
7898
+ if (!options.skipSetActive) {
7899
+ this.doSetGroupAndPanelActive(group);
7900
+ }
7297
7901
  return group;
7298
7902
  }
7299
7903
  const target = toTarget(options.direction || 'within');
7300
7904
  const location = getGridLocation(referenceGroup.element);
7301
7905
  const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
7302
7906
  this.doAddGroup(group, relativeLocation);
7907
+ if (!options.skipSetActive) {
7908
+ this.doSetGroupAndPanelActive(group);
7909
+ }
7303
7910
  return group;
7304
7911
  }
7305
7912
  else {
7306
7913
  this.doAddGroup(group);
7914
+ this.doSetGroupAndPanelActive(group);
7307
7915
  return group;
7308
7916
  }
7309
7917
  }
7310
7918
  removeGroup(group, options) {
7919
+ this.doRemoveGroup(group, options);
7920
+ }
7921
+ doRemoveGroup(group, options) {
7311
7922
  var _a;
7312
7923
  const panels = [...group.panels]; // reassign since group panels will mutate
7313
- for (const panel of panels) {
7314
- this.removePanel(panel, {
7315
- removeEmptyGroup: false,
7316
- skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
7317
- });
7924
+ if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
7925
+ for (const panel of panels) {
7926
+ this.removePanel(panel, {
7927
+ removeEmptyGroup: false,
7928
+ skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
7929
+ });
7930
+ }
7318
7931
  }
7319
7932
  const activePanel = this.activePanel;
7320
- this.doRemoveGroup(group, options);
7321
- if (this.activePanel !== activePanel) {
7322
- this._onDidActivePanelChange.fire(this.activePanel);
7323
- }
7324
- }
7325
- doRemoveGroup(group, options) {
7326
- if (group.api.location === 'floating') {
7933
+ if (group.api.location.type === 'floating') {
7327
7934
  const floatingGroup = this._floatingGroups.find((_) => _.group === group);
7328
7935
  if (floatingGroup) {
7329
7936
  if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
@@ -7335,60 +7942,124 @@ define(['exports'], (function (exports) { 'use strict';
7335
7942
  floatingGroup.dispose();
7336
7943
  if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
7337
7944
  const groups = Array.from(this._groups.values());
7338
- this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
7945
+ this.doSetGroupAndPanelActive(groups.length > 0 ? groups[0].value : undefined);
7339
7946
  }
7340
7947
  return floatingGroup.group;
7341
7948
  }
7342
7949
  throw new Error('failed to find floating group');
7343
7950
  }
7344
- if (group.api.location === 'popout') {
7345
- const selectedGroup = this._popoutGroups.find((_) => _.group === group);
7951
+ if (group.api.location.type === 'popout') {
7952
+ const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
7346
7953
  if (selectedGroup) {
7347
7954
  if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
7348
- selectedGroup.group.dispose();
7955
+ if (!(options === null || options === void 0 ? void 0 : options.skipPopoutAssociated)) {
7956
+ const refGroup = selectedGroup.referenceGroup
7957
+ ? this.getPanel(selectedGroup.referenceGroup)
7958
+ : undefined;
7959
+ if (refGroup) {
7960
+ this.removeGroup(refGroup);
7961
+ }
7962
+ }
7963
+ selectedGroup.popoutGroup.dispose();
7349
7964
  this._groups.delete(group.id);
7350
7965
  this._onDidRemoveGroup.fire(group);
7351
7966
  }
7352
- selectedGroup.dispose();
7967
+ const removedGroup = selectedGroup.disposable.dispose();
7968
+ if (!(options === null || options === void 0 ? void 0 : options.skipPopoutReturn) && removedGroup) {
7969
+ this.doAddGroup(removedGroup, [0]);
7970
+ this.doSetGroupAndPanelActive(removedGroup);
7971
+ }
7353
7972
  if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
7354
7973
  const groups = Array.from(this._groups.values());
7355
- this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
7974
+ this.doSetGroupAndPanelActive(groups.length > 0 ? groups[0].value : undefined);
7356
7975
  }
7357
- return selectedGroup.group;
7976
+ this.updateWatermark();
7977
+ return selectedGroup.popoutGroup;
7358
7978
  }
7359
7979
  throw new Error('failed to find popout group');
7360
7980
  }
7361
- return super.doRemoveGroup(group, options);
7981
+ const re = super.doRemoveGroup(group, options);
7982
+ if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
7983
+ if (this.activePanel !== activePanel) {
7984
+ this._onDidActivePanelChange.fire(this.activePanel);
7985
+ }
7986
+ }
7987
+ return re;
7362
7988
  }
7363
- moveGroupOrPanel(destinationGroup, sourceGroupId, sourceItemId, destinationTarget, destinationIndex) {
7364
- var _a, _b, _c;
7989
+ movingLock(func) {
7990
+ const isMoving = this._moving;
7991
+ try {
7992
+ this._moving = true;
7993
+ return func();
7994
+ }
7995
+ finally {
7996
+ this._moving = isMoving;
7997
+ }
7998
+ }
7999
+ moveGroupOrPanel(options) {
8000
+ var _a;
8001
+ const destinationGroup = options.to.group;
8002
+ const sourceGroupId = options.from.groupId;
8003
+ const sourceItemId = options.from.panelId;
8004
+ const destinationTarget = options.to.position;
8005
+ const destinationIndex = options.to.index;
7365
8006
  const sourceGroup = sourceGroupId
7366
8007
  ? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
7367
8008
  : undefined;
8009
+ if (!sourceGroup) {
8010
+ throw new Error(`Failed to find group id ${sourceGroupId}`);
8011
+ }
7368
8012
  if (sourceItemId === undefined) {
7369
- if (sourceGroup) {
7370
- this.moveGroup(sourceGroup, destinationGroup, destinationTarget);
7371
- }
8013
+ /**
8014
+ * Moving an entire group into another group
8015
+ */
8016
+ this.moveGroup({
8017
+ from: { group: sourceGroup },
8018
+ to: {
8019
+ group: destinationGroup,
8020
+ position: destinationTarget,
8021
+ },
8022
+ });
7372
8023
  return;
7373
8024
  }
7374
8025
  if (!destinationTarget || destinationTarget === 'center') {
7375
- const groupItem = (_b = sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) !== null && _b !== void 0 ? _b : this.panels.find((panel) => panel.id === sourceItemId);
7376
- if (!groupItem) {
8026
+ /**
8027
+ * Dropping a panel within another group
8028
+ */
8029
+ const removedPanel = this.movingLock(() => sourceGroup.model.removePanel(sourceItemId, {
8030
+ skipSetActive: false,
8031
+ skipSetActiveGroup: true,
8032
+ }));
8033
+ if (!removedPanel) {
7377
8034
  throw new Error(`No panel with id ${sourceItemId}`);
7378
8035
  }
7379
- if ((sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.size) === 0) {
7380
- this.doRemoveGroup(sourceGroup);
8036
+ if (sourceGroup.model.size === 0) {
8037
+ // remove the group and do not set a new group as active
8038
+ this.doRemoveGroup(sourceGroup, { skipActive: true });
7381
8039
  }
7382
- destinationGroup.model.openPanel(groupItem, {
8040
+ this.movingLock(() => destinationGroup.model.openPanel(removedPanel, {
7383
8041
  index: destinationIndex,
8042
+ skipSetGroupActive: true,
8043
+ }));
8044
+ this.doSetGroupAndPanelActive(destinationGroup);
8045
+ this._onDidMovePanel.fire({
8046
+ panel: removedPanel,
7384
8047
  });
7385
8048
  }
7386
8049
  else {
8050
+ /**
8051
+ * Dropping a panel to the extremities of a group which will place that panel
8052
+ * into an adjacent group
8053
+ */
7387
8054
  const referenceLocation = getGridLocation(destinationGroup.element);
7388
8055
  const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
7389
- if (sourceGroup && sourceGroup.size < 2) {
8056
+ if (sourceGroup.size < 2) {
8057
+ /**
8058
+ * If we are moving from a group which only has one panel left we will consider
8059
+ * moving the group itself rather than moving the panel into a newly created group
8060
+ */
7390
8061
  const [targetParentLocation, to] = tail(targetLocation);
7391
- if (sourceGroup.api.location === 'grid') {
8062
+ if (sourceGroup.api.location.type === 'grid') {
7392
8063
  const sourceLocation = getGridLocation(sourceGroup.element);
7393
8064
  const [sourceParentLocation, from] = tail(sourceLocation);
7394
8065
  if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
@@ -7396,77 +8067,122 @@ define(['exports'], (function (exports) { 'use strict';
7396
8067
  // if a group has one tab - we are essentially moving the 'group'
7397
8068
  // which is equivalent to swapping two views in this case
7398
8069
  this.gridview.moveView(sourceParentLocation, from, to);
8070
+ return;
7399
8071
  }
7400
8072
  }
7401
8073
  // source group will become empty so delete the group
7402
- const targetGroup = this.doRemoveGroup(sourceGroup, {
8074
+ const targetGroup = this.movingLock(() => this.doRemoveGroup(sourceGroup, {
7403
8075
  skipActive: true,
7404
8076
  skipDispose: true,
7405
- });
8077
+ }));
7406
8078
  // after deleting the group we need to re-evaulate the ref location
7407
8079
  const updatedReferenceLocation = getGridLocation(destinationGroup.element);
7408
8080
  const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
7409
- this.doAddGroup(targetGroup, location);
8081
+ this.movingLock(() => this.doAddGroup(targetGroup, location));
8082
+ this.doSetGroupAndPanelActive(targetGroup);
7410
8083
  }
7411
8084
  else {
7412
- const groupItem = (_c = sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) !== null && _c !== void 0 ? _c : this.panels.find((panel) => panel.id === sourceItemId);
7413
- if (!groupItem) {
8085
+ /**
8086
+ * The group we are removing from has many panels, we need to remove the panels we are moving,
8087
+ * create a new group, add the panels to that new group and add the new group in an appropiate position
8088
+ */
8089
+ const removedPanel = this.movingLock(() => sourceGroup.model.removePanel(sourceItemId, {
8090
+ skipSetActive: false,
8091
+ skipSetActiveGroup: true,
8092
+ }));
8093
+ if (!removedPanel) {
7414
8094
  throw new Error(`No panel with id ${sourceItemId}`);
7415
8095
  }
7416
8096
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
7417
8097
  const group = this.createGroupAtLocation(dropLocation);
7418
- group.model.openPanel(groupItem);
8098
+ this.movingLock(() => group.model.openPanel(removedPanel, {
8099
+ skipSetGroupActive: true,
8100
+ }));
8101
+ this.doSetGroupAndPanelActive(group);
7419
8102
  }
7420
8103
  }
7421
8104
  }
7422
- moveGroup(sourceGroup, referenceGroup, target) {
7423
- if (sourceGroup) {
7424
- if (!target || target === 'center') {
7425
- const activePanel = sourceGroup.activePanel;
7426
- const panels = [...sourceGroup.panels].map((p) => sourceGroup.model.removePanel(p.id));
7427
- if ((sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.size) === 0) {
7428
- this.doRemoveGroup(sourceGroup);
7429
- }
8105
+ moveGroup(options) {
8106
+ const from = options.from.group;
8107
+ const to = options.to.group;
8108
+ const target = options.to.position;
8109
+ if (target === 'center') {
8110
+ const activePanel = from.activePanel;
8111
+ const panels = this.movingLock(() => [...from.panels].map((p) => from.model.removePanel(p.id, {
8112
+ skipSetActive: true,
8113
+ })));
8114
+ if ((from === null || from === void 0 ? void 0 : from.model.size) === 0) {
8115
+ this.doRemoveGroup(from, { skipActive: true });
8116
+ }
8117
+ this.movingLock(() => {
7430
8118
  for (const panel of panels) {
7431
- referenceGroup.model.openPanel(panel, {
7432
- skipSetPanelActive: panel !== activePanel,
8119
+ to.model.openPanel(panel, {
8120
+ skipSetActive: panel !== activePanel,
8121
+ skipSetGroupActive: true,
7433
8122
  });
7434
8123
  }
7435
- }
7436
- else {
7437
- switch (sourceGroup.api.location) {
7438
- case 'grid':
7439
- this.gridview.removeView(getGridLocation(sourceGroup.element));
7440
- break;
7441
- case 'floating': {
7442
- const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === sourceGroup);
7443
- if (!selectedFloatingGroup) {
7444
- throw new Error('failed to find floating group');
7445
- }
7446
- selectedFloatingGroup.dispose();
7447
- break;
8124
+ });
8125
+ this.doSetGroupAndPanelActive(to);
8126
+ panels.forEach((panel) => {
8127
+ this._onDidMovePanel.fire({ panel });
8128
+ });
8129
+ }
8130
+ else {
8131
+ switch (from.api.location.type) {
8132
+ case 'grid':
8133
+ this.gridview.removeView(getGridLocation(from.element));
8134
+ break;
8135
+ case 'floating': {
8136
+ const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
8137
+ if (!selectedFloatingGroup) {
8138
+ throw new Error('failed to find floating group');
7448
8139
  }
7449
- case 'popout': {
7450
- const selectedPopoutGroup = this._popoutGroups.find((x) => x.group === sourceGroup);
7451
- if (!selectedPopoutGroup) {
7452
- throw new Error('failed to find popout group');
7453
- }
7454
- selectedPopoutGroup.dispose();
8140
+ selectedFloatingGroup.dispose();
8141
+ break;
8142
+ }
8143
+ case 'popout': {
8144
+ const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
8145
+ if (!selectedPopoutGroup) {
8146
+ throw new Error('failed to find popout group');
7455
8147
  }
8148
+ selectedPopoutGroup.disposable.dispose();
7456
8149
  }
7457
- const referenceLocation = getGridLocation(referenceGroup.element);
7458
- const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
7459
- this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
7460
8150
  }
8151
+ const referenceLocation = getGridLocation(to.element);
8152
+ const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
8153
+ this.gridview.addView(from, exports.Sizing.Distribute, dropLocation);
8154
+ from.panels.forEach((panel) => {
8155
+ this._onDidMovePanel.fire({ panel });
8156
+ });
7461
8157
  }
7462
8158
  }
7463
- doSetGroupAndPanelActive(group, skipFocus) {
7464
- var _a, _b;
8159
+ doSetGroupActive(group) {
8160
+ super.doSetGroupActive(group);
8161
+ const activePanel = this.activePanel;
8162
+ if (!this._moving &&
8163
+ activePanel !== this._onDidActivePanelChange.value) {
8164
+ this._onDidActivePanelChange.fire(activePanel);
8165
+ }
8166
+ }
8167
+ doSetGroupAndPanelActive(group) {
8168
+ super.doSetGroupActive(group);
7465
8169
  const activePanel = this.activePanel;
7466
- super.doSetGroupActive(group, skipFocus);
7467
- if (((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.activePanel) !== activePanel) {
7468
- this._onDidActivePanelChange.fire((_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.activePanel);
8170
+ if (group &&
8171
+ this.hasMaximizedGroup() &&
8172
+ !this.isMaximizedGroup(group)) {
8173
+ this.exitMaximizedGroup();
8174
+ }
8175
+ if (!this._moving &&
8176
+ activePanel !== this._onDidActivePanelChange.value) {
8177
+ this._onDidActivePanelChange.fire(activePanel);
8178
+ }
8179
+ }
8180
+ getNextGroupId() {
8181
+ let id = this.nextGroupId.next();
8182
+ while (this._groups.has(id)) {
8183
+ id = this.nextGroupId.next();
7469
8184
  }
8185
+ return id;
7470
8186
  }
7471
8187
  createGroup(options) {
7472
8188
  if (!options) {
@@ -7484,7 +8200,7 @@ define(['exports'], (function (exports) { 'use strict';
7484
8200
  }
7485
8201
  }
7486
8202
  const view = new DockviewGroupPanel(this, id, options);
7487
- view.init({ params: {}, accessor: null }); // required to initialized .part and allow for correct disposal of group
8203
+ view.init({ params: {}, accessor: this });
7488
8204
  if (!this._groups.has(view.id)) {
7489
8205
  const disposable = new CompositeDisposable(view.model.onTabDragStart((event) => {
7490
8206
  this._onWillDragPanel.fire(event);
@@ -7492,20 +8208,48 @@ define(['exports'], (function (exports) { 'use strict';
7492
8208
  this._onWillDragGroup.fire(event);
7493
8209
  }), view.model.onMove((event) => {
7494
8210
  const { groupId, itemId, target, index } = event;
7495
- this.moveGroupOrPanel(view, groupId, itemId, target, index);
8211
+ this.moveGroupOrPanel({
8212
+ from: { groupId: groupId, panelId: itemId },
8213
+ to: {
8214
+ group: view,
8215
+ position: target,
8216
+ index,
8217
+ },
8218
+ });
7496
8219
  }), view.model.onDidDrop((event) => {
7497
- this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api, group: view }));
8220
+ this._onDidDrop.fire(event);
8221
+ }), view.model.onWillDrop((event) => {
8222
+ this._onWillDrop.fire(event);
8223
+ }), view.model.onWillShowOverlay((event) => {
8224
+ if (this.options.disableDnd) {
8225
+ event.preventDefault();
8226
+ return;
8227
+ }
8228
+ this._onWillShowOverlay.fire(event);
7498
8229
  }), view.model.onDidAddPanel((event) => {
8230
+ if (this._moving) {
8231
+ return;
8232
+ }
7499
8233
  this._onDidAddPanel.fire(event.panel);
7500
8234
  }), view.model.onDidRemovePanel((event) => {
8235
+ if (this._moving) {
8236
+ return;
8237
+ }
7501
8238
  this._onDidRemovePanel.fire(event.panel);
7502
8239
  }), view.model.onDidActivePanelChange((event) => {
7503
- this._onDidActivePanelChange.fire(event.panel);
8240
+ if (this._moving) {
8241
+ return;
8242
+ }
8243
+ if (event.panel !== this.activePanel) {
8244
+ return;
8245
+ }
8246
+ if (this._onDidActivePanelChange.value !== event.panel) {
8247
+ this._onDidActivePanelChange.fire(event.panel);
8248
+ }
7504
8249
  }));
7505
8250
  this._groups.set(view.id, { value: view, disposable });
7506
8251
  }
7507
- // TODO: must be called after the above listeners have been setup,
7508
- // not an ideal pattern
8252
+ // TODO: must be called after the above listeners have been setup, not an ideal pattern
7509
8253
  view.initialize();
7510
8254
  return view;
7511
8255
  }
@@ -7558,7 +8302,20 @@ define(['exports'], (function (exports) { 'use strict';
7558
8302
  });
7559
8303
  this._onDidLayoutfromJSON = new Emitter();
7560
8304
  this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
8305
+ this._onDidRemoveGroup = new Emitter();
8306
+ this.onDidRemoveGroup = this._onDidRemoveGroup.event;
8307
+ this._onDidAddGroup = new Emitter();
8308
+ this.onDidAddGroup = this._onDidAddGroup.event;
8309
+ this._onDidActiveGroupChange = new Emitter();
8310
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
7561
8311
  this._options = options;
8312
+ this.addDisposables(this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this.onDidAdd((event) => {
8313
+ this._onDidAddGroup.fire(event);
8314
+ }), this.onDidRemove((event) => {
8315
+ this._onDidRemoveGroup.fire(event);
8316
+ }), this.onDidActiveChange((event) => {
8317
+ this._onDidActiveGroupChange.fire(event);
8318
+ }));
7562
8319
  if (!this.options.components) {
7563
8320
  this.options.components = {};
7564
8321
  }
@@ -7733,6 +8490,7 @@ define(['exports'], (function (exports) { 'use strict';
7733
8490
  });
7734
8491
  this.registerPanel(view);
7735
8492
  this.doAddGroup(view, relativeLocation, options.size);
8493
+ this.doSetGroupActive(view);
7736
8494
  return view;
7737
8495
  }
7738
8496
  registerPanel(panel) {
@@ -7874,19 +8632,19 @@ define(['exports'], (function (exports) { 'use strict';
7874
8632
  const index = this.panels.indexOf(panel);
7875
8633
  this.splitview.setViewVisible(index, visible);
7876
8634
  }
7877
- setActive(view, skipFocus) {
7878
- this._activePanel = view;
8635
+ setActive(panel, skipFocus) {
8636
+ this._activePanel = panel;
7879
8637
  this.panels
7880
- .filter((v) => v !== view)
8638
+ .filter((v) => v !== panel)
7881
8639
  .forEach((v) => {
7882
8640
  v.api._onDidActiveChange.fire({ isActive: false });
7883
8641
  if (!skipFocus) {
7884
8642
  v.focus();
7885
8643
  }
7886
8644
  });
7887
- view.api._onDidActiveChange.fire({ isActive: true });
8645
+ panel.api._onDidActiveChange.fire({ isActive: true });
7888
8646
  if (!skipFocus) {
7889
- view.focus();
8647
+ panel.focus();
7890
8648
  }
7891
8649
  }
7892
8650
  removePanel(panel, sizing) {
@@ -8185,6 +8943,10 @@ define(['exports'], (function (exports) { 'use strict';
8185
8943
  });
8186
8944
  this.addDisposables(this._disposable);
8187
8945
  }
8946
+ setVisible(panel, visible) {
8947
+ const index = this.panels.indexOf(panel);
8948
+ this.paneview.setViewVisible(index, visible);
8949
+ }
8188
8950
  focus() {
8189
8951
  //noop
8190
8952
  }
@@ -8231,6 +8993,7 @@ define(['exports'], (function (exports) { 'use strict';
8231
8993
  isExpanded: options.isExpanded,
8232
8994
  title: options.title,
8233
8995
  containerApi: new PaneviewApi(this),
8996
+ accessor: this,
8234
8997
  });
8235
8998
  this.paneview.addPane(view, size, index);
8236
8999
  view.orientation = this.paneview.orientation;
@@ -8330,6 +9093,7 @@ define(['exports'], (function (exports) { 'use strict';
8330
9093
  title: data.title,
8331
9094
  isExpanded: !!view.expanded,
8332
9095
  containerApi: new PaneviewApi(this),
9096
+ accessor: this,
8333
9097
  });
8334
9098
  panel.orientation = this.paneview.orientation;
8335
9099
  });
@@ -8418,7 +9182,7 @@ define(['exports'], (function (exports) { 'use strict';
8418
9182
  this._onDidChange = new Emitter();
8419
9183
  this.onDidChange = this._onDidChange.event;
8420
9184
  this.api.initialize(this);
8421
- this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
9185
+ this.addDisposables(this._onDidChange, this.api.onWillVisibilityChange((event) => {
8422
9186
  const { isVisible } = event;
8423
9187
  const { accessor } = this._params;
8424
9188
  accessor.setVisible(this, isVisible);
@@ -8487,11 +9251,13 @@ define(['exports'], (function (exports) { 'use strict';
8487
9251
  exports.DockviewApi = DockviewApi;
8488
9252
  exports.DockviewComponent = DockviewComponent;
8489
9253
  exports.DockviewCompositeDisposable = CompositeDisposable;
9254
+ exports.DockviewDidDropEvent = DockviewDidDropEvent;
8490
9255
  exports.DockviewEmitter = Emitter;
8491
9256
  exports.DockviewGroupPanel = DockviewGroupPanel;
8492
9257
  exports.DockviewGroupPanelModel = DockviewGroupPanelModel;
8493
9258
  exports.DockviewMutableDisposable = MutableDisposable;
8494
9259
  exports.DockviewPanel = DockviewPanel;
9260
+ exports.DockviewWillDropEvent = DockviewWillDropEvent;
8495
9261
  exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
8496
9262
  exports.Gridview = Gridview;
8497
9263
  exports.GridviewApi = GridviewApi;
@@ -8510,6 +9276,7 @@ define(['exports'], (function (exports) { 'use strict';
8510
9276
  exports.SplitviewComponent = SplitviewComponent;
8511
9277
  exports.SplitviewPanel = SplitviewPanel;
8512
9278
  exports.Tab = Tab;
9279
+ exports.WillShowOverlayLocationEvent = WillShowOverlayLocationEvent;
8513
9280
  exports.createComponent = createComponent;
8514
9281
  exports.directionToPosition = directionToPosition;
8515
9282
  exports.getDirectionOrientation = getDirectionOrientation;