dockview 1.0.1 → 1.1.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 (221) hide show
  1. package/README.md +243 -186
  2. package/dist/cjs/api/component.api.d.ts +32 -17
  3. package/dist/cjs/api/component.api.js +155 -28
  4. package/dist/cjs/api/component.api.js.map +1 -1
  5. package/dist/cjs/api/gridviewPanelApi.js +1 -0
  6. package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
  7. package/dist/cjs/api/groupPanelApi.d.ts +11 -14
  8. package/dist/cjs/api/groupPanelApi.js +19 -17
  9. package/dist/cjs/api/groupPanelApi.js.map +1 -1
  10. package/dist/cjs/api/panelApi.d.ts +0 -25
  11. package/dist/cjs/api/panelApi.js +1 -20
  12. package/dist/cjs/api/panelApi.js.map +1 -1
  13. package/dist/cjs/api/paneviewPanelApi.js +1 -0
  14. package/dist/cjs/api/paneviewPanelApi.js.map +1 -1
  15. package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
  16. package/dist/cjs/api/splitviewPanelApi.js +1 -5
  17. package/dist/cjs/api/splitviewPanelApi.js.map +1 -1
  18. package/dist/cjs/dnd/abstractDragHandler.d.ts +3 -3
  19. package/dist/cjs/dnd/abstractDragHandler.js +15 -14
  20. package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
  21. package/dist/cjs/dnd/dataTransfer.d.ts +0 -25
  22. package/dist/cjs/dnd/dataTransfer.js +1 -45
  23. package/dist/cjs/dnd/dataTransfer.js.map +1 -1
  24. package/dist/cjs/dnd/dnd.d.ts +1 -14
  25. package/dist/cjs/dnd/dnd.js +1 -79
  26. package/dist/cjs/dnd/dnd.js.map +1 -1
  27. package/dist/cjs/dnd/droptarget.d.ts +4 -5
  28. package/dist/cjs/dnd/droptarget.js +70 -46
  29. package/dist/cjs/dnd/droptarget.js.map +1 -1
  30. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
  31. package/dist/cjs/dockview/components/tab/defaultTab.js +0 -8
  32. package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -1
  33. package/dist/cjs/dockview/defaultGroupPanelView.js +3 -1
  34. package/dist/cjs/dockview/defaultGroupPanelView.js.map +1 -1
  35. package/dist/cjs/dockview/dockviewComponent.d.ts +27 -19
  36. package/dist/cjs/dockview/dockviewComponent.js +67 -178
  37. package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
  38. package/dist/cjs/dockview/dockviewGroupPanel.d.ts +2 -5
  39. package/dist/cjs/dockview/dockviewGroupPanel.js +2 -31
  40. package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
  41. package/dist/cjs/dockview/options.d.ts +2 -1
  42. package/dist/cjs/events.d.ts +7 -0
  43. package/dist/cjs/events.js +47 -5
  44. package/dist/cjs/events.js.map +1 -1
  45. package/dist/cjs/gridview/baseComponentGridview.d.ts +9 -0
  46. package/dist/cjs/gridview/baseComponentGridview.js +20 -15
  47. package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
  48. package/dist/cjs/gridview/basePanelView.d.ts +5 -8
  49. package/dist/cjs/gridview/basePanelView.js +14 -8
  50. package/dist/cjs/gridview/basePanelView.js.map +1 -1
  51. package/dist/cjs/gridview/branchNode.js +1 -1
  52. package/dist/cjs/gridview/branchNode.js.map +1 -1
  53. package/dist/cjs/gridview/gridview.js +19 -18
  54. package/dist/cjs/gridview/gridview.js.map +1 -1
  55. package/dist/cjs/gridview/gridviewComponent.d.ts +4 -0
  56. package/dist/cjs/gridview/gridviewComponent.js +5 -0
  57. package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
  58. package/dist/cjs/gridview/gridviewPanel.d.ts +0 -1
  59. package/dist/cjs/gridview/gridviewPanel.js +3 -6
  60. package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
  61. package/dist/cjs/gridview/leafNode.js +1 -0
  62. package/dist/cjs/gridview/leafNode.js.map +1 -1
  63. package/dist/cjs/groupview/groupPanel.d.ts +0 -7
  64. package/dist/cjs/groupview/groupview.d.ts +15 -8
  65. package/dist/cjs/groupview/groupview.js +38 -125
  66. package/dist/cjs/groupview/groupview.js.map +1 -1
  67. package/dist/cjs/groupview/groupviewPanel.d.ts +5 -2
  68. package/dist/cjs/groupview/groupviewPanel.js.map +1 -1
  69. package/dist/cjs/groupview/panel/content.js +1 -0
  70. package/dist/cjs/groupview/panel/content.js.map +1 -1
  71. package/dist/cjs/groupview/tab.d.ts +10 -13
  72. package/dist/cjs/groupview/tab.js +22 -80
  73. package/dist/cjs/groupview/tab.js.map +1 -1
  74. package/dist/cjs/groupview/titlebar/tabsContainer.js +6 -8
  75. package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
  76. package/dist/cjs/index.d.ts +1 -1
  77. package/dist/cjs/lifecycle.js +2 -1
  78. package/dist/cjs/lifecycle.js.map +1 -1
  79. package/dist/cjs/panel/types.d.ts +0 -2
  80. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
  81. package/dist/cjs/paneview/draggablePaneviewPanel.js +32 -29
  82. package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
  83. package/dist/cjs/paneview/paneview.d.ts +1 -1
  84. package/dist/cjs/paneview/paneview.js +2 -5
  85. package/dist/cjs/paneview/paneview.js.map +1 -1
  86. package/dist/cjs/paneview/paneviewComponent.d.ts +6 -5
  87. package/dist/cjs/paneview/paneviewComponent.js +11 -16
  88. package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
  89. package/dist/cjs/paneview/paneviewPanel.d.ts +5 -1
  90. package/dist/cjs/paneview/paneviewPanel.js +14 -2
  91. package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
  92. package/dist/cjs/react/deserializer.js +1 -3
  93. package/dist/cjs/react/deserializer.js.map +1 -1
  94. package/dist/cjs/react/dockview/dockview.d.ts +9 -9
  95. package/dist/cjs/react/dockview/dockview.js +14 -1
  96. package/dist/cjs/react/dockview/dockview.js.map +1 -1
  97. package/dist/cjs/react/dockview/reactContentPart.js +4 -4
  98. package/dist/cjs/react/dockview/reactContentPart.js.map +1 -1
  99. package/dist/cjs/react/dockview/reactHeaderPart.js +1 -0
  100. package/dist/cjs/react/dockview/reactHeaderPart.js.map +1 -1
  101. package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +1 -2
  102. package/dist/cjs/react/dockview/reactWatermarkPart.js +1 -2
  103. package/dist/cjs/react/dockview/reactWatermarkPart.js.map +1 -1
  104. package/dist/cjs/react/gridview/view.js +2 -2
  105. package/dist/cjs/react/gridview/view.js.map +1 -1
  106. package/dist/cjs/react/index.d.ts +1 -0
  107. package/dist/cjs/react/index.js.map +1 -1
  108. package/dist/cjs/react/react.js +1 -2
  109. package/dist/cjs/react/react.js.map +1 -1
  110. package/dist/cjs/react/splitview/view.js +2 -2
  111. package/dist/cjs/react/splitview/view.js.map +1 -1
  112. package/dist/cjs/splitview/core/splitview.js +1 -1
  113. package/dist/cjs/splitview/core/splitview.js.map +1 -1
  114. package/dist/cjs/splitview/splitviewComponent.d.ts +9 -6
  115. package/dist/cjs/splitview/splitviewComponent.js +11 -1
  116. package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
  117. package/dist/cjs/splitview/splitviewPanel.d.ts +1 -6
  118. package/dist/cjs/splitview/splitviewPanel.js +5 -3
  119. package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
  120. package/dist/dockview.amd.js +480 -567
  121. package/dist/dockview.amd.min.js +2 -16
  122. package/dist/dockview.amd.min.noStyle.js +2 -16
  123. package/dist/dockview.amd.noStyle.js +479 -566
  124. package/dist/dockview.cjs.js +480 -567
  125. package/dist/dockview.esm.js +480 -563
  126. package/dist/dockview.esm.min.js +2 -16
  127. package/dist/dockview.js +480 -567
  128. package/dist/dockview.min.js +2 -16
  129. package/dist/dockview.min.noStyle.js +2 -16
  130. package/dist/dockview.noStyle.js +479 -566
  131. package/dist/esm/api/component.api.d.ts +32 -17
  132. package/dist/esm/api/component.api.js +71 -20
  133. package/dist/esm/api/gridviewPanelApi.js +1 -0
  134. package/dist/esm/api/groupPanelApi.d.ts +11 -14
  135. package/dist/esm/api/groupPanelApi.js +18 -13
  136. package/dist/esm/api/panelApi.d.ts +0 -25
  137. package/dist/esm/api/panelApi.js +1 -20
  138. package/dist/esm/api/paneviewPanelApi.js +1 -0
  139. package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
  140. package/dist/esm/api/splitviewPanelApi.js +1 -5
  141. package/dist/esm/dnd/abstractDragHandler.d.ts +3 -3
  142. package/dist/esm/dnd/abstractDragHandler.js +9 -8
  143. package/dist/esm/dnd/dataTransfer.d.ts +0 -25
  144. package/dist/esm/dnd/dataTransfer.js +0 -40
  145. package/dist/esm/dnd/dnd.d.ts +1 -14
  146. package/dist/esm/dnd/dnd.js +1 -69
  147. package/dist/esm/dnd/droptarget.d.ts +4 -5
  148. package/dist/esm/dnd/droptarget.js +70 -46
  149. package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
  150. package/dist/esm/dockview/components/tab/defaultTab.js +1 -9
  151. package/dist/esm/dockview/defaultGroupPanelView.js +3 -1
  152. package/dist/esm/dockview/dockviewComponent.d.ts +27 -19
  153. package/dist/esm/dockview/dockviewComponent.js +54 -118
  154. package/dist/esm/dockview/dockviewGroupPanel.d.ts +2 -5
  155. package/dist/esm/dockview/dockviewGroupPanel.js +2 -30
  156. package/dist/esm/dockview/options.d.ts +2 -1
  157. package/dist/esm/events.d.ts +7 -0
  158. package/dist/esm/events.js +20 -3
  159. package/dist/esm/gridview/baseComponentGridview.d.ts +9 -0
  160. package/dist/esm/gridview/baseComponentGridview.js +21 -16
  161. package/dist/esm/gridview/basePanelView.d.ts +5 -8
  162. package/dist/esm/gridview/basePanelView.js +10 -8
  163. package/dist/esm/gridview/branchNode.js +1 -1
  164. package/dist/esm/gridview/gridview.js +16 -16
  165. package/dist/esm/gridview/gridviewComponent.d.ts +4 -0
  166. package/dist/esm/gridview/gridviewComponent.js +5 -0
  167. package/dist/esm/gridview/gridviewPanel.d.ts +0 -1
  168. package/dist/esm/gridview/gridviewPanel.js +3 -6
  169. package/dist/esm/gridview/leafNode.js +1 -0
  170. package/dist/esm/groupview/groupPanel.d.ts +0 -7
  171. package/dist/esm/groupview/groupview.d.ts +15 -8
  172. package/dist/esm/groupview/groupview.js +24 -58
  173. package/dist/esm/groupview/groupviewPanel.d.ts +5 -2
  174. package/dist/esm/groupview/panel/content.js +1 -0
  175. package/dist/esm/groupview/tab.d.ts +10 -13
  176. package/dist/esm/groupview/tab.js +17 -24
  177. package/dist/esm/groupview/titlebar/tabsContainer.js +6 -8
  178. package/dist/esm/index.d.ts +1 -1
  179. package/dist/esm/lifecycle.js +2 -1
  180. package/dist/esm/panel/types.d.ts +0 -2
  181. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
  182. package/dist/esm/paneview/draggablePaneviewPanel.js +32 -29
  183. package/dist/esm/paneview/paneview.d.ts +1 -1
  184. package/dist/esm/paneview/paneview.js +2 -5
  185. package/dist/esm/paneview/paneviewComponent.d.ts +6 -5
  186. package/dist/esm/paneview/paneviewComponent.js +11 -8
  187. package/dist/esm/paneview/paneviewPanel.d.ts +5 -1
  188. package/dist/esm/paneview/paneviewPanel.js +10 -2
  189. package/dist/esm/react/deserializer.js +1 -3
  190. package/dist/esm/react/dockview/dockview.d.ts +9 -9
  191. package/dist/esm/react/dockview/dockview.js +15 -2
  192. package/dist/esm/react/dockview/reactContentPart.js +4 -4
  193. package/dist/esm/react/dockview/reactHeaderPart.js +1 -0
  194. package/dist/esm/react/dockview/reactWatermarkPart.d.ts +1 -2
  195. package/dist/esm/react/dockview/reactWatermarkPart.js +1 -2
  196. package/dist/esm/react/gridview/view.js +2 -2
  197. package/dist/esm/react/index.d.ts +1 -0
  198. package/dist/esm/react/react.js +1 -2
  199. package/dist/esm/react/splitview/view.js +2 -2
  200. package/dist/esm/splitview/core/splitview.js +1 -1
  201. package/dist/esm/splitview/splitviewComponent.d.ts +9 -6
  202. package/dist/esm/splitview/splitviewComponent.js +10 -2
  203. package/dist/esm/splitview/splitviewPanel.d.ts +1 -6
  204. package/dist/esm/splitview/splitviewPanel.js +5 -3
  205. package/dist/styles/dockview.css +5 -9
  206. package/package.json +4 -4
  207. package/dist/cjs/functions.d.ts +0 -1
  208. package/dist/cjs/functions.js +0 -42
  209. package/dist/cjs/functions.js.map +0 -1
  210. package/dist/cjs/groupview/panel/hostedPanel.d.ts +0 -22
  211. package/dist/cjs/groupview/panel/hostedPanel.js +0 -57
  212. package/dist/cjs/groupview/panel/hostedPanel.js.map +0 -1
  213. package/dist/cjs/json.d.ts +0 -1
  214. package/dist/cjs/json.js +0 -14
  215. package/dist/cjs/json.js.map +0 -1
  216. package/dist/esm/functions.d.ts +0 -1
  217. package/dist/esm/functions.js +0 -8
  218. package/dist/esm/groupview/panel/hostedPanel.d.ts +0 -22
  219. package/dist/esm/groupview/panel/hostedPanel.js +0 -43
  220. package/dist/esm/json.d.ts +0 -1
  221. package/dist/esm/json.js +0 -9
