dockview 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +50 -52
  3. package/dist/{esm/react → cjs}/dockview/defaultTab.d.ts +5 -4
  4. package/dist/cjs/dockview/defaultTab.d.ts.map +1 -0
  5. package/dist/cjs/{react/dockview → dockview}/defaultTab.js +72 -72
  6. package/dist/cjs/dockview/defaultTab.js.map +1 -0
  7. package/dist/{esm/react → cjs}/dockview/dockview.d.ts +36 -35
  8. package/dist/cjs/dockview/dockview.d.ts.map +1 -0
  9. package/dist/cjs/{react/dockview → dockview}/dockview.js +196 -213
  10. package/dist/cjs/dockview/dockview.js.map +1 -0
  11. package/dist/cjs/{react/dockview → dockview}/groupControlsRenderer.d.ts +33 -43
  12. package/dist/cjs/dockview/groupControlsRenderer.d.ts.map +1 -0
  13. package/dist/cjs/{react/dockview → dockview}/groupControlsRenderer.js +86 -86
  14. package/dist/cjs/dockview/groupControlsRenderer.js.map +1 -0
  15. package/dist/{esm/react → cjs}/dockview/reactContentPart.d.ts +23 -30
  16. package/dist/cjs/dockview/reactContentPart.d.ts.map +1 -0
  17. package/dist/cjs/{react/dockview → dockview}/reactContentPart.js +50 -58
  18. package/dist/cjs/dockview/reactContentPart.js.map +1 -0
  19. package/dist/cjs/{react/dockview → dockview}/reactHeaderPart.d.ts +19 -26
  20. package/dist/cjs/dockview/reactHeaderPart.d.ts.map +1 -0
  21. package/dist/cjs/{react/dockview → dockview}/reactHeaderPart.js +43 -55
  22. package/dist/cjs/dockview/reactHeaderPart.js.map +1 -0
  23. package/dist/cjs/{react/dockview → dockview}/reactWatermarkPart.d.ts +25 -29
  24. package/dist/cjs/dockview/reactWatermarkPart.d.ts.map +1 -0
  25. package/dist/cjs/{react/dockview → dockview}/reactWatermarkPart.js +53 -65
  26. package/dist/cjs/dockview/reactWatermarkPart.js.map +1 -0
  27. package/dist/cjs/gridview/gridview.d.ts +23 -132
  28. package/dist/cjs/gridview/gridview.d.ts.map +1 -0
  29. package/dist/cjs/gridview/gridview.js +96 -510
  30. package/dist/cjs/gridview/gridview.js.map +1 -1
  31. package/dist/{esm/react → cjs}/gridview/view.d.ts +11 -11
  32. package/dist/cjs/gridview/view.d.ts.map +1 -0
  33. package/dist/cjs/{react/gridview → gridview}/view.js +39 -41
  34. package/dist/cjs/gridview/view.js.map +1 -0
  35. package/dist/cjs/index.d.ts +11 -30
  36. package/dist/cjs/index.d.ts.map +1 -0
  37. package/dist/cjs/index.js +24 -47
  38. package/dist/cjs/index.js.map +1 -1
  39. package/dist/cjs/paneview/paneview.d.ts +25 -40
  40. package/dist/cjs/paneview/paneview.d.ts.map +1 -0
  41. package/dist/cjs/paneview/paneview.js +139 -201
  42. package/dist/cjs/paneview/paneview.js.map +1 -1
  43. package/dist/cjs/{react/paneview → paneview}/view.d.ts +20 -20
  44. package/dist/cjs/paneview/view.d.ts.map +1 -0
  45. package/dist/cjs/{react/paneview → paneview}/view.js +44 -44
  46. package/dist/cjs/paneview/view.js.map +1 -0
  47. package/dist/{esm/react → cjs}/react.d.ts +36 -36
  48. package/dist/cjs/react.d.ts.map +1 -0
  49. package/dist/cjs/{react/react.js → react.js} +196 -194
  50. package/dist/cjs/react.js.map +1 -0
  51. package/dist/{esm/react → cjs}/splitview/splitview.d.ts +23 -24
  52. package/dist/cjs/splitview/splitview.d.ts.map +1 -0
  53. package/dist/cjs/{react/splitview → splitview}/splitview.js +91 -108
  54. package/dist/cjs/splitview/splitview.js.map +1 -0
  55. package/dist/{esm/react → cjs}/splitview/view.d.ts +11 -10
  56. package/dist/cjs/splitview/view.d.ts.map +1 -0
  57. package/dist/cjs/{react/splitview → splitview}/view.js +39 -40
  58. package/dist/cjs/splitview/view.js.map +1 -0
  59. package/dist/cjs/svg.d.ts +4 -3
  60. package/dist/cjs/svg.d.ts.map +1 -0
  61. package/dist/cjs/svg.js +35 -43
  62. package/dist/cjs/svg.js.map +1 -1
  63. package/dist/cjs/types.d.ts +8 -8
  64. package/dist/cjs/types.d.ts.map +1 -0
  65. package/dist/cjs/types.js +2 -7
  66. package/dist/cjs/types.js.map +1 -1
  67. package/dist/dockview.amd.js +7047 -7153
  68. package/dist/dockview.amd.min.js +2 -2
  69. package/dist/dockview.amd.min.noStyle.js +2 -2
  70. package/dist/dockview.amd.noStyle.js +7043 -7149
  71. package/dist/dockview.cjs.js +7052 -7158
  72. package/dist/dockview.esm.js +7035 -7151
  73. package/dist/dockview.esm.min.js +2 -2
  74. package/dist/dockview.js +7047 -7153
  75. package/dist/dockview.min.js +2 -2
  76. package/dist/dockview.min.noStyle.js +2 -2
  77. package/dist/dockview.noStyle.js +7043 -7149
  78. package/dist/{cjs/react → esm}/dockview/defaultTab.d.ts +5 -4
  79. package/dist/esm/dockview/defaultTab.d.ts.map +1 -0
  80. package/dist/esm/{react/dockview → dockview}/defaultTab.js +35 -34
  81. package/dist/esm/dockview/defaultTab.js.map +1 -0
  82. package/dist/{cjs/react → esm}/dockview/dockview.d.ts +36 -35
  83. package/dist/esm/dockview/dockview.d.ts.map +1 -0
  84. package/dist/esm/{react/dockview → dockview}/dockview.js +155 -158
  85. package/dist/esm/dockview/dockview.js.map +1 -0
  86. package/dist/esm/{react/dockview → dockview}/groupControlsRenderer.d.ts +33 -43
  87. package/dist/esm/dockview/groupControlsRenderer.d.ts.map +1 -0
  88. package/dist/esm/{react/dockview → dockview}/groupControlsRenderer.js +69 -68
  89. package/dist/esm/dockview/groupControlsRenderer.js.map +1 -0
  90. package/dist/{cjs/react → esm}/dockview/reactContentPart.d.ts +23 -30
  91. package/dist/esm/dockview/reactContentPart.d.ts.map +1 -0
  92. package/dist/esm/{react/dockview → dockview}/reactContentPart.js +42 -49
  93. package/dist/esm/dockview/reactContentPart.js.map +1 -0
  94. package/dist/esm/{react/dockview → dockview}/reactHeaderPart.d.ts +19 -26
  95. package/dist/esm/dockview/reactHeaderPart.d.ts.map +1 -0
  96. package/dist/esm/{react/dockview → dockview}/reactHeaderPart.js +35 -46
  97. package/dist/esm/dockview/reactHeaderPart.js.map +1 -0
  98. package/dist/esm/{react/dockview → dockview}/reactWatermarkPart.d.ts +25 -29
  99. package/dist/esm/dockview/reactWatermarkPart.d.ts.map +1 -0
  100. package/dist/esm/{react/dockview → dockview}/reactWatermarkPart.js +45 -55
  101. package/dist/esm/dockview/reactWatermarkPart.js.map +1 -0
  102. package/dist/esm/gridview/gridview.d.ts +23 -132
  103. package/dist/esm/gridview/gridview.d.ts.map +1 -0
  104. package/dist/esm/gridview/gridview.js +55 -423
  105. package/dist/esm/gridview/gridview.js.map +1 -0
  106. package/dist/{cjs/react → esm}/gridview/view.d.ts +11 -11
  107. package/dist/esm/gridview/view.d.ts.map +1 -0
  108. package/dist/esm/{react/gridview → gridview}/view.js +18 -19
  109. package/dist/esm/gridview/view.js.map +1 -0
  110. package/dist/esm/index.d.ts +11 -30
  111. package/dist/esm/index.d.ts.map +1 -0
  112. package/dist/esm/index.js +9 -23
  113. package/dist/esm/index.js.map +1 -0
  114. package/dist/esm/paneview/paneview.d.ts +25 -40
  115. package/dist/esm/paneview/paneview.d.ts.map +1 -0
  116. package/dist/esm/paneview/paneview.js +85 -145
  117. package/dist/esm/paneview/paneview.js.map +1 -0
  118. package/dist/esm/{react/paneview → paneview}/view.d.ts +20 -20
  119. package/dist/esm/paneview/view.d.ts.map +1 -0
  120. package/dist/esm/{react/paneview → paneview}/view.js +36 -35
  121. package/dist/esm/paneview/view.js.map +1 -0
  122. package/dist/{cjs/react → esm}/react.d.ts +36 -36
  123. package/dist/esm/react.d.ts.map +1 -0
  124. package/dist/esm/{react/react.js → react.js} +128 -125
  125. package/dist/esm/react.js.map +1 -0
  126. package/dist/{cjs/react → esm}/splitview/splitview.d.ts +23 -24
  127. package/dist/esm/splitview/splitview.d.ts.map +1 -0
  128. package/dist/esm/{react/splitview → splitview}/splitview.js +50 -66
  129. package/dist/esm/splitview/splitview.js.map +1 -0
  130. package/dist/{cjs/react → esm}/splitview/view.d.ts +11 -10
  131. package/dist/esm/splitview/view.d.ts.map +1 -0
  132. package/dist/esm/{react/splitview → splitview}/view.js +18 -18
  133. package/dist/esm/splitview/view.js.map +1 -0
  134. package/dist/esm/svg.d.ts +4 -3
  135. package/dist/esm/svg.d.ts.map +1 -0
  136. package/dist/esm/svg.js +8 -31
  137. package/dist/esm/svg.js.map +1 -0
  138. package/dist/esm/types.d.ts +8 -8
  139. package/dist/esm/types.d.ts.map +1 -0
  140. package/dist/esm/types.js +2 -3
  141. package/dist/{cjs/panel → esm}/types.js.map +1 -1
  142. package/dist/styles/dockview.css +1 -617
  143. package/package.json +9 -5
  144. package/dist/cjs/actionbar/actionsContainer.d.ts +0 -7
  145. package/dist/cjs/actionbar/actionsContainer.js +0 -27
  146. package/dist/cjs/actionbar/actionsContainer.js.map +0 -1
  147. package/dist/cjs/api/component.api.d.ts +0 -145
  148. package/dist/cjs/api/component.api.js +0 -579
  149. package/dist/cjs/api/component.api.js.map +0 -1
  150. package/dist/cjs/api/dockviewPanelApi.d.ts +0 -34
  151. package/dist/cjs/api/dockviewPanelApi.js +0 -84
  152. package/dist/cjs/api/dockviewPanelApi.js.map +0 -1
  153. package/dist/cjs/api/gridviewPanelApi.d.ts +0 -37
  154. package/dist/cjs/api/gridviewPanelApi.js +0 -48
  155. package/dist/cjs/api/gridviewPanelApi.js.map +0 -1
  156. package/dist/cjs/api/panelApi.d.ts +0 -88
  157. package/dist/cjs/api/panelApi.js +0 -138
  158. package/dist/cjs/api/panelApi.js.map +0 -1
  159. package/dist/cjs/api/paneviewPanelApi.d.ts +0 -26
  160. package/dist/cjs/api/paneviewPanelApi.js +0 -58
  161. package/dist/cjs/api/paneviewPanelApi.js.map +0 -1
  162. package/dist/cjs/api/splitviewPanelApi.d.ts +0 -32
  163. package/dist/cjs/api/splitviewPanelApi.js +0 -48
  164. package/dist/cjs/api/splitviewPanelApi.js.map +0 -1
  165. package/dist/cjs/array.d.ts +0 -13
  166. package/dist/cjs/array.js +0 -78
  167. package/dist/cjs/array.js.map +0 -1
  168. package/dist/cjs/dnd/abstractDragHandler.d.ts +0 -11
  169. package/dist/cjs/dnd/abstractDragHandler.js +0 -116
  170. package/dist/cjs/dnd/abstractDragHandler.js.map +0 -1
  171. package/dist/cjs/dnd/dataTransfer.d.ts +0 -31
  172. package/dist/cjs/dnd/dataTransfer.js +0 -101
  173. package/dist/cjs/dnd/dataTransfer.js.map +0 -1
  174. package/dist/cjs/dnd/dnd.d.ts +0 -27
  175. package/dist/cjs/dnd/dnd.js +0 -60
  176. package/dist/cjs/dnd/dnd.js.map +0 -1
  177. package/dist/cjs/dnd/droptarget.d.ts +0 -42
  178. package/dist/cjs/dnd/droptarget.js +0 -280
  179. package/dist/cjs/dnd/droptarget.js.map +0 -1
  180. package/dist/cjs/dnd/ghost.d.ts +0 -1
  181. package/dist/cjs/dnd/ghost.js +0 -15
  182. package/dist/cjs/dnd/ghost.js.map +0 -1
  183. package/dist/cjs/dnd/groupDragHandler.d.ts +0 -11
  184. package/dist/cjs/dnd/groupDragHandler.js +0 -62
  185. package/dist/cjs/dnd/groupDragHandler.js.map +0 -1
  186. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -27
  187. package/dist/cjs/dockview/components/tab/defaultTab.js +0 -122
  188. package/dist/cjs/dockview/components/tab/defaultTab.js.map +0 -1
  189. package/dist/cjs/dockview/components/watermark/watermark.d.ts +0 -20
  190. package/dist/cjs/dockview/components/watermark/watermark.js +0 -102
  191. package/dist/cjs/dockview/components/watermark/watermark.js.map +0 -1
  192. package/dist/cjs/dockview/defaultGroupPanelView.d.ts +0 -29
  193. package/dist/cjs/dockview/defaultGroupPanelView.js +0 -69
  194. package/dist/cjs/dockview/defaultGroupPanelView.js.map +0 -1
  195. package/dist/cjs/dockview/deserializer.d.ts +0 -6
  196. package/dist/cjs/dockview/deserializer.js +0 -3
  197. package/dist/cjs/dockview/deserializer.js.map +0 -1
  198. package/dist/cjs/dockview/dockviewComponent.d.ts +0 -133
  199. package/dist/cjs/dockview/dockviewComponent.js +0 -796
  200. package/dist/cjs/dockview/dockviewComponent.js.map +0 -1
  201. package/dist/cjs/dockview/dockviewPanel.d.ts +0 -42
  202. package/dist/cjs/dockview/dockviewPanel.js +0 -161
  203. package/dist/cjs/dockview/dockviewPanel.js.map +0 -1
  204. package/dist/cjs/dockview/options.d.ts +0 -110
  205. package/dist/cjs/dockview/options.js +0 -32
  206. package/dist/cjs/dockview/options.js.map +0 -1
  207. package/dist/cjs/dockview/validation.d.ts +0 -2
  208. package/dist/cjs/dockview/validation.js +0 -135
  209. package/dist/cjs/dockview/validation.js.map +0 -1
  210. package/dist/cjs/dom.d.ts +0 -14
  211. package/dist/cjs/dom.js +0 -183
  212. package/dist/cjs/dom.js.map +0 -1
  213. package/dist/cjs/events.d.ts +0 -30
  214. package/dist/cjs/events.js +0 -130
  215. package/dist/cjs/events.js.map +0 -1
  216. package/dist/cjs/gridview/baseComponentGridview.d.ts +0 -87
  217. package/dist/cjs/gridview/baseComponentGridview.js +0 -279
  218. package/dist/cjs/gridview/baseComponentGridview.js.map +0 -1
  219. package/dist/cjs/gridview/basePanelView.d.ts +0 -43
  220. package/dist/cjs/gridview/basePanelView.js +0 -124
  221. package/dist/cjs/gridview/basePanelView.js.map +0 -1
  222. package/dist/cjs/gridview/branchNode.d.ts +0 -49
  223. package/dist/cjs/gridview/branchNode.js +0 -343
  224. package/dist/cjs/gridview/branchNode.js.map +0 -1
  225. package/dist/cjs/gridview/gridviewComponent.d.ts +0 -85
  226. package/dist/cjs/gridview/gridviewComponent.js +0 -325
  227. package/dist/cjs/gridview/gridviewComponent.js.map +0 -1
  228. package/dist/cjs/gridview/gridviewPanel.d.ts +0 -60
  229. package/dist/cjs/gridview/gridviewPanel.js +0 -202
  230. package/dist/cjs/gridview/gridviewPanel.js.map +0 -1
  231. package/dist/cjs/gridview/leafNode.d.ts +0 -34
  232. package/dist/cjs/gridview/leafNode.js +0 -171
  233. package/dist/cjs/gridview/leafNode.js.map +0 -1
  234. package/dist/cjs/gridview/options.d.ts +0 -18
  235. package/dist/cjs/gridview/options.js +0 -3
  236. package/dist/cjs/gridview/options.js.map +0 -1
  237. package/dist/cjs/gridview/types.d.ts +0 -3
  238. package/dist/cjs/gridview/types.js +0 -3
  239. package/dist/cjs/gridview/types.js.map +0 -1
  240. package/dist/cjs/groupview/dnd.d.ts +0 -6
  241. package/dist/cjs/groupview/dnd.js +0 -11
  242. package/dist/cjs/groupview/dnd.js.map +0 -1
  243. package/dist/cjs/groupview/groupview.d.ts +0 -177
  244. package/dist/cjs/groupview/groupview.js +0 -608
  245. package/dist/cjs/groupview/groupview.js.map +0 -1
  246. package/dist/cjs/groupview/groupviewPanel.d.ts +0 -35
  247. package/dist/cjs/groupview/groupviewPanel.js +0 -129
  248. package/dist/cjs/groupview/groupviewPanel.js.map +0 -1
  249. package/dist/cjs/groupview/panel/content.d.ts +0 -30
  250. package/dist/cjs/groupview/panel/content.js +0 -101
  251. package/dist/cjs/groupview/panel/content.js.map +0 -1
  252. package/dist/cjs/groupview/tab.d.ts +0 -31
  253. package/dist/cjs/groupview/tab.js +0 -125
  254. package/dist/cjs/groupview/tab.js.map +0 -1
  255. package/dist/cjs/groupview/titlebar/tabsContainer.d.ts +0 -65
  256. package/dist/cjs/groupview/titlebar/tabsContainer.js +0 -252
  257. package/dist/cjs/groupview/titlebar/tabsContainer.js.map +0 -1
  258. package/dist/cjs/groupview/titlebar/voidContainer.d.ts +0 -15
  259. package/dist/cjs/groupview/titlebar/voidContainer.js +0 -74
  260. package/dist/cjs/groupview/titlebar/voidContainer.js.map +0 -1
  261. package/dist/cjs/groupview/types.d.ts +0 -68
  262. package/dist/cjs/groupview/types.js +0 -3
  263. package/dist/cjs/groupview/types.js.map +0 -1
  264. package/dist/cjs/hostedContainer.d.ts +0 -23
  265. package/dist/cjs/hostedContainer.js +0 -74
  266. package/dist/cjs/hostedContainer.js.map +0 -1
  267. package/dist/cjs/lifecycle.d.ts +0 -22
  268. package/dist/cjs/lifecycle.js +0 -89
  269. package/dist/cjs/lifecycle.js.map +0 -1
  270. package/dist/cjs/math.d.ts +0 -4
  271. package/dist/cjs/math.js +0 -16
  272. package/dist/cjs/math.js.map +0 -1
  273. package/dist/cjs/panel/componentFactory.d.ts +0 -8
  274. package/dist/cjs/panel/componentFactory.js +0 -31
  275. package/dist/cjs/panel/componentFactory.js.map +0 -1
  276. package/dist/cjs/panel/types.d.ts +0 -33
  277. package/dist/cjs/panel/types.js +0 -3
  278. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +0 -21
  279. package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -91
  280. package/dist/cjs/paneview/defaultPaneviewHeader.js.map +0 -1
  281. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +0 -19
  282. package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -131
  283. package/dist/cjs/paneview/draggablePaneviewPanel.js.map +0 -1
  284. package/dist/cjs/paneview/options.d.ts +0 -27
  285. package/dist/cjs/paneview/options.js +0 -3
  286. package/dist/cjs/paneview/options.js.map +0 -1
  287. package/dist/cjs/paneview/paneviewComponent.d.ts +0 -129
  288. package/dist/cjs/paneview/paneviewComponent.js +0 -395
  289. package/dist/cjs/paneview/paneviewComponent.js.map +0 -1
  290. package/dist/cjs/paneview/paneviewPanel.d.ts +0 -92
  291. package/dist/cjs/paneview/paneviewPanel.js +0 -276
  292. package/dist/cjs/paneview/paneviewPanel.js.map +0 -1
  293. package/dist/cjs/react/deserializer.d.ts +0 -10
  294. package/dist/cjs/react/deserializer.js +0 -44
  295. package/dist/cjs/react/deserializer.js.map +0 -1
  296. package/dist/cjs/react/dockview/defaultTab.js.map +0 -1
  297. package/dist/cjs/react/dockview/dockview.js.map +0 -1
  298. package/dist/cjs/react/dockview/groupControlsRenderer.js.map +0 -1
  299. package/dist/cjs/react/dockview/reactContentPart.js.map +0 -1
  300. package/dist/cjs/react/dockview/reactHeaderPart.js.map +0 -1
  301. package/dist/cjs/react/dockview/reactWatermarkPart.js.map +0 -1
  302. package/dist/cjs/react/dockview/v2/reactContentRenderer.d.ts +0 -29
  303. package/dist/cjs/react/dockview/v2/reactContentRenderer.js +0 -88
  304. package/dist/cjs/react/dockview/v2/reactContentRenderer.js.map +0 -1
  305. package/dist/cjs/react/dockview/v2/reactGroupPanelView.d.ts +0 -7
  306. package/dist/cjs/react/dockview/v2/reactGroupPanelView.js +0 -35
  307. package/dist/cjs/react/dockview/v2/reactGroupPanelView.js.map +0 -1
  308. package/dist/cjs/react/dockview/v2/webviewContentRenderer.d.ts +0 -18
  309. package/dist/cjs/react/dockview/v2/webviewContentRenderer.js +0 -46
  310. package/dist/cjs/react/dockview/v2/webviewContentRenderer.js.map +0 -1
  311. package/dist/cjs/react/gridview/gridview.d.ts +0 -24
  312. package/dist/cjs/react/gridview/gridview.js +0 -113
  313. package/dist/cjs/react/gridview/gridview.js.map +0 -1
  314. package/dist/cjs/react/gridview/view.js.map +0 -1
  315. package/dist/cjs/react/index.d.ts +0 -9
  316. package/dist/cjs/react/index.js +0 -24
  317. package/dist/cjs/react/index.js.map +0 -1
  318. package/dist/cjs/react/paneview/paneview.d.ts +0 -30
  319. package/dist/cjs/react/paneview/paneview.js +0 -156
  320. package/dist/cjs/react/paneview/paneview.js.map +0 -1
  321. package/dist/cjs/react/paneview/view.js.map +0 -1
  322. package/dist/cjs/react/react.js.map +0 -1
  323. package/dist/cjs/react/splitview/splitview.js.map +0 -1
  324. package/dist/cjs/react/splitview/view.js.map +0 -1
  325. package/dist/cjs/react/svg.d.ts +0 -3
  326. package/dist/cjs/react/svg.js +0 -36
  327. package/dist/cjs/react/svg.js.map +0 -1
  328. package/dist/cjs/react/types.d.ts +0 -7
  329. package/dist/cjs/react/types.js +0 -3
  330. package/dist/cjs/react/types.js.map +0 -1
  331. package/dist/cjs/splitview/core/options.d.ts +0 -26
  332. package/dist/cjs/splitview/core/options.js +0 -3
  333. package/dist/cjs/splitview/core/options.js.map +0 -1
  334. package/dist/cjs/splitview/core/splitview.d.ts +0 -127
  335. package/dist/cjs/splitview/core/splitview.js +0 -909
  336. package/dist/cjs/splitview/core/splitview.js.map +0 -1
  337. package/dist/cjs/splitview/core/viewItem.d.ts +0 -25
  338. package/dist/cjs/splitview/core/viewItem.js +0 -125
  339. package/dist/cjs/splitview/core/viewItem.js.map +0 -1
  340. package/dist/cjs/splitview/splitviewComponent.d.ts +0 -101
  341. package/dist/cjs/splitview/splitviewComponent.js +0 -374
  342. package/dist/cjs/splitview/splitviewComponent.js.map +0 -1
  343. package/dist/cjs/splitview/splitviewPanel.d.ts +0 -45
  344. package/dist/cjs/splitview/splitviewPanel.js +0 -180
  345. package/dist/cjs/splitview/splitviewPanel.js.map +0 -1
  346. package/dist/esm/actionbar/actionsContainer.d.ts +0 -7
  347. package/dist/esm/actionbar/actionsContainer.js +0 -17
  348. package/dist/esm/api/component.api.d.ts +0 -145
  349. package/dist/esm/api/component.api.js +0 -329
  350. package/dist/esm/api/dockviewPanelApi.d.ts +0 -34
  351. package/dist/esm/api/dockviewPanelApi.js +0 -48
  352. package/dist/esm/api/gridviewPanelApi.d.ts +0 -37
  353. package/dist/esm/api/gridviewPanelApi.js +0 -25
  354. package/dist/esm/api/panelApi.d.ts +0 -88
  355. package/dist/esm/api/panelApi.js +0 -95
  356. package/dist/esm/api/paneviewPanelApi.d.ts +0 -26
  357. package/dist/esm/api/paneviewPanelApi.js +0 -27
  358. package/dist/esm/api/splitviewPanelApi.d.ts +0 -32
  359. package/dist/esm/api/splitviewPanelApi.js +0 -25
  360. package/dist/esm/array.d.ts +0 -13
  361. package/dist/esm/array.js +0 -67
  362. package/dist/esm/dnd/abstractDragHandler.d.ts +0 -11
  363. package/dist/esm/dnd/abstractDragHandler.js +0 -37
  364. package/dist/esm/dnd/dataTransfer.d.ts +0 -31
  365. package/dist/esm/dnd/dataTransfer.js +0 -69
  366. package/dist/esm/dnd/dnd.d.ts +0 -27
  367. package/dist/esm/dnd/dnd.js +0 -36
  368. package/dist/esm/dnd/droptarget.d.ts +0 -42
  369. package/dist/esm/dnd/droptarget.js +0 -249
  370. package/dist/esm/dnd/ghost.d.ts +0 -1
  371. package/dist/esm/dnd/ghost.js +0 -10
  372. package/dist/esm/dnd/groupDragHandler.d.ts +0 -11
  373. package/dist/esm/dnd/groupDragHandler.js +0 -38
  374. package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -27
  375. package/dist/esm/dockview/components/tab/defaultTab.js +0 -79
  376. package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -20
  377. package/dist/esm/dockview/components/watermark/watermark.js +0 -70
  378. package/dist/esm/dockview/defaultGroupPanelView.d.ts +0 -29
  379. package/dist/esm/dockview/defaultGroupPanelView.js +0 -44
  380. package/dist/esm/dockview/deserializer.d.ts +0 -6
  381. package/dist/esm/dockview/deserializer.js +0 -1
  382. package/dist/esm/dockview/dockviewComponent.d.ts +0 -133
  383. package/dist/esm/dockview/dockviewComponent.js +0 -632
  384. package/dist/esm/dockview/dockviewPanel.d.ts +0 -42
  385. package/dist/esm/dockview/dockviewPanel.js +0 -111
  386. package/dist/esm/dockview/options.d.ts +0 -110
  387. package/dist/esm/dockview/options.js +0 -24
  388. package/dist/esm/dockview/validation.d.ts +0 -2
  389. package/dist/esm/dockview/validation.js +0 -86
  390. package/dist/esm/dom.d.ts +0 -14
  391. package/dist/esm/dom.js +0 -113
  392. package/dist/esm/events.d.ts +0 -30
  393. package/dist/esm/events.js +0 -88
  394. package/dist/esm/gridview/baseComponentGridview.d.ts +0 -87
  395. package/dist/esm/gridview/baseComponentGridview.js +0 -188
  396. package/dist/esm/gridview/basePanelView.d.ts +0 -43
  397. package/dist/esm/gridview/basePanelView.js +0 -74
  398. package/dist/esm/gridview/branchNode.d.ts +0 -49
  399. package/dist/esm/gridview/branchNode.js +0 -218
  400. package/dist/esm/gridview/gridviewComponent.d.ts +0 -85
  401. package/dist/esm/gridview/gridviewComponent.js +0 -237
  402. package/dist/esm/gridview/gridviewPanel.d.ts +0 -60
  403. package/dist/esm/gridview/gridviewPanel.js +0 -138
  404. package/dist/esm/gridview/leafNode.d.ts +0 -34
  405. package/dist/esm/gridview/leafNode.js +0 -103
  406. package/dist/esm/gridview/options.d.ts +0 -18
  407. package/dist/esm/gridview/options.js +0 -1
  408. package/dist/esm/gridview/types.d.ts +0 -3
  409. package/dist/esm/gridview/types.js +0 -1
  410. package/dist/esm/groupview/dnd.d.ts +0 -6
  411. package/dist/esm/groupview/dnd.js +0 -7
  412. package/dist/esm/groupview/groupview.d.ts +0 -177
  413. package/dist/esm/groupview/groupview.js +0 -462
  414. package/dist/esm/groupview/groupviewPanel.d.ts +0 -35
  415. package/dist/esm/groupview/groupviewPanel.js +0 -61
  416. package/dist/esm/groupview/panel/content.d.ts +0 -30
  417. package/dist/esm/groupview/panel/content.js +0 -73
  418. package/dist/esm/groupview/tab.d.ts +0 -31
  419. package/dist/esm/groupview/tab.js +0 -94
  420. package/dist/esm/groupview/titlebar/tabsContainer.d.ts +0 -65
  421. package/dist/esm/groupview/titlebar/tabsContainer.js +0 -183
  422. package/dist/esm/groupview/titlebar/voidContainer.d.ts +0 -15
  423. package/dist/esm/groupview/titlebar/voidContainer.js +0 -47
  424. package/dist/esm/groupview/types.d.ts +0 -68
  425. package/dist/esm/groupview/types.js +0 -1
  426. package/dist/esm/hostedContainer.d.ts +0 -23
  427. package/dist/esm/hostedContainer.js +0 -63
  428. package/dist/esm/lifecycle.d.ts +0 -22
  429. package/dist/esm/lifecycle.js +0 -39
  430. package/dist/esm/math.d.ts +0 -4
  431. package/dist/esm/math.js +0 -10
  432. package/dist/esm/panel/componentFactory.d.ts +0 -8
  433. package/dist/esm/panel/componentFactory.js +0 -24
  434. package/dist/esm/panel/types.d.ts +0 -33
  435. package/dist/esm/panel/types.js +0 -1
  436. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -21
  437. package/dist/esm/paneview/defaultPaneviewHeader.js +0 -63
  438. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -19
  439. package/dist/esm/paneview/draggablePaneviewPanel.js +0 -91
  440. package/dist/esm/paneview/options.d.ts +0 -27
  441. package/dist/esm/paneview/options.js +0 -1
  442. package/dist/esm/paneview/paneviewComponent.d.ts +0 -129
  443. package/dist/esm/paneview/paneviewComponent.js +0 -270
  444. package/dist/esm/paneview/paneviewPanel.d.ts +0 -92
  445. package/dist/esm/paneview/paneviewPanel.js +0 -192
  446. package/dist/esm/react/deserializer.d.ts +0 -10
  447. package/dist/esm/react/deserializer.js +0 -38
  448. package/dist/esm/react/dockview/v2/reactContentRenderer.d.ts +0 -29
  449. package/dist/esm/react/dockview/v2/reactContentRenderer.js +0 -69
  450. package/dist/esm/react/dockview/v2/reactGroupPanelView.d.ts +0 -7
  451. package/dist/esm/react/dockview/v2/reactGroupPanelView.js +0 -12
  452. package/dist/esm/react/dockview/v2/webviewContentRenderer.d.ts +0 -18
  453. package/dist/esm/react/dockview/v2/webviewContentRenderer.js +0 -36
  454. package/dist/esm/react/gridview/gridview.d.ts +0 -24
  455. package/dist/esm/react/gridview/gridview.js +0 -70
  456. package/dist/esm/react/index.d.ts +0 -9
  457. package/dist/esm/react/index.js +0 -7
  458. package/dist/esm/react/paneview/paneview.d.ts +0 -30
  459. package/dist/esm/react/paneview/paneview.js +0 -100
  460. package/dist/esm/react/svg.d.ts +0 -3
  461. package/dist/esm/react/svg.js +0 -7
  462. package/dist/esm/react/types.d.ts +0 -7
  463. package/dist/esm/react/types.js +0 -1
  464. package/dist/esm/splitview/core/options.d.ts +0 -26
  465. package/dist/esm/splitview/core/options.js +0 -1
  466. package/dist/esm/splitview/core/splitview.d.ts +0 -127
  467. package/dist/esm/splitview/core/splitview.js +0 -689
  468. package/dist/esm/splitview/core/viewItem.d.ts +0 -25
  469. package/dist/esm/splitview/core/viewItem.js +0 -79
  470. package/dist/esm/splitview/splitviewComponent.d.ts +0 -101
  471. package/dist/esm/splitview/splitviewComponent.js +0 -249
  472. package/dist/esm/splitview/splitviewPanel.d.ts +0 -45
  473. package/dist/esm/splitview/splitviewPanel.js +0 -108
