dockview-core 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 5.0.0
3
+ * @version 5.1.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -8127,6 +8127,9 @@ class OverlayRenderContainer extends CompositeDisposable {
8127
8127
  if (!this.map[panel.api.id]) {
8128
8128
  const element = createFocusableElement();
8129
8129
  element.className = 'dv-render-overlay';
8130
+ // Hide until the first RAF-based position is applied to prevent a
8131
+ // one-frame flash at position 0,0 when the element is first attached.
8132
+ element.style.visibility = 'hidden';
8130
8133
  this.map[panel.api.id] = {
8131
8134
  panel,
8132
8135
  disposable: Disposable.NONE,
@@ -8163,6 +8166,11 @@ class OverlayRenderContainer extends CompositeDisposable {
8163
8166
  focusContainer.style.top = `${top}px`;
8164
8167
  focusContainer.style.width = `${width}px`;
8165
8168
  focusContainer.style.height = `${height}px`;
8169
+ // Reveal after the first position is applied (was hidden to
8170
+ // prevent a flash at 0,0 before the initial layout fires).
8171
+ if (focusContainer.style.visibility === 'hidden') {
8172
+ focusContainer.style.visibility = '';
8173
+ }
8166
8174
  toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
8167
8175
  });
8168
8176
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockview-core",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Zero dependency layout manager supporting tabs, groups, grids and splitviews for vanilla TypeScript",
5
5
  "keywords": [
6
6
  "splitview",