package/dist/dockview.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview
3
- * @version 1.0.1
3
+ * @version 1.1.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -58,7 +58,7 @@
58
58
  }
59
59
  }
60
60
 
61
- var css_248z = ".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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\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-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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\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-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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\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-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-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\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 a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\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 pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\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.active-tab .tab-action {\n background-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.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.active-tab .tab-action {\n background-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.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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}\n.pane-container .view .default-header > span {\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.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:not(.dirty) {\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-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\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 a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.tab .default-tab .action-container .tab-list .tab-action.dirty:not(:hover) {\n display: block;\n -webkit-mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\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}";
61
+ var css_248z = ".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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\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 a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\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 pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\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.active-tab .tab-action {\n background-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.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.active-tab .tab-action {\n background-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.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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}\n.pane-container .view .default-header > span {\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.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-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\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 a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\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}";
62
62
  styleInject(css_248z);
63
63
 
64
64
  exports.Event = void 0;
@@ -91,7 +91,6 @@
91
91
  if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
92
92
  listener(this._last);
93
93
  }
94
- this._listeners.length === 0;
95
94
  this._listeners.push(listener);
96
95
  return {
97
96
  dispose: () => {
@@ -107,9 +106,9 @@
107
106
  }
108
107
  fire(e) {
109
108
  this._last = e;
110
- this._listeners.forEach((listener) => {
109
+ for (const listener of this._listeners) {
111
110
  listener(e);
112
- });
111
+ }
113
112
  }
114
113
  dispose() {
115
114
  this._listeners = [];
@@ -131,6 +130,24 @@
131
130
  element.removeEventListener(type, listener);
132
131
  },
133
132
  };
133
+ }
134
+ class TickDelayedEvent {
135
+ constructor() {
136
+ this._onFired = new Emitter();
137
+ this.onEvent = this._onFired.event;
138
+ }
139
+ fire() {
140
+ if (this.timer) {
141
+ clearTimeout(this.timer);
142
+ }
143
+ this.timer = setTimeout(() => {
144
+ this._onFired.fire();
145
+ clearTimeout(this.timer);
146
+ });
147
+ }
148
+ dispose() {
149
+ this._onFired.dispose();
150
+ }
134
151
  }
135
152
 
136
153
  exports.Disposable = void 0;
@@ -149,7 +166,7 @@
149
166
  return new CompositeDisposable(...args);
150
167
  }
151
168
  addDisposables(...args) {
152
- args === null || args === void 0 ? void 0 : args.forEach((arg) => this.disposables.push(arg));
169
+ args.forEach((arg) => this.disposables.push(arg));
153
170
  }
154
171
  dispose() {
155
172
  this.disposables.forEach((arg) => arg.dispose());
@@ -168,20 +185,11 @@
168
185
  dispose() {
169
186
  if (this._disposable) {
170
187
  this._disposable.dispose();
188
+ this._disposable = exports.Disposable.NONE;
171
189
  }
172
190
  }
173
191
  }
174
192
 
175
- function tryParseJSON(text, reviver) {
176
- try {
177
- return JSON.parse(text, reviver);
178
- }
179
- catch (err) {
180
- console.warn('failed to parse JSON');
181
- return undefined;
182
- }
183
- }
184
-
185
193
  class TransferObject {
186
194
  constructor() {
187
195
  //
@@ -202,45 +210,6 @@
202
210
  this.paneId = paneId;
203
211
  }
204
212
  }
205
- const DATA_KEY = 'splitview/transfer';
206
- const isPanelTransferEvent = (event) => {
207
- if (!event.dataTransfer) {
208
- return false;
209
- }
210
- return event.dataTransfer.types.includes(DATA_KEY);
211
- };
212
- exports.DragType = void 0;
213
- (function (DragType) {
214
- DragType["DOCKVIEW_TAB"] = "dockview_tab";
215
- DragType["EXTERNAL"] = "external_group_drag";
216
- })(exports.DragType || (exports.DragType = {}));
217
- /**
218
- * Determine whether this data belong to that of an event that was started by
219
- * dragging a tab component
220
- */
221
- const isTabDragEvent = (data) => {
222
- return data.type === exports.DragType.DOCKVIEW_TAB;
223
- };
224
- /**
225
- * Determine whether this data belong to that of an event that was started by
226
- * a custom drag-enable component
227
- */
228
- const isCustomDragEvent = (data) => {
229
- return data.type === exports.DragType.EXTERNAL;
230
- };
231
- const extractData = (event) => {
232
- if (!event.dataTransfer) {
233
- return null;
234
- }
235
- const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
236
- if (!data) {
237
- console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
238
- }
239
- if (typeof data.type !== 'string') {
240
- console.warn(`[dragEvent] invalid type ${data.type}`);
241
- }
242
- return data;
243
- };
244
213
  /**
245
214
  * A singleton to store transfer data during drag & drop operations that are only valid within the application.
246
215
  */
@@ -310,11 +279,17 @@
310
279
  get length() {
311
280
  return this.component.length;
312
281
  }
282
+ get orientation() {
283
+ return this.component.orientation;
284
+ }
313
285
  get onDidLayoutChange() {
314
286
  return this.component.onDidLayoutChange;
315
287
  }
