dockview 1.5.2 → 1.6.0

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 (220) hide show
  1. package/dist/cjs/api/component.api.d.ts +3 -2
  2. package/dist/cjs/api/component.api.js +9 -2
  3. package/dist/cjs/api/component.api.js.map +1 -1
  4. package/dist/cjs/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +2 -2
  5. package/dist/cjs/api/{groupPanelApi.js → dockviewPanelApi.js} +4 -6
  6. package/dist/cjs/api/dockviewPanelApi.js.map +1 -0
  7. package/dist/cjs/api/gridviewPanelApi.d.ts +4 -3
  8. package/dist/cjs/api/gridviewPanelApi.js +4 -4
  9. package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
  10. package/dist/cjs/api/panelApi.d.ts +7 -0
  11. package/dist/cjs/api/panelApi.js +17 -1
  12. package/dist/cjs/api/panelApi.js.map +1 -1
  13. package/dist/cjs/array.d.ts +1 -1
  14. package/dist/cjs/dnd/abstractDragHandler.d.ts +2 -2
  15. package/dist/cjs/dnd/abstractDragHandler.js +3 -3
  16. package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
  17. package/dist/cjs/dnd/dataTransfer.d.ts +2 -2
  18. package/dist/cjs/dnd/dataTransfer.js.map +1 -1
  19. package/dist/cjs/dnd/dnd.d.ts +1 -1
  20. package/dist/cjs/dnd/dnd.js +7 -12
  21. package/dist/cjs/dnd/dnd.js.map +1 -1
  22. package/dist/cjs/dnd/droptarget.d.ts +20 -15
  23. package/dist/cjs/dnd/droptarget.js +152 -74
  24. package/dist/cjs/dnd/droptarget.js.map +1 -1
  25. package/dist/cjs/dnd/ghost.d.ts +1 -0
  26. package/dist/cjs/dnd/ghost.js +15 -0
  27. package/dist/cjs/dnd/ghost.js.map +1 -0
  28. package/dist/cjs/dnd/groupDragHandler.d.ts +11 -0
  29. package/dist/cjs/dnd/groupDragHandler.js +62 -0
  30. package/dist/cjs/dnd/groupDragHandler.js.map +1 -0
  31. package/dist/cjs/dockview/defaultGroupPanelView.d.ts +1 -1
  32. package/dist/cjs/dockview/deserializer.d.ts +2 -1
  33. package/dist/cjs/dockview/dockviewComponent.d.ts +15 -7
  34. package/dist/cjs/dockview/dockviewComponent.js +215 -34
  35. package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
  36. package/dist/{esm/dockview/dockviewGroupPanel.d.ts → cjs/dockview/dockviewPanel.d.ts} +16 -5
  37. package/dist/cjs/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +25 -21
  38. package/dist/cjs/dockview/dockviewPanel.js.map +1 -0
  39. package/dist/cjs/dockview/options.d.ts +32 -10
  40. package/dist/cjs/dockview/options.js +29 -0
  41. package/dist/cjs/dockview/options.js.map +1 -1
  42. package/dist/cjs/dockview/validation.d.ts +2 -0
  43. package/dist/cjs/dockview/validation.js +135 -0
  44. package/dist/cjs/dockview/validation.js.map +1 -0
  45. package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
  46. package/dist/cjs/gridview/baseComponentGridview.js +5 -6
  47. package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
  48. package/dist/cjs/gridview/basePanelView.d.ts +2 -2
  49. package/dist/cjs/gridview/gridview.d.ts +9 -3
  50. package/dist/cjs/gridview/gridview.js +38 -7
  51. package/dist/cjs/gridview/gridview.js.map +1 -1
  52. package/dist/cjs/gridview/gridviewComponent.d.ts +2 -2
  53. package/dist/cjs/gridview/gridviewComponent.js +2 -3
  54. package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
  55. package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
  56. package/dist/cjs/gridview/gridviewPanel.js +1 -2
  57. package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
  58. package/dist/cjs/gridview/types.d.ts +1 -1
  59. package/dist/cjs/groupview/dnd.d.ts +2 -1
  60. package/dist/cjs/groupview/dnd.js +1 -0
  61. package/dist/cjs/groupview/dnd.js.map +1 -1
  62. package/dist/cjs/groupview/groupview.d.ts +6 -6
  63. package/dist/cjs/groupview/groupview.js +43 -25
  64. package/dist/cjs/groupview/groupview.js.map +1 -1
  65. package/dist/cjs/groupview/groupviewPanel.d.ts +3 -3
  66. package/dist/cjs/groupview/panel/content.d.ts +1 -1
  67. package/dist/cjs/groupview/tab.d.ts +2 -12
  68. package/dist/cjs/groupview/tab.js +13 -9
  69. package/dist/cjs/groupview/tab.js.map +1 -1
  70. package/dist/cjs/groupview/titlebar/tabsContainer.d.ts +5 -8
  71. package/dist/cjs/groupview/titlebar/tabsContainer.js +23 -30
  72. package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
  73. package/dist/cjs/groupview/titlebar/voidContainer.d.ts +15 -0
  74. package/dist/cjs/groupview/titlebar/voidContainer.js +74 -0
  75. package/dist/cjs/groupview/titlebar/voidContainer.js.map +1 -0
  76. package/dist/cjs/groupview/types.d.ts +18 -2
  77. package/dist/cjs/index.d.ts +3 -3
  78. package/dist/cjs/index.js +4 -3
  79. package/dist/cjs/index.js.map +1 -1
  80. package/dist/cjs/paneview/draggablePaneviewPanel.js +6 -5
  81. package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
  82. package/dist/cjs/paneview/paneviewComponent.js +2 -2
  83. package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
  84. package/dist/cjs/paneview/paneviewPanel.js +1 -0
  85. package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
  86. package/dist/cjs/react/deserializer.d.ts +2 -1
  87. package/dist/cjs/react/deserializer.js +2 -2
  88. package/dist/cjs/react/deserializer.js.map +1 -1
  89. package/dist/cjs/react/dockview/defaultTab.d.ts +1 -1
  90. package/dist/cjs/react/dockview/dockview.d.ts +5 -4
  91. package/dist/cjs/react/dockview/dockview.js +1 -0
  92. package/dist/cjs/react/dockview/dockview.js.map +1 -1
  93. package/dist/cjs/react/dockview/groupControlsRenderer.d.ts +1 -1
  94. package/dist/cjs/react/gridview/view.js +2 -1
  95. package/dist/cjs/react/gridview/view.js.map +1 -1
  96. package/dist/cjs/react/react.d.ts +1 -1
  97. package/dist/cjs/splitview/core/splitview.d.ts +4 -4
  98. package/dist/cjs/splitview/splitviewComponent.d.ts +1 -1
  99. package/dist/cjs/splitview/splitviewComponent.js +2 -2
  100. package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
  101. package/dist/cjs/splitview/splitviewPanel.js +1 -0
  102. package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
  103. package/dist/cjs/types.d.ts +2 -1
  104. package/dist/cjs/types.js +5 -0
  105. package/dist/cjs/types.js.map +1 -1
  106. package/dist/dockview.amd.js +1411 -987
  107. package/dist/dockview.amd.min.js +2 -2
  108. package/dist/dockview.amd.min.noStyle.js +2 -2
  109. package/dist/dockview.amd.noStyle.js +1410 -986
  110. package/dist/dockview.cjs.js +1394 -970
  111. package/dist/dockview.esm.js +1385 -964
  112. package/dist/dockview.esm.min.js +2 -2
  113. package/dist/dockview.js +1411 -987
  114. package/dist/dockview.min.js +2 -2
  115. package/dist/dockview.min.noStyle.js +2 -2
  116. package/dist/dockview.noStyle.js +1410 -986
  117. package/dist/esm/actionbar/actionsContainer.js +3 -3
  118. package/dist/esm/api/component.api.d.ts +3 -2
  119. package/dist/esm/api/component.api.js +16 -13
  120. package/dist/esm/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +2 -2
  121. package/dist/esm/api/{groupPanelApi.js → dockviewPanelApi.js} +16 -18
  122. package/dist/esm/api/gridviewPanelApi.d.ts +4 -3
  123. package/dist/esm/api/gridviewPanelApi.js +4 -4
  124. package/dist/esm/api/panelApi.d.ts +7 -0
  125. package/dist/esm/api/panelApi.js +33 -17
  126. package/dist/esm/api/paneviewPanelApi.js +3 -3
  127. package/dist/esm/array.d.ts +1 -1
  128. package/dist/esm/dnd/abstractDragHandler.d.ts +2 -2
  129. package/dist/esm/dnd/abstractDragHandler.js +3 -3
  130. package/dist/esm/dnd/dataTransfer.d.ts +2 -2
  131. package/dist/esm/dnd/dnd.d.ts +1 -1
  132. package/dist/esm/dnd/dnd.js +7 -12
  133. package/dist/esm/dnd/droptarget.d.ts +20 -15
  134. package/dist/esm/dnd/droptarget.js +149 -67
  135. package/dist/esm/dnd/ghost.d.ts +1 -0
  136. package/dist/esm/dnd/ghost.js +10 -0
  137. package/dist/esm/dnd/groupDragHandler.d.ts +11 -0
  138. package/dist/esm/dnd/groupDragHandler.js +38 -0
  139. package/dist/esm/dockview/components/tab/defaultTab.js +6 -6
  140. package/dist/esm/dockview/components/watermark/watermark.js +3 -3
  141. package/dist/esm/dockview/defaultGroupPanelView.d.ts +1 -1
  142. package/dist/esm/dockview/defaultGroupPanelView.js +5 -5
  143. package/dist/esm/dockview/deserializer.d.ts +2 -1
  144. package/dist/esm/dockview/dockviewComponent.d.ts +15 -7
  145. package/dist/esm/dockview/dockviewComponent.js +229 -65
  146. package/dist/{cjs/dockview/dockviewGroupPanel.d.ts → esm/dockview/dockviewPanel.d.ts} +16 -5
  147. package/dist/esm/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +19 -15
  148. package/dist/esm/dockview/options.d.ts +32 -10
  149. package/dist/esm/dockview/options.js +24 -1
  150. package/dist/esm/dockview/validation.d.ts +2 -0
  151. package/dist/esm/dockview/validation.js +86 -0
  152. package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
  153. package/dist/esm/gridview/baseComponentGridview.js +31 -32
  154. package/dist/esm/gridview/basePanelView.d.ts +2 -2
  155. package/dist/esm/gridview/basePanelView.js +13 -13
  156. package/dist/esm/gridview/branchNode.js +47 -47
  157. package/dist/esm/gridview/gridview.d.ts +9 -3
  158. package/dist/esm/gridview/gridview.js +41 -15
  159. package/dist/esm/gridview/gridviewComponent.d.ts +2 -2
  160. package/dist/esm/gridview/gridviewComponent.js +17 -18
  161. package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
  162. package/dist/esm/gridview/gridviewPanel.js +45 -45
  163. package/dist/esm/gridview/leafNode.js +23 -23
  164. package/dist/esm/gridview/types.d.ts +1 -1
  165. package/dist/esm/groupview/dnd.d.ts +2 -1
  166. package/dist/esm/groupview/dnd.js +1 -0
  167. package/dist/esm/groupview/groupview.d.ts +6 -6
  168. package/dist/esm/groupview/groupview.js +90 -72
  169. package/dist/esm/groupview/groupviewPanel.d.ts +3 -3
  170. package/dist/esm/groupview/groupviewPanel.js +4 -4
  171. package/dist/esm/groupview/panel/content.d.ts +1 -1
  172. package/dist/esm/groupview/panel/content.js +3 -3
  173. package/dist/esm/groupview/tab.d.ts +2 -12
  174. package/dist/esm/groupview/tab.js +15 -11
  175. package/dist/esm/groupview/titlebar/tabsContainer.d.ts +5 -8
  176. package/dist/esm/groupview/titlebar/tabsContainer.js +54 -61
  177. package/dist/esm/groupview/titlebar/voidContainer.d.ts +15 -0
  178. package/dist/esm/groupview/titlebar/voidContainer.js +47 -0
  179. package/dist/esm/groupview/types.d.ts +18 -2
  180. package/dist/esm/hostedContainer.js +3 -3
  181. package/dist/esm/index.d.ts +3 -3
  182. package/dist/esm/index.js +2 -2
  183. package/dist/esm/lifecycle.js +3 -3
  184. package/dist/esm/paneview/defaultPaneviewHeader.js +3 -3
  185. package/dist/esm/paneview/draggablePaneviewPanel.js +7 -6
  186. package/dist/esm/paneview/paneview.js +21 -21
  187. package/dist/esm/paneview/paneviewComponent.js +30 -30
  188. package/dist/esm/paneview/paneviewPanel.js +45 -44
  189. package/dist/esm/react/deserializer.d.ts +2 -1
  190. package/dist/esm/react/deserializer.js +2 -2
  191. package/dist/esm/react/dockview/defaultTab.d.ts +1 -1
  192. package/dist/esm/react/dockview/dockview.d.ts +5 -4
  193. package/dist/esm/react/dockview/dockview.js +1 -0
  194. package/dist/esm/react/dockview/groupControlsRenderer.d.ts +1 -1
  195. package/dist/esm/react/dockview/groupControlsRenderer.js +8 -8
  196. package/dist/esm/react/dockview/reactContentPart.js +3 -3
  197. package/dist/esm/react/dockview/reactHeaderPart.js +3 -3
  198. package/dist/esm/react/dockview/reactWatermarkPart.js +3 -3
  199. package/dist/esm/react/dockview/v2/reactContentRenderer.js +9 -9
  200. package/dist/esm/react/dockview/v2/webviewContentRenderer.js +3 -3
  201. package/dist/esm/react/gridview/view.js +2 -1
  202. package/dist/esm/react/paneview/view.js +3 -3
  203. package/dist/esm/react/react.d.ts +1 -1
  204. package/dist/esm/splitview/core/splitview.d.ts +4 -4
  205. package/dist/esm/splitview/core/splitview.js +59 -59
  206. package/dist/esm/splitview/core/viewItem.js +15 -15
  207. package/dist/esm/splitview/splitviewComponent.d.ts +1 -1
  208. package/dist/esm/splitview/splitviewComponent.js +23 -23
  209. package/dist/esm/splitview/splitviewPanel.js +31 -30
  210. package/dist/esm/types.d.ts +2 -1
  211. package/dist/esm/types.js +3 -1
  212. package/dist/styles/dockview.css +23 -26
  213. package/package.json +12 -16
  214. package/dist/cjs/api/groupPanelApi.js.map +0 -1
  215. package/dist/cjs/dockview/dockviewGroupPanel.js.map +0 -1
  216. package/dist/cjs/groupview/groupPanel.d.ts +0 -32
  217. package/dist/cjs/groupview/groupPanel.js +0 -3
  218. package/dist/cjs/groupview/groupPanel.js.map +0 -1
  219. package/dist/esm/groupview/groupPanel.d.ts +0 -32
  220. package/dist/esm/groupview/groupPanel.js +0 -1
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * dockview
3
- * @version 1.5.2
3
+ * @version 1.6.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
7
7
  define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) { 'use strict';
8
8
 
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
9
+ function _interopNamespaceDefault(e) {
11
10
  var n = Object.create(null);
12
11
  if (e) {
13
12
  Object.keys(e).forEach(function (k) {
@@ -20,12 +19,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
20
19
  }
21
20
  });
22
21
  }
23
- n["default"] = e;
22
+ n.default = e;
24
23
  return Object.freeze(n);
25
24
  }
26
25
 
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
- var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
26
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
27
+ var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
29
28
 
30
29
  function styleInject(css, ref) {
31
30
  if ( ref === void 0 ) ref = {};
@@ -54,7 +53,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
54
53
  }
55
54
  }
56
55
 
57
- var css_248z = ".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-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-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-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-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-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-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-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-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-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-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.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .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.actions-bar .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-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: 10000;\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.left {\n transform: translateX(-25%) scaleX(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translateX(25%) scaleX(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top {\n transform: translateY(-25%) scaleY(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translateY(25%) scaleY(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\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.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\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 overflow: hidden;\n outline: none;\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.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 .void-container {\n display: flex;\n flex-grow: 1;\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.tab .dockview-react-tab {\n display: flex;\n padding: 0px 8px;\n align-items: center;\n height: 100%;\n}\n.tab .dockview-react-tab .dockview-react-tab-title {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .dockview-react-tab .dockview-react-tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .dockview-react-tab .dockview-react-tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tab.inactive-tab:not(:hover) .dockview-react-tab-action {\n visibility: hidden;\n}\n.dockview-react-part {\n height: 100%;\n width: 100%;\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}\n.split-view-container .sash-container .sash: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: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}\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.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* 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.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.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\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}";
56
+ var css_248z = ".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-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-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-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-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-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-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-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-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-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-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.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .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.actions-bar .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-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: 10000;\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.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\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}\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.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\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 overflow: hidden;\n outline: none;\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.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.tab .dockview-react-tab {\n display: flex;\n padding: 0px 8px;\n align-items: center;\n height: 100%;\n}\n.tab .dockview-react-tab .dockview-react-tab-title {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .dockview-react-tab .dockview-react-tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .dockview-react-tab .dockview-react-tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tab.inactive-tab:not(:hover) .dockview-react-tab-action {\n visibility: hidden;\n}\n.dockview-react-part {\n height: 100%;\n width: 100%;\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}\n.split-view-container .sash-container .sash: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: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}\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.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.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\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}";
58
57
  styleInject(css_248z);
59
58
 
60
59
  class TransferObject {
@@ -225,12 +224,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
225
224
  };
226
225
  })(Disposable || (Disposable = {}));
227
226
  class CompositeDisposable {
228
- constructor(...args) {
229
- this.disposables = args;
230
- }
231
227
  static from(...args) {
232
228
  return new CompositeDisposable(...args);
233
229
  }
230
+ constructor(...args) {
231
+ this.disposables = args;
232
+ }
234
233
  addDisposables(...args) {
235
234
  args.forEach((arg) => this.disposables.push(arg));
236
235
  }
@@ -448,21 +447,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
448
447
  }
449
448
 
