dockview-core 7.0.4 → 8.0.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 (374) hide show
  1. package/LICENCE.md +21 -0
  2. package/README.md +17 -86
  3. package/dist/cjs/api/component.api.d.ts +100 -9
  4. package/dist/cjs/api/dockviewGroupPanelApi.d.ts +45 -1
  5. package/dist/cjs/api/dockviewPanelApi.d.ts +21 -0
  6. package/dist/cjs/dismissableLayer.d.ts +57 -0
  7. package/dist/cjs/dnd/backend.d.ts +2 -2
  8. package/dist/cjs/dnd/dropTargetAnchorContainer.d.ts +12 -0
  9. package/dist/cjs/dnd/droptarget.d.ts +94 -0
  10. package/dist/cjs/dnd/ghost.d.ts +1 -0
  11. package/dist/cjs/dnd/pointer/longPress.d.ts +2 -2
  12. package/dist/cjs/dnd/pointer/pointerDragController.d.ts +5 -2
  13. package/dist/cjs/dnd/pointer/pointerDragSource.d.ts +1 -1
  14. package/dist/cjs/dnd/pointer/pointerDropTarget.d.ts +30 -1
  15. package/dist/cjs/dnd/pointer/pointerGhost.d.ts +1 -1
  16. package/dist/cjs/dockview/accessibilityMessages.d.ts +6 -0
  17. package/dist/cjs/dockview/advancedDnDService.d.ts +46 -0
  18. package/dist/cjs/dockview/components/panel/content.d.ts +1 -1
  19. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +2 -0
  20. package/dist/cjs/dockview/components/tab/tab.d.ts +2 -0
  21. package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +2 -2
  22. package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -1
  23. package/dist/cjs/dockview/components/titlebar/tabGroupChip.d.ts +1 -1
  24. package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +73 -2
  25. package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +1 -1
  26. package/dist/cjs/dockview/components/titlebar/tabReorderController.d.ts +295 -0
  27. package/dist/cjs/dockview/components/titlebar/tabs.d.ts +120 -50
  28. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +48 -0
  29. package/dist/cjs/dockview/dndCapabilities.d.ts +1 -1
  30. package/dist/cjs/dockview/dockviewComponent.d.ts +303 -19
  31. package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -0
  32. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +52 -2
  33. package/dist/cjs/dockview/dockviewPanel.d.ts +12 -0
  34. package/dist/cjs/dockview/dockviewShell.d.ts +48 -24
  35. package/dist/cjs/dockview/edgeGroupService.d.ts +20 -0
  36. package/dist/cjs/dockview/events.d.ts +6 -0
  37. package/dist/cjs/dockview/liveRegionService.d.ts +18 -5
  38. package/dist/cjs/dockview/moduleContracts.d.ts +480 -14
  39. package/dist/cjs/dockview/modules.d.ts +101 -22
  40. package/dist/cjs/dockview/options.d.ts +337 -30
  41. package/dist/cjs/dockview/optionsModules.d.ts +73 -0
  42. package/dist/cjs/dockview/popoutWindowService.d.ts +15 -10
  43. package/dist/cjs/dockview/rootDropTargetService.d.ts +11 -0
  44. package/dist/cjs/dockview/tabGroupAccent.d.ts +1 -1
  45. package/dist/cjs/dockview/tabGroupChipsService.d.ts +10 -0
  46. package/dist/cjs/dockview/theme.d.ts +2 -2
  47. package/dist/cjs/dockview/types.d.ts +3 -0
  48. package/dist/cjs/dom.d.ts +9 -1
  49. package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -2
  50. package/dist/cjs/gridview/gridview.d.ts +2 -0
  51. package/dist/cjs/index.d.ts +35 -29
  52. package/dist/cjs/lifecycle.d.ts +1 -0
  53. package/dist/cjs/overlay/overlay.d.ts +4 -2
  54. package/dist/cjs/overlay/overlayRenderContainer.d.ts +8 -0
  55. package/dist/cjs/paneview/paneview.d.ts +2 -1
  56. package/dist/cjs/paneview/paneviewComponent.d.ts +3 -0
  57. package/dist/cjs/paneview/paneviewPanel.d.ts +5 -0
  58. package/dist/cjs/svg.d.ts +1 -0
  59. package/dist/cjs/types.d.ts +8 -0
  60. package/dist/dockview-core.js +18391 -19679
  61. package/dist/dockview-core.min.js +4138 -6
  62. package/dist/dockview-core.min.noStyle.js +6 -7
  63. package/dist/dockview-core.noStyle.js +18390 -19656
  64. package/dist/package/main.cjs.js +18002 -19268
  65. package/dist/package/main.cjs.min.js +6 -6
  66. package/dist/package/main.esm.min.mjs +6 -6
  67. package/dist/package/main.esm.mjs +17959 -19260
  68. package/package.json +81 -77
  69. package/dist/cjs/api/component.api.js +0 -1242
  70. package/dist/cjs/api/dockviewGroupPanelApi.js +0 -200
  71. package/dist/cjs/api/dockviewPanelApi.js +0 -172
  72. package/dist/cjs/api/entryPoints.js +0 -27
  73. package/dist/cjs/api/gridviewPanelApi.js +0 -45
  74. package/dist/cjs/api/panelApi.js +0 -133
  75. package/dist/cjs/api/paneviewPanelApi.js +0 -57
  76. package/dist/cjs/api/splitviewPanelApi.js +0 -47
  77. package/dist/cjs/array.js +0 -66
  78. package/dist/cjs/constants.js +0 -11
  79. package/dist/cjs/dnd/backend.js +0 -171
  80. package/dist/cjs/dnd/dataTransfer.js +0 -100
  81. package/dist/cjs/dnd/dnd.js +0 -74
  82. package/dist/cjs/dnd/dropOverlay.js +0 -197
  83. package/dist/cjs/dnd/dropTargetAnchorContainer.js +0 -104
  84. package/dist/cjs/dnd/droptarget.js +0 -362
  85. package/dist/cjs/dnd/ghost.js +0 -17
  86. package/dist/cjs/dnd/pointer/index.js +0 -13
  87. package/dist/cjs/dnd/pointer/longPress.js +0 -151
  88. package/dist/cjs/dnd/pointer/pointerDragController.js +0 -243
  89. package/dist/cjs/dnd/pointer/pointerDragSource.js +0 -197
  90. package/dist/cjs/dnd/pointer/pointerDropTarget.js +0 -198
  91. package/dist/cjs/dnd/pointer/pointerGhost.js +0 -44
  92. package/dist/cjs/dnd/pointer/types.js +0 -2
  93. package/dist/cjs/dockview/accessibilityMessages.js +0 -51
  94. package/dist/cjs/dockview/allModules.js +0 -25
  95. package/dist/cjs/dockview/components/panel/content.js +0 -213
  96. package/dist/cjs/dockview/components/popupService.js +0 -132
  97. package/dist/cjs/dockview/components/tab/defaultTab.js +0 -70
  98. package/dist/cjs/dockview/components/tab/tab.js +0 -281
  99. package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +0 -95
  100. package/dist/cjs/dockview/components/titlebar/groupDragSource.js +0 -218
  101. package/dist/cjs/dockview/components/titlebar/tabGroupChip.js +0 -104
  102. package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +0 -477
  103. package/dist/cjs/dockview/components/titlebar/tabGroups.js +0 -854
  104. package/dist/cjs/dockview/components/titlebar/tabOverflowControl.js +0 -19
  105. package/dist/cjs/dockview/components/titlebar/tabs.js +0 -2016
  106. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +0 -458
  107. package/dist/cjs/dockview/components/titlebar/voidContainer.js +0 -120
  108. package/dist/cjs/dockview/components/watermark/watermark.js +0 -40
  109. package/dist/cjs/dockview/deserializer.js +0 -39
  110. package/dist/cjs/dockview/dndCapabilities.js +0 -39
  111. package/dist/cjs/dockview/dockviewComponent.js +0 -3896
  112. package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -70
  113. package/dist/cjs/dockview/dockviewGroupPanel.js +0 -204
  114. package/dist/cjs/dockview/dockviewGroupPanelModel.js +0 -1514
  115. package/dist/cjs/dockview/dockviewPanel.js +0 -265
  116. package/dist/cjs/dockview/dockviewPanelModel.js +0 -105
  117. package/dist/cjs/dockview/dockviewShell.js +0 -744
  118. package/dist/cjs/dockview/edgeGroupService.js +0 -128
  119. package/dist/cjs/dockview/events.js +0 -67
  120. package/dist/cjs/dockview/floatingGroupService.js +0 -231
  121. package/dist/cjs/dockview/framework.js +0 -2
  122. package/dist/cjs/dockview/headerActionsService.js +0 -149
  123. package/dist/cjs/dockview/liveRegionService.js +0 -185
  124. package/dist/cjs/dockview/moduleContracts.js +0 -2
  125. package/dist/cjs/dockview/modules.js +0 -304
  126. package/dist/cjs/dockview/options.js +0 -103
  127. package/dist/cjs/dockview/popoutWindowService.js +0 -261
  128. package/dist/cjs/dockview/rootDropTargetService.js +0 -87
  129. package/dist/cjs/dockview/strictEventsSequencing.js +0 -63
  130. package/dist/cjs/dockview/tabGroup.js +0 -219
  131. package/dist/cjs/dockview/tabGroupAccent.js +0 -126
  132. package/dist/cjs/dockview/theme.js +0 -139
  133. package/dist/cjs/dockview/types.js +0 -2
  134. package/dist/cjs/dockview/validate.js +0 -76
  135. package/dist/cjs/dockview/watermarkService.js +0 -61
  136. package/dist/cjs/dom.js +0 -543
  137. package/dist/cjs/events.js +0 -296
  138. package/dist/cjs/framwork.js +0 -2
  139. package/dist/cjs/gridview/baseComponentGridview.js +0 -330
  140. package/dist/cjs/gridview/basePanelView.js +0 -162
  141. package/dist/cjs/gridview/branchNode.js +0 -372
  142. package/dist/cjs/gridview/gridview.js +0 -776
  143. package/dist/cjs/gridview/gridviewComponent.js +0 -363
  144. package/dist/cjs/gridview/gridviewPanel.js +0 -249
  145. package/dist/cjs/gridview/leafNode.js +0 -169
  146. package/dist/cjs/gridview/options.js +0 -17
  147. package/dist/cjs/gridview/types.js +0 -2
  148. package/dist/cjs/index.js +0 -105
  149. package/dist/cjs/lifecycle.js +0 -80
  150. package/dist/cjs/math.js +0 -38
  151. package/dist/cjs/overlay/overlay.js +0 -602
  152. package/dist/cjs/overlay/overlayRenderContainer.js +0 -309
  153. package/dist/cjs/panel/types.js +0 -2
  154. package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -92
  155. package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -141
  156. package/dist/cjs/paneview/options.js +0 -44
  157. package/dist/cjs/paneview/paneview.js +0 -203
  158. package/dist/cjs/paneview/paneviewComponent.js +0 -430
  159. package/dist/cjs/paneview/paneviewPanel.js +0 -275
  160. package/dist/cjs/popoutWindow.js +0 -244
  161. package/dist/cjs/resizable.js +0 -97
  162. package/dist/cjs/scrollbar.js +0 -169
  163. package/dist/cjs/splitview/options.js +0 -19
  164. package/dist/cjs/splitview/splitview.js +0 -999
  165. package/dist/cjs/splitview/splitviewComponent.js +0 -401
  166. package/dist/cjs/splitview/splitviewPanel.js +0 -179
  167. package/dist/cjs/splitview/viewItem.js +0 -119
  168. package/dist/cjs/svg.js +0 -43
  169. package/dist/cjs/types.js +0 -2
  170. package/dist/dockview-core.min.js.map +0 -1
  171. package/dist/dockview-core.min.noStyle.js.map +0 -1
  172. package/dist/esm/api/component.api.d.ts +0 -640
  173. package/dist/esm/api/component.api.js +0 -887
  174. package/dist/esm/api/dockviewGroupPanelApi.d.ts +0 -109
  175. package/dist/esm/api/dockviewGroupPanelApi.js +0 -155
  176. package/dist/esm/api/dockviewPanelApi.d.ts +0 -84
  177. package/dist/esm/api/dockviewPanelApi.js +0 -124
  178. package/dist/esm/api/entryPoints.d.ts +0 -9
  179. package/dist/esm/api/entryPoints.js +0 -21
  180. package/dist/esm/api/gridviewPanelApi.d.ts +0 -37
  181. package/dist/esm/api/gridviewPanelApi.js +0 -23
  182. package/dist/esm/api/panelApi.d.ts +0 -100
  183. package/dist/esm/api/panelApi.js +0 -87
  184. package/dist/esm/api/paneviewPanelApi.d.ts +0 -26
  185. package/dist/esm/api/paneviewPanelApi.js +0 -27
  186. package/dist/esm/api/splitviewPanelApi.d.ts +0 -32
  187. package/dist/esm/api/splitviewPanelApi.js +0 -25
  188. package/dist/esm/array.d.ts +0 -13
  189. package/dist/esm/array.js +0 -57
  190. package/dist/esm/constants.d.ts +0 -8
  191. package/dist/esm/constants.js +0 -8
  192. package/dist/esm/dnd/backend.d.ts +0 -70
  193. package/dist/esm/dnd/backend.js +0 -148
  194. package/dist/esm/dnd/dataTransfer.d.ts +0 -31
  195. package/dist/esm/dnd/dataTransfer.js +0 -67
  196. package/dist/esm/dnd/dnd.d.ts +0 -32
  197. package/dist/esm/dnd/dnd.js +0 -51
  198. package/dist/esm/dnd/dropOverlay.d.ts +0 -20
  199. package/dist/esm/dnd/dropOverlay.js +0 -192
  200. package/dist/esm/dnd/dropTargetAnchorContainer.d.ts +0 -16
  201. package/dist/esm/dnd/dropTargetAnchorContainer.js +0 -73
  202. package/dist/esm/dnd/droptarget.d.ts +0 -116
  203. package/dist/esm/dnd/droptarget.js +0 -316
  204. package/dist/esm/dnd/ghost.d.ts +0 -4
  205. package/dist/esm/dnd/ghost.js +0 -14
  206. package/dist/esm/dnd/pointer/index.d.ts +0 -11
  207. package/dist/esm/dnd/pointer/index.js +0 -5
  208. package/dist/esm/dnd/pointer/longPress.d.ts +0 -32
  209. package/dist/esm/dnd/pointer/longPress.js +0 -127
  210. package/dist/esm/dnd/pointer/pointerDragController.d.ts +0 -60
  211. package/dist/esm/dnd/pointer/pointerDragController.js +0 -193
  212. package/dist/esm/dnd/pointer/pointerDragSource.d.ts +0 -61
  213. package/dist/esm/dnd/pointer/pointerDragSource.js +0 -173
  214. package/dist/esm/dnd/pointer/pointerDropTarget.d.ts +0 -39
  215. package/dist/esm/dnd/pointer/pointerDropTarget.js +0 -168
  216. package/dist/esm/dnd/pointer/pointerGhost.d.ts +0 -30
  217. package/dist/esm/dnd/pointer/pointerGhost.js +0 -39
  218. package/dist/esm/dnd/pointer/types.d.ts +0 -16
  219. package/dist/esm/dnd/pointer/types.js +0 -1
  220. package/dist/esm/dockview/accessibilityMessages.d.ts +0 -32
  221. package/dist/esm/dockview/accessibilityMessages.js +0 -30
  222. package/dist/esm/dockview/allModules.d.ts +0 -8
  223. package/dist/esm/dockview/allModules.js +0 -22
  224. package/dist/esm/dockview/components/panel/content.d.ts +0 -54
  225. package/dist/esm/dockview/components/panel/content.js +0 -185
  226. package/dist/esm/dockview/components/popupService.d.ts +0 -21
  227. package/dist/esm/dockview/components/popupService.js +0 -108
  228. package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -12
  229. package/dist/esm/dockview/components/tab/defaultTab.js +0 -43
  230. package/dist/esm/dockview/components/tab/tab.d.ts +0 -44
  231. package/dist/esm/dockview/components/tab/tab.js +0 -242
  232. package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +0 -34
  233. package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +0 -65
  234. package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +0 -51
  235. package/dist/esm/dockview/components/titlebar/groupDragSource.js +0 -178
  236. package/dist/esm/dockview/components/titlebar/tabGroupChip.d.ts +0 -37
  237. package/dist/esm/dockview/components/titlebar/tabGroupChip.js +0 -77
  238. package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +0 -72
  239. package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +0 -360
  240. package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +0 -107
  241. package/dist/esm/dockview/components/titlebar/tabGroups.js +0 -621
  242. package/dist/esm/dockview/components/titlebar/tabOverflowControl.d.ts +0 -8
  243. package/dist/esm/dockview/components/titlebar/tabOverflowControl.js +0 -16
  244. package/dist/esm/dockview/components/titlebar/tabs.d.ts +0 -167
  245. package/dist/esm/dockview/components/titlebar/tabs.js +0 -1653
  246. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +0 -104
  247. package/dist/esm/dockview/components/titlebar/tabsContainer.js +0 -359
  248. package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +0 -21
  249. package/dist/esm/dockview/components/titlebar/voidContainer.js +0 -92
  250. package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -8
  251. package/dist/esm/dockview/components/watermark/watermark.js +0 -14
  252. package/dist/esm/dockview/deserializer.d.ts +0 -12
  253. package/dist/esm/dockview/deserializer.js +0 -34
  254. package/dist/esm/dockview/dndCapabilities.d.ts +0 -19
  255. package/dist/esm/dockview/dndCapabilities.js +0 -36
  256. package/dist/esm/dockview/dockviewComponent.d.ts +0 -626
  257. package/dist/esm/dockview/dockviewComponent.js +0 -3214
  258. package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -45
  259. package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -44
  260. package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -35
  261. package/dist/esm/dockview/dockviewGroupPanel.js +0 -142
  262. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +0 -358
  263. package/dist/esm/dockview/dockviewGroupPanelModel.js +0 -1180
  264. package/dist/esm/dockview/dockviewPanel.d.ts +0 -69
  265. package/dist/esm/dockview/dockviewPanel.js +0 -178
  266. package/dist/esm/dockview/dockviewPanelModel.d.ts +0 -37
  267. package/dist/esm/dockview/dockviewPanelModel.js +0 -81
  268. package/dist/esm/dockview/dockviewShell.d.ts +0 -150
  269. package/dist/esm/dockview/dockviewShell.js +0 -678
  270. package/dist/esm/dockview/edgeGroupService.d.ts +0 -38
  271. package/dist/esm/dockview/edgeGroupService.js +0 -63
  272. package/dist/esm/dockview/events.d.ts +0 -38
  273. package/dist/esm/dockview/events.js +0 -34
  274. package/dist/esm/dockview/floatingGroupService.d.ts +0 -37
  275. package/dist/esm/dockview/floatingGroupService.js +0 -150
  276. package/dist/esm/dockview/framework.d.ts +0 -65
  277. package/dist/esm/dockview/framework.js +0 -1
  278. package/dist/esm/dockview/headerActionsService.d.ts +0 -32
  279. package/dist/esm/dockview/headerActionsService.js +0 -86
  280. package/dist/esm/dockview/liveRegionService.d.ts +0 -53
  281. package/dist/esm/dockview/liveRegionService.js +0 -159
  282. package/dist/esm/dockview/moduleContracts.d.ts +0 -119
  283. package/dist/esm/dockview/moduleContracts.js +0 -1
  284. package/dist/esm/dockview/modules.d.ts +0 -110
  285. package/dist/esm/dockview/modules.js +0 -170
  286. package/dist/esm/dockview/options.d.ts +0 -474
  287. package/dist/esm/dockview/options.js +0 -77
  288. package/dist/esm/dockview/popoutWindowService.d.ts +0 -95
  289. package/dist/esm/dockview/popoutWindowService.js +0 -175
  290. package/dist/esm/dockview/rootDropTargetService.d.ts +0 -35
  291. package/dist/esm/dockview/rootDropTargetService.js +0 -82
  292. package/dist/esm/dockview/strictEventsSequencing.d.ts +0 -7
  293. package/dist/esm/dockview/strictEventsSequencing.js +0 -41
  294. package/dist/esm/dockview/tabGroup.d.ts +0 -99
  295. package/dist/esm/dockview/tabGroup.js +0 -144
  296. package/dist/esm/dockview/tabGroupAccent.d.ts +0 -65
  297. package/dist/esm/dockview/tabGroupAccent.js +0 -114
  298. package/dist/esm/dockview/theme.d.ts +0 -86
  299. package/dist/esm/dockview/theme.js +0 -136
  300. package/dist/esm/dockview/types.d.ts +0 -53
  301. package/dist/esm/dockview/types.js +0 -1
  302. package/dist/esm/dockview/validate.d.ts +0 -0
  303. package/dist/esm/dockview/validate.js +0 -76
  304. package/dist/esm/dockview/watermarkService.d.ts +0 -30
  305. package/dist/esm/dockview/watermarkService.js +0 -56
  306. package/dist/esm/dom.d.ts +0 -60
  307. package/dist/esm/dom.js +0 -375
  308. package/dist/esm/events.d.ts +0 -79
  309. package/dist/esm/events.js +0 -219
  310. package/dist/esm/framwork.d.ts +0 -4
  311. package/dist/esm/framwork.js +0 -1
  312. package/dist/esm/gridview/baseComponentGridview.d.ts +0 -111
  313. package/dist/esm/gridview/baseComponentGridview.js +0 -237
  314. package/dist/esm/gridview/basePanelView.d.ts +0 -40
  315. package/dist/esm/gridview/basePanelView.js +0 -91
  316. package/dist/esm/gridview/branchNode.d.ts +0 -57
  317. package/dist/esm/gridview/branchNode.js +0 -257
  318. package/dist/esm/gridview/gridview.d.ts +0 -158
  319. package/dist/esm/gridview/gridview.js +0 -681
  320. package/dist/esm/gridview/gridviewComponent.d.ts +0 -88
  321. package/dist/esm/gridview/gridviewComponent.js +0 -265
  322. package/dist/esm/gridview/gridviewPanel.d.ts +0 -77
  323. package/dist/esm/gridview/gridviewPanel.js +0 -182
  324. package/dist/esm/gridview/leafNode.d.ts +0 -34
  325. package/dist/esm/gridview/leafNode.js +0 -102
  326. package/dist/esm/gridview/options.d.ts +0 -15
  327. package/dist/esm/gridview/options.js +0 -14
  328. package/dist/esm/gridview/types.d.ts +0 -3
  329. package/dist/esm/gridview/types.js +0 -1
  330. package/dist/esm/index.d.ts +0 -58
  331. package/dist/esm/index.js +0 -44
  332. package/dist/esm/lifecycle.d.ts +0 -25
  333. package/dist/esm/lifecycle.js +0 -56
  334. package/dist/esm/math.d.ts +0 -5
  335. package/dist/esm/math.js +0 -32
  336. package/dist/esm/overlay/overlay.d.ts +0 -91
  337. package/dist/esm/overlay/overlay.js +0 -520
  338. package/dist/esm/overlay/overlayRenderContainer.d.ts +0 -24
  339. package/dist/esm/overlay/overlayRenderContainer.js +0 -249
  340. package/dist/esm/panel/types.d.ts +0 -33
  341. package/dist/esm/panel/types.js +0 -1
  342. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -21
  343. package/dist/esm/paneview/defaultPaneviewHeader.js +0 -65
  344. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -38
  345. package/dist/esm/paneview/draggablePaneviewPanel.js +0 -107
  346. package/dist/esm/paneview/options.d.ts +0 -30
  347. package/dist/esm/paneview/options.js +0 -22
  348. package/dist/esm/paneview/paneview.d.ts +0 -41
  349. package/dist/esm/paneview/paneview.js +0 -148
  350. package/dist/esm/paneview/paneviewComponent.d.ts +0 -133
  351. package/dist/esm/paneview/paneviewComponent.js +0 -306
  352. package/dist/esm/paneview/paneviewPanel.d.ts +0 -98
  353. package/dist/esm/paneview/paneviewPanel.js +0 -192
  354. package/dist/esm/popoutWindow.d.ts +0 -38
  355. package/dist/esm/popoutWindow.js +0 -170
  356. package/dist/esm/resizable.d.ts +0 -12
  357. package/dist/esm/resizable.js +0 -66
  358. package/dist/esm/scrollbar.d.ts +0 -15
  359. package/dist/esm/scrollbar.js +0 -139
  360. package/dist/esm/splitview/options.d.ts +0 -21
  361. package/dist/esm/splitview/options.js +0 -16
  362. package/dist/esm/splitview/splitview.d.ts +0 -145
  363. package/dist/esm/splitview/splitview.js +0 -770
  364. package/dist/esm/splitview/splitviewComponent.d.ts +0 -101
  365. package/dist/esm/splitview/splitviewComponent.js +0 -267
  366. package/dist/esm/splitview/splitviewPanel.d.ts +0 -45
  367. package/dist/esm/splitview/splitviewPanel.js +0 -108
  368. package/dist/esm/splitview/viewItem.d.ts +0 -25
  369. package/dist/esm/splitview/viewItem.js +0 -74
  370. package/dist/esm/svg.d.ts +0 -3
  371. package/dist/esm/svg.js +0 -31
  372. package/dist/esm/types.d.ts +0 -31
  373. package/dist/esm/types.js +0 -1
  374. package/dist/styles/dockview.css +0 -3436