316
- get orientation() {
317
- return this.component.orientation;
288
+ get onDidAddView() {
289
+ return this.component.onDidAddView;
290
+ }
291
+ get onDidRemoveView() {
292
+ return this.component.onDidRemoveView;
318
293
  }
319
294
  updateOptions(options) {
320
295
  this.component.updateOptions(options);
@@ -360,21 +335,38 @@
360
335
  constructor(component) {
361
336
  this.component = component;
362
337
  }
363
- get width() {
364
- return this.component.width;
365
- }
366
- get height() {
367
- return this.component.height;
368
- }
369
338
  get minimumSize() {
370
339
  return this.component.minimumSize;
371
340
  }
372
341
  get maximumSize() {
373
342
  return this.component.maximumSize;
374
343
  }
344
+ get height() {
345
+ return this.component.height;
346
+ }
347
+ get width() {
348
+ return this.component.width;
349
+ }
375
350
  get onDidLayoutChange() {
376
351
  return this.component.onDidLayoutChange;
377
352
  }
353
+ get onDidAddView() {
354
+ return this.component.onDidAddView;
355
+ }
356
+ get onDidRemoveView() {
357
+ return this.component.onDidRemoveView;
358
+ }
359
+ get onDidDrop() {
360
+ const emitter = new Emitter();
361
+ const disposable = this.component.onDidDrop((e) => {
362
+ emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
363
+ });
364
+ emitter.dispose = () => {
365
+ disposable.dispose();
366
+ emitter.dispose();
367
+ };
368
+ return emitter.event;
369
+ }
378
370
  getPanels() {
379
371
  return this.component.getPanels();
380
372
  }
@@ -410,12 +402,6 @@
410
402
  constructor(component) {
411
403
  this.component = component;
412
404
  }
413
- get width() {
414
- return this.component.width;
415
- }
416
- get height() {
417
- return this.component.height;
418
- }
419
405
  get minimumHeight() {
420
406
  return this.component.minimumHeight;
421
407
  }
@@ -428,12 +414,30 @@
428
414
  get maximumWidth() {
429
415
  return this.component.maximumWidth;
430
416
  }
417
+ get width() {
418
+ return this.component.width;
419
+ }
420
+ get height() {
421
+ return this.component.height;
422
+ }
431
423
  get onGridEvent() {
432
424
  return this.component.onGridEvent;
433
425
  }
434
426
  get onDidLayoutChange() {
435
427
  return this.component.onDidLayoutChange;
436
428
  }
429
+ get onDidAddGroup() {
430
+ return this.component.onDidAddGroup;
431
+ }
432
+ get onDidRemoveGroup() {
433
+ return this.component.onDidRemoveGroup;
434
+ }
435
+ get onDidActiveGroupChange() {
436
+ return this.component.onDidActiveGroupChange;
437
+ }
438
+ get onDidLayoutFromJSON() {
439
+ return this.component.onDidLayoutFromJSON;
440
+ }
437
441
  get panels() {
438
442
  return this.component.groups;
439
443
  }
@@ -511,6 +515,27 @@
511
515
  get onGridEvent() {
512
516
  return this.component.onGridEvent;
513
517
  }
518
+ get onDidActiveGroupChange() {
519
+ return this.component.onDidActiveGroupChange;
520
+ }
521
+ get onDidAddGroup() {
522
+ return this.component.onDidAddGroup;
523
+ }
524
+ get onDidRemoveGroup() {
525
+ return this.component.onDidRemoveGroup;
526
+ }
527
+ get onDidActivePanelChange() {
528
+ return this.component.onDidActivePanelChange;
529
+ }
530
+ get onDidAddPanel() {
531
+ return this.component.onDidAddPanel;
532
+ }
533
+ get onDidRemovePanel() {
534
+ return this.component.onDidRemovePanel;
535
+ }
536
+ get onDidLayoutfromJSON() {
537
+ return this.component.onDidLayoutfromJSON;
538
+ }
514
539
  get onDidLayoutChange() {
515
540
  return this.component.onDidLayoutChange;
516
541
  }
@@ -538,18 +563,12 @@
538
563
  getPanel(id) {
539
564
  return this.component.getGroupPanel(id);
540
565
  }
541
- setActivePanel(panel) {
542
- this.component.setActivePanel(panel);
543
- }
544
566
  layout(width, height, force = false) {
545
567
  this.component.layout(width, height, force);
546
568
  }
547
569
  addPanel(options) {
548
570
  return this.component.addPanel(options);
549
571
  }
550
- removePanel(panel) {
551
- this.component.removePanel(panel);
552
- }
553
572
  addEmptyGroup(options) {
554
573
  this.component.addEmptyGroup(options);
555
574
  }
@@ -897,7 +916,7 @@
897
916
  this._onDidAddView = new Emitter();
898
917
  this.onDidAddView = this._onDidAddView.event;
899
918
  this._onDidRemoveView = new Emitter();
900
- this.onDidRemoveView = this._onDidAddView.event;
919
+ this.onDidRemoveView = this._onDidRemoveView.event;
901
920
  this._startSnappingEnabled = true;
902
921
  this._endSnappingEnabled = true;
903
922
  this.resize = (index, delta, sizes = this.views.map((x) => x.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) => {
@@ -1539,9 +1558,9 @@
1539
1558
  var _a;
1540
1559
  super();
1541
1560
  this.paneItems = [];
1561
+ this.skipAnimation = false;
1542
1562
  this._onDidChange = new Emitter();
1543
1563
  this.onDidChange = this._onDidChange.event;
1544
- this.skipAnimation = false;
1545
1564
  this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
1546
1565
  this.element = document.createElement('div');
1547
1566
  this.element.className = 'pane-container';
@@ -1569,7 +1588,7 @@
1569
1588
  this.paneItems.push(paneItem);
1570
1589
  pane.orthogonalSize = this.splitview.orthogonalSize;
1571
1590
  });
1572
- this.addDisposables(this.splitview.onDidSashEnd(() => {
1591
+ this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
1573
1592
  this._onDidChange.fire(undefined);
1574
1593
  }), this.splitview.onDidAddView(() => {
1575
1594
  this._onDidChange.fire();
@@ -1641,9 +1660,6 @@
1641
1660
  }
1642
1661
  }
1643
1662
  layout(size, orthogonalSize) {
1644
- // for (const paneItem of this.paneItems) {
1645
- // paneItem.pane.orthogonalSize = orthogonalSize;
1646
- // }
1647
1663
  this.splitview.layout(size, orthogonalSize);
1648
1664
  }
1649
1665
  setupAnimation() {
@@ -1733,7 +1749,7 @@
1733
1749
  this.options = options;
1734
1750
  this._onDrop = new Emitter();
1735
1751
  this.onDrop = this._onDrop.event;
1736
- this.addDisposables(new DragAndDropObserver(this.element, {
1752
+ this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
1737
1753
  onDragEnter: (e) => undefined,
1738
1754
  onDragOver: (e) => {
1739
1755
  if (isBooleanValue(this.options.canDisplayOverlay)) {
@@ -1769,51 +1785,11 @@
1769
1785
  const y = e.offsetY;
1770
1786
  const xp = (100 * x) / width;
1771
1787
  const yp = (100 * y) / height;
1772
- let isRight = false;
1773
- let isLeft = false;
1774
- let isTop = false;
1775
- let isBottom = false;
1776
- switch (this.options.validOverlays) {
1777
- case 'all':
1778
- isRight = xp > 80;
1779
- isLeft = xp < 20;
1780
- isTop = !isRight && !isLeft && yp < 20;
1781
- isBottom = !isRight && !isLeft && yp > 80;
1782
- break;
1783
- case 'vertical':
1784
- isTop = yp < 50;
1785
- isBottom = yp >= 50;
1786
- break;
1787
- case 'horizontal':
1788
- isLeft = xp < 50;
1789
- isRight = xp >= 50;
1790
- break;
1791
- }
1788
+ const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
1792
1789
  const isSmallX = width < 100;
1793
1790
  const isSmallY = height < 100;
1794
- toggleClass(this.overlay, 'right', !isSmallX && isRight);
1795
- toggleClass(this.overlay, 'left', !isSmallX && isLeft);
1796
- toggleClass(this.overlay, 'top', !isSmallY && isTop);
1797
- toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
1798
- toggleClass(this.overlay, 'small-right', isSmallX && isRight);
1799
- toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
1800
- toggleClass(this.overlay, 'small-top', isSmallY && isTop);
1801
- toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
1802
- if (isRight) {
1803
- this._state = exports.Position.Right;
1804
- }
1805
- else if (isLeft) {
1806
- this._state = exports.Position.Left;
1807
- }
1808
- else if (isTop) {
1809
- this._state = exports.Position.Top;
1810
- }
1811
- else if (isBottom) {
1812
- this._state = exports.Position.Bottom;
1813
- }
1814
- else {
1815
- this._state = exports.Position.Center;
1816
- }
1791
+ this.toggleClasses(quadrant, isSmallX, isSmallY);
1792
+ this.setState(quadrant);
1817
1793
  },
1818
1794
  onDragLeave: (e) => {
1819
1795
  this.removeDropTarget();
@@ -1827,7 +1803,7 @@
1827
1803
  const state = this._state;
1828
1804
  this.removeDropTarget();
1829
1805
  if (state) {
1830
- this._onDrop.fire({ position: state, event: e });
1806
+ this._onDrop.fire({ position: state, nativeEvent: e });
1831
1807
  }
1832
1808
  },
1833
1809
  }));
@@ -1842,9 +1818,73 @@
1842
1818
  this.options.canDisplayOverlay = value;
1843
1819
  }
1844
1820
  dispose() {
1845
- this._onDrop.dispose();
1846
1821
  this.removeDropTarget();
1847
1822
  }
1823
+ toggleClasses(quadrant, isSmallX, isSmallY) {
1824
+ if (!this.overlay) {
1825
+ return;
1826
+ }
1827
+ const isLeft = quadrant === 'left';
1828
+ const isRight = quadrant === 'right';
1829
+ const isTop = quadrant === 'top';
1830
+ const isBottom = quadrant === 'bottom';
1831
+ toggleClass(this.overlay, 'right', !isSmallX && isRight);
1832
+ toggleClass(this.overlay, 'left', !isSmallX && isLeft);
1833
+ toggleClass(this.overlay, 'top', !isSmallY && isTop);
1834
+ toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
1835
+ toggleClass(this.overlay, 'small-right', isSmallX && isRight);
1836
+ toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
1837
+ toggleClass(this.overlay, 'small-top', isSmallY && isTop);
1838
+ toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
1839
+ }
1840
+ setState(quadrant) {
1841
+ switch (quadrant) {
1842
+ case 'top':
1843
+ this._state = exports.Position.Top;
1844
+ break;
1845
+ case 'left':
1846
+ this._state = exports.Position.Left;
1847
+ break;
1848
+ case 'bottom':
1849
+ this._state = exports.Position.Bottom;
1850
+ break;
1851
+ case 'right':
1852
+ this._state = exports.Position.Right;
1853
+ break;
1854
+ default:
1855
+ this._state = exports.Position.Center;
1856
+ break;
1857
+ }
1858
+ }
1859
+ calculateQuadrant(overlayType, xp, yp) {
1860
+ switch (overlayType) {
1861
+ case 'all':
1862
+ if (xp < 20) {
1863
+ return 'left';
1864
+ }
1865
+ if (xp > 80) {
1866
+ return 'right';
1867
+ }
1868
+ if (yp < 20) {
1869
+ return 'top';
1870
+ }
1871
+ if (yp > 80) {
1872
+ return 'bottom';
1873
+ }
1874
+ break;
1875
+ case 'vertical':
1876
+ if (yp < 50) {
1877
+ return 'top';
1878
+ }
1879
+ return 'bottom';
1880
+ case 'horizontal':
1881
+ if (xp < 50) {
1882
+ return 'left';
1883
+ }
1884
+ return 'right';
1885
+ }
1886
+ return null;
1887
+ }
1848
1888
  removeDropTarget() {
1849
1889
  if (this.target) {
1850
1890
  this._state = undefined;
@@ -1947,6 +1987,7 @@
1947
1987
  this.view.layout(this.width, this.height);
1948
1988
  }
1949
1989
  dispose() {
1990
+ this._onDidChange.dispose();
1950
1991
  this._disposable.dispose();
1951
1992
  }
1952
1993
  }
@@ -1998,7 +2039,7 @@
1998
2039
  proportionalLayout,
1999
2040
  });
2000
2041
  }
2001
- this.addDisposables(this.splitview.onDidSashEnd(() => {
2042
+ this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
2002
2043
  this._onDidChange.fire(undefined);
2003
2044
  }));
2004
2045
  this.setupChildrenEvents();
@@ -2170,6 +2211,15 @@
2170
2211
  * Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
2171
2212
  * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
2172
2213
  *--------------------------------------------------------------------------------------------*/
2214
+ function findLeaf(candiateNode, last) {
2215
+ if (candiateNode instanceof LeafNode) {
2216
+ return candiateNode;
2217
+ }
2218
+ if (candiateNode instanceof BranchNode) {
2219
+ return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
2220
+ }
2221
+ throw new Error('invalid node');
2222
+ }
2173
2223
  function flipNode(node, size, orthogonalSize) {
2174
2224
  if (node instanceof BranchNode) {
2175
2225
  const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
@@ -2308,13 +2358,13 @@
2308
2358
  }
2309
2359
  deserialize(json, deserializer) {
2310
2360
  const orientation = json.orientation;
2311
- const height = json.height;
2361
+ const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
2312
2362
  this._deserialize(json.root, orientation, deserializer, height);
2313
2363
  }
2314
2364
  _deserialize(root, orientation, deserializer, orthogonalSize) {
2315
- this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
2365
+ this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
2316
2366
  }
2317
- _deserializeNode(node, orientation, deserializer, orthogonalSize) {
2367
+ _deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
2318
2368
  let result;
2319
2369
  if (node.type === 'branch') {
2320
2370
  const serializedChildren = node.data;
@@ -2324,7 +2374,9 @@
2324
2374
  visible: serializedChild.visible,
2325
2375
  };
2326
2376
  });
2327
- result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, orthogonalSize, children);
2377
+ // HORIZONTAL => height=orthogonalsize width=size
2378
+ // VERTICAL => height=size width=orthogonalsize
2379
+ result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
2328
2380
  }
2329
2381
  else {
2330
2382
  result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
@@ -2385,15 +2437,6 @@
2385
2437
  if (!(node instanceof LeafNode)) {
2386
2438
  throw new Error('invalid location');
2387
2439
  }
2388
- const findLeaf = (candiateNode, last) => {
2389
- if (candiateNode instanceof LeafNode) {
2390
- return candiateNode;
2391
- }
2392
- if (candiateNode instanceof BranchNode) {
2393
- return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
2394
- }
2395
- throw new Error('invalid node');
2396
- };
2397
2440
  for (let i = path.length - 1; i > -1; i--) {
2398
2441
  const n = path[i];
2399
2442
  const l = location[i] || 0;
@@ -2490,15 +2533,14 @@
2490
2533
  }
2491
2534
  parent.removeChild(index, sizing);
2492
2535
  if (parent.children.length === 0) {
2493
- // throw new Error('Invalid grid state');
2494
2536
  return node.view;
2495
2537
  }
2496
2538
  if (parent.children.length > 1) {
2497
2539
  return node.view;
2498
2540
  }
2541
+ const sibling = parent.children[0];
2499
2542
  if (pathToParent.length === 0) {
2500
2543
  // parent is root
2501
- const sibling = parent.children[0];
2502
2544
  if (sibling instanceof LeafNode) {
2503
2545
  return node.view;
2504
2546
  }
@@ -2509,7 +2551,6 @@
2509
2551
  }
2510
2552
  const [grandParent, ..._] = [...pathToParent].reverse();
2511
2553
  const [parentIndex, ...__] = [...rest].reverse();
2512
- const sibling = parent.children[0];
2513
2554
  const isSiblingVisible = parent.isChildVisible(0);
2514
2555
  parent.removeChild(0, sizing);
2515
2556
  const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
@@ -2556,31 +2597,6 @@
2556
2597
  }
2557
2598
  }
2558
2599
 
2559
- /*! *****************************************************************************
2560
- Copyright (c) Microsoft Corporation.
2561
-
2562
- Permission to use, copy, modify, and/or distribute this software for any
2563
- purpose with or without fee is hereby granted.
2564
-
2565
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2566
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2567
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2568
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2569
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2570
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2571
- PERFORMANCE OF THIS SOFTWARE.
2572
- ***************************************************************************** */
2573
-
2574
- function __awaiter(thisArg, _arguments, P, generator) {
2575
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2576
- return new (P || (P = Promise))(function (resolve, reject) {
2577
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2578
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2579
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2580
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2581
- });
2582
- }
2583
-
2584
2600
  class ContentContainer extends CompositeDisposable {
2585
2601
  constructor() {
2586
2602
  super();
@@ -2592,6 +2608,7 @@
2592
2608
  this._element = document.createElement('div');
2593
2609
  this._element.className = 'content-container';
2594
2610
  this._element.tabIndex = -1;
2611
+ this.addDisposables(this._onDidFocus, this._onDidBlur);
2595
2612
  // for hosted containers
2596
2613
  // 1) register a drop target on the host
2597
2614
  // 2) register window dragStart events to disable pointer events
@@ -2658,6 +2675,41 @@
2658
2675
  DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
2659
2676
  })(DockviewDropTargets || (DockviewDropTargets = {}));