450
449
  class ViewItem {
451
- constructor(container, view, size, disposable) {
452
- this.container = container;
453
- this.view = view;
454
- this.disposable = disposable;
455
- this._cachedVisibleSize = undefined;
456
- if (typeof size === 'number') {
457
- this._size = size;
458
- this._cachedVisibleSize = undefined;
459
- container.classList.add('visible');
460
- }
461
- else {
462
- this._size = 0;
463
- this._cachedVisibleSize = size.cachedVisibleSize;
464
- }
465
- }
466
450
  set size(size) {
467
451
  this._size = size;
468
452
  }
@@ -515,6 +499,21 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
515
499
  set enabled(enabled) {
516
500
  this.container.style.pointerEvents = enabled ? '' : 'none';
517
501
  }
502
+ constructor(container, view, size, disposable) {
503
+ this.container = container;
504
+ this.view = view;
505
+ this.disposable = disposable;
506
+ this._cachedVisibleSize = undefined;
507
+ if (typeof size === 'number') {
508
+ this._size = size;
509
+ this._cachedVisibleSize = undefined;
510
+ container.classList.add('visible');
511
+ }
512
+ else {
513
+ this._size = 0;
514
+ this._cachedVisibleSize = size.cachedVisibleSize;
515
+ }
516
+ }
518
517
  // layout(offset: number, layoutContext: TLayoutContext | undefined): void {
519
518
  // this.layoutContainer(offset);
520
519
  // this.view.layout(this.size, offset, layoutContext);
@@ -561,6 +560,65 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
561
560
  Sizing.Invisible = Invisible;
562
561
  })(exports.Sizing || (exports.Sizing = {}));
563
562
  class Splitview {
563
+ get size() {
564
+ return this._size;
565
+ }
566
+ set size(value) {
567
+ this._size = value;
568
+ }
569
+ get orthogonalSize() {
570
+ return this._orthogonalSize;
571
+ }
572
+ set orthogonalSize(value) {
573
+ this._orthogonalSize = value;
574
+ }
575
+ get length() {
576
+ return this.views.length;
577
+ }
578
+ get proportions() {
579
+ return this._proportions ? [...this._proportions] : undefined;
580
+ }
581
+ get orientation() {
582
+ return this._orientation;
583
+ }
584
+ set orientation(value) {
585
+ this._orientation = value;
586
+ const tmp = this.size;
587
+ this.size = this.orthogonalSize;
588
+ this.orthogonalSize = tmp;
589
+ removeClasses(this.element, 'horizontal', 'vertical');
590
+ this.element.classList.add(this.orientation == exports.Orientation.HORIZONTAL
591
+ ? 'horizontal'
592
+ : 'vertical');
593
+ }
594
+ get minimumSize() {
595
+ return this.views.reduce((r, item) => r + item.minimumSize, 0);
596
+ }
597
+ get maximumSize() {
598
+ return this.length === 0
599
+ ? Number.POSITIVE_INFINITY
600
+ : this.views.reduce((r, item) => r + item.maximumSize, 0);
601
+ }
602
+ get startSnappingEnabled() {
603
+ return this._startSnappingEnabled;
604
+ }
605
+ set startSnappingEnabled(startSnappingEnabled) {
606
+ if (this._startSnappingEnabled === startSnappingEnabled) {
607
+ return;
608
+ }
609
+ this._startSnappingEnabled = startSnappingEnabled;
610
+ this.updateSashEnablement();
611
+ }
612
+ get endSnappingEnabled() {
613
+ return this._endSnappingEnabled;
614
+ }
615
+ set endSnappingEnabled(endSnappingEnabled) {
616
+ if (this._endSnappingEnabled === endSnappingEnabled) {
617
+ return;
618
+ }
619
+ this._endSnappingEnabled = endSnappingEnabled;
620
+ this.updateSashEnablement();
621
+ }
564
622
  constructor(container, options) {
565
623
  this.container = container;
566
624
  this.views = [];
@@ -690,65 +748,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
690
748
  this.saveProportions();
691
749
  }
692
750
  }
693
- get size() {
694
- return this._size;
695
- }
696
- set size(value) {
697
- this._size = value;
698
- }
699
- get orthogonalSize() {
700
- return this._orthogonalSize;
701
- }
702
- set orthogonalSize(value) {
703
- this._orthogonalSize = value;
704
- }
705
- get length() {
706
- return this.views.length;
707
- }
708
- get proportions() {
709
- return this._proportions ? [...this._proportions] : undefined;
710
- }
711
- get orientation() {
712
- return this._orientation;
713
- }
714
- set orientation(value) {
715
- this._orientation = value;
716
- const tmp = this.size;
717
- this.size = this.orthogonalSize;
718
- this.orthogonalSize = tmp;
719
- removeClasses(this.element, 'horizontal', 'vertical');
720
- this.element.classList.add(this.orientation == exports.Orientation.HORIZONTAL
721
- ? 'horizontal'
722
- : 'vertical');
723
- }
724
- get minimumSize() {
725
- return this.views.reduce((r, item) => r + item.minimumSize, 0);
726
- }
727
- get maximumSize() {
728
- return this.length === 0
729
- ? Number.POSITIVE_INFINITY
730
- : this.views.reduce((r, item) => r + item.maximumSize, 0);
731
- }
732
- get startSnappingEnabled() {
733
- return this._startSnappingEnabled;
734
- }
735
- set startSnappingEnabled(startSnappingEnabled) {
736
- if (this._startSnappingEnabled === startSnappingEnabled) {
737
- return;
738
- }
739
- this._startSnappingEnabled = startSnappingEnabled;
740
- this.updateSashEnablement();
741
- }
742
- get endSnappingEnabled() {
743
- return this._endSnappingEnabled;
744
- }
745
- set endSnappingEnabled(endSnappingEnabled) {
746
- if (this._endSnappingEnabled === endSnappingEnabled) {
747
- return;
748
- }
749
- this._endSnappingEnabled = endSnappingEnabled;
750
- this.updateSashEnablement();
751
- }
752
751
  style(styles) {
753
752
  if ((styles === null || styles === void 0 ? void 0 : styles.separatorBorder) === 'transparent') {
754
753
  removeClasses(this.element, 'separator-border');
@@ -1212,6 +1211,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1212
1211
  }
1213
1212
 
1214
1213
  class Paneview extends CompositeDisposable {
1214
+ get onDidAddView() {
1215
+ return this.splitview.onDidAddView;
1216
+ }
1217
+ get onDidRemoveView() {
1218
+ return this.splitview.onDidRemoveView;
1219
+ }
1220
+ get minimumSize() {
1221
+ return this.splitview.minimumSize;
1222
+ }
1223
+ get maximumSize() {
1224
+ return this.splitview.maximumSize;
1225
+ }
1226
+ get orientation() {
1227
+ return this.splitview.orientation;
1228
+ }
1229
+ get size() {
1230
+ return this.splitview.size;
1231
+ }
1232
+ get orthogonalSize() {
1233
+ return this.splitview.orthogonalSize;
1234
+ }
1215
1235
  constructor(container, options) {
1216
1236
  var _a;
1217
1237
  super();
@@ -1254,27 +1274,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1254
1274
  this._onDidChange.fire();
1255
1275
  }));
1256
1276
  }
1257
- get onDidAddView() {
1258
- return this.splitview.onDidAddView;
1259
- }
1260
- get onDidRemoveView() {
1261
- return this.splitview.onDidRemoveView;
1262
- }
1263
- get minimumSize() {
1264
- return this.splitview.minimumSize;
1265
- }
1266
- get maximumSize() {
1267
- return this.splitview.maximumSize;
1268
- }
1269
- get orientation() {
1270
- return this.splitview.orientation;
1271
- }
1272
- get size() {
1273
- return this.splitview.size;
1274
- }
1275
- get orthogonalSize() {
1276
- return this.splitview.orthogonalSize;
1277
- }
1278
1277
  addPane(pane, size, index = this.splitview.length, skipLayout = false) {
1279
1278
  const disposable = pane.onDidChangeExpansionState(() => {
1280
1279
  this.setupAnimation();
@@ -1353,243 +1352,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1353
1352
  }
1354
1353
  }
1355
1354
 
1356
- class DragAndDropObserver extends CompositeDisposable {
1357
- constructor(element, callbacks) {
1358
- super();
1359
- this.element = element;
1360
- this.callbacks = callbacks;
1361
- // A helper to fix issues with repeated DRAG_ENTER / DRAG_LEAVE
1362
- // calls see https://github.com/microsoft/vscode/issues/14470
1363
- // when the element has child elements where the events are fired
1364
- // repeadedly.
1365
- this.counter = 0;
1366
- this.registerListeners();
1355
+ /*---------------------------------------------------------------------------------------------
1356
+ * Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
1357
+ * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
1358
+ *--------------------------------------------------------------------------------------------*/
1359
+ class LeafNode {
1360
+ get minimumWidth() {
1361
+ return this.view.minimumWidth;
1367
1362
  }
1368
- registerListeners() {
1369
- this.addDisposables(addDisposableListener(this.element, 'dragenter', (e) => {
1370
- this.counter++;
1371
- this.callbacks.onDragEnter(e);
1372
- }));
1373
- this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
1374
- e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
1375
- if (this.callbacks.onDragOver) {
1376
- this.callbacks.onDragOver(e);
1377
- }
1378
- }));
1379
- this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
1380
- this.counter--;
1381
- if (this.counter === 0) {
1382
- this.callbacks.onDragLeave(e);
1383
- }
1384
- }));
1385
- this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
1386
- this.counter = 0;
1387
- this.callbacks.onDragEnd(e);
1388
- }));
1389
- this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
1390
- this.counter = 0;
1391
- this.callbacks.onDrop(e);
1392
- }));
1393
- }
1394
- }
1395
-
1396
- exports.Position = void 0;
1397
- (function (Position) {
1398
- Position["Top"] = "Top";
1399
- Position["Left"] = "Left";
1400
- Position["Bottom"] = "Bottom";
1401
- Position["Right"] = "Right";
1402
- Position["Center"] = "Center";
1403
- })(exports.Position || (exports.Position = {}));
1404
- function isBooleanValue(canDisplayOverlay) {
1405
- return typeof canDisplayOverlay === 'boolean';
1406
- }
1407
- class Droptarget extends CompositeDisposable {
1408
- constructor(element, options) {
1409
- super();
1410
- this.element = element;
1411
- this.options = options;
1412
- this._onDrop = new Emitter();
1413
- this.onDrop = this._onDrop.event;
1414
- this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
1415
- onDragEnter: () => undefined,
1416
- onDragOver: (e) => {
1417
- const width = this.element.clientWidth;
1418
- const height = this.element.clientHeight;
1419
- if (width === 0 || height === 0) {
1420
- return; // avoid div!0
1421
- }
1422
- const x = e.offsetX;
1423
- const y = e.offsetY;
1424
- const xp = (100 * x) / width;
1425
- const yp = (100 * y) / height;
1426
- const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
1427
- if (isBooleanValue(this.options.canDisplayOverlay)) {
1428
- if (!this.options.canDisplayOverlay) {
1429
- return;
1430
- }
1431
- }
1432
- else if (!this.options.canDisplayOverlay(e, quadrant)) {
1433
- return;
1434
- }
1435
- if (!this.target) {
1436
- this.target = document.createElement('div');
1437
- this.target.className = 'drop-target-dropzone';
1438
- this.overlay = document.createElement('div');
1439
- this.overlay.className = 'drop-target-selection';
1440
- this._state = exports.Position.Center;
1441
- this.target.appendChild(this.overlay);
1442
- this.element.classList.add('drop-target');
1443
- this.element.append(this.target);
1444
- }
1445
- if (this.options.validOverlays === 'none') {
1446
- return;
1447
- }
1448
- if (!this.target || !this.overlay) {
1449
- return;
1450
- }
1451
- const isSmallX = width < 100;
1452
- const isSmallY = height < 100;
1453
- this.toggleClasses(quadrant, isSmallX, isSmallY);
1454
- this.setState(quadrant);
1455
- },
1456
- onDragLeave: () => {
1457
- this.removeDropTarget();
1458
- },
1459
- onDragEnd: () => {
1460
- this.removeDropTarget();
1461
- },
1462
- onDrop: (e) => {
1463
- e.preventDefault();
1464
- e.stopPropagation();
1465
- const state = this._state;
1466
- this.removeDropTarget();
1467
- if (state) {
1468
- this._onDrop.fire({ position: state, nativeEvent: e });
1469
- }
1470
- },
1471
- }));
1472
- }
1473
- get state() {
1474
- return this._state;
1475
- }
1476
- set validOverlays(value) {
1477
- this.options.validOverlays = value;
1478
- }
1479
- set canDisplayOverlay(value) {
1480
- this.options.canDisplayOverlay = value;
1481
- }
1482
- dispose() {
1483
- this.removeDropTarget();
1484
- }
1485
- toggleClasses(quadrant, isSmallX, isSmallY) {
1486
- if (!this.overlay) {
1487
- return;
1488
- }
1489
- const isLeft = quadrant === 'left';
1490
- const isRight = quadrant === 'right';
1491
- const isTop = quadrant === 'top';
1492
- const isBottom = quadrant === 'bottom';
1493
- toggleClass(this.overlay, 'right', !isSmallX && isRight);
1494
- toggleClass(this.overlay, 'left', !isSmallX && isLeft);
1495
- toggleClass(this.overlay, 'top', !isSmallY && isTop);
1496
- toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
1497
- toggleClass(this.overlay, 'small-right', isSmallX && isRight);
1498
- toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
1499
- toggleClass(this.overlay, 'small-top', isSmallY && isTop);
1500
- toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
1501
- }
1502
- setState(quadrant) {
1503
- switch (quadrant) {
1504
- case 'top':
1505
- this._state = exports.Position.Top;
1506
- break;
1507
- case 'left':
1508
- this._state = exports.Position.Left;
1509
- break;
1510
- case 'bottom':
1511
- this._state = exports.Position.Bottom;
1512
- break;
1513
- case 'right':
1514
- this._state = exports.Position.Right;
1515
- break;
1516
- default:
1517
- this._state = exports.Position.Center;
1518
- break;
1519
- }
1520
- }
1521
- calculateQuadrant(overlayType, xp, yp) {
1522
- switch (overlayType) {
1523
- case 'all':
1524
- if (xp < 20) {
1525
- return 'left';
1526
- }
1527
- if (xp > 80) {
1528
- return 'right';
1529
- }
1530
- if (yp < 20) {
1531
- return 'top';
1532
- }
1533
- if (yp > 80) {
1534
- return 'bottom';
1535
- }
1536
- break;
1537
- case 'vertical':
1538
- if (yp < 50) {
1539
- return 'top';
1540
- }
1541
- return 'bottom';
1542
- case 'horizontal':
1543
- if (xp < 50) {
1544
- return 'left';
1545
- }
1546
- return 'right';
1547
- }
1548
- return null;
1549
- }
1550
- removeDropTarget() {
1551
- if (this.target) {
1552
- this._state = undefined;
1553
- this.element.removeChild(this.target);
1554
- this.target = undefined;
1555
- this.element.classList.remove('drop-target');
1556
- }
1557
- }
1558
- }
1559
-
1560
- /*---------------------------------------------------------------------------------------------
1561
- * Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
1562
- * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
1563
- *--------------------------------------------------------------------------------------------*/
1564
- class LeafNode {
1565
- constructor(view, orientation, orthogonalSize, size = 0) {
1566
- this.view = view;
1567
- this.orientation = orientation;
1568
- this._onDidChange = new Emitter();
1569
- this.onDidChange = this._onDidChange.event;
1570
- this._orthogonalSize = orthogonalSize;
1571
- this._size = size;
1572
- this._disposable = this.view.onDidChange((event) => {
1573
- if (event) {
1574
- this._onDidChange.fire({
1575
- size: this.orientation === exports.Orientation.VERTICAL
1576
- ? event.width
1577
- : event.height,
1578
- orthogonalSize: this.orientation === exports.Orientation.VERTICAL
1579
- ? event.height
1580
- : event.width,
1581
- });
1582
- }
1583
- else {
1584
- this._onDidChange.fire({});
1585
- }
1586
- });
1587
- }
1588
- get minimumWidth() {
1589
- return this.view.minimumWidth;
1590
- }
1591
- get maximumWidth() {
1592
- return this.view.maximumWidth;
1363
+ get maximumWidth() {
1364
+ return this.view.maximumWidth;
1593
1365
  }
1594
1366
  get minimumHeight() {
1595
1367
  return this.view.minimumHeight;
@@ -1642,6 +1414,29 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1642
1414
  ? this.size
1643
1415
  : this.orthogonalSize;
1644
1416
  }
1417
+ constructor(view, orientation, orthogonalSize, size = 0) {
1418
+ this.view = view;
1419
+ this.orientation = orientation;
1420
+ this._onDidChange = new Emitter();
1421
+ this.onDidChange = this._onDidChange.event;
1422
+ this._orthogonalSize = orthogonalSize;
1423
+ this._size = size;
1424
+ this._disposable = this.view.onDidChange((event) => {
1425
+ if (event) {
1426
+ this._onDidChange.fire({
1427
+ size: this.orientation === exports.Orientation.VERTICAL
1428
+ ? event.width
1429
+ : event.height,
1430
+ orthogonalSize: this.orientation === exports.Orientation.VERTICAL
1431
+ ? event.height
1432
+ : event.width,
1433
+ });
1434
+ }
1435
+ else {
1436
+ this._onDidChange.fire({});
1437
+ }
1438
+ });
1439
+ }
1645
1440
  setVisible(visible) {
1646
1441
  if (this.view.setVisible) {
1647
1442
  this.view.setVisible(visible);
@@ -1664,53 +1459,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1664
1459
  * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
1665
1460
  *--------------------------------------------------------------------------------------------*/
1666
1461
  class BranchNode extends CompositeDisposable {
1667
- constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
1668
- super();
1669
- this.orientation = orientation;
1670
- this.proportionalLayout = proportionalLayout;
1671
- this.styles = styles;
1672
- this.children = [];
1673
- this._onDidChange = new Emitter();
1674
- this.onDidChange = this._onDidChange.event;
1675
- this._childrenDisposable = Disposable.NONE;
1676
- this._orthogonalSize = orthogonalSize;
1677
- this._size = size;
1678
- this.element = document.createElement('div');
1679
- this.element.className = 'branch-node';
1680
- if (!childDescriptors) {
1681
- this.splitview = new Splitview(this.element, {
1682
- orientation: this.orientation,
1683
- proportionalLayout,
1684
- styles,
1685
- });
1686
- this.splitview.layout(this.size, this.orthogonalSize);
1687
- }
1688
- else {
1689
- const descriptor = {
1690
- views: childDescriptors.map((childDescriptor) => {
1691
- return {
1692
- view: childDescriptor.node,
1693
- size: childDescriptor.node.size,
1694
- visible: childDescriptor.node instanceof LeafNode &&
1695
- childDescriptor.visible !== undefined
1696
- ? childDescriptor.visible
1697
- : true,
1698
- };
1699
- }),
1700
- size: this.size,
1701
- };
1702
- this.children = childDescriptors.map((c) => c.node);
1703
- this.splitview = new Splitview(this.element, {
1704
- orientation: this.orientation,
1705
- descriptor,
1706
- proportionalLayout,
1707
- });
1708
- }
1709
- this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
1710
- this._onDidChange.fire({});
1711
- }));
1712
- this.setupChildrenEvents();
1713
- }
1714
1462
  get width() {
1715
1463
  return this.orientation === exports.Orientation.HORIZONTAL
1716
1464
  ? this.size
@@ -1776,6 +1524,53 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1776
1524
  }
1777
1525
  return exports.LayoutPriority.Normal;
1778
1526
  }
