bwin 0.1.4 → 0.1.7-dev.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 (2) hide show
  1. package/dist/bwin.js +12 -9
  2. package/package.json +1 -1
package/dist/bwin.js CHANGED
@@ -309,7 +309,7 @@ const S = {
309
309
  size: "50%",
310
310
  position: r.Left
311
311
  };
312
- class R {
312
+ class A {
313
313
  constructor({
314
314
  parentRect: t,
315
315
  children: i,
@@ -411,7 +411,7 @@ class R {
411
411
  }
412
412
  }
413
413
  createPrimaryConfigNode({ size: t, position: i, children: n, id: s, minWidth: o, minHeight: h, ...l }) {
414
- return new R({
414
+ return new A({
415
415
  parentRect: this,
416
416
  size: t ?? S.size,
417
417
  position: i ?? S.position,
@@ -423,7 +423,7 @@ class R {
423
423
  });
424
424
  }
425
425
  createSecondaryConfigNode({ size: t, position: i, children: n, id: s, minWidth: o, minHeight: h, ...l }, a) {
426
- return new R({
426
+ return new A({
427
427
  parentRect: this,
428
428
  size: t,
429
429
  position: i,
@@ -450,22 +450,22 @@ class R {
450
450
  )), s && o && (t.children.push(s.buildSashTree()), t.children.push(o.buildSashTree())), t;
451
451
  }
452
452
  }
453
- const A = {
453
+ const R = {
454
454
  width: 333,
455
455
  height: 333
456
456
  }, D = {
457
457
  fitContainer: !1
458
458
  };
459
- class K extends R {
459
+ class K extends A {
460
460
  constructor({
461
461
  id: t,
462
462
  children: i,
463
- width: n = A.width,
464
- height: s = A.height,
463
+ width: n = R.width,
464
+ height: s = R.height,
465
465
  fitContainer: o = D.fitContainer,
466
466
  ...h
467
467
  } = {
468
- ...A,
468
+ ...R,
469
469
  ...D
470
470
  }) {
471
471
  super({
@@ -669,10 +669,13 @@ const st = {
669
669
  }
670
670
  }, ht = {
671
671
  fitContainer: !1,
672
+ fit() {
673
+ this.rootSash.width = this.containerElement.clientWidth, this.rootSash.height = this.containerElement.clientHeight, this.update();
674
+ },
672
675
  enableFitContainer() {
673
676
  new ResizeObserver((t) => {
674
677
  for (const i of t)
675
- i.target === this.containerElement && this.fitContainer && (this.rootSash.width = i.contentRect.width, this.rootSash.height = i.contentRect.height, this.update());
678
+ i.target === this.containerElement && this.fitContainer && this.fit();
676
679
  }).observe(this.containerElement);
677
680
  }
678
681
  }, rt = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "bwin",
3
3
  "description": "A tiling window manager for web browsers",
4
4
  "type": "module",
5
- "version": "0.1.4",
5
+ "version": "0.1.7-dev.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/bhjsdev/bwin.git"