2660
2677
 
2678
+ class DragHandler extends CompositeDisposable {
2679
+ constructor(el) {
2680
+ super();
2681
+ this.el = el;
2682
+ this.disposable = new MutableDisposable();
2683
+ this._onDragStart = new Emitter();
2684
+ this.onDragStart = this._onDragStart.event;
2685
+ this.iframes = [];
2686
+ this.configure();
2687
+ }
2688
+ configure() {
2689
+ this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
2690
+ this.iframes = [
2691
+ ...getElementsByTagName('iframe'),
2692
+ ...getElementsByTagName('webview'),
2693
+ ];
2694
+ for (const iframe of this.iframes) {
2695
+ iframe.style.pointerEvents = 'none';
2696
+ }
2697
+ this.el.classList.add('dragged');
2698
+ setTimeout(() => this.el.classList.remove('dragged'), 0);
2699
+ this.disposable.value = this.getData();
2700
+ if (event.dataTransfer) {
2701
+ event.dataTransfer.effectAllowed = 'move';
2702
+ }
2703
+ }), addDisposableListener(this.el, 'dragend', (ev) => {
2704
+ for (const iframe of this.iframes) {
2705
+ iframe.style.pointerEvents = 'auto';
2706
+ }
2707
+ this.iframes = [];
2708
+ this.disposable.dispose();
2709
+ }));
2710
+ }
2711
+ }
2712
+
2661
2713
  exports.MouseEventKind = void 0;
2662
2714
  (function (MouseEventKind) {
2663
2715
  MouseEventKind["CLICK"] = "CLICK";
@@ -2667,42 +2719,34 @@
2667
2719
  constructor(panelId, accessor, group) {
2668
2720
  super();
2669
2721
  this.panelId = panelId;
2670
- this.accessor = accessor;
2671
2722
  this.group = group;
2672
2723
  this._onChanged = new Emitter();
2673
2724
  this.onChanged = this._onChanged.event;
2674
2725
  this._onDropped = new Emitter();
2675
2726
  this.onDrop = this._onDropped.event;
2676
- this.panelTransfer = LocalSelectionTransfer.getInstance();
2677
- this.iframes = [];
2678
2727
  this.addDisposables(this._onChanged, this._onDropped);
2679
2728
  this._element = document.createElement('div');
2680
2729
  this._element.className = 'tab';
2681
2730
  this._element.tabIndex = 0;
2682
2731
  this._element.draggable = true;
2683
- this.addDisposables(addDisposableListener(this._element, 'dragstart', (event) => {
2684
- this.iframes = [
2685
- ...getElementsByTagName('iframe'),
2686
- ...getElementsByTagName('webview'),
2687
- ];
2688
- for (const iframe of this.iframes) {
2689
- iframe.style.pointerEvents = 'none';
2732
+ this.addDisposables(new (class Handler extends DragHandler {
2733
+ constructor() {
2734
+ super(...arguments);
2735
+ this.panelTransfer = LocalSelectionTransfer.getInstance();
2690
2736
  }
2691
- this.element.classList.add('dragged');
2692
- setTimeout(() => this.element.classList.remove('dragged'), 0);
2693
- this.panelTransfer.setData([
2694
- new PanelTransfer(this.accessor.id, this.group.id, this.panelId),
2695
- ], PanelTransfer.prototype);
2696
- if (event.dataTransfer) {
2697
- event.dataTransfer.effectAllowed = 'move';
2737
+ getData() {
2738
+ this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
2739
+ return {
2740
+ dispose: () => {
2741
+ this.panelTransfer.clearData(PanelTransfer.prototype);
2742
+ },
2743
+ };
2698
2744
  }
2699
- }), addDisposableListener(this._element, 'dragend', (ev) => {
2700
- for (const iframe of this.iframes) {
2701
- iframe.style.pointerEvents = 'auto';
2745
+ dispose() {
2746
+ //
2702
2747
  }
2703
- this.iframes = [];
2704
- this.panelTransfer.clearData(PanelTransfer.prototype);
2705
- }), addDisposableListener(this._element, 'mousedown', (event) => {
2748
+ })(this._element));
2749
+ this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
2706
2750
  if (event.defaultPrevented) {
2707
2751
  return;
2708
2752
  }
@@ -2791,7 +2835,7 @@
2791
2835
  });
2792
2836
  this.addDisposables(this.voidDropTarget.onDrop((event) => {
2793
2837
  this._onDrop.fire({
2794
- event: event.event,
2838
+ event: event.nativeEvent,
2795
2839
  index: this.tabs.length,
2796
2840
  });
2797
2841
  }), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
@@ -2904,16 +2948,14 @@
2904
2948
  if (!isLeftClick || event.event.defaultPrevented) {
2905
2949
  return;
2906
2950
  }
2907
- switch (event.kind) {
2908
- case exports.MouseEventKind.CLICK:
2909
- this.group.model.openPanel(panel, {
2910
- skipFocus: alreadyFocused,
2911
- });
2912
- break;
2951
+ if (event.kind === exports.MouseEventKind.CLICK) {
2952
+ this.group.model.openPanel(panel, {
2953
+ skipFocus: alreadyFocused,
2954
+ });
2913
2955
  }
2914
2956
  }), tabToAdd.onDrop((event) => {
2915
2957
  this._onDrop.fire({
2916
- event: event.event,
2958
+ event: event.nativeEvent,
2917
2959
  index: this.tabs.findIndex((x) => x.value === tabToAdd),
2918
2960
  });
2919
2961
  }));
@@ -2938,7 +2980,6 @@
2938
2980
  GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
2939
2981
  GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
2940
2982
  GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
2941
- GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
2942
2983
  })(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
2943
2984
  class Groupview extends CompositeDisposable {
2944
2985
  constructor(container, accessor, id, options, parent) {
@@ -2959,15 +3000,10 @@
2959
3000
  this.onMove = this._onMove.event;
2960
3001
  this._onDidGroupChange = new Emitter();
2961
3002
  this.onDidGroupChange = this._onDidGroupChange.event;
2962
- this.closePanel = (panel) => __awaiter(this, void 0, void 0, function* () {
2963
- if (panel.close && !(yield panel.close())) {
2964
- return false;
2965
- }
2966
- this.doClose(panel);
2967
- return true;
2968
- });
3003
+ this._onDidDrop = new Emitter();
3004
+ this.onDidDrop = this._onDidDrop.event;
2969
3005
  this.container.classList.add('groupview');
2970
- this.addDisposables(this._onMove, this._onDidGroupChange);
3006
+ this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
2971
3007
  this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
2972
3008
  tabHeight: options.tabHeight,
2973
3009
  });
@@ -2989,9 +3025,9 @@
2989
3025
  }), this.contentContainer.onDidFocus(() => {
2990
3026
  this.accessor.doSetGroupActive(this.parent, true);
2991
3027
  }), this.contentContainer.onDidBlur(() => {
2992
- // this._activePanel?.api._ondid
3028
+ // noop
2993
3029
  }), this.dropTarget.onDrop((event) => {
2994
- this.handleDropEvent(event.event, event.position);
3030
+ this.handleDropEvent(event.nativeEvent, event.position);
2995
3031
  }));
2996
3032
  }
2997
3033
  get element() {
@@ -3124,6 +3160,8 @@
3124
3160
  options.index > this.panels.length) {
3125
3161
  options.index = this.panels.length;
3126
3162
  }
3163
+ // ensure the group is updated before we fire any events
3164
+ panel.updateParentGroup(this.parent, true);
3127
3165
  if (this._activePanel === panel) {
3128
3166
  this.accessor.doSetGroupActive(this.parent);
3129
3167
  return;
@@ -3144,43 +3182,19 @@
3144
3182
  return this._removePanel(panelToRemove);
3145
3183
  }
3146
3184
  closeAllPanels() {
3147
- var _a;
3148
- return __awaiter(this, void 0, void 0, function* () {
3149
- const index = this._activePanel
3150
- ? this.panels.indexOf(this._activePanel)
3151
- : -1;
3152
- if (this._activePanel && index > -1) {
3153
- if (this.panels.indexOf(this._activePanel) < 0) {
3154
- console.warn('active panel not tracked');
3155
- }
3156
- const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
3157
- if (!canClose) {
3158
- return false;
3159
- }
3160
- }
3161
- for (let i = 0; i < this.panels.length; i++) {
3162
- if (i === index) {
3163
- continue;
3164
- }
3165
- const panel = this.panels[i];
3166
- this.openPanel(panel);
3167
- if (panel.close) {
3168
- const canClose = yield panel.close();
3169
- if (!canClose) {
3170
- return false;
3171
- }
3172
- }
3173
- }
3174
- if (this.panels.length > 0) {
3175
- // take a copy since we will be edting the array as we iterate through
3176
- const arrPanelCpy = [...this.panels];
3177
- yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
3185
+ if (this.panels.length > 0) {
3186
+ // take a copy since we will be edting the array as we iterate through
3187
+ const arrPanelCpy = [...this.panels];
3188
+ for (const panel of arrPanelCpy) {
3189
+ this.doClose(panel);
3178
3190
  }
3179
- else {
3180
- this.accessor.removeGroup(this.parent);
3181
- }
3182
- return true;
3183
- });
3191
+ }
3192
+ else {
3193
+ this.accessor.removeGroup(this.parent);
3194
+ }
3195
+ }
3196
+ closePanel(panel) {
3197
+ this.doClose(panel);
3184
3198
  }
3185
3199
  doClose(panel) {
3186
3200
  this.accessor.removePanel(panel);
@@ -3323,8 +3337,11 @@
3323
3337
  this.tabsContainer.show();
3324
3338
  }
3325
3339
  }
3326
- canDisplayOverlay(dragOverEvent, target) {
3340
+ canDisplayOverlay(event, target) {
3327
3341
  // custom overlay handler
3342
+ if (this.accessor.options.showDndOverlay) {
3343
+ return this.accessor.options.showDndOverlay(event, target);
3344
+ }
3328
3345
  return false;
3329
3346
  }
3330
3347
  handleDropEvent(event, position, index) {
@@ -3349,6 +3366,9 @@
3349
3366
  index,
3350
3367
  });
3351
3368
  }
3369
+ else {
3370
+ this._onDidDrop.fire({ nativeEvent: event, position, index });
3371
+ }
3352
3372
  }