1527
+ constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
1528
+ super();
1529
+ this.orientation = orientation;
1530
+ this.proportionalLayout = proportionalLayout;
1531
+ this.styles = styles;
1532
+ this.children = [];
1533
+ this._onDidChange = new Emitter();
1534
+ this.onDidChange = this._onDidChange.event;
1535
+ this._childrenDisposable = Disposable.NONE;
1536
+ this._orthogonalSize = orthogonalSize;
1537
+ this._size = size;
1538
+ this.element = document.createElement('div');
1539
+ this.element.className = 'branch-node';
1540
+ if (!childDescriptors) {
1541
+ this.splitview = new Splitview(this.element, {
1542
+ orientation: this.orientation,
1543
+ proportionalLayout,
1544
+ styles,
1545
+ });
1546
+ this.splitview.layout(this.size, this.orthogonalSize);
1547
+ }
1548
+ else {
1549
+ const descriptor = {
1550
+ views: childDescriptors.map((childDescriptor) => {
1551
+ return {
1552
+ view: childDescriptor.node,
1553
+ size: childDescriptor.node.size,
1554
+ visible: childDescriptor.node instanceof LeafNode &&
1555
+ childDescriptor.visible !== undefined
1556
+ ? childDescriptor.visible
1557
+ : true,
1558
+ };
1559
+ }),
1560
+ size: this.size,
1561
+ };
1562
+ this.children = childDescriptors.map((c) => c.node);
1563
+ this.splitview = new Splitview(this.element, {
1564
+ orientation: this.orientation,
1565
+ descriptor,
1566
+ proportionalLayout,
1567
+ });
1568
+ }
1569
+ this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
1570
+ this._onDidChange.fire({});
1571
+ }));
1572
+ this.setupChildrenEvents();
1573
+ }
1779
1574
  setVisible(visible) {
1780
1575
  for (const child of this.children) {
1781
1576
  child.setVisible(visible);
@@ -1947,20 +1742,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1947
1742
  if (orientation === directionOrientation) {
1948
1743
  const [rest, _index] = tail(location);
1949
1744
  let index = _index;
1950
- if (direction === exports.Position.Right || direction === exports.Position.Bottom) {
1745
+ if (direction === 'right' || direction === 'bottom') {
1951
1746
  index += 1;
1952
1747
  }
1953
1748
  return [...rest, index];
1954
1749
  }
1955
1750
  else {
1956
- const index = direction === exports.Position.Right || direction === exports.Position.Bottom
1957
- ? 1
1958
- : 0;
1751
+ const index = direction === 'right' || direction === 'bottom' ? 1 : 0;
1959
1752
  return [...location, index];
1960
1753
  }
1961
1754
  }
1962
1755
  function getDirectionOrientation(direction) {
1963
- return direction === exports.Position.Top || direction === exports.Position.Bottom
1756
+ return direction === 'top' || direction === 'bottom'
1964
1757
  ? exports.Orientation.VERTICAL
1965
1758
  : exports.Orientation.HORIZONTAL;
1966
1759
  }
@@ -1995,15 +1788,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1995
1788
  };
1996
1789
  };
1997
1790
  class Gridview {
1998
- constructor(proportionalLayout, styles, orientation) {
1999
- this.proportionalLayout = proportionalLayout;
2000
- this.styles = styles;
2001
- this.disposable = new MutableDisposable();
2002
- this._onDidChange = new Emitter();
2003
- this.onDidChange = this._onDidChange.event;
2004
- this.element = document.createElement('div');
2005
- this.element.className = 'grid-view';
2006
- this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
1791
+ get length() {
1792
+ return this._root ? this._root.children.length : 0;
2007
1793
  }
2008
1794
  serialize() {
2009
1795
  const root = serializeBranchNode(this.getView(), this.orientation);
@@ -2077,6 +1863,32 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2077
1863
  this._onDidChange.fire(e);
2078
1864
  });
2079
1865
  }
1866
+ /**
1867
+ * If the root is orientated as a VERTICAL node then nest the existing root within a new HORIZIONTAL root node
1868
+ * If the root is orientated as a HORIZONTAL node then nest the existing root within a new VERITCAL root node
1869
+ */
1870
+ insertOrthogonalSplitviewAtRoot() {
1871
+ if (!this._root) {
1872
+ return;
1873
+ }
1874
+ const oldRoot = this.root;
1875
+ oldRoot.element.remove();
1876
+ this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
1877
+ if (oldRoot.children.length === 1) {
1878
+ // can remove one level of redundant branching if there is only a single child
1879
+ const childReference = oldRoot.children[0];
1880
+ oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
1881
+ oldRoot.dispose();
1882
+ this._root.addChild(childReference, exports.Sizing.Distribute, 0);
1883
+ }
1884
+ else {
1885
+ this._root.addChild(oldRoot, exports.Sizing.Distribute, 0);
1886
+ }
1887
+ this.element.appendChild(this._root.element);
1888
+ this.disposable.value = this._root.onDidChange((e) => {
1889
+ this._onDidChange.fire(e);
1890
+ });
1891
+ }
2080
1892
  next(location) {
2081
1893
  return this.progmaticSelect(location);
2082
1894
  }
@@ -2135,6 +1947,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2135
1947
  get maximumHeight() {
2136
1948
  return this.root.maximumHeight;
2137
1949
  }
1950
+ constructor(proportionalLayout, styles, orientation) {
1951
+ this.proportionalLayout = proportionalLayout;
1952
+ this.styles = styles;
1953
+ this.disposable = new MutableDisposable();
1954
+ this._onDidChange = new Emitter();
1955
+ this.onDidChange = this._onDidChange.event;
1956
+ this.element = document.createElement('div');
1957
+ this.element.className = 'grid-view';
1958
+ this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
1959
+ }
2138
1960
  isViewVisible(location) {
2139
1961
  const [rest, index] = tail(location);
2140
1962
  const [, parent] = this.getNode(rest);
@@ -2266,9 +2088,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2266
2088
  }
2267
2089
 
2268
2090
  class SplitviewApi {
2269
- constructor(component) {
2270
- this.component = component;
2271
- }
2272
2091
  get minimumSize() {
2273
2092
  return this.component.minimumSize;
2274
2093
  }
@@ -2302,6 +2121,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2302
2121
  get onDidRemoveView() {
2303
2122
  return this.component.onDidRemoveView;
2304
2123
  }
2124
+ constructor(component) {
2125
+ this.component = component;
2126
+ }
2305
2127
  updateOptions(options) {
2306
2128
  this.component.updateOptions(options);
2307
2129
  }
@@ -2334,9 +2156,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2334
2156
  }
2335
2157
  }
2336
2158
  class PaneviewApi {
2337
- constructor(component) {
2338
- this.component = component;
2339
- }
2340
2159
  get minimumSize() {
2341
2160
  return this.component.minimumSize;
2342
2161
  }
@@ -2375,6 +2194,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2375
2194
  };
2376
2195
  return emitter.event;
2377
2196
  }
2197
+ constructor(component) {
2198
+ this.component = component;
2199
+ }
2378
2200
  removePanel(panel) {
2379
2201
  this.component.removePanel(panel);
2380
2202
  }
@@ -2404,9 +2226,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2404
2226
  }
2405
2227
  }
2406
2228
  class GridviewApi {
2407
- constructor(component) {
2408
- this.component = component;
2409
- }
2410
2229
  get minimumHeight() {
2411
2230
  return this.component.minimumHeight;
2412
2231
  }
@@ -2449,6 +2268,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2449
2268
  set orientation(value) {
2450
2269
  this.component.updateOptions({ orientation: value });
2451
2270
  }
2271
+ constructor(component) {
2272
+ this.component = component;
2273
+ }
2452
2274
  focus() {
2453
2275
  this.component.focus();
2454
2276
  }
@@ -2478,8 +2300,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2478
2300
  }
2479
2301
  }
2480
2302
  class DockviewApi {
2481
- constructor(component) {
2482
- this.component = component;
2303
+ get id() {
2304
+ return this.component.id;
2483
2305
  }
2484
2306
  get width() {
2485
2307
  return this.component.width;
@@ -2544,6 +2366,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2544
2366
  get activeGroup() {
2545
2367
  return this.component.activeGroup;
2546
2368
  }
2369
+ constructor(component) {
2370
+ this.component = component;
2371
+ }
2547
2372
  getTabHeight() {
2548
2373
  return this.component.tabHeight;
2549
2374
  }
@@ -2562,8 +2387,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2562
2387
  addPanel(options) {
2563
2388
  return this.component.addPanel(options);
2564
2389
  }
2565
- addEmptyGroup(options) {
2566
- this.component.addEmptyGroup(options);
2390
+ addGroup(options) {
2391
+ return this.component.addGroup(options);
2567
2392
  }
2568
2393
  moveToNext(options) {
2569
2394
  this.component.moveToNext(options);
@@ -2591,7 +2416,293 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2591
2416
  }
2592
2417
  }
2593
2418
 
2419
+ class DragAndDropObserver extends CompositeDisposable {
2420
+ constructor(element, callbacks) {
2421
+ super();
2422
+ this.element = element;
2423
+ this.callbacks = callbacks;
2424
+ this.target = null;
2425
+ this.registerListeners();
2426
+ }
2427
+ registerListeners() {
2428
+ this.addDisposables(addDisposableListener(this.element, 'dragenter', (e) => {
2429
+ this.target = e.target;
2430
+ this.callbacks.onDragEnter(e);
2431
+ }, true));
2432
+ this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
2433
+ e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
2434
+ if (this.callbacks.onDragOver) {
2435
+ this.callbacks.onDragOver(e);
2436
+ }
2437
+ }, true));
2438
+ this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
2439
+ if (this.target === e.target) {
2440
+ this.target = null;
2441
+ this.callbacks.onDragLeave(e);
2442
+ }
2443
+ }));
2444
+ this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
2445
+ this.target = null;
2446
+ this.callbacks.onDragEnd(e);
2447
+ }));
2448
+ this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
2449
+ this.callbacks.onDrop(e);
2450
+ }));
2451
+ }
2452
+ }
2453
+
2454
+ function isBooleanValue(value) {
2455
+ return typeof value === 'boolean';
2456
+ }
2457
+
2458
+ function numberOrFallback(maybeNumber, fallback) {
2459
+ return typeof maybeNumber === 'number' ? maybeNumber : fallback;
2460
+ }
2461
+ function directionToPosition(direction) {
2462
+ switch (direction) {
2463
+ case 'above':
2464
+ return 'top';
2465
+ case 'below':
2466
+ return 'bottom';
2467
+ case 'left':
2468
+ return 'left';
2469
+ case 'right':
2470
+ return 'right';
2471
+ case 'within':
2472
+ return 'center';
2473
+ default:
2474
+ throw new Error(`invalid direction '${direction}'`);
2475
+ }
2476
+ }
2477
+ function positionToDirection(position) {
2478
+ switch (position) {
2479
+ case 'top':
2480
+ return 'above';
2481
+ case 'bottom':
2482
+ return 'below';
2483
+ case 'left':
2484
+ return 'left';
2485
+ case 'right':
2486
+ return 'right';
2487
+ case 'center':
2488
+ return 'within';
2489
+ default:
2490
+ throw new Error(`invalid position '${position}'`);
2491
+ }
2492
+ }
2493
+ class Droptarget extends CompositeDisposable {
2494
+ get state() {
2495
+ return this._state;
2496
+ }
2497
+ constructor(element, options) {
2498
+ super();
2499
+ this.element = element;
2500
+ this.options = options;
2501
+ this._onDrop = new Emitter();
2502
+ this.onDrop = this._onDrop.event;
2503
+ // use a set to take advantage of #<set>.has
2504
+ const acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
2505
+ this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
2506
+ onDragEnter: () => undefined,
2507
+ onDragOver: (e) => {
2508
+ const width = this.element.clientWidth;
2509
+ const height = this.element.clientHeight;
2510
+ if (width === 0 || height === 0) {
2511
+ return; // avoid div!0
2512
+ }
2513
+ const rect = e.currentTarget.getBoundingClientRect();
2514
+ const x = e.clientX - rect.left;
2515
+ const y = e.clientY - rect.top;
2516
+ const quadrant = this.calculateQuadrant(acceptedTargetZonesSet, x, y, width, height);
2517
+ if (quadrant === null) {
2518
+ // no drop target should be displayed
2519
+ this.removeDropTarget();
2520
+ return;
2521
+ }
2522
+ if (isBooleanValue(this.options.canDisplayOverlay)) {
2523
+ if (!this.options.canDisplayOverlay) {
2524
+ return;
2525
+ }
2526
+ }
2527
+ else if (!this.options.canDisplayOverlay(e, quadrant)) {
2528
+ return;
2529
+ }
2530
+ if (!this.target) {
2531
+ this.target = document.createElement('div');
2532
+ this.target.className = 'drop-target-dropzone';
2533
+ this.overlay = document.createElement('div');
2534
+ this.overlay.className = 'drop-target-selection';
2535
+ this._state = 'center';
2536
+ this.target.appendChild(this.overlay);
2537
+ this.element.classList.add('drop-target');
2538
+ this.element.append(this.target);
2539
+ }
2540
+ if (this.options.acceptedTargetZones.length === 0) {
2541
+ return;
2542
+ }
2543
+ if (!this.target || !this.overlay) {
2544
+ return;
2545
+ }
2546
+ this.toggleClasses(quadrant, width, height);
2547
+ this.setState(quadrant);
2548
+ },
2549
+ onDragLeave: () => {
2550
+ this.removeDropTarget();
2551
+ },
2552
+ onDragEnd: () => {
2553
+ this.removeDropTarget();
2554
+ },
2555
+ onDrop: (e) => {
2556
+ e.preventDefault();
2557
+ e.stopPropagation();
2558
+ const state = this._state;
2559
+ this.removeDropTarget();
2560
+ if (state) {
2561
+ this._onDrop.fire({ position: state, nativeEvent: e });
2562
+ }
2563
+ },
2564
+ }));
2565
+ }
2566
+ dispose() {
2567
+ this.removeDropTarget();
2568
+ }
2569
+ toggleClasses(quadrant, width, height) {
2570
+ var _a, _b, _c, _d;
2571
+ if (!this.overlay) {
2572
+ return;
2573
+ }
2574
+ const isSmallX = width < 100;
2575
+ const isSmallY = height < 100;
2576
+ const isLeft = quadrant === 'left';
2577
+ const isRight = quadrant === 'right';
2578
+ const isTop = quadrant === 'top';
2579
+ const isBottom = quadrant === 'bottom';
2580
+ const rightClass = !isSmallX && isRight;
2581
+ const leftClass = !isSmallX && isLeft;
2582
+ const topClass = !isSmallY && isTop;
2583
+ const bottomClass = !isSmallY && isBottom;
2584
+ let size = 0.5;
2585
+ if (((_b = (_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.type) === 'percentage') {
2586
+ size = clamp(this.options.overlayModel.size.value, 0, 100) / 100;
2587
+ }
2588
+ if (((_d = (_c = this.options.overlayModel) === null || _c === void 0 ? void 0 : _c.size) === null || _d === void 0 ? void 0 : _d.type) === 'pixels') {
2589
+ if (rightClass || leftClass) {
2590
+ size =
2591
+ clamp(0, this.options.overlayModel.size.value, width) /
2592
+ width;
2593
+ }
2594
+ if (topClass || bottomClass) {
2595
+ size =
2596
+ clamp(0, this.options.overlayModel.size.value, height) /
2597
+ height;
2598
+ }
2599
+ }
2600
+ const translate = (1 - size) / 2;
2601
+ const scale = size;
2602
+ let transform;
2603
+ if (rightClass) {
2604
+ transform = `translateX(${100 * translate}%) scaleX(${scale})`;
2605
+ }
2606
+ else if (leftClass) {
2607
+ transform = `translateX(-${100 * translate}%) scaleX(${scale})`;
2608
+ }
2609
+ else if (topClass) {
2610
+ transform = `translateY(-${100 * translate}%) scaleY(${scale})`;
2611
+ }
2612
+ else if (bottomClass) {
2613
+ transform = `translateY(${100 * translate}%) scaleY(${scale})`;
2614
+ }
2615
+ else {
2616
+ transform = '';
2617
+ }
2618
+ this.overlay.style.transform = transform;
2619
+ toggleClass(this.overlay, 'small-right', isSmallX && isRight);
2620
+ toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
2621
+ toggleClass(this.overlay, 'small-top', isSmallY && isTop);
2622
+ toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
2623
+ }
2624
+ setState(quadrant) {
2625
+ switch (quadrant) {
2626
+ case 'top':
2627
+ this._state = 'top';
2628
+ break;
2629
+ case 'left':
2630
+ this._state = 'left';
2631
+ break;
2632
+ case 'bottom':
2633
+ this._state = 'bottom';
2634
+ break;
2635
+ case 'right':
2636
+ this._state = 'right';
2637
+ break;
2638
+ case 'center':
2639
+ this._state = 'center';
2640
+ break;
2641
+ }
2642
+ }
2643
+ calculateQuadrant(overlayType, x, y, width, height) {
2644
+ var _a, _b, _c, _d, _e, _f;
2645
+ const isPercentage = ((_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.activationSize) === undefined ||
2646
+ ((_c = (_b = this.options.overlayModel) === null || _b === void 0 ? void 0 : _b.activationSize) === null || _c === void 0 ? void 0 : _c.type) === 'percentage';
2647
+ const value = numberOrFallback((_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.overlayModel) === null || _e === void 0 ? void 0 : _e.activationSize) === null || _f === void 0 ? void 0 : _f.value, 20);
2648
+ if (isPercentage) {
2649
+ return calculateQuadrantAsPercentage(overlayType, x, y, width, height, value);
2650
+ }
2651
+ return calculateQuadrantAsPixels(overlayType, x, y, width, height, value);
2652
+ }
2653
+ removeDropTarget() {
2654
+ if (this.target) {
2655
+ this._state = undefined;
2656
+ this.element.removeChild(this.target);
2657
+ this.target = undefined;
2658
+ this.overlay = undefined;
2659
+ this.element.classList.remove('drop-target');
2660
+ }
2661
+ }
2662
+ }
2663
+ function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
2664
+ const xp = (100 * x) / width;
2665
+ const yp = (100 * y) / height;
2666
+ if (overlayType.has('left') && xp < threshold) {
2667
+ return 'left';
2668
+ }
2669
+ if (overlayType.has('right') && xp > 100 - threshold) {
2670
+ return 'right';
2671
+ }
2672
+ if (overlayType.has('top') && yp < threshold) {
2673
+ return 'top';
2674
+ }
2675
+ if (overlayType.has('bottom') && yp > 100 - threshold) {
2676
+ return 'bottom';
2677
+ }
2678
+ if (!overlayType.has('center')) {
2679
+ return null;
2680
+ }
2681
+ return 'center';
2682
+ }
2683
+ function calculateQuadrantAsPixels(overlayType, x, y, width, height, threshold) {
2684
+ if (overlayType.has('left') && x < threshold) {
2685
+ return 'left';
2686
+ }
2687
+ if (overlayType.has('right') && x > width - threshold) {
2688
+ return 'right';
2689
+ }
2690
+ if (overlayType.has('top') && y < threshold) {
2691
+ return 'top';
2692
+ }
2693
+ if (overlayType.has('bottom') && y > height - threshold) {
2694
+ return 'bottom';
2695
+ }
2696
+ if (!overlayType.has('center')) {
2697
+ return null;
2698
+ }
2699
+ return 'center';
2700
+ }
2701
+
2594
2702
  class ContentContainer extends CompositeDisposable {
2703
+ get element() {
2704
+ return this._element;
2705
+ }
2595
2706
  constructor() {
2596
2707
  super();
2597
2708
  this.disposable = new MutableDisposable();
@@ -2609,9 +2720,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2609
2720
  // 3) register dragEnd events
2610
2721
  // 4) register mouseMove events (if no buttons are present we take this as a dragEnd event)
2611
2722
  }
2612
- get element() {
2613
- return this._element;
2614
- }
2615
2723
  show() {
2616
2724
  this.element.style.display = '';
2617
2725
  }
@@ -2667,6 +2775,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2667
2775
  DockviewDropTargets[DockviewDropTargets["Tab"] = 0] = "Tab";
2668
2776
  DockviewDropTargets[DockviewDropTargets["Panel"] = 1] = "Panel";
2669
2777
  DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
2778
+ DockviewDropTargets[DockviewDropTargets["Edge"] = 3] = "Edge";
2670
2779
  })(exports.DockviewDropTargets || (exports.DockviewDropTargets = {}));