@@ -1,159 +0,0 @@
1
- import { CompositeDisposable } from '../lifecycle';
2
- import { resolveMessages } from './accessibilityMessages';
3
- import { defineModule } from './modules';
4
- /** Bulk transactions whose per-panel events should not each be announced. */
5
- const isBulk = (kind) => kind === 'load' || kind === 'clear';
6
- function createLiveRegion(politeness) {
7
- const el = document.createElement('div');
8
- el.className =
9
- politeness === 'assertive'
10
- ? 'dv-live-region-assertive'
11
- : 'dv-live-region';
12
- // assertive interrupts the SR (errors / cancellations); polite waits for a
13
- // pause (routine status). `alert` implies assertive, `status` implies polite.
14
- el.setAttribute('role', politeness === 'assertive' ? 'alert' : 'status');
15
- el.setAttribute('aria-live', politeness);
16
- el.setAttribute('aria-atomic', 'true');
17
- // Visually hidden but kept in the accessibility tree (never display:none /
18
- // visibility:hidden, which would drop it from AT). Standard clip pattern.
19
- Object.assign(el.style, {
20
- position: 'absolute',
21
- width: '1px',
22
- height: '1px',
23
- margin: '-1px',
24
- padding: '0',
25
- overflow: 'hidden',
26
- clip: 'rect(0 0 0 0)',
27
- clipPath: 'inset(50%)',
28
- whiteSpace: 'nowrap',
29
- border: '0',
30
- });
31
- return el;
32
- }
33
- /**
34
- * Narrates layout state changes to screen readers via visually-hidden
35
- * `aria-live` regions. Free / core (WCAG 4.1.3). Announces panel open/close +
36
- * the shared `announce()` sink (the accessibility module narrates docking here too).
37
- * Two regions: a **polite** one for routine status and an **assertive** one
38
- * for errors/cancellations. The bulk load/clear burst is suppressed via the
39
- * mutation-transaction events, and an app can take over delivery entirely with
40
- * the `announcer` option.
41
- */
42
- export class LiveRegionService extends CompositeDisposable {
43
- constructor(host) {
44
- super();
45
- this._suppressDepth = 0;
46
- this._locationSubs = new Map();
47
- this._host = host;
48
- this._polite = createLiveRegion('polite');
49
- this._assertive = createLiveRegion('assertive');
50
- host.element.appendChild(this._polite);
51
- host.element.appendChild(this._assertive);
52
- this.addDisposables({ dispose: () => this._polite.remove() }, { dispose: () => this._assertive.remove() }, host.onDidAddPanel((panel) => this._announce(panel, 'open')), host.onDidRemovePanel((panel) => this._announce(panel, 'close')),
53
- // Bracket bulk transactions so a fromJSON / clear doesn't announce
54
- // every nested add/remove.
55
- host.onWillMutateLayout((e) => {
56
- if (isBulk(e.kind)) {
57
- this._suppressDepth++;
58
- }
59
- }), host.onDidMutateLayout((e) => {
60
- if (isBulk(e.kind)) {
61
- this._suppressDepth = Math.max(0, this._suppressDepth - 1);
62
- }
63
- }), host.onDidMaximizedGroupChange((e) => {
64
- const panel = e.group.activePanel;
65
- if (panel) {
66
- this._announce(panel, e.isMaximized ? 'maximize' : 'restore');
67
- }
68
- }),
69
- // Narrate a group floating / docking back / popping out. A group is
70
- // born in the grid then transitions, so track each group's previous
71
- // location and ignore the no-op initial `-> grid`.
72
- host.onDidAddGroup((group) => this._trackLocation(group)), host.onDidRemoveGroup((group) => {
73
- var _a;
74
- (_a = this._locationSubs.get(group.id)) === null || _a === void 0 ? void 0 : _a.dispose();
75
- this._locationSubs.delete(group.id);
76
- }), {
77
- dispose: () => {
78
- this._locationSubs.forEach((sub) => sub.dispose());
79
- this._locationSubs.clear();
80
- },
81
- });
82
- }
83
- _trackLocation(group) {
84
- let prev = group.api.location.type;
85
- const sub = group.api.onDidLocationChange((e) => {
86
- const next = e.location.type;
87
- if (next === prev) {
88
- return;
89
- }
90
- prev = next;
91
- const panel = group.activePanel;
92
- if (!panel) {
93
- return;
94
- }
95
- const kind = next === 'floating'
96
- ? 'float'
97
- : next === 'popout'
98
- ? 'popout'
99
- : 'dock';
100
- this._announce(panel, kind);
101
- });
102
- this._locationSubs.set(group.id, sub);
103
- }
104
- announce(message, politeness = 'polite') {
105
- // Opt-out (read live so `updateOptions({ announcements })` applies).
106
- if (this._host.options.announcements === false ||
107
- this._suppressDepth > 0 ||
108
- !message) {
109
- return;
110
- }
111
- // Apps can route announcements into their own SR system instead of the
112
- // built-in regions (e.g. a shared app-wide live region).
113
- const announcer = this._host.options.announcer;
114
- if (announcer) {
115
- announcer({ message, politeness });
116
- return;
117
- }
118
- // Clearing first forces SRs to re-announce an identical message.
119
- const region = politeness === 'assertive' ? this._assertive : this._polite;
120
- region.textContent = '';
121
- region.textContent = message;
122
- }
123
- _announce(panel, kind) {
124
- var _a, _b;
125
- // The app may localise/override the message, suppress it (null / ''),
126
- // or fall through to the default (undefined).
127
- const custom = (_b = (_a = this._host.options).getAnnouncement) === null || _b === void 0 ? void 0 : _b.call(_a, { kind, panel });
128
- if (custom === null || custom === '') {
129
- return;
130
- }
131
- this.announce(custom !== null && custom !== void 0 ? custom : this._defaultMessage(panel, kind));
132
- }
133
- _defaultMessage(panel, kind) {
134
- var _a;
135
- const m = resolveMessages(this._host.options.messages);
136
- const name = (_a = panel.title) !== null && _a !== void 0 ? _a : panel.id;
137
- switch (kind) {
138
- case 'open':
139
- return m.panelOpened(name);
140
- case 'close':
141
- return m.panelClosed(name);
142
- case 'maximize':
143
- return m.groupMaximized(name);
144
- case 'restore':
145
- return m.groupRestored(name);
146
- case 'float':
147
- return m.groupFloated(name);
148
- case 'dock':
149
- return m.groupDocked(name);
150
- case 'popout':
151
- return m.groupPoppedOut(name);
152
- }
153
- }
154
- }
155
- export const LiveRegionModule = defineModule({
156
- name: 'LiveRegion',
157
- serviceKey: 'liveRegionService',
158
- create: (host) => new LiveRegionService(host),
159
- });
@@ -1,119 +0,0 @@
1
- /**
2
- * Service + host interfaces for the pluggable feature modules. Core references
3
- * only these interfaces — never a module's implementation — so each module is
4
- * decoupled from core and independently testable / removable. Keep this file
5
- * implementation-free.
6
- */
7
- import { IDisposable } from '../lifecycle';
8
- import { Event } from '../events';
9
- import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
10
- import { IDragGhostSpec } from '../dnd/backend';
11
- import { DockviewApi } from '../api/component.api';
12
- import { DockviewGroupPanel } from './dockviewGroupPanel';
13
- import { IDockviewPanel } from './dockviewPanel';
14
- import { ITabGroup } from './tabGroup';
15
- import { TabGroupColorPalette } from './tabGroupAccent';
16
- import { PopupService } from './components/popupService';
17
- import { DockviewComponentOptions } from './options';
18
- import { DockviewLayoutMutationEvent, GroupNavigationDirection } from './dockviewComponent';
19
- import { DockviewWillDropEvent } from './dockviewGroupPanelModel';
20
- import { GroupDragEvent, TabDragEvent } from './components/titlebar/tabsContainer';
21
- import { DockviewGroupDropLocation, DockviewTabGroupChangeEvent, DockviewTabGroupPanelChangeEvent, DockviewTabGroupCollapsedChangeEvent, DockviewWillShowOverlayLocationEvent } from './events';
22
- export interface IContextMenuHost {
23
- readonly options: DockviewComponentOptions;
24
- readonly api: DockviewApi;
25
- readonly tabGroupColorPalette: TabGroupColorPalette;
26
- getPopupServiceForGroup(group: DockviewGroupPanel): PopupService;
27
- }
28
- export interface IContextMenuService {
29
- show(panel: IDockviewPanel, group: DockviewGroupPanel, event: MouseEvent): void;
30
- showForChip(tabGroup: ITabGroup, group: DockviewGroupPanel, event: MouseEvent): void;
31
- }
32
- export interface ITabGroupChipsHost {
33
- readonly onDidAddGroup: Event<DockviewGroupPanel>;
34
- readonly onDidRemoveGroup: Event<DockviewGroupPanel>;
35
- fireDidCreateTabGroup(event: DockviewTabGroupChangeEvent): void;
36
- fireDidDestroyTabGroup(event: DockviewTabGroupChangeEvent): void;
37
- fireDidAddPanelToTabGroup(event: DockviewTabGroupPanelChangeEvent): void;
38
- fireDidRemovePanelFromTabGroup(event: DockviewTabGroupPanelChangeEvent): void;
39
- fireDidTabGroupChange(event: DockviewTabGroupChangeEvent): void;
40
- fireDidTabGroupCollapsedChange(event: DockviewTabGroupCollapsedChangeEvent): void;
41
- }
42
- export interface ITabGroupChipsService extends IDisposable {
43
- /**
44
- * Subscribe to the per-group tab-group events on the given group and
45
- * re-fire them on the host's component-level emitters. Returns a
46
- * disposable that detaches the subscriptions; intended to be bundled
47
- * into the per-group CompositeDisposable so cleanup happens when the
48
- * group is removed.
49
- */
50
- attachToGroup(group: DockviewGroupPanel): IDisposable;
51
- }
52
- export interface IAccessibilityHost {
53
- /**
54
- * The outermost dockview element (the shell, which also contains edge
55
- * groups). A getter — it must resolve to the shell once that exists, not
56
- * the inner gridview, or keydowns from edge groups are missed.
57
- */
58
- readonly rootElement: HTMLElement;
59
- readonly options: DockviewComponentOptions;
60
- readonly groups: DockviewGroupPanel[];
61
- readonly activeGroup: DockviewGroupPanel | undefined;
62
- readonly activePanel: IDockviewPanel | undefined;
63
- /**
64
- * The next / previous group in gridview (spatial) order, wrapping round —
65
- * the one piece of navigation that needs the grid internals. All other
66
- * focus logic lives in the service, using the public group API.
67
- */
68
- adjacentGroup(group: DockviewGroupPanel, reverse: boolean): DockviewGroupPanel | undefined;
69
- /** The nearest grid group in a spatial direction — drives Alt+Arrow nav. */
70
- adjacentGroupInDirection(group: DockviewGroupPanel, direction: GroupNavigationDirection): DockviewGroupPanel | undefined;
71
- /** Fires before / after a structural layout change — used to restore focus on close. */
72
- readonly onWillMutateLayout: Event<DockviewLayoutMutationEvent>;
73
- readonly onDidMutateLayout: Event<DockviewLayoutMutationEvent>;
74
- showDropPreview(group: DockviewGroupPanel, position: Position): IDisposable;
75
- announce(message: string): void;
76
- dockPanel(panel: IDockviewPanel, group: DockviewGroupPanel, position: Position): void;
77
- }
78
- export interface IAccessibilityService extends IDisposable {
79
- }
80
- /**
81
- * Marker for the advanced keyboard docking service (spatial group focus +
82
- * keyboard move mode). Self-driven; the component never calls into it.
83
- */
84
- export interface IKeyboardDockingService extends IDisposable {
85
- }
86
- export interface IAdvancedDnDHost {
87
- readonly options: DockviewComponentOptions;
88
- readonly api: DockviewApi;
89
- fireWillDragPanel(event: TabDragEvent): void;
90
- fireWillDragGroup(event: GroupDragEvent): void;
91
- fireWillDrop(event: DockviewWillDropEvent): void;
92
- fireWillShowOverlay(event: DockviewWillShowOverlayLocationEvent): void;
93
- }
94
- export interface IAdvancedDnDService extends IDisposable {
95
- dispatchWillDragPanel(event: TabDragEvent): void;
96
- dispatchWillDragGroup(event: GroupDragEvent): void;
97
- dispatchWillDrop(event: DockviewWillDropEvent): void;
98
- dispatchWillShowOverlay(event: DockviewWillShowOverlayLocationEvent): void;
99
- /**
100
- * Resolve the custom group drag ghost from
101
- * `createGroupDragGhostComponent`, or `undefined` when no factory is
102
- * configured (the caller then renders the default chip). Returning
103
- * `undefined` is also what happens when this module is absent.
104
- */
105
- buildGroupDragGhost(group: DockviewGroupPanel): IDragGhostSpec | undefined;
106
- /**
107
- * Resolve the app-supplied overlay model for a group drop target via the
108
- * `dropOverlayModel` option, or `undefined` to keep the target's default.
109
- */
110
- resolveOverlayModel(location: DockviewGroupDropLocation, group?: DockviewGroupPanel): DroptargetOverlayModel | undefined;
111
- /**
112
- * Render the drop-preview overlay on a group at `position` — the same
113
- * overlay a mouse drag shows — without a live drag. Returns a disposable
114
- * that clears it. Used by keyboard docking so keyboard and mouse previews
115
- * are identical (single source of truth). Commit the move via the public
116
- * `api.moveGroupOrPanel({ to: { group, position } })`.
117
- */
118
- showPreviewOverlay(group: DockviewGroupPanel, position: Position): IDisposable;
119
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,110 +0,0 @@
1
- /**
2
- * Internal module system for dockview.
3
- *
4
- * Modules are feature bundles that register services into the dockview
5
- * component. `registerModules(...)` is the one public entry point — it lets a
6
- * sibling package contribute modules that `DockviewComponent` picks up at
7
- * construction. The richer opt-in surface (a per-component `modules` option,
8
- * framework wrappers) is still reserved for a future version; the module
9
- * authoring API (`defineModule`, the service contracts) remains internal.
10
- */
11
- import { IDisposable } from '../lifecycle';
12
- import { IFloatingGroupService } from './floatingGroupService';
13
- import { IPopoutWindowService } from './popoutWindowService';
14
- import { IWatermarkService } from './watermarkService';
15
- import { IEdgeGroupService } from './edgeGroupService';
16
- import { IRootDropTargetService } from './rootDropTargetService';
17
- import { IHeaderActionsService } from './headerActionsService';
18
- import { ILiveRegionService } from './liveRegionService';
19
- import { IAccessibilityService, IAdvancedDnDService, IContextMenuService, IKeyboardDockingService, ITabGroupChipsService } from './moduleContracts';
20
- export interface ServiceCollection {
21
- floatingGroupService?: IFloatingGroupService;
22
- popoutWindowService?: IPopoutWindowService;
23
- watermarkService?: IWatermarkService;
24
- edgeGroupService?: IEdgeGroupService;
25
- tabGroupChipsService?: ITabGroupChipsService;
26
- contextMenuService?: IContextMenuService;
27
- rootDropTargetService?: IRootDropTargetService;
28
- headerActionsService?: IHeaderActionsService;
29
- advancedDnDService?: IAdvancedDnDService;
30
- liveRegionService?: ILiveRegionService;
31
- accessibilityService?: IAccessibilityService;
32
- keyboardDockingService?: IKeyboardDockingService;
33
- }
34
- export interface DockviewModule<THost = unknown> {
35
- moduleName: string;
36
- services?: Record<string, (host: THost) => unknown>;
37
- /**
38
- * Optional post-construct hook called once after the host is fully
39
- * constructed and all module services are instantiated. Use this to
40
- * subscribe to host events — the returned disposable runs at host
41
- * teardown. Components don't need to call into the service from event
42
- * handlers; the module owns its own reactivity.
43
- */
44
- init?: (host: THost, services: ServiceCollection) => IDisposable;
45
- dependsOn?: DockviewModule<any>[];
46
- }
47
- /**
48
- * Typed helper for defining a module. Enforces that the factory's return
49
- * type matches the slot in ServiceCollection at compile time, replacing
50
- * the manual cast each module file would otherwise need.
51
- */
52
- export declare function defineModule<K extends keyof ServiceCollection, THost>(config: {
53
- name: string;
54
- serviceKey: K;
55
- create: (host: THost) => NonNullable<ServiceCollection[K]>;
56
- init?: (host: THost, service: NonNullable<ServiceCollection[K]>) => IDisposable;
57
- dependsOn?: DockviewModule<any>[];
58
- }): DockviewModule<THost>;
59
- /**
60
- * For tests — clears the once-per-key dedup cache used by `assertModule`.
61
- */
62
- export declare function _resetMissingModuleWarnings(): void;
63
- /**
64
- * Returns the service if its module is registered, otherwise logs a
65
- * deduplicated console error and returns `undefined`. Modelled on AG Grid's
66
- * `assertModuleRegistered`: missing modules never throw — they degrade the
67
- * affected feature to a no-op so consuming applications don't crash in
68
- * production.
69
- *
70
- * Use at public-API entry points where the caller wants to surface which
71
- * module is missing. For internal/lifecycle paths, plain `?.` chaining on
72
- * the service slot is preferred — no log, just a silent no-op.
73
- */
74
- export declare function assertModule<T>(service: T | undefined, moduleName: string, context?: string): T | undefined;
75
- export declare class ModuleRegistry<THost> implements IDisposable {
76
- private readonly _modules;
77
- private readonly _services;
78
- private readonly _initDisposables;
79
- get services(): ServiceCollection;
80
- register<H>(module: DockviewModule<H>): void;
81
- initialize(host: THost): void;
82
- postConstruct(host: THost): void;
83
- has(moduleName: string): boolean;
84
- dispose(): void;
85
- }
86
- /**
87
- * Register modules globally. Idempotent per `moduleName` — registering the
88
- * same module twice is a no-op. Intended to be called once at import time by
89
- * the package that bundles a given set of modules.
90
- */
91
- export declare function registerModules(modules: DockviewModule<any>[]): void;
92
- /**
93
- * Returns the globally-registered modules (a copy). `DockviewComponent` reads
94
- * this to extend its built-in module set.
95
- */
96
- export declare function getRegisteredModules(): DockviewModule<any>[];
97
- /**
98
- * For tests — clears the global module registry.
99
- */
100
- export declare function clearRegisteredModules(): void;
101
- /**
102
- * Called once by the `dockview` package on import, solely so `dockview-core`
103
- * can warn when it is used directly (see above). Not used for anything else.
104
- */
105
- export declare function markDockviewPackageLoaded(): void;
106
- /**
107
- * Whether the `dockview` package has been loaded in this process. Used only to
108
- * gate the "don't use dockview-core directly" developer warning.
109
- */
110
- export declare function isDockviewPackageLoaded(): boolean;
@@ -1,170 +0,0 @@
1
- /**
2
- * Internal module system for dockview.
3
- *
4
- * Modules are feature bundles that register services into the dockview
5
- * component. `registerModules(...)` is the one public entry point — it lets a
6
- * sibling package contribute modules that `DockviewComponent` picks up at
7
- * construction. The richer opt-in surface (a per-component `modules` option,
8
- * framework wrappers) is still reserved for a future version; the module
9
- * authoring API (`defineModule`, the service contracts) remains internal.
10
- */
11
- /**
12
- * Typed helper for defining a module. Enforces that the factory's return
13
- * type matches the slot in ServiceCollection at compile time, replacing
14
- * the manual cast each module file would otherwise need.
15
- */
16
- export function defineModule(config) {
17
- return {
18
- moduleName: config.name,
19
- services: {
20
- [config.serviceKey]: config.create,
21
- },
22
- init: config.init
23
- ? (host, services) => config.init(host, services[config.serviceKey])
24
- : undefined,
25
- dependsOn: config.dependsOn,
26
- };
27
- }
28
- const _warnedMissingModule = new Set();
29
- /**
30
- * For tests — clears the once-per-key dedup cache used by `assertModule`.
31
- */
32
- export function _resetMissingModuleWarnings() {
33
- _warnedMissingModule.clear();
34
- }
35
- /**
36
- * Returns the service if its module is registered, otherwise logs a
37
- * deduplicated console error and returns `undefined`. Modelled on AG Grid's
38
- * `assertModuleRegistered`: missing modules never throw — they degrade the
39
- * affected feature to a no-op so consuming applications don't crash in
40
- * production.
41
- *
42
- * Use at public-API entry points where the caller wants to surface which
43
- * module is missing. For internal/lifecycle paths, plain `?.` chaining on
44
- * the service slot is preferred — no log, just a silent no-op.
45
- */
46
- export function assertModule(service, moduleName, context) {
47
- if (service !== undefined) {
48
- return service;
49
- }
50
- const key = `${moduleName}|${context !== null && context !== void 0 ? context : ''}`;
51
- if (_warnedMissingModule.has(key)) {
52
- return undefined;
53
- }
54
- _warnedMissingModule.add(key);
55
- const where = context ? ` for ${context}` : '';
56
- // eslint-disable-next-line no-console
57
- console.error(`dockview: module "${moduleName}" is not registered${where}.`);
58
- return undefined;
59
- }
60
- export class ModuleRegistry {
61
- constructor() {
62
- this._modules = new Map();
63
- this._services = {};
64
- this._initDisposables = [];
65
- }
66
- get services() {
67
- return this._services;
68
- }
69
- register(module) {
70
- if (this._modules.has(module.moduleName)) {
71
- return;
72
- }
73
- if (module.dependsOn) {
74
- for (const dep of module.dependsOn) {
75
- this.register(dep);
76
- }
77
- }
78
- this._modules.set(module.moduleName, module);
79
- }
80
- initialize(host) {
81
- for (const module of this._modules.values()) {
82
- if (!module.services) {
83
- continue;
84
- }
85
- for (const [name, factory] of Object.entries(module.services)) {
86
- this._services[name] = factory(host);
87
- }
88
- }
89
- }
90
- postConstruct(host) {
91
- for (const module of this._modules.values()) {
92
- if (module.init) {
93
- this._initDisposables.push(module.init(host, this._services));
94
- }
95
- }
96
- }
97
- has(moduleName) {
98
- return this._modules.has(moduleName);
99
- }
100
- dispose() {
101
- // Tear down init() subscriptions first so they stop firing into
102
- // services that are about to be disposed.
103
- for (const disposable of this._initDisposables) {
104
- disposable.dispose();
105
- }
106
- this._initDisposables.length = 0;
107
- for (const service of Object.values(this._services)) {
108
- if (service !== undefined &&
109
- typeof service.dispose === 'function') {
110
- service.dispose();
111
- }
112
- }
113
- }
114
- }
115
- /**
116
- * Process-global list of modules registered via {@link registerModules}.
117
- * `DockviewComponent` appends these to its built-in set at construction, so
118
- * importing a package that calls `registerModules(...)` (e.g. `dockview`)
119
- * makes those modules available to every component in the process —
120
- * modelled on AG Grid's `ModuleRegistry.registerModules`.
121
- */
122
- const _globalModules = [];
123
- /**
124
- * Register modules globally. Idempotent per `moduleName` — registering the
125
- * same module twice is a no-op. Intended to be called once at import time by
126
- * the package that bundles a given set of modules.
127
- */
128
- export function registerModules(modules) {
129
- for (const module of modules) {
130
- if (_globalModules.some((m) => m.moduleName === module.moduleName)) {
131
- continue;
132
- }
133
- _globalModules.push(module);
134
- }
135
- }
136
- /**
137
- * Returns the globally-registered modules (a copy). `DockviewComponent` reads
138
- * this to extend its built-in module set.
139
- */
140
- export function getRegisteredModules() {
141
- return [..._globalModules];
142
- }
143
- /**
144
- * For tests — clears the global module registry.
145
- */
146
- export function clearRegisteredModules() {
147
- _globalModules.length = 0;
148
- }
149
- /**
150
- * This marker exists for ONE purpose: a developer warning about the v7 package
151
- * renames. It has no functional effect on dockview's behaviour. Following the
152
- * renames, `dockview-core` is internal and `dockview` is the public JavaScript
153
- * package; `dockview` calls {@link markDockviewPackageLoaded} on import so that
154
- * `dockview-core` can detect — and warn about — being used directly.
155
- */
156
- let _dockviewPackageLoaded = false;
157
- /**
158
- * Called once by the `dockview` package on import, solely so `dockview-core`
159
- * can warn when it is used directly (see above). Not used for anything else.
160
- */
161
- export function markDockviewPackageLoaded() {
162
- _dockviewPackageLoaded = true;
163
- }
164
- /**
165
- * Whether the `dockview` package has been loaded in this process. Used only to
166
- * gate the "don't use dockview-core directly" developer warning.
167
- */
168
- export function isDockviewPackageLoaded() {
169
- return _dockviewPackageLoaded;
170
- }