3353
3373
  dispose() {
3354
3374
  for (const panel of this.panels) {
@@ -3401,19 +3421,21 @@
3401
3421
  this.onGridEvent = this._onGridEvent.event;
3402
3422
  this._onDidLayoutChange = new Emitter();
3403
3423
  this.onDidLayoutChange = this._onDidLayoutChange.event;
3424
+ this._onDidRemoveGroup = new Emitter();
3425
+ this.onDidRemoveGroup = this._onDidRemoveGroup.event;
3426
+ this._onDidAddGroup = new Emitter();
3427
+ this.onDidAddGroup = this._onDidAddGroup.event;
3428
+ this._onDidActiveGroupChange = new Emitter();
3429
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3404
3430
  this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
3405
3431
  this.element.appendChild(this.gridview.element);
3406
- // TODO for some reason this is required before anything will layout correctly
3407
- this.layout(0, 0, true);
3432
+ this.layout(0, 0, true); // set some elements height/widths
3408
3433
  this.addDisposables(this.gridview.onDidChange(() => {
3409
3434
  this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
3410
3435
  }));
3411
3436
  this.addDisposables((() => {
3412
- /**
3413
- * TODO Fix this relatively ugly 'merge and delay'
3414
- */
3415
- let timer;
3416
- return this.onGridEvent((event) => {
3437
+ const tickDelayedEvent = new TickDelayedEvent();
3438
+ return new CompositeDisposable(this.onGridEvent((event) => {
3417
3439
  if ([
3418
3440
  exports.GroupChangeKind.ADD_GROUP,
3419
3441
  exports.GroupChangeKind.REMOVE_GROUP,
@@ -3423,15 +3445,11 @@
3423
3445
  exports.GroupChangeKind.PANEL_ACTIVE,
3424
3446
  exports.GroupChangeKind.LAYOUT,
3425
3447
  ].includes(event.kind)) {
3426
- if (timer) {
3427
- clearTimeout(timer);
3428
- }
3429
- timer = setTimeout(() => {
3430
- this._onDidLayoutChange.fire();
3431
- clearTimeout(timer);
3432
- });
3448
+ tickDelayedEvent.fire();
3433
3449
  }
3434
- });
3450
+ }), tickDelayedEvent.onEvent(() => {
3451
+ this._onDidLayoutChange.fire();
3452
+ }), tickDelayedEvent);
3435
3453
  })());
3436
3454
  }
3437
3455
  get id() {
@@ -3477,6 +3495,7 @@
3477
3495
  doAddGroup(group, location = [0], size) {
3478
3496
  this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
3479
3497
  this._onGridEvent.fire({ kind: exports.GroupChangeKind.ADD_GROUP });
3498
+ this._onDidAddGroup.fire(group);
3480
3499
  this.doSetGroupActive(group);
3481
3500
  }
3482
3501
  doRemoveGroup(group, options) {
@@ -3490,6 +3509,7 @@
3490
3509
  this._groups.delete(group.id);
3491
3510
  }
3492
3511
  this._onGridEvent.fire({ kind: exports.GroupChangeKind.REMOVE_GROUP });
3512
+ this._onDidRemoveGroup.fire(group);
3493
3513
  if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
3494
3514
  const groups = Array.from(this._groups.values());
3495
3515
  this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
@@ -3520,6 +3540,7 @@
3520
3540
  this._onGridEvent.fire({
3521
3541
  kind: exports.GroupChangeKind.GROUP_ACTIVE,
3522
3542
  });
3543
+ this._onDidActiveGroupChange.fire(group);
3523
3544
  }
3524
3545
  removeGroup(group) {
3525
3546
  this.doRemoveGroup(group);
@@ -3576,6 +3597,10 @@
3576
3597
  dispose() {
3577
3598
  super.dispose();
3578
3599
  this._onGridEvent.dispose();
3600
+ this._onDidActiveGroupChange.dispose();
3601
+ this._onDidAddGroup.dispose();
3602
+ this._onDidRemoveGroup.dispose();
3603
+ this._onDidLayoutChange.dispose();
3579
3604
  this.gridview.dispose();
3580
3605
  }
3581
3606
  }
@@ -3587,15 +3612,11 @@
3587
3612
  constructor(id) {
3588
3613
  super();
3589
3614
  this.id = id;
3590
- this._state = {};
3591
3615
  this._isFocused = false;
3592
3616
  this._isActive = false;
3593
3617
  this._isVisible = true;
3594
3618
  this._width = 0;
3595
3619
  this._height = 0;
3596
- this._onDidStateChange = new Emitter();
3597
- this.onDidStateChange = this._onDidStateChange.event;
3598
- //
3599
3620
  this._onDidPanelDimensionChange = new Emitter({
3600
3621
  replay: true,
3601
3622
  });
@@ -3624,7 +3645,7 @@
3624
3645
  //
3625
3646
  this._onActiveChange = new Emitter();
3626
3647
  this.onActiveChange = this._onActiveChange.event;
3627
- this.addDisposables(this._onDidStateChange, this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this.onDidFocusChange((event) => {
3648
+ this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
3628
3649
  this._isFocused = event.isFocused;
3629
3650
  }), this.onDidActiveChange((event) => {
3630
3651
  this._isActive = event.isActive;
@@ -3657,21 +3678,6 @@
3657
3678
  setActive() {
3658
3679
  this._onActiveChange.fire();
3659
3680
  }
3660
- setState(key, value) {
3661
- if (typeof key === 'object') {
3662
- this._state = key;
3663
- }
3664
- else if (typeof value !== undefined) {
3665
- this._state[key] = value;
3666
- }
3667
- this._onDidStateChange.fire(undefined);
3668
- }
3669
- getState() {
3670
- return this._state;
3671
- }
3672
- getStateKey(key) {
3673
- return this._state[key];
3674
- }
3675
3681
  dispose() {
3676
3682
  super.dispose();
3677
3683
  }
@@ -3691,6 +3697,7 @@
3691
3697
  //
3692
3698
  this._onDidSizeChange = new Emitter();
3693
3699
  this.onDidSizeChange = this._onDidSizeChange.event;
3700
+ this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
3694
3701
  }
3695
3702
  setConstraints(value) {
3696
3703
  this._onDidConstraintsChangeInternal.fire(value);
@@ -3704,19 +3711,19 @@
3704
3711
  constructor(panel, group) {
3705
3712
  super(panel.id);
3706
3713
  this.panel = panel;
3707
- this._onDidDirtyChange = new Emitter();
3708
- this.onDidDirtyChange = this._onDidDirtyChange.event;
3709
3714
  this._onDidTitleChange = new Emitter();
3710
3715
  this.onDidTitleChange = this._onDidTitleChange.event;
3711
3716
  this._titleChanged = new Emitter();
3712
3717
  this.titleChanged = this._titleChanged.event;
3713
3718
  this._suppressClosableChanged = new Emitter();
3714
3719
  this.suppressClosableChanged = this._suppressClosableChanged.event;
3715
- this._group = group;
3716
- this.addDisposables(this._onDidDirtyChange);
3717
- }
3718
- get tryClose() {
3719
- return this._interceptor;
3720
+ this._onDidActiveGroupChange = new Emitter();
3721
+ this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
3722
+ this._onDidGroupChange = new Emitter();
3723
+ this.onDidGroupChange = this._onDidGroupChange.event;
3724
+ this.disposable = new MutableDisposable();
3725
+ this.group = group;
3726
+ this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
3720
3727
  }
3721
3728
  get title() {
3722
3729
  return this.panel.title;
@@ -3729,7 +3736,17 @@
3729
3736
  return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
3730
3737
  }
3731
3738
  set group(value) {
3739
+ const isOldGroupActive = this.isGroupActive;
3732
3740
  this._group = value;
3741
+ this._onDidGroupChange.fire();
3742
+ if (this._group) {
3743
+ this.disposable.value = this._group.api.onDidActiveChange(() => {
3744
+ this._onDidActiveGroupChange.fire();
3745
+ });
3746
+ if (this.isGroupActive !== isOldGroupActive) {
3747
+ this._onDidActiveGroupChange.fire();
3748
+ }
3749
+ }
3733
3750
  }
3734
3751
  get group() {
3735
3752
  return this._group;
@@ -3743,16 +3760,10 @@
3743
3760
  }
3744
3761
  return this.group.model.closePanel(this.panel);
3745
3762
  }
3746
- interceptOnCloseAction(interceptor) {
3747
- this._interceptor = interceptor;
3748
- }
3749
- dispose() {
3750
- super.dispose();
3751
- }
3752
3763
  }
3753
3764
 
3754
3765
  class DockviewGroupPanel extends CompositeDisposable {
3755
- constructor(id, containerApi) {
3766
+ constructor(id, accessor, containerApi) {
3756
3767
  super();
3757
3768
  this.id = id;
3758
3769
  this.containerApi = containerApi;
@@ -3760,9 +3771,8 @@
3760
3771
  this._suppressClosable = false;
3761
3772
  this._title = '';
3762
3773
  this.api = new DockviewPanelApiImpl(this, this._group);
3763
- this.onDidStateChange = this.api.onDidStateChange;
3764
3774
  this.addDisposables(this.api.onActiveChange(() => {
3765
- this.containerApi.setActivePanel(this);
3775
+ accessor.setActivePanel(this);
3766
3776
  }), this.api.onDidTitleChange((event) => {
3767
3777
  const title = event.title;
3768
3778
  this.update({ params: { title } });
@@ -3786,32 +3796,18 @@
3786
3796
  this._view = params.view;
3787
3797
  this.setTitle(params.title);
3788
3798
  this.setSuppressClosable(params.suppressClosable || false);
3789
- if (params.state) {
3790
- this.api.setState(params.state);
3791
- }
3792
3799
  (_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
3793
3800
  }
3794
3801
  focus() {
3795
3802
  this.api._onFocusEvent.fire();
3796
3803
  }
3797
- setDirty(isDirty) {
3798
- this.api._onDidDirtyChange.fire(isDirty);
3799
- }
3800
- close() {
3801
- if (this.api.tryClose) {
3802
- return this.api.tryClose();
3803
- }
3804
- return Promise.resolve(true);
3805
- }
3806
3804
  toJSON() {
3807
- const state = this.api.getState();
3808
3805
  return {
3809
3806
  id: this.id,
3810
3807
  view: this.view.toJSON(),
3811
3808
  params: Object.keys(this._params || {}).length > 0
3812
3809
  ? this._params
3813
3810
  : undefined,
3814
- state: state && Object.keys(state).length > 0 ? state : undefined,
3815
3811
  suppressClosable: this.suppressClosable || undefined,
3816
3812
  title: this.title,
3817
3813
  };
@@ -3856,18 +3852,6 @@
3856
3852
  var _a;
3857
3853
  this._group = group;
3858
3854
  this.api.group = group;
3859
- this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
3860
- var _a;
3861
- if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
3862
- const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
3863
- this.api._onDidActiveChange.fire({
3864
- isActive: isGroupActive && isVisible,
3865
- });
3866
- this.api._onDidVisibilityChange.fire({
3867
- isVisible,
3868
- });
3869
- }
3870
- });
3871
3855
  const isPanelVisible = this._group.model.isPanelActive(this);
3872
3856
  this.api._onDidActiveChange.fire({
3873
3857
  isActive: isGroupActive && isPanelVisible,
@@ -3977,15 +3961,6 @@
3977
3961
  }
3978
3962
  }
3979
3963
 
3980
- function debounce(cb, wait) {
3981
- let timeout;
3982
- const callable = (...args) => {
3983
- clearTimeout(timeout);
3984
- timeout = setTimeout(() => cb(...args), wait);
3985
- };
3986
- return callable;
3987
- }
3988
-
3989
3964
  class DefaultDeserializer {
3990
3965
  constructor(layout, panelDeserializer) {
3991
3966
  this.layout = layout;
@@ -4086,9 +4061,6 @@
4086
4061
  this._isGroupActive = false;
4087
4062
  //
4088
4063
  this.params = {};
4089
- //
4090
- this.isDirtyDisposable = new MutableDisposable();
4091
- this.addDisposables(this.isDirtyDisposable);
4092
4064
  this._element = document.createElement('div');
4093
4065
  this._element.className = 'default-tab';
4094
4066
  //
@@ -4133,10 +4105,6 @@
4133
4105
  init(params) {
4134
4106
  this.params = params;
4135
4107
  this._content.textContent = params.title;
4136
- this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
4137
- const isDirty = event;
4138
- toggleClass(this.action, 'dirty', isDirty);
4139
- });
4140
4108
  if (!this.params.suppressClosable) {
4141
4109
  addDisposableListener(this.action, 'click', (ev) => {
4142
4110
  ev.preventDefault(); //
@@ -4190,6 +4158,10 @@
4190
4158
  get height() {
4191
4159
  return this._height;
4192
4160
  }
4161
+ get params() {
4162
+ var _a;
4163
+ return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
4164
+ }
4193
4165
  focus() {
4194
4166
  this.api._onFocusEvent.fire();
4195
4167
  }
@@ -4198,29 +4170,27 @@
4198
4170
  this._height = height;
4199
4171
  this.api._onDidPanelDimensionChange.fire({ width, height });
4200
4172
  if (this.part) {
4201
- if (this.params) {
4202
- this.part.update(this.params.params);
4173
+ if (this._params) {
4174
+ this.part.update(this._params.params);
4203
4175
  }
4204
4176
  }
4205
4177
  }
4206
4178
  init(parameters) {
4207
- this.params = parameters;
4179
+ this._params = parameters;
4208
4180
  this.part = this.getComponent();
4209
4181
  }
4210
4182
  update(event) {
4211
4183
  var _a, _b;
4212
- this.params = Object.assign(Object.assign({}, this.params), { params: Object.assign(Object.assign({}, (_a = this.params) === null || _a === void 0 ? void 0 : _a.params), event.params) });
4213
- (_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.params.params });
4184
+ this._params = Object.assign(Object.assign({}, this._params), { params: Object.assign(Object.assign({}, (_a = this._params) === null || _a === void 0 ? void 0 : _a.params), event.params) });
4185
+ (_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
4214
4186
  }
4215
4187
  toJSON() {
4216
4188
  var _a, _b;
4217
- const state = this.api.getState();
4218
- const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
4189
+ const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
4219
4190
  return {
4220
4191
  id: this.id,
4221
4192
  component: this.component,
4222
4193
  params: Object.keys(params).length > 0 ? params : undefined,
4223
- state: Object.keys(state).length === 0 ? undefined : state,
4224
4194
  };
4225
4195
  }
4226
4196
  dispose() {
@@ -4243,12 +4213,12 @@
4243
4213
  this._snap = false;
4244
4214
  this._onDidChange = new Emitter();
4245
4215
  this.onDidChange = this._onDidChange.event;
4246
- this.addDisposables(this.api.onVisibilityChange((event) => {
4216
+ this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
4247
4217
  const { isVisible } = event;
4248
- const { containerApi } = this.params;
4218
+ const { containerApi } = this._params;
4249
4219
  containerApi.setVisible(this, isVisible);
4250
4220
  }), this.api.onActiveChange(() => {
4251
- const { containerApi } = this.params;
4221
+ const { containerApi } = this._params;
4252
4222
  containerApi.setActive(this);
4253
4223
  }), this.api.onDidConstraintsChangeInternal((event) => {
4254
4224
  if (typeof event.minimumWidth === 'number' ||
@@ -4363,9 +4333,6 @@
4363
4333
  const minimum = (value) => (value <= 0 ? undefined : value);
4364
4334
  return Object.assign(Object.assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
4365
4335
  }
4366
- dispose() {
4367
- super.dispose();
4368
- }
4369
4336
  }
4370
4337
 
4371
4338
  class GroupviewPanel extends GridviewPanel {
@@ -4437,7 +4404,9 @@
4437
4404
  this.tab.init(params);
4438
4405
  }
4439
4406
  updateParentGroup(group, isPanelVisible) {
4440
- // TODO
4407
+ var _a;
4408
+ this._content.updateParentGroup(group, isPanelVisible);
4409
+ (_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
4441
4410
  }
4442
4411
  layout(width, height) {
4443
4412
  this.content.layout(width, height);
@@ -4470,15 +4439,22 @@
4470
4439
  orientation: options.orientation || exports.Orientation.HORIZONTAL,
4471
4440
  styles: options.styles,
4472
4441
  });
4473
- this._panels = new Map();
4474
- this.dirtyPanels = new Set();
4475
- this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
4476
4442
  // events
4477
4443
  this._onTabInteractionEvent = new Emitter();
4478
4444
  this.onTabInteractionEvent = this._onTabInteractionEvent.event;
4479
4445
  this._onTabContextMenu = new Emitter();
4480
4446
  this.onTabContextMenu = this._onTabContextMenu.event;
4481
- this.panelState = {};
4447
+ this._onDidDrop = new Emitter();
4448
+ this.onDidDrop = this._onDidDrop.event;
4449
+ this._onDidRemovePanel = new Emitter();
4450
+ this.onDidRemovePanel = this._onDidRemovePanel.event;
4451
+ this._onDidAddPanel = new Emitter();
4452
+ this.onDidAddPanel = this._onDidAddPanel.event;
4453
+ this._onDidLayoutfromJSON = new Emitter();
4454
+ this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
4455
+ this._onDidActivePanelChange = new Emitter();
4456
+ this.onDidActivePanelChange = this._onDidActivePanelChange.event;
4457
+ this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop);
4482
4458
  this._options = options;
4483
4459
  if (!this.options.components) {
4484
4460
  this.options.components = {};
@@ -4499,10 +4475,10 @@
4499
4475
  this._api = new DockviewApi(this);
4500
4476
  }
4501
4477
  get totalPanels() {
4502
- return this._panels.size;
4478
+ return this.panels.length;
4503
4479
  }
4504
4480
  get panels() {
4505
- return Array.from(this._panels.values()).map((_) => _.value);
4481
+ return this.groups.flatMap((group) => group.model.panels);
4506
4482
  }
4507
4483
  get deserializer() {
4508
4484
  return this._deserializer;
@@ -4532,10 +4508,6 @@
4532
4508
  updateOptions(options) {
4533
4509
  const hasOrientationChanged = typeof options.orientation === 'string' &&
4534
4510
  this.options.orientation !== options.orientation;
4535
- // TODO support style update
4536
- // const hasStylesChanged =
4537
- // typeof options.styles === 'object' &&
4538
- // this.options.styles !== options.styles;
4539
4511
  this._options = Object.assign(Object.assign({}, this.options), options);
4540
4512
  if (hasOrientationChanged) {
4541
4513
  this.gridview.orientation = options.orientation;
@@ -4547,8 +4519,7 @@
4547
4519
  (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
4548
4520
  }
4549
4521
  getGroupPanel(id) {
4550
- var _a;
4551
- return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
4522
+ return this.panels.find((panel) => panel.id === id);
4552
4523
  }
4553
4524
  setActivePanel(panel) {
4554
4525
  if (!panel.group) {
@@ -4597,24 +4568,6 @@
4597
4568
  this.doSetGroupActive(next);
4598
4569
  }
4599
4570
  }
4600
- registerPanel(panel) {
4601
- if (this._panels.has(panel.id)) {
4602
- throw new Error(`panel ${panel.id} already exists`);
4603
- }
4604
- const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
4605
- this._panels.set(panel.id, { value: panel, disposable });
4606
- }
4607
- unregisterPanel(panel) {
4608
- if (!this._panels.has(panel.id)) {
4609
- throw new Error(`panel ${panel.id} doesn't exist`);
4610
- }
4611
- const item = this._panels.get(panel.id);
4612
- if (item) {
4613
- item.disposable.dispose();
4614
- item.value.dispose();
4615
- }
4616
- this._panels.delete(panel.id);
4617
- }
4618
4571
  /**
4619
4572
  * Serialize the current state of the layout
4620
4573
  *
@@ -4622,12 +4575,9 @@
4622
4575
  */
4623
4576
  toJSON() {
4624
4577
  var _a;
4625
- this.syncConfigs();
4626
4578
  const data = this.gridview.serialize();
4627
- const panels = Array.from(this._panels.values()).reduce((collection, panel) => {
4628
- if (!this.panelState[panel.value.id]) {
4629
- collection[panel.value.id] = panel.value.toJSON();
4630
- }
4579
+ const panels = this.panels.reduce((collection, panel) => {
4580
+ collection[panel.id] = panel.toJSON();
4631
4581
  return collection;
4632
4582
  }, {});
4633
4583
  return {
@@ -4639,11 +4589,9 @@
4639
4589
  }
4640
4590
  fromJSON(data) {
4641
4591
  this.gridview.clear();
4642
- this._panels.forEach((panel) => {
4643
- panel.disposable.dispose();
4644
- panel.value.dispose();
4592
+ this.panels.forEach((panel) => {
4593
+ panel.dispose();
4645
4594
  });
4646
- this._panels.clear();
4647
4595
  this._groups.clear();
4648
4596
  if (!this.deserializer) {
4649
4597
  throw new Error('invalid deserializer');
@@ -4658,9 +4606,7 @@
4658
4606
  this.gridview.deserialize(grid, new DefaultDeserializer(this, {
4659
4607
  createPanel: (id) => {
4660
4608
  const panelData = panels[id];
4661
- const panel = this.deserializer.fromJSON(panelData);
4662
- this.registerPanel(panel);
4663
- return panel;
4609
+ return this.deserializer.fromJSON(panelData);
4664
4610
  },
4665
4611
  }));
4666
4612
  if (typeof activeGroup === 'string') {
@@ -4671,30 +4617,23 @@
4671
4617
  }
4672
4618
  this.gridview.layout(this.width, this.height);
4673
4619
  this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
4620
+ this._onDidLayoutfromJSON.fire();
4674
4621
  }
4675
4622
  closeAllGroups() {
4676
- return __awaiter(this, void 0, void 0, function* () {
4677
- for (const entry of this._groups.entries()) {
4678
- const [_, group] = entry;
4679
- const didCloseAll = yield group.value.model.closeAllPanels();
4680
- if (!didCloseAll) {
4681
- return false;
4682
- }
4683
- }
4684
- return true;
4685
- });
4623
+ for (const entry of this._groups.entries()) {
4624
+ const [_, group] = entry;
4625
+ group.value.model.closeAllPanels();
4626
+ }
4686
4627
  }
4687
4628
  fireMouseEvent(event) {
4688
- switch (event.kind) {
4689
- case exports.MouseEventKind.CONTEXT_MENU:
4690
- if (event.tab && event.panel) {
4691
- this._onTabContextMenu.fire({
4692
- event: event.event,
4693
- api: this._api,
4694
- panel: event.panel,
4695
- });
4696
- }
4697
- break;
4629
+ if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
4630
+ if (event.tab && event.panel) {
4631
+ this._onTabContextMenu.fire({
4632
+ event: event.event,
4633
+ api: this._api,
4634
+ panel: event.panel,
4635
+ });
4636
+ }
4698
4637
  }
4699
4638
  }
4700
4639
  addPanel(options) {
@@ -4728,7 +4667,6 @@
4728
4667
  return panel;
4729
4668
  }
4730
4669
  removePanel(panel) {
4731
- this.unregisterPanel(panel);
4732
4670
  const group = panel.group;
4733
4671
  if (!group) {
4734
4672
  throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
@@ -4747,10 +4685,9 @@
4747
4685
  : {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
4748
4686
  }
4749
4687
  addEmptyGroup(options) {
4750
- var _a;
4751
4688
  const group = this.createGroup();
4752
4689
  if (options) {
4753
- const referencePanel = (_a = this._panels.get(options.referencePanel)) === null || _a === void 0 ? void 0 : _a.value;
4690
+ const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
4754
4691
  if (!referencePanel) {
4755
4692
  throw new Error(`reference panel ${options.referencePanel} does not exist`);
4756
4693
  }
@@ -4779,13 +4716,13 @@
4779
4716
  super.removeGroup(group);
4780
4717
  }
4781
4718
  moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
4782
- var _a, _b, _c;
4719
+ var _a;
4783
4720
  const sourceGroup = groupId
4784
4721
  ? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
4785
4722
  : undefined;
4786
4723
  if (!target || target === exports.Position.Center) {
4787
4724
  const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
4788
- ((_b = this._panels.get(itemId)) === null || _b === void 0 ? void 0 : _b.value);
4725
+ this.panels.find((panel) => panel.id === itemId);
4789
4726
  if (!groupItem) {
4790
4727
  throw new Error(`No panel with id ${itemId}`);
4791
4728
  }
@@ -4821,7 +4758,7 @@
4821
4758
  }
4822
4759
  else {
4823
4760
  const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
4824
- ((_c = this._panels.get(itemId)) === null || _c === void 0 ? void 0 : _c.value);
4761
+ this.panels.find((panel) => panel.id === itemId);
4825
4762
  if (!groupItem) {
4826
4763
  throw new Error(`No panel with id ${itemId}`);
4827
4764
  }
@@ -4831,7 +4768,7 @@
4831
4768
  }
4832
4769
  }
4833
4770
  doSetGroupActive(group, skipFocus) {
4834
- var _a, _b;
4771
+ var _a, _b, _c;
4835
4772
  const isGroupAlreadyFocused = this._activeGroup === group;
4836
4773
  super.doSetGroupActive(group, skipFocus);
4837
4774
  if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
@@ -4839,6 +4776,7 @@
4839
4776
  kind: exports.GroupChangeKind.PANEL_ACTIVE,
4840
4777
  panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
4841
4778
  });
4779
+ this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
4842
4780
  }
4843
4781
  }
4844
4782
  createGroup(options) {
@@ -4864,6 +4802,8 @@
4864
4802
  const disposable = new CompositeDisposable(view.model.onMove((event) => {
4865
4803
  const { groupId, itemId, target, index } = event;
4866
4804
  this.moveGroupOrPanel(view, groupId, itemId, target, index);
4805
+ }), view.model.onDidDrop((event) => {
4806
+ this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
4867
4807
  }), view.model.onDidGroupChange((event) => {
4868
4808
  switch (event.kind) {
4869
4809
  case exports.GroupChangeKind2.ADD_PANEL:
@@ -4871,24 +4811,25 @@
4871
4811
  kind: exports.GroupChangeKind.ADD_PANEL,
4872
4812
  panel: event.panel,
4873
4813
  });
4874
- break;
4875
- case exports.GroupChangeKind2.GROUP_ACTIVE:
4876
- this._onGridEvent.fire({
4877
- kind: exports.GroupChangeKind.GROUP_ACTIVE,
4878
- panel: event.panel,
4879
- });
4814
+ if (event.panel) {
4815
+ this._onDidAddPanel.fire(event.panel);
4816
+ }
4880
4817
  break;
4881
4818
  case exports.GroupChangeKind2.REMOVE_PANEL:
4882
4819
  this._onGridEvent.fire({
4883
4820
  kind: exports.GroupChangeKind.REMOVE_PANEL,
4884
4821
  panel: event.panel,
4885
4822
  });
4823
+ if (event.panel) {
4824
+ this._onDidRemovePanel.fire(event.panel);
4825
+ }
4886
4826
  break;
4887
4827
  case exports.GroupChangeKind2.PANEL_ACTIVE:
4888
4828
  this._onGridEvent.fire({
4889
4829
  kind: exports.GroupChangeKind.PANEL_ACTIVE,
4890
4830
  panel: event.panel,
4891
4831
  });
4832
+ this._onDidActivePanelChange.fire(event.panel);
4892
4833
  break;
4893
4834
  }
4894
4835
  }));
@@ -4902,44 +4843,18 @@
4902
4843
  }
4903
4844
  return view;
4904
4845
  }
4905
- dispose() {
4906
- super.dispose();
4907
- this._onGridEvent.dispose();
4908
- }
4909
- /**
4910
- * Ensure the local copy of the layout state is up-to-date
4911
- */
4912
- syncConfigs() {
4913
- const dirtyPanels = Array.from(this.dirtyPanels);
4914
- if (dirtyPanels.length === 0) ;
4915
- this.dirtyPanels.clear();
4916
- const partialPanelState = dirtyPanels
4917
- .map((panel) => this._panels.get(panel.id))
4918
- .filter((_) => !!_)
4919
- .reduce((collection, panel) => {
4920
- collection[panel.value.id] = panel.value.toJSON();
4921
- return collection;
4922
- }, {});
4923
- this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
4924
- dirtyPanels
4925
- .filter((p) => this._panels.has(p.id))
4926
- .forEach((panel) => {
4927
- panel.setDirty(false);
4928
- });
4929
- }
4930
4846
  _addPanel(options) {
4931
4847
  const view = new DefaultGroupPanelView({
4932
4848
  content: this.createContentComponent(options.id, options.component),
4933
4849
  tab: this.createTabComponent(options.id, options.tabComponent),
4934
4850
  });
4935
- const panel = new DockviewGroupPanel(options.id, this._api);
4851
+ const panel = new DockviewGroupPanel(options.id, this, this._api);
4936
4852
  panel.init({
4937
4853
  view,
4938
4854
  title: options.title || options.id,
4939
4855
  suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
4940
4856
  params: (options === null || options === void 0 ? void 0 : options.params) || {},
4941
4857
  });
4942
- this.registerPanel(panel);
4943
4858
  return panel;
4944
4859
  }
4945
4860
  createContentComponent(id, componentName) {
@@ -4959,10 +4874,12 @@
4959
4874
  var _a;
4960
4875
  return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
4961
4876
  }
4962
- addDirtyPanel(panel) {
4963
- this.dirtyPanels.add(panel);
4964
- panel.setDirty(true);
4965
- this.debouncedDeque();
4877
+ dispose() {
4878
+ super.dispose();
4879
+ this._onDidActivePanelChange.dispose();
4880
+ this._onDidAddPanel.dispose();
4881
+ this._onDidRemovePanel.dispose();
4882
+ this._onDidLayoutfromJSON.dispose();
4966
4883
  }
4967
4884
  }
4968
4885
 
@@ -4973,6 +4890,8 @@
4973
4890
  orientation: options.orientation,
4974
4891
  styles: options.styles,
4975
4892
  });
4893
+ this._onDidLayoutfromJSON = new Emitter();
4894
+ this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
4976
4895
  this._options = options;
4977
4896
  if (!this.options.components) {
4978
4897
  this.options.components = {};
@@ -5081,6 +5000,7 @@
5081
5000
  }
5082
5001
  }
5083
5002
  this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
5003
+ this._onDidLayoutfromJSON.fire();
5084
5004
  }
5085
5005
  movePanel(panel, options) {
5086
5006
  var _a;
@@ -5195,6 +5115,7 @@
5195
5115
  }
5196
5116
  dispose() {
5197
5117
  super.dispose();
5118
+ this._onDidLayoutfromJSON.dispose();
5198
5119
  }
5199
5120
  }
5200
5121
 
@@ -5207,6 +5128,10 @@
5207
5128
  this.element = element;
5208
5129
  this._disposable = new MutableDisposable();
5209
5130
  this.panels = new Map();
5131
+ this._onDidAddView = new Emitter();
5132
+ this.onDidAddView = this._onDidAddView.event;
5133
+ this._onDidRemoveView = new Emitter();
5134
+ this.onDidRemoveView = this._onDidRemoveView.event;
5210
5135
  this._onDidLayoutChange = new Emitter();
5211
5136
  this.onDidLayoutChange = this._onDidLayoutChange.event;
5212
5137
  this._options = options;
@@ -5217,7 +5142,7 @@
5217
5142
  options.frameworkComponents = {};
5218
5143
  }
5219
5144
  this.splitview = new Splitview(this.element, options);
5220
- this.addDisposables(this._disposable);
5145
+ this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
5221
5146
  }
5222
5147
  get options() {
5223
5148
  return this._options;
@@ -5232,7 +5157,7 @@
5232
5157
  this._splitview = value;
5233
5158
  this._disposable.value = new CompositeDisposable(this._splitview.onDidSashEnd(() => {
5234
5159
  this._onDidLayoutChange.fire(undefined);
5235
- }));
5160
+ }), this._splitview.onDidAddView((e) => this._onDidAddView.fire(e)), this._splitview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
5236
5161
  }
5237
5162
  get minimumSize() {
5238
5163
  return this.splitview.minimumSize;
@@ -5406,6 +5331,10 @@
5406
5331
  });
5407
5332
  panel.orientation = orientation;
5408
5333
  this.doAddView(panel);
5334
+ setTimeout(() => {
5335
+ // the original onDidAddView events are missed since they are fired before we can subcribe to them
5336
+ this._onDidAddView.fire(panel);
5337
+ }, 0);
5409
5338
  return { size: view.size, view: panel };
5410
5339
  }),
5411
5340
  },
@@ -5435,41 +5364,6 @@
5435
5364
  }
5436
5365
  }
5437
5366
 
5438
- class DragHandler extends CompositeDisposable {
5439
- constructor(el) {
5440
- super();
5441
- this.el = el;
5442
- this.iframes = [];
5443
- this._onDragStart = new Emitter();
5444
- this.onDragStart = this._onDragStart.event;
5445
- this.configure();
5446
- }
5447
- configure() {
5448
- this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
5449
- var _a;
5450
- this.iframes = [
5451
- ...getElementsByTagName('iframe'),
5452
- ...getElementsByTagName('webview'),
5453
- ];
5454
- for (const iframe of this.iframes) {
5455
- iframe.style.pointerEvents = 'none';
5456
- }
5457
- this.el.classList.add('dragged');
5458
- setTimeout(() => this.el.classList.remove('dragged'), 0);
5459
- (_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
5460
- this.disposable = this.getData();
5461
- }), addDisposableListener(this.el, 'dragend', (ev) => {
5462
- var _a;
5463
- for (const iframe of this.iframes) {
5464
- iframe.style.pointerEvents = 'auto';
5465
- }
5466
- this.iframes = [];
5467
- (_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
5468
- this.disposable = undefined;
5469
- }));
5470
- }
5471
- }
5472
-
5473
5367
  class SplitviewPanelApiImpl extends PanelApiImpl {
5474
5368
  //
5475
5369
  constructor(id) {
@@ -5484,6 +5378,7 @@
5484
5378
  //
5485
5379
  this._onDidSizeChange = new Emitter();
5486
5380
  this.onDidSizeChange = this._onDidSizeChange.event;
5381
+ this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
5487
5382
  }
5488
5383
  setConstraints(value) {
5489
5384
  this._onDidConstraintsChangeInternal.fire(value);
@@ -5491,11 +5386,6 @@
5491
5386
  setSize(event) {
5492
5387
  this._onDidSizeChange.fire(event);
5493
5388
  }
5494
- dispose() {
5495
- super.dispose();
5496
- this._onDidConstraintsChange.dispose();
5497
- this._onDidSizeChange.dispose();
5498
- }
5499
5389
  }
5500
5390
 
5501
5391
  class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
@@ -5509,6 +5399,7 @@
5509
5399
  this.onMouseEnter = this._onMouseEnter.event;
5510
5400
  this._onMouseLeave = new Emitter({});
5511
5401
  this.onMouseLeave = this._onMouseLeave.event;
5402
+ this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
5512
5403
  }
5513
5404
  set pane(pane) {
5514
5405
  this._pane = pane;
@@ -5524,7 +5415,7 @@
5524
5415
  }
5525
5416
 
5526
5417
  class PaneviewPanel extends BasePanelView {
5527
- constructor(id, component, headerComponent, orientation, isExpanded) {
5418
+ constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
5528
5419
  super(id, component, new PaneviewPanelApiImpl(id));
5529
5420
  this.headerComponent = headerComponent;
5530
5421
  this._onDidChangeExpansionState = new Emitter({ replay: true });
@@ -5540,6 +5431,7 @@
5540
5431
  this.expandedSize = 0;
5541
5432
  this.api.pane = this; // TODO cannot use 'this' before 'super'
5542
5433
  this._isExpanded = isExpanded;
5434
+ this._headerVisible = isHeaderVisible;
5543
5435
  this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
5544
5436
  this._orientation = orientation;
5545
5437
  this.element.classList.add('pane');
@@ -5607,6 +5499,13 @@
5607
5499
  this._maximumBodySize =
5608
5500
  typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
5609
5501
  }
5502
+ get headerVisible() {
5503
+ return this._headerVisible;
5504
+ }
5505
+ set headerVisible(value) {
5506
+ this._headerVisible = value;
5507
+ this.header.style.display = value ? '' : 'none';
5508
+ }
5610
5509
  setVisible(isVisible) {
5611
5510
  this.api._onDidVisibilityChange.fire({ isVisible });
5612
5511
  }
@@ -5669,7 +5568,7 @@
5669
5568
  }
5670
5569
  }
5671
5570
  toJSON() {
5672
- const params = this.params;
5571
+ const params = this._params;
5673
5572
  return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
5674
5573
  }
5675
5574
  renderOnce() {
@@ -5704,7 +5603,7 @@
5704
5603
 
5705
5604
  class DraggablePaneviewPanel extends PaneviewPanel {
5706
5605
  constructor(id, component, headerComponent, orientation, isExpanded, disableDnd) {
5707
- super(id, component, headerComponent, orientation, isExpanded);
5606
+ super(id, component, headerComponent, orientation, isExpanded, true);
5708
5607
  this._onDidDrop = new Emitter();
5709
5608
  this.onDidDrop = this._onDidDrop.event;
5710
5609
  if (!disableDnd) {
@@ -5738,36 +5637,39 @@
5738
5637
  },
5739
5638
  });
5740
5639
  this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
5741
- const data = getPaneData();
5742
- if (!data) {
5743
- this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
5744
- return;
5745
- }
5746
- const containerApi = this.params
5747
- .containerApi;
5748
- const panelId = data.paneId;
5749
- const existingPanel = containerApi.getPanel(panelId);
5750
- if (!existingPanel) {
5751
- this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
5752
- return;
5753
- }
5754
- const allPanels = containerApi.getPanels();
5755
- const fromIndex = allPanels.indexOf(existingPanel);
5756
- let toIndex = containerApi.getPanels().indexOf(this);
5757
- if (event.position === exports.Position.Left ||
5758
- event.position === exports.Position.Top) {
5759
- toIndex = Math.max(0, toIndex - 1);
5760
- }
5761
- if (event.position === exports.Position.Right ||
5762
- event.position === exports.Position.Bottom) {
5763
- if (fromIndex > toIndex) {
5764
- toIndex++;
5765
- }
5766
- toIndex = Math.min(allPanels.length - 1, toIndex);
5767
- }
5768
- containerApi.movePanel(fromIndex, toIndex);
5640
+ this.onDrop(event);
5769
5641
  }));