2671
2780
 
2672
2781
  class DragHandler extends CompositeDisposable {
@@ -2688,9 +2797,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2688
2797
  for (const iframe of this.iframes) {
2689
2798
  iframe.style.pointerEvents = 'none';
2690
2799
  }
2691
- this.el.classList.add('dragged');
2692
- setTimeout(() => this.el.classList.remove('dragged'), 0);
2693
- this.disposable.value = this.getData();
2800
+ this.el.classList.add('dv-dragged');
2801
+ setTimeout(() => this.el.classList.remove('dv-dragged'), 0);
2802
+ this.disposable.value = this.getData(event.dataTransfer);
2694
2803
  if (event.dataTransfer) {
2695
2804
  event.dataTransfer.effectAllowed = 'move';
2696
2805
  }
@@ -2704,11 +2813,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2704
2813
  }
2705
2814
  }
2706
2815
 
2707
- exports.MouseEventKind = void 0;
2708
- (function (MouseEventKind) {
2709
- MouseEventKind["CLICK"] = "CLICK";
2710
- })(exports.MouseEventKind || (exports.MouseEventKind = {}));
2711
2816
  class Tab extends CompositeDisposable {
2817
+ get element() {
2818
+ return this._element;
2819
+ }
2712
2820
  constructor(panelId, accessor, group) {
2713
2821
  super();
2714
2822
  this.panelId = panelId;
@@ -2752,25 +2860,30 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2752
2860
  * on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
2753
2861
  */
2754
2862
  event.stopPropagation();
2755
- this._onChanged.fire({ kind: exports.MouseEventKind.CLICK, event });
2863
+ this._onChanged.fire(event);
2756
2864
  }));
2757
2865
  this.droptarget = new Droptarget(this._element, {
2758
- validOverlays: 'none',
2759
- canDisplayOverlay: (event) => {
2866
+ acceptedTargetZones: ['center'],
2867
+ canDisplayOverlay: (event, position) => {
2868
+ if (this.group.locked) {
2869
+ return false;
2870
+ }
2760
2871
  const data = getPanelData();
2761
2872
  if (data && this.accessor.id === data.viewId) {
2873
+ if (data.panelId === null &&
2874
+ data.groupId === this.group.id) {
2875
+ // don't allow group move to drop on self
2876
+ return false;
2877
+ }
2762
2878
  return this.panelId !== data.panelId;
2763
2879
  }
2764
- return this.group.model.canDisplayOverlay(event, exports.DockviewDropTargets.Tab);
2880
+ return this.group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Tab);
2765
2881
  },
2766
2882
  });
2767
2883
  this.addDisposables(this.droptarget.onDrop((event) => {
2768
2884
  this._onDropped.fire(event);
2769
2885
  }));
2770
2886
  }
2771
- get element() {
2772
- return this._element;
2773
- }
2774
2887
  setActive(isActive) {
2775
2888
  toggleClass(this.element, 'active-tab', isActive);
2776
2889
  toggleClass(this.element, 'inactive-tab', !isActive);
@@ -2788,56 +2901,94 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2788
2901
  }
2789
2902
  }
2790
2903
 
2791
- class TabsContainer extends CompositeDisposable {
2792
- constructor(accessor, group, options) {
2904
+ function addGhostImage(dataTransfer, ghostElement) {
2905
+ // class dockview provides to force ghost image to be drawn on a different layer and prevent weird rendering issues
2906
+ addClasses(ghostElement, 'dv-dragged');
2907
+ document.body.appendChild(ghostElement);
2908
+ dataTransfer.setDragImage(ghostElement, 0, 0);
2909
+ setTimeout(() => {
2910
+ ghostElement.remove();
2911
+ }, 0);
2912
+ }
2913
+
2914
+ class GroupDragHandler extends DragHandler {
2915
+ constructor(element, accessorId, group) {
2916
+ super(element);
2917
+ this.accessorId = accessorId;
2918
+ this.group = group;
2919
+ this.panelTransfer = LocalSelectionTransfer.getInstance();
2920
+ }
2921
+ getData(dataTransfer) {
2922
+ this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
2923
+ const style = window.getComputedStyle(this.el);
2924
+ const bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
2925
+ const color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
2926
+ if (dataTransfer) {
2927
+ const ghostElement = document.createElement('div');
2928
+ ghostElement.style.backgroundColor = bgColor;
2929
+ ghostElement.style.color = color;
2930
+ ghostElement.style.padding = '2px 8px';
2931
+ ghostElement.style.height = '24px';
2932
+ ghostElement.style.fontSize = '11px';
2933
+ ghostElement.style.lineHeight = '20px';
2934
+ ghostElement.style.borderRadius = '12px';
2935
+ ghostElement.style.position = 'absolute';
2936
+ ghostElement.textContent = `Multiple Panels (${this.group.size})`;
2937
+ addGhostImage(dataTransfer, ghostElement);
2938
+ }
2939
+ return {
2940
+ dispose: () => {
2941
+ this.panelTransfer.clearData(PanelTransfer.prototype);
2942
+ },
2943
+ };
2944
+ }
2945
+ dispose() {
2946
+ //
2947
+ }
2948
+ }
2949
+
2950
+ class VoidContainer extends CompositeDisposable {
2951
+ get element() {
2952
+ return this._element;
2953
+ }
2954
+ constructor(accessor, group) {
2793
2955
  super();
2794
2956
  this.accessor = accessor;
2795
2957
  this.group = group;
2796
- this.tabs = [];
2797
- this.selectedIndex = -1;
2798
- this._hidden = false;
2799
2958
  this._onDrop = new Emitter();
2800
2959
  this.onDrop = this._onDrop.event;
2801
- this.addDisposables(this._onDrop);
2802
2960
  this._element = document.createElement('div');
2803
- this._element.className = 'tabs-and-actions-container';
2804
- this.height = options.tabHeight;
2805
- this.actionContainer = document.createElement('div');
2806
- this.actionContainer.className = 'action-container';
2807
- this.tabContainer = document.createElement('div');
2808
- this.tabContainer.className = 'tabs-container';
2809
- this.voidContainer = document.createElement('div');
2810
- this.voidContainer.className = 'void-container';
2811
- this._element.appendChild(this.tabContainer);
2812
- this._element.appendChild(this.voidContainer);
2813
- this._element.appendChild(this.actionContainer);
2814
- this.voidDropTarget = new Droptarget(this.voidContainer, {
2815
- validOverlays: 'none',
2816
- canDisplayOverlay: (event) => {
2961
+ this._element.className = 'void-container';
2962
+ this._element.tabIndex = 0;
2963
+ this._element.draggable = true;
2964
+ this.addDisposables(this._onDrop, addDisposableListener(this._element, 'click', () => {
2965
+ this.accessor.doSetGroupActive(this.group);
2966
+ }));
2967
+ const handler = new GroupDragHandler(this._element, accessor.id, group);
2968
+ this.voidDropTarget = new Droptarget(this._element, {
2969
+ acceptedTargetZones: ['center'],
2970
+ canDisplayOverlay: (event, position) => {
2817
2971
  var _a;
2818
2972
  const data = getPanelData();
2819
2973
  if (data && this.accessor.id === data.viewId) {
2974
+ if (data.panelId === null &&
2975
+ data.groupId === this.group.id) {
2976
+ // don't allow group move to drop on self
2977
+ return false;
2978
+ }
2820
2979
  // don't show the overlay if the tab being dragged is the last panel of this group
2821
- return ((_a = last(this.tabs)) === null || _a === void 0 ? void 0 : _a.value.panelId) !== data.panelId;
2980
+ return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
2822
2981
  }
2823
- return group.model.canDisplayOverlay(event, exports.DockviewDropTargets.Panel);
2982
+ return group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
2824
2983
  },
2825
2984
  });
2826
- this.addDisposables(this.voidDropTarget.onDrop((event) => {
2827
- this._onDrop.fire({
2828
- event: event.nativeEvent,
2829
- index: this.tabs.length,
2830
- });
2831
- }), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
2832
- if (event.defaultPrevented) {
2833
- return;
2834
- }
2835
- const isLeftClick = event.button === 0;
2836
- if (isLeftClick) {
2837
- this.accessor.doSetGroupActive(this.group);
2838
- }
2839
- }));
2985
+ this.addDisposables(handler, this.voidDropTarget.onDrop((event) => {
2986
+ this._onDrop.fire(event);
2987
+ }), this.voidDropTarget);
2840
2988
  }
2989
+ }
2990
+
2991
+ class TabsContainer extends CompositeDisposable {
2841
2992
  get panels() {
2842
2993
  return this.tabs.map((_) => _.value.panelId);
2843
2994
  }
@@ -2898,6 +3049,52 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2898
3049
  indexOf(id) {
2899
3050
  return this.tabs.findIndex((tab) => tab.value.panelId === id);
2900
3051
  }
3052
+ constructor(accessor, group) {
3053
+ super();
3054
+ this.accessor = accessor;
3055
+ this.group = group;
3056
+ this.tabs = [];
3057
+ this.selectedIndex = -1;
3058
+ this._hidden = false;
3059
+ this._onDrop = new Emitter();
3060
+ this.onDrop = this._onDrop.event;
3061
+ this.addDisposables(this._onDrop);
3062
+ this._element = document.createElement('div');
3063
+ this._element.className = 'tabs-and-actions-container';
3064
+ this.height = accessor.options.tabHeight;
3065
+ toggleClass(this._element, 'dv-full-width-single-tab', this.accessor.options.singleTabMode === 'fullwidth');
3066
+ this.addDisposables(this.accessor.onDidAddPanel((e) => {
3067
+ if (e.api.group === this.group) {
3068
+ toggleClass(this._element, 'dv-single-tab', this.size === 1);
3069
+ }
3070
+ }), this.accessor.onDidRemovePanel((e) => {
3071
+ if (e.api.group === this.group) {
3072
+ toggleClass(this._element, 'dv-single-tab', this.size === 1);
3073
+ }
3074
+ }));
3075
+ this.actionContainer = document.createElement('div');
3076
+ this.actionContainer.className = 'action-container';
3077
+ this.tabContainer = document.createElement('div');
3078
+ this.tabContainer.className = 'tabs-container';
3079
+ this.voidContainer = new VoidContainer(this.accessor, this.group);
3080
+ this._element.appendChild(this.tabContainer);
3081
+ this._element.appendChild(this.voidContainer.element);
3082
+ this._element.appendChild(this.actionContainer);
3083
+ this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
3084
+ this._onDrop.fire({
3085
+ event: event.nativeEvent,
3086
+ index: this.tabs.length,
3087
+ });
3088
+ }), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
3089
+ if (event.defaultPrevented) {
3090
+ return;
3091
+ }
3092
+ const isLeftClick = event.button === 0;
3093
+ if (isLeftClick) {
3094
+ this.accessor.doSetGroupActive(this.group);
3095
+ }
3096
+ }));
3097
+ }
2901
3098
  setActive(_isGroupActive) {
2902
3099
  // noop
2903
3100
  }
@@ -2942,15 +3139,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2942
3139
  var _a;
2943
3140
  const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
2944
3141
  this.group.model.isContentFocused;
2945
- const isLeftClick = event.event.button === 0;
2946
- if (!isLeftClick || event.event.defaultPrevented) {
3142
+ const isLeftClick = event.button === 0;
3143
+ if (!isLeftClick || event.defaultPrevented) {
2947
3144
  return;
2948
3145
  }
2949
- if (event.kind === exports.MouseEventKind.CLICK) {
2950
- this.group.model.openPanel(panel, {
2951
- skipFocus: alreadyFocused,
2952
- });
2953
- }
3146
+ this.group.model.openPanel(panel, {
3147
+ skipFocus: alreadyFocused,
3148
+ });
2954
3149
  }), tabToAdd.onDrop((event) => {
2955
3150
  this._onDrop.fire({
2956
3151
  event: event.nativeEvent,
@@ -2973,63 +3168,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2973
3168
  }
2974
3169
 
2975
3170
  class Groupview extends CompositeDisposable {
2976
- constructor(container, accessor, id, options, parent) {
2977
- super();
2978
- this.container = container;
2979
- this.accessor = accessor;
2980
- this.id = id;
2981
- this.options = options;
2982
- this.parent = parent;
2983
- this._isGroupActive = false;
2984
- this._locked = false;
2985
- this.mostRecentlyUsed = [];
2986
- this._onDidChange = new Emitter();
2987
- this.onDidChange = this._onDidChange.event;
2988
- this._width = 0;
2989
- this._height = 0;
2990
- this._panels = [];
2991
- this._onMove = new Emitter();
2992
- this.onMove = this._onMove.event;
2993
- this._onDidDrop = new Emitter();
2994
- this.onDidDrop = this._onDidDrop.event;
2995
- this._onDidAddPanel = new Emitter();
2996
- this.onDidAddPanel = this._onDidAddPanel.event;
2997
- this._onDidRemovePanel = new Emitter();
2998
- this.onDidRemovePanel = this._onDidRemovePanel.event;
2999
- this._onDidActivePanelChange = new Emitter();
3000
- this.onDidActivePanelChange = this._onDidActivePanelChange.event;
3001
- this.container.classList.add('groupview');
3002
- this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
3003
- tabHeight: options.tabHeight,
3004
- });
3005
- this.contentContainer = new ContentContainer();
3006
- this.dropTarget = new Droptarget(this.contentContainer.element, {
3007
- validOverlays: 'all',
3008
- canDisplayOverlay: (event, quadrant) => {
3009
- if (this.locked && !quadrant) {
3010
- return false;
3011
- }
3012
- const data = getPanelData();
3013
- if (data && data.viewId === this.accessor.id) {
3014
- const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
3015
- return !groupHasOnePanelAndIsActiveDragElement;
3016
- }
3017
- return this.canDisplayOverlay(event, exports.DockviewDropTargets.Panel);
3018
- },
3019
- });
3020
- container.append(this.tabsContainer.element, this.contentContainer.element);
3021
- this.header.hidden = !!options.hideHeader;
3022
- this.locked = !!options.locked;
3023
- this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
3024
- this.handleDropEvent(event.event, exports.Position.Center, event.index);
3025
- }), this.contentContainer.onDidFocus(() => {
3026
- this.accessor.doSetGroupActive(this.parent, true);
3027
- }), this.contentContainer.onDidBlur(() => {
3028
- // noop
3029
- }), this.dropTarget.onDrop((event) => {
3030
- this.handleDropEvent(event.nativeEvent, event.position);
3031
- }));
3032
- }
3033
3171
  get element() {
3034
3172
  throw new Error('not supported');
3035
3173
  }
@@ -3041,6 +3179,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3041
3179
  }
3042
3180
  set locked(value) {
3043
3181
  this._locked = value;
3182
+ toggleClass(this.container, 'locked-groupview', value);
3044
3183
  }
