dockview 1.13.1 → 1.14.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.
@@ -29,7 +29,7 @@ export class ReactPanelContentPart {
29
29
  }
30
30
  update(event) {
31
31
  var _a;
32
- (_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
32
+ (_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
33
33
  }
34
34
  layout(_width, _height) {
35
35
  // noop
@@ -24,7 +24,7 @@ export class ReactPanelHeaderPart {
24
24
  }
25
25
  update(event) {
26
26
  var _a;
27
- (_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
27
+ (_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
28
28
  }
29
29
  layout(_width, _height) {
30
30
  // noop - retrieval from api
package/dist/esm/react.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
+ import { DockviewDisposable, } from 'dockview-core';
3
4
  /**
4
5
  * This component is intended to interface between vanilla-js and React hence we need to be
5
6
  * creative in how we update props.
@@ -109,15 +110,13 @@ export const usePortalsLifecycle = () => {
109
110
  const addPortal = React.useCallback((portal) => {
110
111
  setPortals((existingPortals) => [...existingPortals, portal]);
111
112
  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
- };
113
+ return DockviewDisposable.from(() => {
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
+ });
121
120
  }, []);
122
121
  return [portals, addPortal];
123
122
  };
@@ -438,16 +438,16 @@
438
438
  .dv-dockview .dv-overlay-render-container {
439
439
  position: relative;
440
440
  }
441
- .dv-dockview .split-view-container.horizontal > .view-container > .view:not(:last-child) {
441
+ .dv-dockview .split-view-container.horizontal > .view-container > .view:not(:last-child) .groupview {
442
442
  border-right: var(--dv-group-gap-size) solid transparent;
443
443
  }
444
- .dv-dockview .split-view-container.horizontal > .view-container > .view:not(:first-child) {
444
+ .dv-dockview .split-view-container.horizontal > .view-container > .view:not(:first-child) .groupview {
445
445
  border-left: var(--dv-group-gap-size) solid transparent;
446
446
  }
447
- .dv-dockview .split-view-container.vertical > .view-container > .view:not(:last-child) {
447
+ .dv-dockview .split-view-container.vertical > .view-container > .view:not(:last-child) .groupview {
448
448
  border-bottom: var(--dv-group-gap-size) solid transparent;
449
449
  }
450
- .dv-dockview .split-view-container.vertical > .view-container > .view:not(:first-child) {
450
+ .dv-dockview .split-view-container.vertical > .view-container > .view:not(:first-child) .groupview {
451
451
  border-top: var(--dv-group-gap-size) solid transparent;
452
452
  }
453
453
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockview",
3
- "version": "1.13.1",
3
+ "version": "1.14.1",
4
4
  "description": "Zero dependency layout manager supporting tabs, grids and splitviews",
5
5
  "keywords": [
6
6
  "splitview",
@@ -54,6 +54,6 @@
54
54
  "test:cov": "cross-env ../../node_modules/.bin/jest --selectProjects dockview --coverage"
55
55
  },
56
56
  "dependencies": {
57
- "dockview-core": "^1.13.1"
57
+ "dockview-core": "^1.14.1"
58
58
  }
59
59
  }