5770
5642
  }
5643
+ onDrop(event) {
5644
+ const data = getPaneData();
5645
+ if (!data) {
5646
+ this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
5647
+ return;
5648
+ }
5649
+ const containerApi = this._params
5650
+ .containerApi;
5651
+ const panelId = data.paneId;
5652
+ const existingPanel = containerApi.getPanel(panelId);
5653
+ if (!existingPanel) {
5654
+ this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
5655
+ return;
5656
+ }
5657
+ const allPanels = containerApi.getPanels();
5658
+ const fromIndex = allPanels.indexOf(existingPanel);
5659
+ let toIndex = containerApi.getPanels().indexOf(this);
5660
+ if (event.position === exports.Position.Left ||
5661
+ event.position === exports.Position.Top) {
5662
+ toIndex = Math.max(0, toIndex - 1);
5663
+ }
5664
+ if (event.position === exports.Position.Right ||
5665
+ event.position === exports.Position.Bottom) {
5666
+ if (fromIndex > toIndex) {
5667
+ toIndex++;
5668
+ }
5669
+ toIndex = Math.min(allPanels.length - 1, toIndex);
5670
+ }
5671
+ containerApi.movePanel(fromIndex, toIndex);
5672
+ }
5771
5673
  }
5772
5674
 
5773
5675
  class DefaultHeader extends CompositeDisposable {
@@ -5827,6 +5729,11 @@
5827
5729
  this.onDidLayoutChange = this._onDidLayoutChange.event;
5828
5730
  this._onDidDrop = new Emitter();
5829
5731
  this.onDidDrop = this._onDidDrop.event;
5732
+ this._onDidAddView = new Emitter();
5733
+ this.onDidAddView = this._onDidAddView.event;
5734
+ this._onDidRemoveView = new Emitter();
5735
+ this.onDidRemoveView = this._onDidRemoveView.event;
5736
+ this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
5830
5737
  this._options = options;
5831
5738
  if (!options.components) {
5832
5739
  options.components = {};
@@ -5840,17 +5747,11 @@
5840
5747
  });