3045
3184
  get isActive() {
3046
3185
  return this._isGroupActive;
@@ -3078,6 +3217,71 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3078
3217
  }
3079
3218
  return isAncestor(document.activeElement, this.contentContainer.element);
3080
3219
  }
3220
+ constructor(container, accessor, id, options, groupPanel) {
3221
+ super();
3222
+ this.container = container;
3223
+ this.accessor = accessor;
3224
+ this.id = id;
3225
+ this.options = options;
3226
+ this.groupPanel = groupPanel;
3227
+ this._isGroupActive = false;
3228
+ this._locked = false;
3229
+ this.mostRecentlyUsed = [];
3230
+ this._onDidChange = new Emitter();
3231
+ this.onDidChange = this._onDidChange.event;
3232
+ this._width = 0;
3233
+ this._height = 0;
3234
+ this._panels = [];
3235
+ this._onMove = new Emitter();
3236
+ this.onMove = this._onMove.event;
3237
+ this._onDidDrop = new Emitter();
3238
+ this.onDidDrop = this._onDidDrop.event;
3239
+ this._onDidAddPanel = new Emitter();
3240
+ this.onDidAddPanel = this._onDidAddPanel.event;
3241
+ this._onDidRemovePanel = new Emitter();
3242
+ this.onDidRemovePanel = this._onDidRemovePanel.event;
3243
+ this._onDidActivePanelChange = new Emitter();
3244
+ this.onDidActivePanelChange = this._onDidActivePanelChange.event;
3245
+ this.container.classList.add('groupview');
3246
+ this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
3247
+ this.contentContainer = new ContentContainer();
3248
+ this.dropTarget = new Droptarget(this.contentContainer.element, {
3249
+ acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
3250
+ canDisplayOverlay: (event, position) => {
3251
+ if (this.locked && position === 'center') {
3252
+ return false;
3253
+ }
3254
+ const data = getPanelData();
3255
+ if (data && data.viewId === this.accessor.id) {
3256
+ if (data.groupId === this.id) {
3257
+ if (position === 'center') {
3258
+ // don't allow to drop on self for center position
3259
+ return false;
3260
+ }
3261
+ if (data.panelId === null) {
3262
+ // don't allow group move to drop anywhere on self
3263
+ return false;
3264
+ }
3265
+ }
3266
+ const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
3267
+ return !groupHasOnePanelAndIsActiveDragElement;
3268
+ }
3269
+ return this.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
3270
+ },
3271
+ });
3272
+ container.append(this.tabsContainer.element, this.contentContainer.element);
3273
+ this.header.hidden = !!options.hideHeader;
3274
+ this.locked = !!options.locked;
3275
+ this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
3276
+ this.handleDropEvent(event.event, 'center', event.index);
3277
+ }), this.contentContainer.onDidFocus(() => {
3278
+ this.accessor.doSetGroupActive(this.groupPanel, true);
3279
+ }), this.contentContainer.onDidBlur(() => {
3280
+ // noop
3281
+ }), this.dropTarget.onDrop((event) => {
3282
+ this.handleDropEvent(event.nativeEvent, event.position);
3283
+ }));
3284
+ }
3081
3285
  initialize() {
3082
3286
  var _a, _b;
3083
3287
  if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
@@ -3093,11 +3297,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3093
3297
  this.setActive(this.isActive, true, true);
3094
3298
  this.updateContainer();
3095
3299
  if (this.accessor.options.createGroupControlElement) {
3096
- this._control = this.accessor.options.createGroupControlElement(this.parent);
3300
+ this._control = this.accessor.options.createGroupControlElement(this.groupPanel);
3097
3301
  this.addDisposables(this._control);
3098
3302
  this._control.init({
3099
3303
  containerApi: new DockviewApi(this.accessor),
3100
- api: this.parent.api,
3304
+ api: this.groupPanel.api,
3101
3305
  });
3102
3306
  this.tabsContainer.setActionElement(this._control.element);
3103
3307
  }
@@ -3184,10 +3388,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3184
3388
  const skipSetPanelActive = !!options.skipSetPanelActive;
3185
3389
  const skipSetGroupActive = !!options.skipSetGroupActive;
3186
3390
  // ensure the group is updated before we fire any events
3187
- panel.updateParentGroup(this.parent, true);
3391
+ panel.updateParentGroup(this.groupPanel, true);
3188
3392
  if (this._activePanel === panel) {
3189
3393
  if (!skipSetGroupActive) {
3190
- this.accessor.doSetGroupActive(this.parent);
3394
+ this.accessor.doSetGroupActive(this.groupPanel);
3191
3395
  }
3192
3396
  return;
3193
3397
  }
@@ -3196,7 +3400,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3196
3400
  this.doSetActivePanel(panel);
3197
3401
  }
3198
3402
  if (!skipSetGroupActive) {
3199
- this.accessor.doSetGroupActive(this.parent, !!options.skipFocus);
3403
+ this.accessor.doSetGroupActive(this.groupPanel, !!options.skipFocus);
3200
3404
  }
3201
3405
  this.updateContainer();
3202
3406
  }
@@ -3219,7 +3423,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3219
3423
  }
3220
3424
  }
3221
3425
  else {
3222
- this.accessor.removeGroup(this.parent);
3426
+ this.accessor.removeGroup(this.groupPanel);
3223
3427
  }
3224
3428
  }
3225
3429
  closePanel(panel) {
@@ -3324,7 +3528,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3324
3528
  }
3325
3529
  updateContainer() {
3326
3530
  toggleClass(this.container, 'empty', this.isEmpty);
3327
- this.panels.forEach((panel) => panel.updateParentGroup(this.parent, this.isActive));
3531
+ this.panels.forEach((panel) => panel.updateParentGroup(this.groupPanel, this.isActive));
3328
3532
  if (this.isEmpty && !this.watermark) {
3329
3533
  const watermark = this.accessor.createWatermarkComponent();
3330
3534
  watermark.init({
@@ -3336,29 +3540,28 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3336
3540
  this.watermark = watermark;
3337
3541
  addDisposableListener(this.watermark.element, 'click', () => {
3338
3542
  if (!this.isActive) {
3339
- this.accessor.doSetGroupActive(this.parent);
3543
+ this.accessor.doSetGroupActive(this.groupPanel);
3340
3544
  }
3341
3545
  });
3342
- this.contentContainer.hide();
3343
3546
  this.tabsContainer.hide();
3344
- this.container.appendChild(this.watermark.element);
3345
- this.watermark.updateParentGroup(this.parent, true);
3547
+ this.contentContainer.element.appendChild(this.watermark.element);
3548
+ this.watermark.updateParentGroup(this.groupPanel, true);
3346
3549
  }
3347
3550
  if (!this.isEmpty && this.watermark) {
3348
3551
  this.watermark.element.remove();
3349
3552
  this.watermark.dispose();
3350
3553
  this.watermark = undefined;
3351
- this.contentContainer.show();
3352
3554
  this.tabsContainer.show();
3353
3555
  }
3354
3556
  }
3355
- canDisplayOverlay(event, target) {
3557
+ canDisplayOverlay(event, position, target) {
3356
3558
  // custom overlay handler
3357
3559
  if (this.accessor.options.showDndOverlay) {
3358
3560
  return this.accessor.options.showDndOverlay({
3359
3561
  nativeEvent: event,
3360
3562
  target,
3361
3563
  group: this.accessor.getPanel(this.id),
3564
+ position,
3362
3565
  getData: getPanelData,
3363
3566
  });
3364
3567
  }
@@ -3366,7 +3569,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3366
3569
  }
3367
3570
  handleDropEvent(event, position, index) {
3368
3571
  const data = getPanelData();
3369
- if (data) {
3572
+ if (data && data.viewId === this.accessor.id) {
3573
+ if (data.panelId === null) {
3574
+ // this is a group move dnd event
3575
+ const { groupId } = data;
3576
+ this._onMove.fire({
3577
+ target: position,
3578
+ groupId: groupId,
3579
+ index,
3580
+ });
3581
+ return;
3582
+ }
3370
3583
  const fromSameGroup = this.tabsContainer.indexOf(data.panelId) !== -1;
3371
3584
  if (fromSameGroup && this.tabsContainer.size === 1) {
3372
3585
  return;
@@ -3412,45 +3625,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3412
3625
  function toTarget(direction) {
3413
3626
  switch (direction) {
3414
3627
  case 'left':
3415
- return exports.Position.Left;
3628
+ return 'left';
3416
3629
  case 'right':
3417
- return exports.Position.Right;
3630
+ return 'right';
3418
3631
  case 'above':
3419
- return exports.Position.Top;
3632
+ return 'top';
3420
3633
  case 'below':
3421
- return exports.Position.Bottom;
3634
+ return 'bottom';
3422
3635
  case 'within':
3423
3636
  default:
3424
- return exports.Position.Center;
3637
+ return 'center';
3425
3638
  }
3426
3639
  }
3427
3640
  class BaseGrid extends CompositeDisposable {
3428
- constructor(_element, options) {
3429
- super();
3430
- this._element = _element;
3431
- this._id = nextLayoutId$1.next();
3432
- this._groups = new Map();
3433
- this._onDidLayoutChange = new Emitter();
3434
- this.onDidLayoutChange = this._onDidLayoutChange.event;
3435
- this._onDidRemoveGroup = new Emitter();
3436
- this.onDidRemoveGroup = this._onDidRemoveGroup.event;
3437
- this._onDidAddGroup = new Emitter();
3438
- this.onDidAddGroup = this._onDidAddGroup.event;
3439
- this._onDidActiveGroupChange = new Emitter();
3440
- this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3441
- this._bufferOnDidLayoutChange = new TickDelayedEvent();
3442
- this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
3443
- this.element.appendChild(this.gridview.element);
3444
- this.layout(0, 0, true); // set some elements height/widths
3445
- this.addDisposables(this.gridview.onDidChange(() => {
3446
- this._bufferOnDidLayoutChange.fire();
3447
- }));
3448
- this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
3449
- this._bufferOnDidLayoutChange.fire();
3450
- }), this._bufferOnDidLayoutChange.onEvent(() => {
3451
- this._onDidLayoutChange.fire();
3452
- }), this._bufferOnDidLayoutChange);
3453
- }
3454
3641
  get id() {
3455
3642
  return this._id;
3456
3643
  }
@@ -3484,6 +3671,32 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3484
3671
  get activeGroup() {
3485
3672
  return this._activeGroup;
3486
3673
  }
3674
+ constructor(_element, options) {
3675
+ super();
3676
+ this._element = _element;
3677
+ this._id = nextLayoutId$1.next();
3678
+ this._groups = new Map();
3679
+ this._onDidLayoutChange = new Emitter();
3680
+ this.onDidLayoutChange = this._onDidLayoutChange.event;
3681
+ this._onDidRemoveGroup = new Emitter();
3682
+ this.onDidRemoveGroup = this._onDidRemoveGroup.event;
3683
+ this._onDidAddGroup = new Emitter();
3684
+ this.onDidAddGroup = this._onDidAddGroup.event;
3685
+ this._onDidActiveGroupChange = new Emitter();
3686
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3687
+ this._bufferOnDidLayoutChange = new TickDelayedEvent();
3688
+ this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
3689
+ this.element.appendChild(this.gridview.element);
3690
+ this.layout(0, 0, true); // set some elements height/widths
3691
+ this.addDisposables(this.gridview.onDidChange(() => {
3692
+ this._bufferOnDidLayoutChange.fire();
3693
+ }));
3694
+ this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
3695
+ this._bufferOnDidLayoutChange.fire();
3696
+ }), this._bufferOnDidLayoutChange.onEvent(() => {
3697
+ this._onDidLayoutChange.fire();
3698
+ }), this._bufferOnDidLayoutChange);
3699
+ }
3487
3700
  setVisible(panel, visible) {
3488
3701
  this.gridview.setViewVisible(getGridLocation(panel.element), visible);
3489
3702
  this._onDidLayoutChange.fire();
@@ -3592,10 +3805,51 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3592
3805
  }
3593
3806
  }
3594
3807
 
3808
+ function isPanelOptionsWithPanel(data) {
3809
+ if (data.referencePanel) {
3810
+ return true;
3811
+ }
3812
+ return false;
3813
+ }
3814
+ function isPanelOptionsWithGroup(data) {
3815
+ if (data.referenceGroup) {
3816
+ return true;
3817
+ }
3818
+ return false;
3819
+ }
3820
+ function isGroupOptionsWithPanel(data) {
3821
+ if (data.referencePanel) {
3822
+ return true;
3823
+ }
3824
+ return false;
3825
+ }
3826
+ function isGroupOptionsWithGroup(data) {
3827
+ if (data.referenceGroup) {
3828
+ return true;
3829
+ }
3830
+ return false;
3831
+ }
3832
+
3595
3833
  /**
3596
3834
  * A core api implementation that should be used across all panel-like objects
3597
3835
  */
3598
3836
  class PanelApiImpl extends CompositeDisposable {
3837
+ //
3838
+ get isFocused() {
3839
+ return this._isFocused;
3840
+ }
3841
+ get isActive() {
3842
+ return this._isActive;
3843
+ }
3844
+ get isVisible() {
3845
+ return this._isVisible;
3846
+ }
3847
+ get width() {
3848
+ return this._width;
3849
+ }
3850
+ get height() {
3851
+ return this._height;
3852
+ }
3599
3853
  constructor(id) {
3600
3854
  super();
3601
3855
  this.id = id;
@@ -3604,6 +3858,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3604
3858
  this._isVisible = true;
3605
3859
  this._width = 0;
3606
3860
  this._height = 0;
3861
+ this.panelUpdatesDisposable = new MutableDisposable();
3607
3862
  this._onDidDimensionChange = new Emitter({
3608
3863
  replay: true,
3609
3864
  });
@@ -3632,32 +3887,28 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3632
3887
  //
3633
3888
  this._onActiveChange = new Emitter();
3634
3889
  this.onActiveChange = this._onActiveChange.event;
3635
- this.addDisposables(this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
3890
+ //
3891
+ this._onUpdateParameters = new Emitter();
3892
+ this.onUpdateParameters = this._onUpdateParameters.event;
3893
+ this.addDisposables(this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this._onUpdateParameters, this.onDidFocusChange((event) => {
3636
3894
  this._isFocused = event.isFocused;
3637
3895
  }), this.onDidActiveChange((event) => {
3638
3896
  this._isActive = event.isActive;
3639
3897
  }), this.onDidVisibilityChange((event) => {
3640
3898
  this._isVisible = event.isVisible;
3641
- }), this.onDidDimensionsChange((event) => {
3642
- this._width = event.width;
3643
- this._height = event.height;
3644
- }));
3645
- }
3646
- //
3647
- get isFocused() {
3648
- return this._isFocused;
3649
- }
3650
- get isActive() {
3651
- return this._isActive;
3652
- }
3653
- get isVisible() {
3654
- return this._isVisible;
3655
- }
3656
- get width() {
3657
- return this._width;
3899
+ }), this.onDidDimensionsChange((event) => {
3900
+ this._width = event.width;
3901
+ this._height = event.height;
3902
+ }));
3658
3903
  }
3659
- get height() {
3660
- return this._height;
3904
+ initialize(panel) {
3905
+ this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
3906
+ panel.update({
3907
+ params: {
3908
+ params: parameters,
3909
+ },
3910
+ });
3911
+ });
3661
3912
  }
3662
3913
  setVisible(isVisible) {
3663
3914
  this._onVisibilityChange.fire({ isVisible });
@@ -3665,26 +3916,29 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3665
3916
  setActive() {
3666
3917
  this._onActiveChange.fire();
3667
3918
  }
3919
+ updateParameters(parameters) {
3920
+ this._onUpdateParameters.fire(parameters);
3921
+ }
3668
3922
  dispose() {
3669
3923
  super.dispose();
3670
3924
  }
3671
3925
  }
3672
3926
 