@@ -1,36 +1,36 @@
1
- import * as React from 'react';
2
- import { IDisposable } from '../lifecycle';
3
- import { IFrameworkPart } from '../panel/types';
4
- export interface ReactPortalStore {
5
- addPortal: (portal: React.ReactPortal) => IDisposable;
6
- }
7
- export declare const ReactPartContext: React.Context<{}>;
8
- export declare class ReactPart<P extends object, C extends object = {}> implements IFrameworkPart {
9
- private readonly parent;
10
- private readonly portalStore;
11
- private readonly component;
12
- private readonly parameters;
13
- private readonly context?;
14
- private _initialProps;
15
- private componentInstance?;
16
- private ref?;
17
- private disposed;
18
- constructor(parent: HTMLElement, portalStore: ReactPortalStore, component: React.FunctionComponent<P>, parameters: P, context?: C | undefined);
19
- update(props: {
20
- [index: string]: any;
21
- }): void;
22
- private createPortal;
23
- dispose(): void;
24
- }
25
- type PortalLifecycleHook = () => [
26
- React.ReactPortal[],
27
- (portal: React.ReactPortal) => IDisposable
28
- ];
29
- /**
30
- * A React Hook that returns an array of portals to be rendered by the user of this hook
31
- * and a disposable function to add a portal. Calling dispose removes this portal from the
32
- * portal array
33
- */
34
- export declare const usePortalsLifecycle: PortalLifecycleHook;
35
- export declare function isReactElement(element: any | React.ReactElement): element is React.ReactElement;
36
- export {};
1
+ import * as React from 'react';
2
+ import { IFrameworkPart, IDockviewDisposable } from 'dockview-core';
3
+ export interface ReactPortalStore {
4
+ addPortal: (portal: React.ReactPortal) => IDockviewDisposable;
5
+ }
6
+ export declare const ReactPartContext: React.Context<{}>;
7
+ export declare class ReactPart<P extends object, C extends object = {}> implements IFrameworkPart {
8
+ private readonly parent;
9
+ private readonly portalStore;
10
+ private readonly component;
11
+ private readonly parameters;
12
+ private readonly context?;
13
+ private _initialProps;
14
+ private componentInstance?;
15
+ private ref?;
16
+ private disposed;
17
+ constructor(parent: HTMLElement, portalStore: ReactPortalStore, component: React.FunctionComponent<P>, parameters: P, context?: C | undefined);
18
+ update(props: {
19
+ [index: string]: any;
20
+ }): void;
21
+ private createPortal;
22
+ dispose(): void;
23
+ }
24
+ type PortalLifecycleHook = () => [
25
+ React.ReactPortal[],
26
+ (portal: React.ReactPortal) => IDockviewDisposable
27
+ ];
28
+ /**
29
+ * A React Hook that returns an array of portals to be rendered by the user of this hook
30
+ * and a disposable function to add a portal. Calling dispose removes this portal from the
31
+ * portal array
32
+ */
33
+ export declare const usePortalsLifecycle: PortalLifecycleHook;
34
+ export declare function isReactElement(element: any | React.ReactElement): element is React.ReactElement;
35
+ export {};
36
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC;CACjE;AAyDD,eAAO,MAAM,gBAAgB,mBAA8B,CAAC;AAE5D,qBAAa,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,CAC1D,YAAW,cAAc;IAWrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAb7B,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,iBAAiB,CAAC,CAAmB;IAC7C,OAAO,CAAC,GAAG,CAAC,CAGV;IACF,OAAO,CAAC,QAAQ,CAAS;gBAGJ,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,gBAAgB,EAC7B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EACrC,UAAU,EAAE,CAAC,EACb,OAAO,CAAC,eAAG;IAKzB,MAAM,CAAC,KAAK,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;IAa7C,OAAO,CAAC,YAAY;IAqDb,OAAO;CAIjB;AAED,KAAK,mBAAmB,GAAG,MAAM;IAC7B,KAAK,CAAC,WAAW,EAAE;IACnB,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,KAAK,mBAAmB;CACrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAwBjC,CAAC;AAGF,wBAAgB,cAAc,CAC1B,OAAO,EAAE,GAAG,GAAG,KAAK,CAAC,YAAY,GAClC,OAAO,IAAI,KAAK,CAAC,YAAY,CAE/B"}
@@ -1,125 +1,128 @@
1
- import * as React from 'react';
2
- import * as ReactDOM from 'react-dom';
3
- import { sequentialNumberGenerator } from '../math';
4
- /**
5
- * This component is intended to interface between vanilla-js and React hence we need to be
6
- * creative in how we update props.
7
- * A ref of the component is exposed with an update method; which when called stores the props
8
- * as a ref within this component and forcefully triggers a re-render of the component using
9
- * the ref of props we just set on the renderered component as the props passed to the inner
10
- * component
11
- */
12
- const ReactComponentBridge = (props, ref) => {
13
- const [_, triggerRender] = React.useState();
14
- const _props = React.useRef(props.componentProps);
15
- React.useImperativeHandle(ref, () => ({
16
- update: (componentProps) => {
17
- _props.current = Object.assign(Object.assign({}, _props.current), componentProps);
18
- /**
19
- * setting a arbitrary piece of state within this component will
20
- * trigger a re-render.
21
- * we use this rather than updating through a prop since we can
22
- * pass a ref into the vanilla-js world.
23
- */
24
- triggerRender(Date.now());
25
- },
26
- }), []);
27
- return React.createElement(props.component, _props.current);
28
- };
29
- ReactComponentBridge.displayName = 'DockviewReactJsBridge';
30
- /**
31
- * Since we are storing the React.Portal references in a rendered array they
32
- * require a key property like any other React element rendered in an array
33
- * to prevent excessive re-rendering
34
- */
35
- const uniquePortalKeyGenerator = sequentialNumberGenerator();
36
- export const ReactPartContext = React.createContext({});
37
- export class ReactPart {
38
- constructor(parent, portalStore, component, parameters, context) {
39
- this.parent = parent;
40
- this.portalStore = portalStore;
41
- this.component = component;
42
- this.parameters = parameters;
43
- this.context = context;
44
- this._initialProps = {};
45
- this.disposed = false;
46
- this.createPortal();
47
- }
48
- update(props) {
49
- if (this.disposed) {
50
- throw new Error('invalid operation: resource is already disposed');
51
- }
52
- if (!this.componentInstance) {
53
- // if the component is yet to be mounted store the props
54
- this._initialProps = Object.assign(Object.assign({}, this._initialProps), props);
55
- }
56
- else {
57
- this.componentInstance.update(props);
58
- }
59
- }
60
- createPortal() {
61
- if (this.disposed) {
62
- throw new Error('invalid operation: resource is already disposed');
63
- }
64
- if (typeof this.component !== 'function') {
65
- /**
66
- * we know this isn't a React.FunctionComponent so throw an error here.
67
- * if we do not intercept this the React library will throw a very obsure error
68
- * for the same reason, at least at this point we will emit a sensible stacktrace.
69
- */
70
- throw new Error('Invalid Operation. dockview only supports React Functional Components.');
71
- }
72
- const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
73
- component: this
74
- .component,
75
- componentProps: this.parameters,
76
- ref: (element) => {
77
- this.componentInstance = element;
78
- if (Object.keys(this._initialProps).length > 0) {
79
- this.componentInstance.update(this._initialProps);
80
- this._initialProps = {}; // don't keep a reference to the users object once no longer required
81
- }
82
- },
83
- });
84
- const node = this.context
85
- ? React.createElement(ReactPartContext.Provider, { value: this.context }, bridgeComponent)
86
- : bridgeComponent;
87
- const portal = ReactDOM.createPortal(node, this.parent, uniquePortalKeyGenerator.next());
88
- this.ref = {
89
- portal,
90
- disposable: this.portalStore.addPortal(portal),
91
- };
92
- }
93
- dispose() {
94
- var _a;
95
- (_a = this.ref) === null || _a === void 0 ? void 0 : _a.disposable.dispose();
96
- this.disposed = true;
97
- }
98
- }
99
- /**
100
- * A React Hook that returns an array of portals to be rendered by the user of this hook
101
- * and a disposable function to add a portal. Calling dispose removes this portal from the
102
- * portal array
103
- */
104
- export const usePortalsLifecycle = () => {
105
- const [portals, setPortals] = React.useState([]);
106
- React.useDebugValue(`Portal count: ${portals.length}`);
107
- const addPortal = React.useCallback((portal) => {
108
- setPortals((existingPortals) => [...existingPortals, portal]);
109
- let disposed = false;
110
- return {
111
- dispose: () => {
112
- if (disposed) {
113
- throw new Error('invalid operation: resource already disposed');
114
- }
115
- disposed = true;
116
- setPortals((existingPortals) => existingPortals.filter((p) => p !== portal));
117
- },
118
- };
119
- }, []);
120
- return [portals, addPortal];
121
- };
122
- // it does the job...
123
- export function isReactElement(element) {
124
- return element === null || element === void 0 ? void 0 : element.type;
125
- }
1
+ import * as React from 'react';
2
+ import * as ReactDOM from 'react-dom';
3
+ /**
4
+ * This component is intended to interface between vanilla-js and React hence we need to be
5
+ * creative in how we update props.
6
+ * A ref of the component is exposed with an update method; which when called stores the props
7
+ * as a ref within this component and forcefully triggers a re-render of the component using
8
+ * the ref of props we just set on the renderered component as the props passed to the inner
9
+ * component
10
+ */
11
+ const ReactComponentBridge = (props, ref) => {
12
+ const [_, triggerRender] = React.useState();
13
+ const _props = React.useRef(props.componentProps);
14
+ React.useImperativeHandle(ref, () => ({
15
+ update: (componentProps) => {
16
+ _props.current = Object.assign(Object.assign({}, _props.current), componentProps);
17
+ /**
18
+ * setting a arbitrary piece of state within this component will
19
+ * trigger a re-render.
20
+ * we use this rather than updating through a prop since we can
21
+ * pass a ref into the vanilla-js world.
22
+ */
23
+ triggerRender(Date.now());
24
+ },
25
+ }), []);
26
+ return React.createElement(props.component, _props.current);
27
+ };
28
+ ReactComponentBridge.displayName = 'DockviewReactJsBridge';
29
+ /**
30
+ * Since we are storing the React.Portal references in a rendered array they
31
+ * require a key property like any other React element rendered in an array
32
+ * to prevent excessive re-rendering
33
+ */
34
+ const uniquePortalKeyGenerator = (() => {
35
+ let value = 1;
36
+ return { next: () => `dockview_react_portal_key_${(value++).toString()}` };
37
+ })();
38
+ export const ReactPartContext = React.createContext({});
39
+ export class ReactPart {
40
+ constructor(parent, portalStore, component, parameters, context) {
41
+ this.parent = parent;
42
+ this.portalStore = portalStore;
43
+ this.component = component;
44
+ this.parameters = parameters;
45
+ this.context = context;
46
+ this._initialProps = {};
47
+ this.disposed = false;
48
+ this.createPortal();
49
+ }
50
+ update(props) {
51
+ if (this.disposed) {
52
+ throw new Error('invalid operation: resource is already disposed');
53
+ }
54
+ if (!this.componentInstance) {
55
+ // if the component is yet to be mounted store the props
56
+ this._initialProps = Object.assign(Object.assign({}, this._initialProps), props);
57
+ }
58
+ else {
59
+ this.componentInstance.update(props);
60
+ }
61
+ }
62
+ createPortal() {
63
+ if (this.disposed) {
64
+ throw new Error('invalid operation: resource is already disposed');
65
+ }
66
+ if (typeof this.component !== 'function') {
67
+ /**
68
+ * we know this isn't a React.FunctionComponent so throw an error here.
69
+ * if we do not intercept this the React library will throw a very obsure error
70
+ * for the same reason, at least at this point we will emit a sensible stacktrace.
71
+ */
72
+ throw new Error('Invalid Operation. dockview only supports React Functional Components.');
73
+ }
74
+ const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
75
+ component: this
76
+ .component,
77
+ componentProps: this.parameters,
78
+ ref: (element) => {
79
+ this.componentInstance = element;
80
+ if (Object.keys(this._initialProps).length > 0) {
81
+ this.componentInstance.update(this._initialProps);
82
+ this._initialProps = {}; // don't keep a reference to the users object once no longer required
83
+ }
84
+ },
85
+ });
86
+ const node = this.context
87
+ ? React.createElement(ReactPartContext.Provider, { value: this.context }, bridgeComponent)
88
+ : bridgeComponent;
89
+ const portal = ReactDOM.createPortal(node, this.parent, uniquePortalKeyGenerator.next());
90
+ this.ref = {
91
+ portal,
92
+ disposable: this.portalStore.addPortal(portal),
93
+ };
94
+ }
95
+ dispose() {
96
+ var _a;
97
+ (_a = this.ref) === null || _a === void 0 ? void 0 : _a.disposable.dispose();
98
+ this.disposed = true;
99
+ }
100
+ }
101
+ /**
102
+ * A React Hook that returns an array of portals to be rendered by the user of this hook
103
+ * and a disposable function to add a portal. Calling dispose removes this portal from the
104
+ * portal array
105
+ */
106
+ export const usePortalsLifecycle = () => {
107
+ const [portals, setPortals] = React.useState([]);
108
+ React.useDebugValue(`Portal count: ${portals.length}`);
109
+ const addPortal = React.useCallback((portal) => {
110
+ setPortals((existingPortals) => [...existingPortals, portal]);
111
+ let disposed = false;
112
+ return {
113
+ dispose: () => {
114
+ if (disposed) {
115
+ throw new Error('invalid operation: resource already disposed');
116
+ }
117
+ disposed = true;
118
+ setPortals((existingPortals) => existingPortals.filter((p) => p !== portal));
119
+ },
120
+ };
121
+ }, []);
122
+ return [portals, addPortal];
123
+ };
124
+ // it does the job...
125
+ export function isReactElement(element) {
126
+ return element === null || element === void 0 ? void 0 : element.type;
127
+ }
128
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAgBtC;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAGtB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACpD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAS,KAAK,CAAC,cAAc,CAAC,CAAC;IAE1D,KAAK,CAAC,mBAAmB,CACrB,GAAG,EACH,GAAG,EAAE,CAAC,CAAC;QACH,MAAM,EAAE,CAAC,cAAsB,EAAE,EAAE;YAC/B,MAAM,CAAC,OAAO,mCAAQ,MAAM,CAAC,OAAO,GAAK,cAAc,CAAE,CAAC;YAC1D;;;;;eAKG;YACH,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC9B,CAAC;KACJ,CAAC,EACF,EAAE,CACL,CAAC;IAEF,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AAChE,CAAC,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE;IACnC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC;AAC/E,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAK,EAAE,CAAC,CAAC;AAE5D,MAAM,OAAO,SAAS;IAWlB,YACqB,MAAmB,EACnB,WAA6B,EAC7B,SAAqC,EACrC,UAAa,EACb,OAAW;QAJX,WAAM,GAAN,MAAM,CAAa;QACnB,gBAAW,GAAX,WAAW,CAAkB;QAC7B,cAAS,GAAT,SAAS,CAA4B;QACrC,eAAU,GAAV,UAAU,CAAG;QACb,YAAO,GAAP,OAAO,CAAI;QAbxB,kBAAa,GAAwB,EAAE,CAAC;QAMxC,aAAQ,GAAG,KAAK,CAAC;QASrB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,KAA+B;QACzC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACzB,wDAAwD;YACxD,IAAI,CAAC,aAAa,mCAAQ,IAAI,CAAC,aAAa,GAAK,KAAK,CAAE,CAAC;SAC5D;aAAM;YACH,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACxC;IACL,CAAC;IAEO,YAAY;QAChB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE;YACtC;;;;eAIG;YACH,MAAM,IAAI,KAAK,CACX,wEAAwE,CAC3E,CAAC;SACL;QAED,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CACvC,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,EACtC;YACI,SAAS,EAAE,IAAI;iBACV,SAAmD;YACxD,cAAc,EAAE,IAAI,CAAC,UAA2B;YAChD,GAAG,EAAE,CAAC,OAAyB,EAAE,EAAE;gBAC/B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC;gBAEjC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;oBAC5C,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBAClD,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,qEAAqE;iBACjG;YACL,CAAC;SACJ,CACJ,CAAC;QAEF,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;YACrB,CAAC,CAAC,KAAK,CAAC,aAAa,CACf,gBAAgB,CAAC,QAAQ,EACzB,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EACvB,eAAe,CAClB;YACH,CAAC,CAAC,eAAe,CAAC;QAEtB,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAChC,IAAI,EACJ,IAAI,CAAC,MAAM,EACX,wBAAwB,CAAC,IAAI,EAAE,CAClC,CAAC;QAEF,IAAI,CAAC,GAAG,GAAG;YACP,MAAM;YACN,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC;SACjD,CAAC;IACN,CAAC;IAEM,OAAO;;QACV,MAAA,IAAI,CAAC,GAAG,0CAAE,UAAU,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;CACJ;AAOD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB,GAAG,EAAE;IACzD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAsB,EAAE,CAAC,CAAC;IAEtE,KAAK,CAAC,aAAa,CAAC,iBAAiB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvD,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,MAAyB,EAAE,EAAE;QAC9D,UAAU,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,GAAG,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;QAC9D,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,OAAO;YACH,OAAO,EAAE,GAAG,EAAE;gBACV,IAAI,QAAQ,EAAE;oBACV,MAAM,IAAI,KAAK,CACX,8CAA8C,CACjD,CAAC;iBACL;gBACD,QAAQ,GAAG,IAAI,CAAC;gBAChB,UAAU,CAAC,CAAC,eAAe,EAAE,EAAE,CAC3B,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAC9C,CAAC;YACN,CAAC;SACJ,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,qBAAqB;AACrB,MAAM,UAAU,cAAc,CAC1B,OAAiC;IAEjC,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC;AACzB,CAAC"}
@@ -1,24 +1,23 @@
1
- import * as React from 'react';
2
- import { SplitviewApi } from '../../api/component.api';
3
- import { SplitviewPanelApi } from '../../api/splitviewPanelApi';
4
- import { Orientation } from '../../splitview/core/splitview';
5
- import { PanelCollection, PanelParameters } from '../types';
6
- export interface SplitviewReadyEvent {
7
- api: SplitviewApi;
8
- }
9
- export interface ISplitviewPanelProps<T extends {
10
- [index: string]: any;
11
- } = any> extends PanelParameters<T> {
12
- api: SplitviewPanelApi;
13
- containerApi: SplitviewApi;
14
- }
15
- export interface ISplitviewReactProps {
16
- orientation?: Orientation;
17
- onReady: (event: SplitviewReadyEvent) => void;
18
- components: PanelCollection<ISplitviewPanelProps>;
19
- proportionalLayout?: boolean;
20
- hideBorders?: boolean;
21
- className?: string;
22
- disableAutoResizing?: boolean;
23
- }
24
- export declare const SplitviewReact: React.ForwardRefExoticComponent<ISplitviewReactProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from 'react';
2
+ import { SplitviewApi, SplitviewPanelApi, Orientation } from 'dockview-core';
3
+ import { PanelCollection, PanelParameters } from '../types';
4
+ export interface SplitviewReadyEvent {
5
+ api: SplitviewApi;
6
+ }
7
+ export interface ISplitviewPanelProps<T extends {
8
+ [index: string]: any;
9
+ } = any> extends PanelParameters<T> {
10
+ api: SplitviewPanelApi;
11
+ containerApi: SplitviewApi;
12
+ }
13
+ export interface ISplitviewReactProps {
14
+ orientation?: Orientation;
15
+ onReady: (event: SplitviewReadyEvent) => void;
16
+ components: PanelCollection<ISplitviewPanelProps>;
17
+ proportionalLayout?: boolean;
18
+ hideBorders?: boolean;
19
+ className?: string;
20
+ disableAutoResizing?: boolean;
21
+ }
22
+ export declare const SplitviewReact: React.ForwardRefExoticComponent<ISplitviewReactProps & React.RefAttributes<HTMLDivElement>>;
23
+ //# sourceMappingURL=splitview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitview.d.ts","sourceRoot":"","sources":["../../../src/splitview/splitview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACH,YAAY,EACZ,iBAAiB,EAGjB,WAAW,EACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG5D,MAAM,WAAW,mBAAmB;IAChC,GAAG,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,GAAG,CAC1E,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC1B,GAAG,EAAE,iBAAiB,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,UAAU,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAClD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,cAAc,6FAkE1B,CAAC"}
@@ -1,66 +1,50 @@
1
- import * as React from 'react';
2
- import { SplitviewApi } from '../../api/component.api';
3
- import { SplitviewComponent, } from '../../splitview/splitviewComponent';
4
- import { Orientation } from '../../splitview/core/splitview';
5
- import { usePortalsLifecycle } from '../react';
6
- import { ReactPanelView } from './view';
7
- import { watchElementResize } from '../../dom';
8
- export const SplitviewReact = React.forwardRef((props, ref) => {
9
- const domRef = React.useRef(null);
10
- const splitviewRef = React.useRef();
11
- const [portals, addPortal] = usePortalsLifecycle();
12
- React.useImperativeHandle(ref, () => domRef.current, []);
13
- React.useEffect(() => {
14
- if (props.disableAutoResizing) {
15
- return () => {
16
- //
17
- };
18
- }
19
- const watcher = watchElementResize(domRef.current, (entry) => {
20
- var _a;
21
- const { width, height } = entry.contentRect;
22
- (_a = splitviewRef.current) === null || _a === void 0 ? void 0 : _a.layout(width, height);
23
- });
24
- return () => {
25
- watcher.dispose();
26
- };
27
- }, [props.disableAutoResizing]);
28
- React.useEffect(() => {
29
- const splitview = new SplitviewComponent(domRef.current, {
30
- orientation: props.orientation || Orientation.HORIZONTAL,
31
- frameworkComponents: props.components,
32
- frameworkWrapper: {
33
- createComponent: (id, componentId, component) => {
34
- return new ReactPanelView(id, componentId, component, {
35
- addPortal,
36
- });
37
- },
38
- },
39
- proportionalLayout: typeof props.proportionalLayout === 'boolean'
40
- ? props.proportionalLayout
41
- : true,
42
- styles: props.hideBorders
43
- ? { separatorBorder: 'transparent' }
44
- : undefined,
45
- });
46
- const { clientWidth, clientHeight } = domRef.current;
47
- splitview.layout(clientWidth, clientHeight);
48
- if (props.onReady) {
49
- props.onReady({ api: new SplitviewApi(splitview) });
50
- }
51
- splitviewRef.current = splitview;
52
- return () => {
53
- splitview.dispose();
54
- };
55
- }, []);
56
- React.useEffect(() => {
57
- if (!splitviewRef.current) {
58
- return;
59
- }
60
- splitviewRef.current.updateOptions({
61
- frameworkComponents: props.components,
62
- });
63
- }, [props.components]);
64
- return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
65
- });
66
- SplitviewReact.displayName = 'SplitviewComponent';
1
+ import * as React from 'react';
2
+ import { SplitviewApi, SplitviewComponent, Orientation, } from 'dockview-core';
3
+ import { usePortalsLifecycle } from '../react';
4
+ import { ReactPanelView } from './view';
5
+ export const SplitviewReact = React.forwardRef((props, ref) => {
6
+ const domRef = React.useRef(null);
7
+ const splitviewRef = React.useRef();
8
+ const [portals, addPortal] = usePortalsLifecycle();
9
+ React.useImperativeHandle(ref, () => domRef.current, []);
10
+ React.useEffect(() => {
11
+ const splitview = new SplitviewComponent({
12
+ parentElement: domRef.current,
13
+ orientation: props.orientation || Orientation.HORIZONTAL,
14
+ frameworkComponents: props.components,
15
+ frameworkWrapper: {
16
+ createComponent: (id, componentId, component) => {
17
+ return new ReactPanelView(id, componentId, component, {
18
+ addPortal,
19
+ });
20
+ },
21
+ },
22
+ proportionalLayout: typeof props.proportionalLayout === 'boolean'
23
+ ? props.proportionalLayout
24
+ : true,
25
+ styles: props.hideBorders
26
+ ? { separatorBorder: 'transparent' }
27
+ : undefined,
28
+ });
29
+ const { clientWidth, clientHeight } = domRef.current;
30
+ splitview.layout(clientWidth, clientHeight);
31
+ if (props.onReady) {
32
+ props.onReady({ api: new SplitviewApi(splitview) });
33
+ }
34
+ splitviewRef.current = splitview;
35
+ return () => {
36
+ splitview.dispose();
37
+ };
38
+ }, []);
39
+ React.useEffect(() => {
40
+ if (!splitviewRef.current) {
41
+ return;
42
+ }
43
+ splitviewRef.current.updateOptions({
44
+ frameworkComponents: props.components,
45
+ });
46
+ }, [props.components]);
47
+ return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
48
+ });
49
+ SplitviewReact.displayName = 'SplitviewComponent';
50
+ //# sourceMappingURL=splitview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"splitview.js","sourceRoot":"","sources":["../../../src/splitview/splitview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACH,YAAY,EAGZ,kBAAkB,EAClB,WAAW,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAsBxC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC1C,CAAC,KAA2B,EAAE,GAAuC,EAAE,EAAE;IACrE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,EAAuB,CAAC;IACzD,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,mBAAmB,EAAE,CAAC;IAEnD,KAAK,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAQ,EAAE,EAAE,CAAC,CAAC;IAE1D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,SAAS,GAAG,IAAI,kBAAkB,CAAC;YACrC,aAAa,EAAE,MAAM,CAAC,OAAQ;YAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,WAAW,CAAC,UAAU;YACxD,mBAAmB,EAAE,KAAK,CAAC,UAAU;YACrC,gBAAgB,EAAE;gBACd,eAAe,EAAE,CACb,EAAU,EACV,WAAW,EACX,SAAc,EAChB,EAAE;oBACA,OAAO,IAAI,cAAc,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;wBAClD,SAAS;qBACZ,CAAC,CAAC;gBACP,CAAC;aACJ;YACD,kBAAkB,EACd,OAAO,KAAK,CAAC,kBAAkB,KAAK,SAAS;gBACzC,CAAC,CAAC,KAAK,CAAC,kBAAkB;gBAC1B,CAAC,CAAC,IAAI;YACd,MAAM,EAAE,KAAK,CAAC,WAAW;gBACrB,CAAC,CAAC,EAAE,eAAe,EAAE,aAAa,EAAE;gBACpC,CAAC,CAAC,SAAS;SAClB,CAAC,CAAC;QAEH,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC,OAAQ,CAAC;QACtD,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAE5C,IAAI,KAAK,CAAC,OAAO,EAAE;YACf,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SACvD;QAED,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;QAEjC,OAAO,GAAG,EAAE;YACR,SAAS,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;YACvB,OAAO;SACV;QACD,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC;YAC/B,mBAAmB,EAAE,KAAK,CAAC,UAAU;SACxC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAEvB,OAAO,CACH,6BACI,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACxC,GAAG,EAAE,MAAM,IAEV,OAAO,CACN,CACT,CAAC;AACN,CAAC,CACJ,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
@@ -1,10 +1,11 @@
1
- /// <reference types="react" />
2
- import { SplitviewPanel } from '../../splitview/splitviewPanel';
3
- import { ReactPart, ReactPortalStore } from '../react';
4
- import { ISplitviewPanelProps } from './splitview';
5
- export declare class ReactPanelView extends SplitviewPanel {
6
- private readonly reactComponent;
7
- private readonly reactPortalStore;
8
- constructor(id: string, component: string, reactComponent: React.FunctionComponent<ISplitviewPanelProps>, reactPortalStore: ReactPortalStore);
9
- getComponent(): ReactPart<ISplitviewPanelProps<any>, {}>;
10
- }
1
+ /// <reference types="react" />
2
+ import { SplitviewPanel } from 'dockview-core';
3
+ import { ReactPart, ReactPortalStore } from '../react';
4
+ import { ISplitviewPanelProps } from './splitview';
5
+ export declare class ReactPanelView extends SplitviewPanel {
6
+ private readonly reactComponent;
7
+ private readonly reactPortalStore;
8
+ constructor(id: string, component: string, reactComponent: React.FunctionComponent<ISplitviewPanelProps>, reactPortalStore: ReactPortalStore);
9
+ getComponent(): ReactPart<ISplitviewPanelProps>;
10
+ }
11
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/splitview/view.ts"],"names":[],"mappings":";AAAA,OAAO,EAGH,cAAc,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,qBAAa,cAAe,SAAQ,cAAc;IAI1C,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAHjC,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,EACA,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAC7D,gBAAgB,EAAE,gBAAgB;IAKvD,YAAY,IAAI,SAAS,CAAC,oBAAoB,CAAC;CAclD"}
@@ -1,18 +1,18 @@
1
- import { SplitviewApi } from '../../api/component.api';
2
- import { SplitviewPanel } from '../../splitview/splitviewPanel';
3
- import { ReactPart } from '../react';
4
- export class ReactPanelView extends SplitviewPanel {
5
- constructor(id, component, reactComponent, reactPortalStore) {
6
- super(id, component);
7
- this.reactComponent = reactComponent;
8
- this.reactPortalStore = reactPortalStore;
9
- }
10
- getComponent() {
11
- var _a;
12
- return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
13
- params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
14
- api: this.api,
15
- containerApi: new SplitviewApi(this._params.accessor),
16
- });
17
- }
18
- }
1
+ import { SplitviewApi, SplitviewPanel, } from 'dockview-core';
2
+ import { ReactPart } from '../react';
3
+ export class ReactPanelView extends SplitviewPanel {
4
+ constructor(id, component, reactComponent, reactPortalStore) {
5
+ super(id, component);
6
+ this.reactComponent = reactComponent;
7
+ this.reactPortalStore = reactPortalStore;
8
+ }
9
+ getComponent() {
10
+ var _a;
11
+ return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
12
+ params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
13
+ api: this.api,
14
+ containerApi: new SplitviewApi(this._params.accessor),
15
+ });
16
+ }
17
+ }
18
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/splitview/view.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAEZ,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAoB,MAAM,UAAU,CAAC;AAGvD,MAAM,OAAO,cAAe,SAAQ,cAAc;IAC9C,YACI,EAAU,EACV,SAAiB,EACA,cAA6D,EAC7D,gBAAkC;QAEnD,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAHJ,mBAAc,GAAd,cAAc,CAA+C;QAC7D,qBAAgB,GAAhB,gBAAgB,CAAkB;IAGvD,CAAC;IAED,YAAY;;QACR,OAAO,IAAI,SAAS,CAChB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,cAAc,EACnB;YACI,MAAM,EAAE,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,KAAI,EAAE;YAClC,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,YAAY,EAAE,IAAI,YAAY,CACzB,IAAI,CAAC,OAAmC,CAAC,QAAQ,CACrD;SACJ,CACJ,CAAC;IACN,CAAC;CACJ"}
package/dist/esm/svg.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export declare const createCloseButton: () => SVGSVGElement;
2
- export declare const createExpandMoreButton: () => SVGSVGElement;
3
- export declare const createChevronRightButton: () => SVGSVGElement;
1
+ /// <reference types="react" />
2
+ export declare const CloseButton: () => JSX.Element;
3
+ export declare const ExpandMore: () => JSX.Element;
4
+ //# sourceMappingURL=svg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/svg.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,WAAW,mBAWvB,CAAC;AAEF,eAAO,MAAM,UAAU,mBAatB,CAAC"}