5841
5748
  this.addDisposables(this._disposable);
5842
5749
  }
5843
- get onDidAddView() {
5844
- return this._paneview.onDidAddView;
5845
- }
5846
- get onDidRemoveView() {
5847
- return this._paneview.onDidRemoveView;
5848
- }
5849
5750
  set paneview(value) {
5850
5751
  this._paneview = value;
5851
- this._disposable.value = new CompositeDisposable(this.paneview.onDidChange(() => {
5752
+ this._disposable.value = new CompositeDisposable(this._paneview.onDidChange(() => {
5852
5753
  this._onDidLayoutChange.fire(undefined);
5853
- }));
5754
+ }), this._paneview.onDidAddView((e) => this._onDidAddView.fire(e)), this._paneview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
5854
5755
  }
5855
5756
  get paneview() {
5856
5757
  return this._paneview;
@@ -6030,6 +5931,10 @@
6030
5931
  });
6031
5932
  panel.orientation = this.paneview.orientation;
6032
5933
  });
5934
+ setTimeout(() => {
5935
+ // the original onDidAddView events are missed since they are fired before we can subcribe to them
5936
+ this._onDidAddView.fire(panel);
5937
+ }, 0);
6033
5938
  return { size: view.size, view: panel };
6034
5939
  }),
6035
5940
  },