3673
3927
  class GridviewPanelApiImpl extends PanelApiImpl {
3674
- //
3675
- constructor(id) {
3928
+ constructor(id, panel) {
3676
3929
  super(id);
3677
3930
  this._onDidConstraintsChangeInternal = new Emitter();
3678
3931
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
3679
- //
3680
3932
  this._onDidConstraintsChange = new Emitter({
3681
3933
  replay: true,
3682
3934
  });
3683
3935
  this.onDidConstraintsChange = this._onDidConstraintsChange.event;
3684
- //
3685
3936
  this._onDidSizeChange = new Emitter();
3686
3937
  this.onDidSizeChange = this._onDidSizeChange.event;
3687
3938
  this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
3939
+ if (panel) {
3940
+ this.initialize(panel);
3941
+ }
3688
3942
  }
3689
3943
  setConstraints(value) {
3690
3944
  this._onDidConstraintsChangeInternal.fire(value);
@@ -3695,19 +3949,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3695
3949
  }
3696
3950
 
3697
3951
  class DockviewPanelApiImpl extends GridviewPanelApiImpl {
3698
- constructor(panel, group) {
3699
- super(panel.id);
3700
- this.panel = panel;
3701
- this._onDidTitleChange = new Emitter();
3702
- this.onDidTitleChange = this._onDidTitleChange.event;
3703
- this._onDidActiveGroupChange = new Emitter();
3704
- this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3705
- this._onDidGroupChange = new Emitter();
3706
- this.onDidGroupChange = this._onDidGroupChange.event;
3707
- this.disposable = new MutableDisposable();
3708
- this._group = group;
3709
- this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
3710
- }
3711
3952
  get title() {
3712
3953
  return this.panel.title;
3713
3954
  }
@@ -3731,30 +3972,29 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3731
3972
  get group() {
3732
3973
  return this._group;
3733
3974
  }
3975
+ constructor(panel, group) {
3976
+ super(panel.id);
3977
+ this.panel = panel;
3978
+ this._onDidTitleChange = new Emitter();
3979
+ this.onDidTitleChange = this._onDidTitleChange.event;
3980
+ this._onDidActiveGroupChange = new Emitter();
3981
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3982
+ this._onDidGroupChange = new Emitter();
3983
+ this.onDidGroupChange = this._onDidGroupChange.event;
3984
+ this.disposable = new MutableDisposable();
3985
+ this.initialize(panel);
3986
+ this._group = group;
3987
+ this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
3988
+ }
3734
3989
  setTitle(title) {
3735
- this._onDidTitleChange.fire({ title });
3990
+ this.panel.update({ params: { title } });
3736
3991
  }
3737
3992
  close() {
3738
- if (!this.group) {
3739
- throw new Error(`panel ${this.id} has no group`);
3740
- }
3741
- return this.group.model.closePanel(this.panel);
3993
+ this.group.model.closePanel(this.panel);
3742
3994
  }
3743
3995
  }
3744
3996
 
3745
- class DockviewGroupPanel extends CompositeDisposable {
3746
- constructor(id, accessor, containerApi, group) {
3747
- super();
3748
- this.id = id;
3749
- this.containerApi = containerApi;
3750
- this.mutableDisposable = new MutableDisposable();
3751
- this._title = '';
3752
- this._group = group;
3753
- this.api = new DockviewPanelApiImpl(this, this._group);
3754
- this.addDisposables(this.api.onActiveChange(() => {
3755
- accessor.setActivePanel(this);
3756
- }));
3757
- }
3997
+ class DockviewPanel extends CompositeDisposable {
3758
3998
  get params() {
3759
3999
  return this._params;
3760
4000
  }
@@ -3767,6 +4007,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3767
4007
  get view() {
3768
4008
  return this._view;
3769
4009
  }
4010
+ constructor(id, accessor, containerApi, group) {
4011
+ super();
4012
+ this.id = id;
4013
+ this.containerApi = containerApi;
4014
+ this.mutableDisposable = new MutableDisposable();
4015
+ this._title = '';
4016
+ this._group = group;
4017
+ this.api = new DockviewPanelApiImpl(this, this._group);
4018
+ this.addDisposables(this.api.onActiveChange(() => {
4019
+ accessor.setActivePanel(this);
4020
+ }), this.api.onDidSizeChange((event) => {
4021
+ // forward the resize event to the group since if you want to resize a panel
4022
+ // you are actually just resizing the panels parent which is the group
4023
+ this.group.api.setSize(event);
4024
+ }));
4025
+ }
3770
4026
  init(params) {
3771
4027
  var _a;
3772
4028
  this._params = params.params;
@@ -3849,6 +4105,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3849
4105
  }
3850
4106
 
3851
4107
  class ActionContainer {
4108
+ get element() {
4109
+ return this._element;
4110
+ }
3852
4111
  constructor() {
3853
4112
  this._element = document.createElement('div');
3854
4113
  this._element.className = 'actions-bar';
@@ -3856,9 +4115,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3856
4115
  this._list.className = 'actions-container';
3857
4116
  this._element.appendChild(this._list);
3858
4117
  }
3859
- get element() {
3860
- return this._element;
3861
- }
3862
4118
  add(element) {
3863
4119
  const listItem = document.createElement('li');
3864
4120
  listItem.className = 'action-item';
@@ -3899,6 +4155,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3899
4155
  });
3900
4156
 
3901
4157
  class Watermark extends CompositeDisposable {
4158
+ get id() {
4159
+ return 'watermark';
4160
+ }
3902
4161
  constructor() {
3903
4162
  super();
3904
4163
  this._element = document.createElement('div');
@@ -3926,9 +4185,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3926
4185
  }
3927
4186
  }));
3928
4187
  }
3929
- get id() {
3930
- return 'watermark';
3931
- }
3932
4188
  update(_event) {
3933
4189
  // noop
3934
4190
  }
@@ -3991,6 +4247,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3991
4247
 
3992
4248
  const DEFAULT_TAB_IDENTIFIER = '__default__tab__';
3993
4249
  class DefaultTab extends CompositeDisposable {
4250
+ get element() {
4251
+ return this._element;
4252
+ }
4253
+ get id() {
4254
+ return DEFAULT_TAB_IDENTIFIER;
4255
+ }
3994
4256
  constructor() {
3995
4257
  super();
3996
4258
  this._isPanelVisible = false;
@@ -4023,12 +4285,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4023
4285
  }));
4024
4286
  this.render();
4025
4287
  }
4026
- get element() {
4027
- return this._element;
4028
- }
4029
- get id() {
4030
- return DEFAULT_TAB_IDENTIFIER;
4031
- }
4032
4288
  update(event) {
4033
4289
  this.params = Object.assign(Object.assign({}, this.params), event.params);
4034
4290
  this.render();
@@ -4067,6 +4323,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4067
4323
  }
4068
4324
 
4069
4325
  class BasePanelView extends CompositeDisposable {
4326
+ get element() {
4327
+ return this._element;
4328
+ }
4329
+ get width() {
4330
+ return this._width;
4331
+ }
4332
+ get height() {
4333
+ return this._height;
4334
+ }
4335
+ get params() {
4336
+ var _a;
4337
+ return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
4338
+ }
4070
4339
  constructor(id, component, api) {
4071
4340
  super();
4072
4341
  this.id = id;
@@ -4087,19 +4356,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4087
4356
  this.api._onDidChangeFocus.fire({ isFocused: false });
4088
4357
  }));
4089
4358
  }
4090
- get element() {
4091
- return this._element;
4092
- }
4093
- get width() {
4094
- return this._width;
4095
- }
4096
- get height() {
4097
- return this._height;
4098
- }
4099
- get params() {
4100
- var _a;
4101
- return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
4102
- }
4103
4359
  focus() {
4104
4360
  this.api._onFocusEvent.fire();
4105
4361
  }
@@ -4140,50 +4396,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4140
4396
  }
4141
4397
 
4142
4398
  class GridviewPanel extends BasePanelView {
4143
- constructor(id, component, api = new GridviewPanelApiImpl(id)) {
4144
- super(id, component, api);
4145
- this._evaluatedMinimumWidth = 0;
4146
- this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
4147
- this._evaluatedMinimumHeight = 0;
4148
- this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
4149
- this._minimumWidth = 0;
4150
- this._minimumHeight = 0;
4151
- this._maximumWidth = Number.MAX_SAFE_INTEGER;
4152
- this._maximumHeight = Number.MAX_SAFE_INTEGER;
4153
- this._snap = false;
4154
- this._onDidChange = new Emitter();
4155
- this.onDidChange = this._onDidChange.event;
4156
- this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
4157
- const { isVisible } = event;
4158
- const { accessor } = this._params;
4159
- accessor.setVisible(this, isVisible);
4160
- }), this.api.onActiveChange(() => {
4161
- const { accessor } = this._params;
4162
- accessor.setActive(this);
4163
- }), this.api.onDidConstraintsChangeInternal((event) => {
4164
- if (typeof event.minimumWidth === 'number' ||
4165
- typeof event.minimumWidth === 'function') {
4166
- this._minimumWidth = event.minimumWidth;
4167
- }
4168
- if (typeof event.minimumHeight === 'number' ||
4169
- typeof event.minimumHeight === 'function') {
4170
- this._minimumHeight = event.minimumHeight;
4171
- }
4172
- if (typeof event.maximumWidth === 'number' ||
4173
- typeof event.maximumWidth === 'function') {
4174
- this._maximumWidth = event.maximumWidth;
4175
- }
4176
- if (typeof event.maximumHeight === 'number' ||
4177
- typeof event.maximumHeight === 'function') {
4178
- this._maximumHeight = event.maximumHeight;
4179
- }
4180
- }), this.api.onDidSizeChange((event) => {
4181
- this._onDidChange.fire({
4182
- height: event.height,
4183
- width: event.width,
4184
- });
4185
- }));
4186
- }
4187
4399
  get priority() {
4188
4400
  return this._priority;
4189
4401
  }
@@ -4233,6 +4445,51 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4233
4445
  get isActive() {
4234
4446
  return this.api.isActive;
4235
4447
  }
4448
+ constructor(id, component, api) {
4449
+ super(id, component, api);
4450
+ this._evaluatedMinimumWidth = 0;
4451
+ this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
4452
+ this._evaluatedMinimumHeight = 0;
4453
+ this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
4454
+ this._minimumWidth = 0;
4455
+ this._minimumHeight = 0;
4456
+ this._maximumWidth = Number.MAX_SAFE_INTEGER;
4457
+ this._maximumHeight = Number.MAX_SAFE_INTEGER;
4458
+ this._snap = false;
4459
+ this._onDidChange = new Emitter();
4460
+ this.onDidChange = this._onDidChange.event;
4461
+ this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
4462
+ this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
4463
+ const { isVisible } = event;
4464
+ const { accessor } = this._params;
4465
+ accessor.setVisible(this, isVisible);
4466
+ }), this.api.onActiveChange(() => {
4467
+ const { accessor } = this._params;
4468
+ accessor.setActive(this);
4469
+ }), this.api.onDidConstraintsChangeInternal((event) => {
4470
+ if (typeof event.minimumWidth === 'number' ||
4471
+ typeof event.minimumWidth === 'function') {
4472
+ this._minimumWidth = event.minimumWidth;
4473
+ }
4474
+ if (typeof event.minimumHeight === 'number' ||
4475
+ typeof event.minimumHeight === 'function') {
4476
+ this._minimumHeight = event.minimumHeight;
4477
+ }
4478
+ if (typeof event.maximumWidth === 'number' ||
4479
+ typeof event.maximumWidth === 'function') {
4480
+ this._maximumWidth = event.maximumWidth;
4481
+ }
4482
+ if (typeof event.maximumHeight === 'number' ||
4483
+ typeof event.maximumHeight === 'function') {
4484
+ this._maximumHeight = event.maximumHeight;
4485
+ }
4486
+ }), this.api.onDidSizeChange((event) => {
4487
+ this._onDidChange.fire({
4488
+ height: event.height,
4489
+ width: event.width,
4490
+ });
4491
+ }));
4492
+ }
4236
4493
  setVisible(isVisible) {
4237
4494
  this.api._onDidVisibilityChange.fire({ isVisible });
4238
4495
  }
@@ -4278,10 +4535,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4278
4535
  class GroupviewApi extends GridviewPanelApiImpl {
4279
4536
  }
4280
4537
  class GroupPanel extends GridviewPanel {
4281
- constructor(accessor, id, options) {
4282
- super(id, 'groupview_default', new GroupviewApi(id));
4283
- this._model = new Groupview(this.element, accessor, id, options, this);
4284
- }
4285
4538
  get panels() {
4286
4539
  return this._model.panels;
4287
4540
  }
@@ -4315,6 +4568,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4315
4568
  get header() {
4316
4569
  return this._model.header;
4317
4570
  }
4571
+ constructor(accessor, id, options) {
4572
+ super(id, 'groupview_default', new GroupviewApi(id));
4573
+ this._model = new Groupview(this.element, accessor, id, options, this);
4574
+ }
4318
4575
  initialize() {
4319
4576
  this._model.initialize();
4320
4577
  }
@@ -4335,17 +4592,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4335
4592
  }
4336
4593
 
4337
4594
  class DefaultGroupPanelView {
4338
- constructor(renderers) {
4339
- var _a;
4340
- this._content = renderers.content;
4341
- this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
4342
- }
4343
4595
  get content() {
4344
4596
  return this._content;
4345
4597
  }
4346
4598
  get tab() {
4347
4599
  return this._tab;
4348
4600
  }
4601
+ constructor(renderers) {
4602
+ var _a;
4603
+ this._content = renderers.content;
4604
+ this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
4605
+ }
4349
4606
  init(params) {
4350
4607
  this.content.init(Object.assign(Object.assign({}, params), { tab: this.tab }));
4351
4608
  this.tab.init(params);
@@ -4367,25 +4624,60 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4367
4624
  if (tab && Object.keys(tab).length === 0) {
4368
4625
  tab = undefined;
4369
4626
  }
4370
- return {
4371
- content: this.content.toJSON(),
4372
- tab,
4373
- };
4627
+ return {
4628
+ content: this.content.toJSON(),
4629
+ tab,
4630
+ };
4631
+ }
4632
+ dispose() {
4633
+ this.content.dispose();
4634
+ this.tab.dispose();
4635
+ }
4636
+ }
4637
+
4638
+ class DockviewComponent extends BaseGrid {
4639
+ get orientation() {
4640
+ return this.gridview.orientation;
4641
+ }
4642
+ get totalPanels() {
4643
+ return this.panels.length;
4644
+ }
4645
+ get panels() {
4646
+ return this.groups.flatMap((group) => group.panels);
4647
+ }
4648
+ get deserializer() {
4649
+ return this._deserializer;
4650
+ }
4651
+ set deserializer(value) {
4652
+ this._deserializer = value;
4653
+ }
4654
+ get options() {
4655
+ return this._options;
4656
+ }
4657
+ get activePanel() {
4658
+ const activeGroup = this.activeGroup;
4659
+ if (!activeGroup) {
4660
+ return undefined;
4661
+ }
4662
+ return activeGroup.activePanel;
4374
4663
  }
4375
- dispose() {
4376
- this.content.dispose();
4377
- this.tab.dispose();
4664
+ set tabHeight(height) {
4665
+ this.options.tabHeight = height;
4666
+ this._groups.forEach((value) => {
4667
+ value.value.model.header.height = height;
4668
+ });
4669
+ }
4670
+ get tabHeight() {
4671
+ return this.options.tabHeight;
4378
4672
  }
4379
- }
4380
-
4381
- const nextGroupId = sequentialNumberGenerator();
4382
- class DockviewComponent extends BaseGrid {
4383
4673
  constructor(element, options) {
4384
4674
  super(element, {
4385
4675
  proportionalLayout: true,
4386
4676
  orientation: options.orientation || exports.Orientation.HORIZONTAL,
4387
4677
  styles: options.styles,
4388
4678
  });
4679
+ this.nextGroupId = sequentialNumberGenerator();
4680
+ this.watermark = null;
4389
4681
  this._onDidDrop = new Emitter();
4390
4682
  this.onDidDrop = this._onDidDrop.event;
4391
4683
  this._onDidRemovePanel = new Emitter();
@@ -4396,7 +4688,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4396
4688
  this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
4397
4689
  this._onDidActivePanelChange = new Emitter();
4398
4690
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
4399
- this.addDisposables(this._onDidDrop, exports.Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
4691
+ this.element.classList.add('dv-dockview');
4692
+ this.addDisposables(this._onDidDrop, exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
4693
+ this.updateWatermark();
4694
+ }), exports.Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
4400
4695
  this._bufferOnDidLayoutChange.fire();
4401
4696
  }));
4402
4697
  this._options = options;
@@ -4416,38 +4711,72 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4416
4711
  !this.options.watermarkFrameworkComponent) {
4417
4712
  this.options.watermarkComponent = Watermark;
4418
4713
  }
4714
+ const dropTarget = new Droptarget(this.element, {
4715
+ canDisplayOverlay: (event, position) => {
4716
+ const data = getPanelData();
4717
+ if (data) {
4718
+ if (data.viewId !== this.id) {
4719
+ return false;
4720
+ }
4721
+ return true;
4722
+ }
4723
+ if (this.options.showDndOverlay) {
4724
+ return this.options.showDndOverlay({
4725
+ nativeEvent: event,
4726
+ position: position,
4727
+ target: exports.DockviewDropTargets.Edge,
4728
+ getData: getPanelData,
4729
+ });
4730
+ }
4731
+ return false;
4732
+ },
4733
+ acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
4734
+ overlayModel: {
4735
+ activationSize: { type: 'pixels', value: 10 },
4736
+ size: { type: 'pixels', value: 20 },
4737
+ },
4738
+ });
4739
+ this.addDisposables(dropTarget, dropTarget.onDrop((event) => {
4740
+ const data = getPanelData();
4741
+ if (data) {
4742
+ this.moveGroupOrPanel(this.orthogonalize(event.position), data.groupId, data.panelId || undefined, 'center');
4743
+ }
4744
+ else {
4745
+ this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api, group: null, getData: getPanelData }));
4746
+ }
4747
+ }));
4419
4748
  this._api = new DockviewApi(this);
4749
+ this.updateWatermark();
4420
4750
  }
4421
- get totalPanels() {
4422
- return this.panels.length;
4423
- }
4424
- get panels() {
4425
- return this.groups.flatMap((group) => group.panels);
4426
- }
4427
- get deserializer() {
4428
- return this._deserializer;
4429
- }
4430
- set deserializer(value) {
4431
- this._deserializer = value;
4432
- }
4433
- get options() {
4434
- return this._options;
4435
- }
4436
- get activePanel() {
4437
- const activeGroup = this.activeGroup;
4438
- if (!activeGroup) {
4439
- return undefined;
4751
+ orthogonalize(position) {
4752
+ switch (position) {
4753
+ case 'top':
4754
+ case 'bottom':
4755
+ if (this.gridview.orientation === exports.Orientation.HORIZONTAL) {
4756
+ // we need to add to a vertical splitview but the current root is a horizontal splitview.
4757
+ // insert a vertical splitview at the root level and add the existing view as a child
4758
+ this.gridview.insertOrthogonalSplitviewAtRoot();
4759
+ }
4760
+ break;
4761
+ case 'left':
4762
+ case 'right':
4763
+ if (this.gridview.orientation === exports.Orientation.VERTICAL) {
4764
+ // we need to add to a horizontal splitview but the current root is a vertical splitview.
4765
+ // insert a horiziontal splitview at the root level and add the existing view as a child
4766
+ this.gridview.insertOrthogonalSplitviewAtRoot();
4767
+ }
4768
+ break;
4769
+ }
4770
+ switch (position) {
4771
+ case 'top':
4772
+ case 'left':
4773
+ return this.createGroupAtLocation([0]); // insert into first position
4774
+ case 'bottom':
4775
+ case 'right':
4776
+ return this.createGroupAtLocation([this.gridview.length]); // insert into last position
4777
+ default:
4778
+ throw new Error(`unsupported position ${position}`);
4440
4779
  }
4441
- return activeGroup.activePanel;
4442
- }
4443
- set tabHeight(height) {
4444
- this.options.tabHeight = height;
4445
- this._groups.forEach((value) => {
4446
- value.value.model.header.height = height;
4447
- });
4448
- }
4449
- get tabHeight() {
4450
- return this.options.tabHeight;
4451
4780
  }
4452
4781
  updateOptions(options) {
4453
4782
  const hasOrientationChanged = typeof options.orientation === 'string' &&
@@ -4497,8 +4826,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4497
4826
  options.group = this.activeGroup;
4498
4827
  }
4499
4828
  if (options.includePanel && options.group) {
4500
- if (options.group.activePanel !==
4501
- options.group.panels[0]) {
4829
+ if (options.group.activePanel !== options.group.panels[0]) {
4502
4830
  options.group.model.moveToPrevious({ suppressRoll: true });
4503
4831
  return;
4504
4832
  }
@@ -4531,14 +4859,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4531
4859
  fromJSON(data) {
4532
4860
  this.clear();
4533
4861
  if (!this.deserializer) {
4534
- throw new Error('invalid deserializer');
4862
+ throw new Error('no deserializer provided');
4535
4863
  }
4536
4864
  const { grid, panels, options, activeGroup } = data;
4537
4865
  if (typeof (options === null || options === void 0 ? void 0 : options.tabHeight) === 'number') {
4538
4866
  this.tabHeight = options.tabHeight;
4539
4867
  }
4540
- if (!this.deserializer) {
4541
- throw new Error('no deserializer provided');
4868
+ if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
4869
+ throw new Error('root must be of type branch');
4542
4870
  }
4543
4871
  this.gridview.deserialize(grid, {
4544
4872
  fromJSON: (node) => {
@@ -4551,19 +4879,20 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4551
4879
  this._onDidAddGroup.fire(group);
4552
4880
  for (const child of views) {
4553
4881
  const panel = this.deserializer.fromJSON(panels[child], group);
4554
- const isActive = typeof activeView === 'string' && activeView === panel.id;
4882
+ const isActive = typeof activeView === 'string' &&
4883
+ activeView === panel.id;
4555
4884
  group.model.openPanel(panel, {
4556
4885
  skipSetPanelActive: !isActive,
4557
- skipSetGroupActive: true
4886
+ skipSetGroupActive: true,
4558
4887
  });
4559
4888
  }
4560
4889
  if (!group.activePanel && group.panels.length > 0) {
4561
4890
  group.model.openPanel(group.panels[group.panels.length - 1], {
4562
- skipSetGroupActive: true
4891
+ skipSetGroupActive: true,
4563
4892
  });
4564
4893
  }
4565
4894
  return group;
4566
- }
4895
+ },
4567
4896
  });
4568
4897
  if (typeof activeGroup === 'string') {
4569
4898
  const panel = this.getPanel(activeGroup);
@@ -4602,12 +4931,31 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4602
4931
  throw new Error(`panel with id ${options.id} already exists`);
4603
4932
  }
4604
4933
  let referenceGroup;
4605
- if ((_a = options.position) === null || _a === void 0 ? void 0 : _a.referencePanel) {
4606
- const referencePanel = this.getGroupPanel(options.position.referencePanel);
4607
- if (!referencePanel) {
4608
- throw new Error(`referencePanel ${options.position.referencePanel} does not exist`);
4934
+ if (options.position) {
4935
+ if (isPanelOptionsWithPanel(options.position)) {
4936
+ const referencePanel = typeof options.position.referencePanel === 'string'
4937
+ ? this.getGroupPanel(options.position.referencePanel)
4938
+ : options.position.referencePanel;
4939
+ if (!referencePanel) {
4940
+ throw new Error(`referencePanel ${options.position.referencePanel} does not exist`);
4941
+ }
4942
+ referenceGroup = this.findGroup(referencePanel);
4943
+ }
4944
+ else if (isPanelOptionsWithGroup(options.position)) {
4945
+ referenceGroup =
4946
+ typeof options.position.referenceGroup === 'string'
4947
+ ? (_a = this._groups.get(options.position.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
4948
+ : options.position.referenceGroup;
4949
+ if (!referenceGroup) {
4950
+ throw new Error(`referencePanel ${options.position.referenceGroup} does not exist`);
4951
+ }
4952
+ }
4953
+ else {
4954
+ const group = this.orthogonalize(directionToPosition(options.position.direction));
4955
+ const panel = this.createPanel(options, group);
4956
+ group.model.openPanel(panel);
4957
+ return panel;
4609
4958
  }
4610
- referenceGroup = this.findGroup(referencePanel);
4611
4959
  }
4612
4960
  else {
4613
4961
  referenceGroup = this.activeGroup;
@@ -4615,7 +4963,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4615
4963
  let panel;
4616
4964
  if (referenceGroup) {
4617
4965
  const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
4618
- if (target === exports.Position.Center) {
4966
+ if (target === 'center') {
4619
4967
  panel = this.createPanel(options, referenceGroup);
4620
4968
  referenceGroup.model.openPanel(panel);
4621
4969
  }
@@ -4644,10 +4992,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4644
4992
  }
4645
4993
  group.model.removePanel(panel);
4646
4994
  panel.dispose();
4647
- const retainGroupForWatermark = this.size === 1;
4648
- if (!retainGroupForWatermark &&
4649
- group.size === 0 &&
4650
- options.removeEmptyGroup) {
4995
+ if (group.size === 0 && options.removeEmptyGroup) {
4651
4996
  this.removeGroup(group);
4652
4997
  }
4653
4998
  }
@@ -4659,24 +5004,67 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4659
5004
  ? { 'watermark-name': this.options.watermarkFrameworkComponent }
4660
5005
  : {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
4661
5006
  }
4662
- addEmptyGroup(options) {
5007
+ updateWatermark() {
5008
+ if (this.groups.length === 0) {
5009
+ if (!this.watermark) {
5010
+ this.watermark = this.createWatermarkComponent();
5011
+ this.watermark.init({
5012
+ containerApi: new DockviewApi(this),
5013
+ params: {},
5014
+ title: '',
5015
+ api: null,
5016
+ });
5017
+ const watermarkContainer = document.createElement('div');
5018
+ watermarkContainer.className = 'dv-watermark-container';
5019
+ watermarkContainer.appendChild(this.watermark.element);
5020
+ this.element.appendChild(watermarkContainer);
5021
+ }
5022
+ }
5023
+ else if (this.watermark) {
5024
+ this.watermark.element.parentElement.remove();
5025
+ this.watermark.dispose();
5026
+ this.watermark = null;
5027
+ }
5028
+ }
5029
+ addGroup(options) {
5030
+ var _a;
4663
5031
  const group = this.createGroup();
4664
5032
  if (options) {
4665
- const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
4666
- if (!referencePanel) {
4667
- throw new Error(`reference panel ${options.referencePanel} does not exist`);
5033
+ let referenceGroup;
5034
+ if (isGroupOptionsWithPanel(options)) {
5035
+ const referencePanel = typeof options.referencePanel === 'string'
5036
+ ? this.panels.find((panel) => panel.id === options.referencePanel)
5037
+ : options.referencePanel;
5038
+ if (!referencePanel) {
5039
+ throw new Error(`reference panel ${options.referencePanel} does not exist`);
5040
+ }
5041
+ referenceGroup = this.findGroup(referencePanel);
5042
+ if (!referenceGroup) {
5043
+ throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
5044
+ }
4668
5045
  }
4669
- const referenceGroup = this.findGroup(referencePanel);
4670
- if (!referenceGroup) {
4671
- throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
5046
+ else if (isGroupOptionsWithGroup(options)) {
5047
+ referenceGroup =
5048
+ typeof options.referenceGroup === 'string'
5049
+ ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
5050
+ : options.referenceGroup;
5051
+ if (!referenceGroup) {
5052
+ throw new Error(`reference group ${options.referenceGroup} does not exist`);
5053
+ }
5054
+ }
5055
+ else {
5056
+ const group = this.orthogonalize(directionToPosition(options.direction));
5057
+ return group;
4672
5058
  }
4673
5059
  const target = toTarget(options.direction || 'within');
4674
5060
  const location = getGridLocation(referenceGroup.element);
4675
5061
  const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
4676
5062
  this.doAddGroup(group, relativeLocation);
5063
+ return group;
4677
5064
  }
4678
5065
  else {
4679
5066
  this.doAddGroup(group);
5067
+ return group;
4680
5068
  }
4681
5069
  }
4682
5070
  removeGroup(group, skipActive = false) {
@@ -4694,7 +5082,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4694
5082
  const sourceGroup = groupId
4695
5083
  ? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
4696
5084
  : undefined;
4697
- if (!target || target === exports.Position.Center) {
5085
+ if (itemId === undefined) {
5086
+ if (sourceGroup) {
5087
+ this.moveGroup(sourceGroup, referenceGroup, target);
5088
+ }
5089
+ return;
5090
+ }
5091
+ if (!target || target === 'center') {
4698
5092
  const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
4699
5093
  this.panels.find((panel) => panel.id === itemId);
4700
5094
  if (!groupItem) {
@@ -4742,6 +5136,28 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4742
5136
  }
4743
5137
  }
4744
5138
  }
5139
+ moveGroup(sourceGroup, referenceGroup, target) {
5140
+ if (sourceGroup) {
5141
+ if (!target || target === 'center') {
5142
+ const activePanel = sourceGroup.activePanel;
5143
+ const panels = [...sourceGroup.panels].map((p) => sourceGroup.model.removePanel(p.id));
5144
+ if ((sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.size) === 0) {
5145
+ this.doRemoveGroup(sourceGroup);
5146
+ }
5147
+ for (const panel of panels) {
5148
+ referenceGroup.model.openPanel(panel, {
5149
+ skipSetPanelActive: panel !== activePanel,
5150
+ });
5151
+ }
5152
+ }
5153
+ else {
5154
+ this.gridview.removeView(getGridLocation(sourceGroup.element));
5155
+ const referenceLocation = getGridLocation(referenceGroup.element);
5156
+ const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
5157
+ this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
5158
+ }
5159
+ }
5160
+ }
4745
5161
  doSetGroupActive(group, skipFocus) {
4746
5162
  var _a, _b;
4747
5163
  const isGroupAlreadyFocused = this._activeGroup === group;
@@ -4763,9 +5179,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4763
5179
  id = undefined;
4764
5180
  }
4765
5181
  if (!id) {
4766
- id = nextGroupId.next();
5182
+ id = this.nextGroupId.next();
4767
5183
  while (this._groups.has(id)) {
4768
- id = nextGroupId.next();
5184
+ id = this.nextGroupId.next();
4769
5185
  }
4770
5186
  }
4771
5187
  const view = new GroupPanel(this, id, options);
@@ -4798,7 +5214,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4798
5214
  content: this.createContentComponent(options.id, options.component),
4799
5215
  tab: this.createTabComponent(options.id, options.tabComponent || this.options.defaultTabComponent),
4800
5216
  });
4801
- const panel = new DockviewGroupPanel(options.id, this, this._api, group);
5217
+ const panel = new DockviewPanel(options.id, this, this._api, group);
4802
5218
  panel.init({
4803
5219
  view,
4804
5220
  title: options.title || options.id,
@@ -4833,6 +5249,21 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4833
5249
  }
4834
5250
 
4835
5251
  class GridviewComponent extends BaseGrid {
5252
+ get orientation() {
5253
+ return this.gridview.orientation;
5254
+ }
5255
+ set orientation(value) {
5256
+ this.gridview.orientation = value;
5257
+ }
5258
+ get options() {
5259
+ return this._options;
5260
+ }
5261
+ get deserializer() {
5262
+ return this._deserializer;
5263
+ }
5264
+ set deserializer(value) {
5265
+ this._deserializer = value;
5266
+ }
4836
5267
  constructor(element, options) {
4837
5268
  super(element, {
4838
5269
  proportionalLayout: options.proportionalLayout,
@@ -4849,21 +5280,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4849
5280
  this.options.frameworkComponents = {};
4850
5281
  }
4851
5282
  }
4852
- get orientation() {
4853
- return this.gridview.orientation;
4854
- }
4855
- set orientation(value) {
4856
- this.gridview.orientation = value;
4857
- }
4858
- get options() {
4859
- return this._options;
4860
- }
4861
- get deserializer() {
4862
- return this._deserializer;
4863
- }
4864
- set deserializer(value) {
4865
- this._deserializer = value;
4866
- }
4867
5283
  updateOptions(options) {
4868
5284
  const hasOrientationChanged = typeof options.orientation === 'string' &&
4869
5285
  this.gridview.orientation !== options.orientation;
@@ -4961,7 +5377,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4961
5377
  throw new Error(`reference group ${options.reference} does not exist`);
4962
5378
  }
4963
5379
  const target = toTarget(options.direction);
4964
- if (target === exports.Position.Center) {
5380
+ if (target === 'center') {
4965
5381
  throw new Error(`${target} not supported as an option`);
4966
5382
  }
4967
5383
  else {
@@ -4979,7 +5395,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4979
5395
  throw new Error(`reference group ${options.position.referencePanel} does not exist`);
4980
5396
  }
4981
5397
  const target = toTarget(options.position.direction);
4982
- if (target === exports.Position.Center) {
5398
+ if (target === 'center') {
4983
5399
  throw new Error(`${target} not supported as an option`);
4984
5400
  }
4985
5401
  else {
@@ -5068,29 +5484,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5068
5484
  * A high-level implementation of splitview that works using 'panels'
5069
5485
  */
5070
5486
  class SplitviewComponent extends CompositeDisposable {
5071
- constructor(element, options) {
5072
- super();
5073
- this.element = element;
5074
- this._disposable = new MutableDisposable();
5075
- this._panels = new Map();
5076
- this._onDidLayoutfromJSON = new Emitter();
5077
- this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
5078
- this._onDidAddView = new Emitter();
5079
- this.onDidAddView = this._onDidAddView.event;
5080
- this._onDidRemoveView = new Emitter();
5081
- this.onDidRemoveView = this._onDidRemoveView.event;
5082
- this._onDidLayoutChange = new Emitter();
5083
- this.onDidLayoutChange = this._onDidLayoutChange.event;
5084
- this._options = options;
5085
- if (!options.components) {
5086
- options.components = {};
5087
- }
5088
- if (!options.frameworkComponents) {
5089
- options.frameworkComponents = {};
5090
- }
5091
- this.splitview = new Splitview(this.element, options);
5092
- this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
5093
- }
5094
5487
  get panels() {
5095
5488
  return this.splitview.getViews();
5096
5489
  }
@@ -5128,6 +5521,29 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5128
5521
  ? this.splitview.size
5129
5522
  : this.splitview.orthogonalSize;
5130
5523
  }
5524
+ constructor(element, options) {
5525
+ super();
5526
+ this.element = element;
5527
+ this._disposable = new MutableDisposable();
5528
+ this._panels = new Map();
5529
+ this._onDidLayoutfromJSON = new Emitter();
5530
+ this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
5531
+ this._onDidAddView = new Emitter();
5532
+ this.onDidAddView = this._onDidAddView.event;
5533
+ this._onDidRemoveView = new Emitter();
5534
+ this.onDidRemoveView = this._onDidRemoveView.event;
5535
+ this._onDidLayoutChange = new Emitter();
5536
+ this.onDidLayoutChange = this._onDidLayoutChange.event;
5537
+ this._options = options;
5538
+ if (!options.components) {
5539
+ options.components = {};
5540
+ }
5541
+ if (!options.frameworkComponents) {
5542
+ options.frameworkComponents = {};
5543
+ }
5544
+ this.splitview = new Splitview(this.element, options);
5545
+ this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
5546
+ }
5131
5547
  updateOptions(options) {
5132
5548
  const hasOrientationChanged = typeof options.orientation === 'string' &&
5133
5549
  this.options.orientation !== options.orientation;
@@ -5329,38 +5745,85 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5329
5745
  setConstraints(value) {
5330
5746
  this._onDidConstraintsChangeInternal.fire(value);
5331
5747
  }
5332
- setSize(event) {
5333
- this._onDidSizeChange.fire(event);
5748
+ setSize(event) {
5749
+ this._onDidSizeChange.fire(event);
5750
+ }
5751
+ }
5752
+
5753
+ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
5754
+ set pane(pane) {
5755
+ this._pane = pane;
5756
+ }
5757
+ constructor(id) {
5758
+ super(id);
5759
+ this._onDidExpansionChange = new Emitter({
5760
+ replay: true,
5761
+ });
5762
+ this.onDidExpansionChange = this._onDidExpansionChange.event;
5763
+ this._onMouseEnter = new Emitter({});
5764
+ this.onMouseEnter = this._onMouseEnter.event;
5765
+ this._onMouseLeave = new Emitter({});
5766
+ this.onMouseLeave = this._onMouseLeave.event;
5767
+ this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
5768
+ }
5769
+ setExpanded(isExpanded) {
5770
+ var _a;
5771
+ (_a = this._pane) === null || _a === void 0 ? void 0 : _a.setExpanded(isExpanded);
5772
+ }
5773
+ get isExpanded() {
5774
+ var _a;
5775
+ return !!((_a = this._pane) === null || _a === void 0 ? void 0 : _a.isExpanded());
5776
+ }
5777
+ }
5778
+
5779
+ class PaneviewPanel extends BasePanelView {
5780
+ set orientation(value) {
5781
+ this._orientation = value;
5782
+ }
5783
+ get orientation() {
5784
+ return this._orientation;
5785
+ }
5786
+ get minimumSize() {
5787
+ const headerSize = this.headerSize;
5788
+ const expanded = this.isExpanded();
5789
+ const minimumBodySize = expanded ? this._minimumBodySize : 0;
5790
+ return headerSize + minimumBodySize;
5791
+ }
5792
+ get maximumSize() {
5793
+ const headerSize = this.headerSize;
5794
+ const expanded = this.isExpanded();
5795
+ const maximumBodySize = expanded ? this._maximumBodySize : 0;
5796
+ return headerSize + maximumBodySize;
5797
+ }
5798
+ get size() {
5799
+ return this._size;
5800
+ }
5801
+ get orthogonalSize() {
5802
+ return this._orthogonalSize;
5803
+ }
5804
+ set orthogonalSize(size) {
5805
+ this._orthogonalSize = size;
5806
+ }
5807
+ get minimumBodySize() {
5808
+ return this._minimumBodySize;
5809
+ }
5810
+ set minimumBodySize(value) {
5811
+ this._minimumBodySize = typeof value === 'number' ? value : 0;
5334
5812
  }
5335
- }
5336
-
5337
- class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
5338
- constructor(id) {
5339
- super(id);
5340
- this._onDidExpansionChange = new Emitter({
5341
- replay: true,
5342
- });
5343
- this.onDidExpansionChange = this._onDidExpansionChange.event;
5344
- this._onMouseEnter = new Emitter({});
5345
- this.onMouseEnter = this._onMouseEnter.event;
5346
- this._onMouseLeave = new Emitter({});
5347
- this.onMouseLeave = this._onMouseLeave.event;
5348
- this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
5813
+ get maximumBodySize() {
5814
+ return this._maximumBodySize;
5349
5815
  }
5350
- set pane(pane) {
5351
- this._pane = pane;
5816
+ set maximumBodySize(value) {
5817
+ this._maximumBodySize =
5818
+ typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
5352
5819
  }
5353
- setExpanded(isExpanded) {
5354
- var _a;
5355
- (_a = this._pane) === null || _a === void 0 ? void 0 : _a.setExpanded(isExpanded);
5820
+ get headerVisible() {
5821
+ return this._headerVisible;
5356
5822
  }
5357
- get isExpanded() {
5358
- var _a;
5359
- return !!((_a = this._pane) === null || _a === void 0 ? void 0 : _a.isExpanded());
5823
+ set headerVisible(value) {
5824
+ this._headerVisible = value;
5825
+ this.header.style.display = value ? '' : 'none';
5360
5826
  }
5361
- }
5362
-
5363
- class PaneviewPanel extends BasePanelView {
5364
5827
  constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
5365
5828
  super(id, component, new PaneviewPanelApiImpl(id));
5366
5829
  this.headerComponent = headerComponent;
@@ -5376,6 +5839,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5376
5839
  this._isExpanded = false;
5377
5840
  this.expandedSize = 0;
5378
5841
  this.api.pane = this; // TODO cannot use 'this' before 'super'
5842
+ this.api.initialize(this);
5379
5843
  this._isExpanded = isExpanded;
5380
5844
  this._headerVisible = isHeaderVisible;
5381
5845
  this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
@@ -5405,53 +5869,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5405
5869
  }));
5406
5870
  this.renderOnce();
5407
5871
  }
5408
- set orientation(value) {
5409
- this._orientation = value;
5410
- }
5411
- get orientation() {
5412
- return this._orientation;
5413
- }
5414
- get minimumSize() {
5415
- const headerSize = this.headerSize;
5416
- const expanded = this.isExpanded();
5417
- const minimumBodySize = expanded ? this._minimumBodySize : 0;
5418
- return headerSize + minimumBodySize;
5419
- }
5420
- get maximumSize() {
5421
- const headerSize = this.headerSize;
5422
- const expanded = this.isExpanded();
5423
- const maximumBodySize = expanded ? this._maximumBodySize : 0;
5424
- return headerSize + maximumBodySize;
5425
- }
5426
- get size() {
5427
- return this._size;
5428
- }
5429
- get orthogonalSize() {
5430
- return this._orthogonalSize;
5431
- }
5432
- set orthogonalSize(size) {
5433
- this._orthogonalSize = size;
5434
- }
5435
- get minimumBodySize() {
5436
- return this._minimumBodySize;
5437
- }
5438
- set minimumBodySize(value) {
5439
- this._minimumBodySize = typeof value === 'number' ? value : 0;
5440
- }
5441
- get maximumBodySize() {
5442
- return this._maximumBodySize;
5443
- }
5444
- set maximumBodySize(value) {
5445
- this._maximumBodySize =
5446
- typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
5447
- }
5448
- get headerVisible() {
5449
- return this._headerVisible;
5450
- }
5451
- set headerVisible(value) {
5452
- this._headerVisible = value;
5453
- this.header.style.display = value ? '' : 'none';
5454
- }
5455
5872
  setVisible(isVisible) {
5456
5873
  this.api._onDidVisibilityChange.fire({ isVisible });
5457
5874
  }
@@ -5575,7 +5992,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5575
5992
  }
5576
5993
  })(this.header);
5577
5994
  this.target = new Droptarget(this.element, {
5578
- validOverlays: 'vertical',
5995
+ acceptedTargetZones: ['top', 'bottom'],
5996
+ overlayModel: {
5997
+ activationSize: { type: 'percentage', value: 50 },
5998
+ },
5579
5999
  canDisplayOverlay: (event) => {
5580
6000
  const data = getPaneData();
5581
6001
  if (data) {
@@ -5618,12 +6038,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5618
6038
  const allPanels = containerApi.panels;
5619
6039
  const fromIndex = allPanels.indexOf(existingPanel);
5620
6040
  let toIndex = containerApi.panels.indexOf(this);
5621
- if (event.position === exports.Position.Left ||
5622
- event.position === exports.Position.Top) {
6041
+ if (event.position === 'left' || event.position === 'top') {
5623
6042
  toIndex = Math.max(0, toIndex - 1);
5624
6043
  }
5625
- if (event.position === exports.Position.Right ||
5626
- event.position === exports.Position.Bottom) {
6044
+ if (event.position === 'right' || event.position === 'bottom') {
5627
6045
  if (fromIndex > toIndex) {
5628
6046
  toIndex++;
5629
6047
  }
@@ -5634,6 +6052,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5634
6052
  }
5635
6053
 
5636
6054
  class DefaultHeader extends CompositeDisposable {
6055
+ get element() {
6056
+ return this._element;
6057
+ }
5637
6058
  constructor() {
5638
6059
  super();
5639
6060
  this._expandedIcon = createExpandMoreButton();
@@ -5652,9 +6073,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5652
6073
  (_a = this.apiRef.api) === null || _a === void 0 ? void 0 : _a.setExpanded(!this.apiRef.api.isExpanded);
5653
6074
  }));
5654
6075
  }
5655
- get element() {
5656
- return this._element;
5657
- }
5658
6076
  init(params) {
5659
6077
  this.apiRef.api = params.api;
5660
6078
  this._content.textContent = params.title;
@@ -5707,36 +6125,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5707
6125
  }
5708
6126
  }
5709
6127
  class PaneviewComponent extends CompositeDisposable {
5710
- constructor(element, options) {
5711
- super();
5712
- this.element = element;
5713
- this._id = nextLayoutId.next();
5714
- this._disposable = new MutableDisposable();
5715
- this._viewDisposables = new Map();
5716
- this._onDidLayoutfromJSON = new Emitter();
5717
- this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
5718
- this._onDidLayoutChange = new Emitter();
5719
- this.onDidLayoutChange = this._onDidLayoutChange.event;
5720
- this._onDidDrop = new Emitter();
5721
- this.onDidDrop = this._onDidDrop.event;
5722
- this._onDidAddView = new Emitter();
5723
- this.onDidAddView = this._onDidAddView.event;
5724
- this._onDidRemoveView = new Emitter();
5725
- this.onDidRemoveView = this._onDidRemoveView.event;
5726
- this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
5727
- this._options = options;
5728
- if (!options.components) {
5729
- options.components = {};
5730
- }
5731
- if (!options.frameworkComponents) {
5732
- options.frameworkComponents = {};
5733
- }
5734
- this.paneview = new Paneview(this.element, {
5735
- // only allow paneview in the vertical orientation for now
5736
- orientation: exports.Orientation.VERTICAL,
5737
- });
5738
- this.addDisposables(this._disposable);
5739
- }
5740
6128
  get id() {
5741
6129
  return this._id;
5742
6130
  }
@@ -5771,6 +6159,36 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5771
6159
  get options() {
5772
6160
  return this._options;
5773
6161
  }
6162
+ constructor(element, options) {
6163
+ super();
6164
+ this.element = element;
6165
+ this._id = nextLayoutId.next();
6166
+ this._disposable = new MutableDisposable();
6167
+ this._viewDisposables = new Map();
6168
+ this._onDidLayoutfromJSON = new Emitter();
6169
+ this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
6170
+ this._onDidLayoutChange = new Emitter();
6171
+ this.onDidLayoutChange = this._onDidLayoutChange.event;
6172
+ this._onDidDrop = new Emitter();
6173
+ this.onDidDrop = this._onDidDrop.event;
6174
+ this._onDidAddView = new Emitter();
6175
+ this.onDidAddView = this._onDidAddView.event;
6176
+ this._onDidRemoveView = new Emitter();
6177
+ this.onDidRemoveView = this._onDidRemoveView.event;
6178
+ this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
6179
+ this._options = options;
6180
+ if (!options.components) {
6181
+ options.components = {};
6182
+ }
6183
+ if (!options.frameworkComponents) {
6184
+ options.frameworkComponents = {};
6185
+ }
6186
+ this.paneview = new Paneview(this.element, {
6187
+ // only allow paneview in the vertical orientation for now
6188
+ orientation: exports.Orientation.VERTICAL,
6189
+ });
6190
+ this.addDisposables(this._disposable);
6191
+ }
5774
6192
  focus() {
5775
6193
  //
5776
6194
  }
@@ -5956,36 +6374,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5956
6374
  }
5957
6375
 
5958
6376
  class SplitviewPanel extends BasePanelView {
5959
- constructor(id, componentName) {
5960
- super(id, componentName, new SplitviewPanelApiImpl(id));
5961
- this._evaluatedMinimumSize = 0;
5962
- this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
5963
- this._minimumSize = 0;
5964
- this._maximumSize = Number.POSITIVE_INFINITY;
5965
- this._snap = false;
5966
- this._onDidChange = new Emitter();
5967
- this.onDidChange = this._onDidChange.event;
5968
- this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
5969
- const { isVisible } = event;
5970
- const { accessor } = this._params;
5971
- accessor.setVisible(this, isVisible);
5972
- }), this.api.onActiveChange(() => {
5973
- const { accessor } = this._params;
5974
- accessor.setActive(this);
5975
- }), this.api.onDidConstraintsChangeInternal((event) => {
5976
- if (typeof event.minimumSize === 'number' ||
5977
- typeof event.minimumSize === 'function') {
5978
- this._minimumSize = event.minimumSize;
5979
- }
5980
- if (typeof event.maximumSize === 'number' ||
5981
- typeof event.maximumSize === 'function') {
5982
- this._maximumSize = event.maximumSize;
5983
- }
5984
- this.updateConstraints();
5985
- }), this.api.onDidSizeChange((event) => {
5986
- this._onDidChange.fire({ size: event.size });
5987
- }));
5988
- }
5989
6377
  get priority() {
5990
6378
  return this._priority;
5991
6379
  }
@@ -6018,6 +6406,37 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6018
6406
  get snap() {
6019
6407
  return this._snap;
6020
6408
  }
6409
+ constructor(id, componentName) {
6410
+ super(id, componentName, new SplitviewPanelApiImpl(id));
6411
+ this._evaluatedMinimumSize = 0;
6412
+ this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
6413
+ this._minimumSize = 0;
6414
+ this._maximumSize = Number.POSITIVE_INFINITY;
6415
+ this._snap = false;
6416
+ this._onDidChange = new Emitter();
6417
+ this.onDidChange = this._onDidChange.event;
6418
+ this.api.initialize(this);
6419
+ this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
6420
+ const { isVisible } = event;
6421
+ const { accessor } = this._params;
6422
+ accessor.setVisible(this, isVisible);
6423
+ }), this.api.onActiveChange(() => {
6424
+ const { accessor } = this._params;
6425
+ accessor.setActive(this);
6426
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6427
+ if (typeof event.minimumSize === 'number' ||
6428
+ typeof event.minimumSize === 'function') {
6429
+ this._minimumSize = event.minimumSize;
6430
+ }
6431
+ if (typeof event.maximumSize === 'number' ||
6432
+ typeof event.maximumSize === 'function') {
6433
+ this._maximumSize = event.maximumSize;
6434
+ }
6435
+ this.updateConstraints();
6436
+ }), this.api.onDidSizeChange((event) => {
6437
+ this._onDidChange.fire({ size: event.size });
6438
+ }));
6439
+ }
6021
6440
  setVisible(isVisible) {
6022
6441
  this.api._onDidVisibilityChange.fire({ isVisible });
6023
6442
  }
@@ -6183,6 +6602,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6183
6602
  }
6184
6603
 
6185
6604
  class ReactPanelContentPart {
6605
+ get element() {
6606
+ return this._element;
6607
+ }
6186
6608
  constructor(id, component, reactPortalStore) {
6187
6609
  this.id = id;
6188
6610
  this.component = component;
@@ -6194,9 +6616,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6194
6616
  this._element = document.createElement('div');
6195
6617
  this._element.className = 'dockview-react-part';
6196
6618
  }
6197
- get element() {
6198
- return this._element;
6199
- }
6200
6619
  focus() {
6201
6620
  // TODO
6202
6621
  }
@@ -6231,6 +6650,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6231
6650
  }
6232
6651
 
6233
6652
  class ReactPanelHeaderPart {
6653
+ get element() {
6654
+ return this._element;
6655
+ }
6234
6656
  constructor(id, component, reactPortalStore) {
6235
6657
  this.id = id;
6236
6658
  this.component = component;
@@ -6238,9 +6660,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6238
6660
  this._element = document.createElement('div');
6239
6661
  this._element.className = 'dockview-react-part';
6240
6662
  }
6241
- get element() {
6242
- return this._element;
6243
- }
6244
6663
  focus() {
6245
6664
  //noop
6246
6665
  }
@@ -6299,7 +6718,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6299
6718
  content: createComponent(viewData.content.id, viewData.content.id, this.layout.options.components, this.layout.options.frameworkComponents, (_d = this.layout.options.frameworkComponentFactory) === null || _d === void 0 ? void 0 : _d.content),
6300
6719
  tab,
6301
6720
  });
6302
- const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout), group);
6721
+ const panel = new DockviewPanel(panelId, this.layout, new DockviewApi(this.layout), group);
6303
6722
  panel.init({
6304
6723
  view,
6305
6724
  title,
@@ -6310,6 +6729,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6310
6729
  }
6311
6730
 
6312
6731
  class ReactWatermarkPart {
6732
+ get element() {
6733
+ return this._element;
6734
+ }
6313
6735
  constructor(id, component, reactPortalStore) {
6314
6736
  this.id = id;
6315
6737
  this.component = component;
@@ -6320,9 +6742,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6320
6742
  this._element = document.createElement('div');
6321
6743
  this._element.className = 'dockview-react-part';
6322
6744
  }
6323
- get element() {
6324
- return this._element;
6325
- }
6326
6745
  init(parameters) {
6327
6746
  this.parameters = parameters;
6328
6747
  this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
@@ -6365,14 +6784,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6365
6784
  }
6366
6785
 
6367
6786
  class ReactGroupControlsRendererPart {
6368
- constructor(component, reactPortalStore, _group) {
6369
- this.component = component;
6370
- this.reactPortalStore = reactPortalStore;
6371
- this._group = _group;
6372
- this.mutableDisposable = new MutableDisposable();
6373
- this._element = document.createElement('div');
6374
- this._element.className = 'dockview-react-part';
6375
- }
6376
6787
  get element() {
6377
6788
  return this._element;
6378
6789
  }
@@ -6382,6 +6793,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6382
6793
  get group() {
6383
6794
  return this._group;
6384
6795
  }
6796
+ constructor(component, reactPortalStore, _group) {
6797
+ this.component = component;
6798
+ this.reactPortalStore = reactPortalStore;
6799
+ this._group = _group;
6800
+ this.mutableDisposable = new MutableDisposable();
6801
+ this._element = document.createElement('div');
6802
+ this._element.className = 'dockview-react-part';
6803
+ }
6385
6804
  focus() {
6386
6805
  // TODO
6387
6806
  }
@@ -6496,6 +6915,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6496
6915
  : undefined,
6497
6916
  showDndOverlay: props.showDndOverlay,
6498
6917
  createGroupControlElement: createGroupControlElement(props.groupControlComponent, { addPortal }),
6918
+ singleTabMode: props.singleTabMode,
6499
6919
  });
6500
6920
  (_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
6501
6921
  dockview.deserializer = new ReactPanelDeserialzier(dockview);
@@ -6708,7 +7128,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6708
7128
 
6709
7129
  class ReactGridPanelView extends GridviewPanel {
6710
7130
  constructor(id, component, reactComponent, reactPortalStore) {
6711
- super(id, component);
7131
+ super(id, component, new GridviewPanelApiImpl(id));
6712
7132
  this.reactComponent = reactComponent;
6713
7133
  this.reactPortalStore = reactPortalStore;
6714
7134
  }
@@ -6787,6 +7207,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6787
7207
  GridviewReact.displayName = 'GridviewComponent';
6788
7208
 
6789
7209
  class PanePanelSection {
7210
+ get element() {
7211
+ return this._element;
7212
+ }
6790
7213
  constructor(id, component, reactPortalStore) {
6791
7214
  this.id = id;
6792
7215
  this.component = component;
@@ -6795,9 +7218,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6795
7218
  this._element.style.height = '100%';
6796
7219
  this._element.style.width = '100%';
6797
7220
  }
6798
- get element() {
6799
- return this._element;
6800
- }
6801
7221
  init(parameters) {
6802
7222
  this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
6803
7223
  params: parameters.params,
@@ -6945,6 +7365,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6945
7365
  exports.SplitviewPanel = SplitviewPanel;
6946
7366
  exports.SplitviewReact = SplitviewReact;
6947
7367
  exports.Tab = Tab;
7368
+ exports.directionToPosition = directionToPosition;
6948
7369
  exports.getDirectionOrientation = getDirectionOrientation;
6949
7370
  exports.getGridLocation = getGridLocation;
6950
7371
  exports.getLocationOrientation = getLocationOrientation;
@@ -6953,11 +7374,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6953
7374
  exports.getRelativeLocation = getRelativeLocation;
6954
7375
  exports.indexInParent = indexInParent;
6955
7376
  exports.isGridBranchNode = isGridBranchNode;
7377
+ exports.isGroupOptionsWithGroup = isGroupOptionsWithGroup;
7378
+ exports.isGroupOptionsWithPanel = isGroupOptionsWithPanel;
7379
+ exports.isPanelOptionsWithGroup = isPanelOptionsWithGroup;
7380
+ exports.isPanelOptionsWithPanel = isPanelOptionsWithPanel;
6956
7381
  exports.isReactElement = isReactElement;
6957
7382
  exports.orthogonal = orthogonal;
7383
+ exports.positionToDirection = positionToDirection;
6958
7384
  exports.toTarget = toTarget;
6959
7385
  exports.usePortalsLifecycle = usePortalsLifecycle;
6960
7386
 
6961
- Object.defineProperty(exports, '__esModule', { value: true });
6962
-
6963
7387
  }));