@@ -6056,12 +5961,14 @@
6056
5961
  this._snap = false;
6057
5962
  this._onDidChange = new Emitter();
6058
5963
  this.onDidChange = this._onDidChange.event;
6059
- this.addDisposables(this.api.onVisibilityChange((event) => {
5964
+ this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
6060
5965
  const { isVisible } = event;
6061
- const { containerApi } = this.params;
5966
+ const { containerApi } = this
5967
+ ._params;
6062
5968
  containerApi.setVisible(this, isVisible);
6063
5969
  }), this.api.onActiveChange(() => {
6064
- const { containerApi } = this.params;
5970
+ const { containerApi } = this
5971
+ ._params;
6065
5972
  containerApi.setActive(this);
6066
5973
  }), this.api.onDidConstraintsChangeInternal((event) => {
6067
5974
  if (typeof event.minimumSize === 'number' ||
@@ -6204,14 +6111,13 @@
6204
6111
  if (this.disposed) {
6205
6112
  throw new Error('invalid operation: resource is already disposed');
6206
6113
  }
6207
- // TODO use a better check for isReactFunctionalComponent
6208
6114
  if (typeof this.component !== 'function') {
6209
6115
  /**
6210
6116
  * we know this isn't a React.FunctionComponent so throw an error here.
6211
6117
  * if we do not intercept this the React library will throw a very obsure error
6212
6118
  * for the same reason, at least at this point we will emit a sensible stacktrace.
6213
6119
  */
6214
- throw new Error('invalid operation: only functional components are supported');
6120
+ throw new Error('Invalid Operation. dockview only supports React Functional Components.');
6215
6121
  }
6216
6122
  const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
6217
6123
  component: this
@@ -6275,16 +6181,14 @@
6275
6181
  this._onDidBlur = new Emitter();
6276
6182
  this.onDidBlur = this._onDidBlur.event;
6277
6183
  this._element = document.createElement('div');
6278
- this._element.style.height = '100%';
6279
- this._element.style.width = '100%';
6184
+ this._element.className = 'dockview-react-part';
6280
6185
  // this.hostedContainer = new HostedContainer({
6281
6186
  // id,
6282
6187
  // });
6283
6188
  // this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
6284
6189
  // this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
6285
6190
  this._actionsElement = document.createElement('div');
6286
- this._actionsElement.style.height = '100%';
6287
- this._actionsElement.style.width = '100%';
6191
+ this._actionsElement.className = 'dockview-react-part';
6288
6192
  }
6289
6193
  get element() {
6290
6194
  return this._element;
@@ -6332,6 +6236,8 @@
6332
6236
  }
6333
6237
  dispose() {
6334
6238
  var _a, _b;
6239
+ this._onDidFocus.dispose();
6240
+ this._onDidBlur.dispose();
6335
6241
  (_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
6336
6242
  // this.hostedContainer?.dispose();
6337
6243
  (_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
@@ -6344,6 +6250,7 @@
6344
6250
  this.component = component;
6345
6251
  this.reactPortalStore = reactPortalStore;
6346
6252
  this._element = document.createElement('div');
6253
+ this._element.className = 'dockview-react-part';
6347
6254
  }
6348
6255
  get element() {
6349
6256
  return this._element;
@@ -6388,7 +6295,6 @@
6388
6295
  const panelId = panelData.id;
6389
6296
  const params = panelData.params;
6390
6297
  const title = panelData.title;
6391
- const state = panelData.state;
6392
6298
  const suppressClosable = panelData.suppressClosable;
6393
6299
  const viewData = panelData.view;
6394
6300
  const view = new DefaultGroupPanelView({
@@ -6397,13 +6303,12 @@
6397
6303
  ? createComponent(viewData.tab.id, viewData.tab.id, this.layout.options.tabComponents, this.layout.options.frameworkTabComponents, (_c = this.layout.options.frameworkComponentFactory) === null || _c === void 0 ? void 0 : _c.tab)
6398
6304
  : new DefaultTab(),
6399
6305
  });
6400
- const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
6306
+ const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
6401
6307
  panel.init({
6402
6308
  view,
6403
6309
  title,
6404
6310
  suppressClosable,
6405
6311
  params: params || {},
6406
- state: state || {},
6407
6312
  });
6408
6313
  return panel;
6409
6314
  }
@@ -6418,8 +6323,7 @@
6418
6323
  value: undefined,
6419
6324
  };
6420
6325
  this._element = document.createElement('div');
6421
- this._element.style.height = '100%';
6422
- this._element.style.width = '100%';
6326
+ this._element.className = 'dockview-react-part';
6423
6327
  }
6424
6328
  get element() {
6425
6329
  return this._element;
@@ -6517,12 +6421,16 @@
6517
6421
  frameworkTabComponents: props.tabComponents,
6518
6422
  tabHeight: props.tabHeight,
6519
6423
  debug: props.debug,
6520
- enableExternalDragEvents: props.enableExternalDragEvents,
6521
6424
  watermarkFrameworkComponent: props.watermarkComponent,
6522
6425
  styles: props.hideBorders
6523
6426
  ? { separatorBorder: 'transparent' }
6524
6427
  : undefined,
6525
6428
  });
6429
+ const disposable = dockview.onDidDrop((event) => {
6430
+ if (props.onDidDrop) {
6431
+ props.onDidDrop(event);
6432
+ }
6433
+ });
6526
6434
  (_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
6527
6435
  dockview.deserializer = new ReactPanelDeserialzier(dockview);
6528
6436
  const { clientWidth, clientHeight } = domRef.current;
@@ -6532,6 +6440,7 @@
6532
6440
  }
6533
6441
  dockviewRef.current = dockview;
6534
6442
  return () => {
6443
+ disposable.dispose();
6535
6444
  dockview.dispose();
6536
6445
  };
6537
6446
  }, []);
@@ -6543,6 +6452,14 @@
6543
6452
  frameworkComponents: props.components,
6544
6453
  });
6545
6454
  }, [props.components]);
6455
+ React__namespace.useEffect(() => {
6456
+ if (!dockviewRef.current) {
6457
+ return;
6458
+ }
6459
+ dockviewRef.current.updateOptions({
6460
+ showDndOverlay: props.showDndOverlay,
6461
+ });
6462
+ }, [props.showDndOverlay]);
6546
6463
  React__namespace.useEffect(() => {
6547
6464
  if (!dockviewRef.current) {
6548
6465
  return;
@@ -6631,9 +6548,9 @@
6631
6548
  getComponent() {
6632
6549
  var _a;
6633
6550
  return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
6634
- params: ((_a = this.params) === null || _a === void 0 ? void 0 : _a.params) || {},
6551
+ params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
6635
6552
  api: this.api,
6636
- containerApi: this.params
6553
+ containerApi: this._params
6637
6554
  .containerApi,
6638
6555
  });
6639
6556
  }
@@ -6706,9 +6623,9 @@
6706
6623
  getComponent() {
6707
6624
  var _a;
6708
6625
  return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
6709
- params: ((_a = this.params) === null || _a === void 0 ? void 0 : _a.params) || {},
6626
+ params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
6710
6627
  api: this.api,
6711
- containerApi: this.params
6628
+ containerApi: this._params
6712
6629
  .containerApi,
6713
6630
  });
6714
6631
  }
@@ -6899,7 +6816,6 @@
6899
6816
  exports.BaseGrid = BaseGrid;
6900
6817
  exports.CompositeDisposable = CompositeDisposable;
6901
6818
  exports.ContentContainer = ContentContainer;
6902
- exports.DATA_KEY = DATA_KEY;
6903
6819
  exports.DockviewApi = DockviewApi;
6904
6820
  exports.DockviewComponent = DockviewComponent;
6905
6821
  exports.DockviewComponents = DockviewComponents;
@@ -6931,9 +6847,9 @@
6931
6847
  exports.SplitviewPanel = SplitviewPanel;
6932
6848
  exports.SplitviewReact = SplitviewReact;
6933
6849
  exports.Tab = Tab$1;
6850
+ exports.TickDelayedEvent = TickDelayedEvent;
6934
6851
  exports.addDisposableListener = addDisposableListener;
6935
6852
  exports.addDisposableWindowListener = addDisposableWindowListener;
6936
- exports.extractData = extractData;
6937
6853
  exports.getDirectionOrientation = getDirectionOrientation;
6938
6854
  exports.getGridLocation = getGridLocation;
6939
6855
  exports.getLocationOrientation = getLocationOrientation;
@@ -6941,11 +6857,8 @@
6941
6857
  exports.getPanelData = getPanelData;
6942
6858
  exports.getRelativeLocation = getRelativeLocation;
6943
6859
  exports.indexInParent = indexInParent;
6944
- exports.isCustomDragEvent = isCustomDragEvent;
6945
6860
  exports.isGridBranchNode = isGridBranchNode;
6946
- exports.isPanelTransferEvent = isPanelTransferEvent;
6947
6861
  exports.isReactElement = isReactElement;
6948
- exports.isTabDragEvent = isTabDragEvent;
6949
6862
  exports.orthogonal = orthogonal;
6950
6863
  exports.toTarget = toTarget;
6951
6864
  exports.usePortalsLifecycle = usePortalsLifecycle;