bwin 0.4.3 → 0.4.4

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.
package/dist/bwin.css CHANGED
@@ -1,2 +1,2 @@
1
- bw-window{--bw-font-family:system-ui;--bw-font-size:14px;--bw-drop-area-bg-color:#0000000d;--bw-glass-clearance:2px;--bw-glass-border-radius:2px;--bw-glass-border-color:#1a1a1a;--bw-glass-border-color-disabled:#ccc;--bw-glass-bg-color-disabled:#f7f7f7;--bw-glass-header-height:30px;--bw-glass-header-gap:4px;--bw-glass-header-bg-color:#f7f7f7;--bw-minimized-glass-highlight-color:#d9d9d9;--bw-detached-glass-shadow:0 2px 6px #0000001f, 0 4px 14px #00000038;--bw-detached-glass-shadow-active:0 4px 10px #00000038, 0 10px 30px #00000061;--bw-detached-glass-resize-handle-size:12px;--bw-sill-gap:6px}bw-window[theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bw-glass-border-color:#666;--bw-glass-border-color-disabled:#4d4d4d;--bw-glass-header-bg-color:#2e2e2e;--bw-glass-bg-color-disabled:#292929;--bw-drop-area-bg-color:#ffffff1a;--bw-detached-glass-shadow:0 2px 6px #0000008c, 0 4px 14px #000000a6;--bw-detached-glass-shadow-active:0 4px 10px #000000a6, 0 10px 30px #000c;--bw-minimized-glass-highlight-color:#a6a6a6cc}bw-window[theme=dark] bw-pane,bw-window[theme=dark] bw-muntin{background-color:#242424}bw-window[theme=dark] bw-glass{color:#e6e6e6;background-color:#292929}bw-window[theme=dark] .bw-glass-tab:hover,bw-window[theme=dark] .bw-glass-action:hover,bw-window[theme=dark] .bw-minimized-glass:hover{background-color:#424242}.body--bw-resize-x{-webkit-user-select:none;user-select:none;cursor:ew-resize}.body--bw-resize-y{-webkit-user-select:none;user-select:none;cursor:ns-resize}bw-window{box-sizing:border-box;display:block;position:absolute}bw-window:has(>bw-pane[maximized])>:is(bw-pane,bw-muntin):not([maximized]){display:none}bw-pane{isolation:isolate;box-sizing:border-box;background-color:#f2f2f2;position:absolute;overflow:auto}bw-pane[drop-area]:before{content:"";background-color:var(--bw-drop-area-bg-color);position:absolute}bw-pane[drop-area=top]:before{height:50%;top:0;left:0;right:0}bw-pane[drop-area=right]:before{width:50%;top:0;bottom:0;right:0}bw-pane[drop-area=bottom]:before{height:50%;bottom:0;left:0;right:0}bw-pane[drop-area=left]:before{width:50%;top:0;bottom:0;left:0}bw-pane[drop-area=center]:before{inset:0}bw-muntin{box-sizing:border-box;background-color:#fff;position:absolute}bw-muntin[horizontal]{cursor:ns-resize}bw-muntin[vertical]{cursor:ew-resize}bw-muntin[resizable=false]{cursor:auto}bw-window:has(bw-glass) bw-pane{background-color:#0000}bw-window:has(bw-glass) bw-pane[drop-area]:before{z-index:1}bw-window:has(bw-glass) bw-pane[drop-area=top]:before{top:var(--bw-glass-clearance);left:var(--bw-glass-clearance);right:var(--bw-glass-clearance);height:50%}bw-window:has(bw-glass) bw-pane[drop-area=right]:before{top:var(--bw-glass-clearance);right:var(--bw-glass-clearance);bottom:var(--bw-glass-clearance);width:50%}bw-window:has(bw-glass) bw-pane[drop-area=bottom]:before{bottom:var(--bw-glass-clearance);left:var(--bw-glass-clearance);right:var(--bw-glass-clearance);height:50%}bw-window:has(bw-glass) bw-pane[drop-area=left]:before{top:var(--bw-glass-clearance);left:var(--bw-glass-clearance);bottom:var(--bw-glass-clearance);width:50%}bw-window:has(bw-glass) bw-pane[drop-area=center]:before{inset:var(--bw-glass-clearance)}bw-window:has(bw-glass) bw-muntin{background-color:#0000}bw-glass{inset:var(--bw-glass-clearance);border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);font-family:var(--bw-font-family);font-size:var(--bw-font-size);box-sizing:border-box;background-color:#fff;flex-direction:column;display:flex;position:absolute}bw-glass[draggable=true]:active{cursor:move;opacity:.4}bw-glass-header{box-sizing:border-box;flex-basis:var(--bw-glass-header-height);-webkit-user-select:none;user-select:none;align-items:center;gap:var(--bw-glass-header-gap);padding-inline:var(--bw-glass-header-gap);border-bottom:1px solid var(--bw-glass-border-color);border-top-left-radius:var(--bw-glass-border-radius);border-top-right-radius:var(--bw-glass-border-radius);background-color:var(--bw-glass-header-bg-color);flex-shrink:0;display:flex;overflow:hidden}bw-glass-title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}bw-glass-tab-container{align-self:flex-end;gap:var(--bw-glass-header-gap);display:flex}.bw-glass-tab{font-family:var(--bw-font-family);border:1px solid var(--bw-glass-border-color);border-top-left-radius:var(--bw-glass-border-radius);border-top-right-radius:var(--bw-glass-border-radius);cursor:pointer;border-bottom:none}.bw-glass-tab:hover{background-color:#fff}.bw-glass-tab:active{transform:translateY(1px)}bw-glass-action-container{flex-shrink:0;gap:2px;margin-left:auto;display:flex}.bw-glass-action{font-family:var(--bw-font-family);border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);cursor:pointer}.bw-glass-action:hover{background-color:#fff}.bw-glass-action:active{transform:scale(.95)}.bw-glass-action:disabled{border:1px solid var(--bw-glass-border-color-disabled);background-color:var(--bw-glass-bg-color-disabled);cursor:not-allowed}.bw-glass-action:disabled:hover{background-color:var(--bw-glass-bg-color-disabled)}.bw-glass-action:disabled:active{transform:scale(1)}.bw-glass-action--minimize:before{content:"−"}.bw-glass-action--detach:before{content:"☐"}.bw-glass-action--attach:before{content:"⊞"}.bw-glass-action--maximize:before{content:"🡥"}bw-pane[maximized] .bw-glass-action--maximize:before{content:"🡧"}.bw-glass-action--close:before{content:"✕"}bw-glass-content{box-sizing:border-box;flex-grow:1;display:block;overflow:auto}bw-glass[detached]{box-shadow:var(--bw-detached-glass-shadow)}bw-glass[detached][active]{box-shadow:var(--bw-detached-glass-shadow-active)}bw-glass[detached]>bw-glass-header[can-drag=true]:active{cursor:move}bw-glass-resize-handle{z-index:2;touch-action:none;position:absolute}bw-glass-resize-handle[resize-dir=n]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);height:var(--bw-detached-glass-resize-handle-size);cursor:ns-resize;left:0;right:0}bw-glass-resize-handle[resize-dir=s]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);height:var(--bw-detached-glass-resize-handle-size);cursor:ns-resize;left:0;right:0}bw-glass-resize-handle[resize-dir=e]{top:0;bottom:0;right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);cursor:ew-resize}bw-glass-resize-handle[resize-dir=w]{top:0;bottom:0;left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);cursor:ew-resize}bw-glass-resize-handle[resize-dir=ne]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nesw-resize}bw-glass-resize-handle[resize-dir=nw]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nwse-resize}bw-glass-resize-handle[resize-dir=se]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nwse-resize}bw-glass-resize-handle[resize-dir=sw]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nesw-resize}bw-sill{margin-top:calc(var(--bw-sill-gap) - var(--bw-glass-clearance));gap:var(--bw-sill-gap);box-sizing:border-box;width:100%;padding-inline:var(--bw-glass-clearance);display:flex;position:absolute;top:100%}.bw-minimized-glass,.bw-minimized-detached-glass{border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);cursor:pointer;background-color:var(--bw-glass-header-bg-color);flex-basis:10%;height:10px;display:block}:is(.bw-minimized-glass,.bw-minimized-detached-glass):hover{background-color:#fff}:is(.bw-minimized-glass,.bw-minimized-detached-glass):active{transform:scale(.95)}.bw-minimized-glass,.bw-minimized-detached-glass{animation:2s ease-out bw-minimized-glass-highlight}@keyframes bw-minimized-glass-highlight{0%{background-color:var(--bw-glass-header-bg-color)}30%{background-color:var(--bw-minimized-glass-highlight-color)}to{background-color:var(--bw-glass-header-bg-color)}}
1
+ bw-window{--bw-font-family:system-ui;--bw-font-size:14px;--bw-drop-area-bg-color:#0000000d;--bw-glass-clearance:2px;--bw-glass-border-radius:2px;--bw-glass-border-color:#1a1a1a;--bw-glass-border-color-disabled:#ccc;--bw-glass-bg-color-disabled:#f7f7f7;--bw-glass-header-height:30px;--bw-glass-header-gap:4px;--bw-glass-header-bg-color:#f7f7f7;--bw-minimized-glass-highlight-color:#d9d9d9;--bw-detached-glass-shadow:0 2px 6px #0000001f, 0 4px 14px #00000038;--bw-detached-glass-shadow-active:0 4px 10px #00000038, 0 10px 30px #00000061;--bw-detached-glass-resize-handle-size:12px;--bw-sill-gap:6px}bw-window[theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bw-glass-border-color:#666;--bw-glass-border-color-disabled:#4d4d4d;--bw-glass-header-bg-color:#2e2e2e;--bw-glass-bg-color-disabled:#292929;--bw-drop-area-bg-color:#ffffff1a;--bw-detached-glass-shadow:0 2px 6px #0000008c, 0 4px 14px #000000a6;--bw-detached-glass-shadow-active:0 4px 10px #000000a6, 0 10px 30px #000c;--bw-minimized-glass-highlight-color:#a6a6a6cc}bw-window[theme=dark] bw-pane,bw-window[theme=dark] bw-muntin{background-color:#242424}bw-window[theme=dark] bw-glass-content{color:#e6e6e6;background-color:#292929}bw-window[theme=dark] .bw-glass-tab:hover,bw-window[theme=dark] .bw-glass-action:hover,bw-window[theme=dark] .bw-minimized-glass:hover{background-color:#424242}.body--bw-resize-x{-webkit-user-select:none;user-select:none;cursor:ew-resize}.body--bw-resize-y{-webkit-user-select:none;user-select:none;cursor:ns-resize}bw-window{box-sizing:border-box;display:block;position:absolute}bw-window:has(>bw-pane[maximized])>:is(bw-pane,bw-muntin):not([maximized]){display:none}bw-pane{isolation:isolate;box-sizing:border-box;background-color:#f2f2f2;position:absolute;overflow:auto}bw-pane[drop-area]:before{content:"";background-color:var(--bw-drop-area-bg-color);position:absolute}bw-pane[drop-area=top]:before{height:50%;top:0;left:0;right:0}bw-pane[drop-area=right]:before{width:50%;top:0;bottom:0;right:0}bw-pane[drop-area=bottom]:before{height:50%;bottom:0;left:0;right:0}bw-pane[drop-area=left]:before{width:50%;top:0;bottom:0;left:0}bw-pane[drop-area=center]:before{inset:0}bw-muntin{box-sizing:border-box;background-color:#fff;position:absolute}bw-muntin[horizontal]{cursor:ns-resize}bw-muntin[vertical]{cursor:ew-resize}bw-muntin[resizable=false]{cursor:auto}bw-window:has(bw-glass) bw-pane{background-color:#0000}bw-window:has(bw-glass) bw-pane[drop-area]:before{z-index:1}bw-window:has(bw-glass) bw-pane[drop-area=top]:before{top:var(--bw-glass-clearance);left:var(--bw-glass-clearance);right:var(--bw-glass-clearance);height:50%}bw-window:has(bw-glass) bw-pane[drop-area=right]:before{top:var(--bw-glass-clearance);right:var(--bw-glass-clearance);bottom:var(--bw-glass-clearance);width:50%}bw-window:has(bw-glass) bw-pane[drop-area=bottom]:before{bottom:var(--bw-glass-clearance);left:var(--bw-glass-clearance);right:var(--bw-glass-clearance);height:50%}bw-window:has(bw-glass) bw-pane[drop-area=left]:before{top:var(--bw-glass-clearance);left:var(--bw-glass-clearance);bottom:var(--bw-glass-clearance);width:50%}bw-window:has(bw-glass) bw-pane[drop-area=center]:before{inset:var(--bw-glass-clearance)}bw-window:has(bw-glass) bw-muntin{background-color:#0000}bw-glass{inset:var(--bw-glass-clearance);border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);font-family:var(--bw-font-family);font-size:var(--bw-font-size);box-sizing:border-box;flex-direction:column;display:flex;position:absolute}bw-glass[draggable=true]:active{cursor:move;opacity:.4}bw-glass-header{box-sizing:border-box;flex-basis:var(--bw-glass-header-height);-webkit-user-select:none;user-select:none;align-items:center;gap:var(--bw-glass-header-gap);padding-inline:var(--bw-glass-header-gap);border-bottom:1px solid var(--bw-glass-border-color);border-top-left-radius:var(--bw-glass-border-radius);border-top-right-radius:var(--bw-glass-border-radius);background-color:var(--bw-glass-header-bg-color);flex-shrink:0;display:flex;overflow:hidden}bw-glass-title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}bw-glass-tab-container{align-self:flex-end;gap:var(--bw-glass-header-gap);display:flex}.bw-glass-tab{font-family:var(--bw-font-family);border:1px solid var(--bw-glass-border-color);border-top-left-radius:var(--bw-glass-border-radius);border-top-right-radius:var(--bw-glass-border-radius);cursor:pointer;border-bottom:none}.bw-glass-tab:hover{background-color:#fff}.bw-glass-tab:active{transform:translateY(1px)}bw-glass-action-container{flex-shrink:0;gap:2px;margin-left:auto;display:flex}.bw-glass-action{font-family:var(--bw-font-family);border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);cursor:pointer}.bw-glass-action:hover{background-color:#fff}.bw-glass-action:active{transform:scale(.95)}.bw-glass-action:disabled{border:1px solid var(--bw-glass-border-color-disabled);background-color:var(--bw-glass-bg-color-disabled);cursor:not-allowed}.bw-glass-action:disabled:hover{background-color:var(--bw-glass-bg-color-disabled)}.bw-glass-action:disabled:active{transform:scale(1)}.bw-glass-action--minimize:before{content:"−"}.bw-glass-action--detach:before{content:"☐"}.bw-glass-action--attach:before{content:"⊞"}.bw-glass-action--maximize:before{content:"🡥"}bw-pane[maximized] .bw-glass-action--maximize:before{content:"🡧"}.bw-glass-action--close:before{content:"✕"}bw-glass-content{box-sizing:border-box;border-bottom-left-radius:var(--bw-glass-border-radius);border-bottom-right-radius:var(--bw-glass-border-radius);background-color:#fff;flex-grow:1;display:block;overflow:auto}bw-glass[detached]{box-shadow:var(--bw-detached-glass-shadow)}bw-glass[detached][active]{box-shadow:var(--bw-detached-glass-shadow-active)}bw-glass[detached]>bw-glass-header[can-drag=true]:active{cursor:move}bw-glass-resize-handle{z-index:2;touch-action:none;position:absolute}bw-glass-resize-handle[resize-dir=n]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);height:var(--bw-detached-glass-resize-handle-size);cursor:ns-resize;left:0;right:0}bw-glass-resize-handle[resize-dir=s]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);height:var(--bw-detached-glass-resize-handle-size);cursor:ns-resize;left:0;right:0}bw-glass-resize-handle[resize-dir=e]{top:0;bottom:0;right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);cursor:ew-resize}bw-glass-resize-handle[resize-dir=w]{top:0;bottom:0;left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);cursor:ew-resize}bw-glass-resize-handle[resize-dir=ne]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nesw-resize}bw-glass-resize-handle[resize-dir=nw]{top:calc(var(--bw-detached-glass-resize-handle-size) / -2);left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nwse-resize}bw-glass-resize-handle[resize-dir=se]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);right:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nwse-resize}bw-glass-resize-handle[resize-dir=sw]{bottom:calc(var(--bw-detached-glass-resize-handle-size) / -2);left:calc(var(--bw-detached-glass-resize-handle-size) / -2);width:var(--bw-detached-glass-resize-handle-size);height:var(--bw-detached-glass-resize-handle-size);cursor:nesw-resize}bw-sill{margin-top:calc(var(--bw-sill-gap) - var(--bw-glass-clearance));gap:var(--bw-sill-gap);box-sizing:border-box;width:100%;padding-inline:var(--bw-glass-clearance);display:flex;position:absolute;top:100%}.bw-minimized-glass,.bw-minimized-detached-glass{border:1px solid var(--bw-glass-border-color);border-radius:var(--bw-glass-border-radius);cursor:pointer;background-color:var(--bw-glass-header-bg-color);flex-basis:10%;height:10px;display:block}:is(.bw-minimized-glass,.bw-minimized-detached-glass):hover{background-color:#fff}:is(.bw-minimized-glass,.bw-minimized-detached-glass):active{transform:scale(.95)}.bw-minimized-glass,.bw-minimized-detached-glass{animation:2s ease-out bw-minimized-glass-highlight}@keyframes bw-minimized-glass-highlight{0%{background-color:var(--bw-glass-header-bg-color)}30%{background-color:var(--bw-minimized-glass-highlight-color)}to{background-color:var(--bw-glass-header-bg-color)}}
2
2
  /*$vite$:1*/
package/dist/bwin.js CHANGED
@@ -457,106 +457,122 @@ function w(e) {
457
457
  let t = e.domNode;
458
458
  return t.style.top = `${e.top}px`, t.style.left = `${e.left}px`, t.style.width = `${e.width}px`, t.style.height = `${e.height}px`, t.setAttribute("position", e.position), t;
459
459
  }
460
- function T(e, { size: n, id: r }) {
461
- let a = i(n), o = e.width / 2;
462
- a && (o = a < 1 ? e.width * a : a);
463
- let s = new v({
460
+ function T(e, { size: n, id: r, minWidth: a, minHeight: o }) {
461
+ let s = i(n), c = e.width / 2;
462
+ s && (c = s < 1 ? e.width * s : s);
463
+ let l = new v({
464
464
  id: r,
465
465
  top: e.top,
466
466
  left: e.left,
467
- width: o,
467
+ width: c,
468
468
  height: e.height,
469
+ minWidth: a,
470
+ minHeight: o,
469
471
  position: d.Left
470
- }), c = new v({
472
+ }), u = new v({
471
473
  id: e.id,
472
474
  top: e.top,
473
- left: e.left + s.width,
474
- width: e.width - o,
475
+ left: e.left + l.width,
476
+ width: e.width - c,
475
477
  height: e.height,
476
478
  position: d.Right,
477
479
  domNode: e.domNode
478
480
  });
479
- return e.addChild(s), e.addChild(c), e.domNode = null, e.id = t(), s;
481
+ return e.addChild(l), e.addChild(u), e.domNode = null, e.id = t(), l;
480
482
  }
481
- function E(e, { size: n, id: r }) {
482
- let a = i(n), o = e.width / 2;
483
- a && (o = a < 1 ? e.width * a : a);
484
- let s = new v({
483
+ function E(e, { size: n, id: r, minWidth: a, minHeight: o }) {
484
+ let s = i(n), c = e.width / 2;
485
+ s && (c = s < 1 ? e.width * s : s);
486
+ let l = new v({
485
487
  id: e.id,
486
488
  left: e.left,
487
489
  top: e.top,
488
- width: e.width - o,
490
+ width: e.width - c,
489
491
  height: e.height,
490
492
  position: d.Left,
491
493
  domNode: e.domNode
492
- }), c = new v({
494
+ }), u = new v({
493
495
  id: r,
494
- left: e.left + s.width,
496
+ left: e.left + l.width,
495
497
  top: e.top,
496
- width: o,
498
+ width: c,
497
499
  height: e.height,
500
+ minWidth: a,
501
+ minHeight: o,
498
502
  position: d.Right
499
503
  });
500
- return e.addChild(s), e.addChild(c), e.domNode = null, e.id = t(), c;
504
+ return e.addChild(l), e.addChild(u), e.domNode = null, e.id = t(), u;
501
505
  }
502
- function D(e, { size: n, id: r }) {
503
- let a = i(n), o = e.height / 2;
504
- a && (o = a < 1 ? e.height * a : a);
505
- let s = new v({
506
+ function D(e, { size: n, id: r, minWidth: a, minHeight: o }) {
507
+ let s = i(n), c = e.height / 2;
508
+ s && (c = s < 1 ? e.height * s : s);
509
+ let l = new v({
506
510
  id: r,
507
511
  left: e.left,
508
512
  top: e.top,
509
513
  width: e.width,
510
- height: o,
514
+ height: c,
515
+ minWidth: a,
516
+ minHeight: o,
511
517
  position: d.Top
512
- }), c = new v({
518
+ }), u = new v({
513
519
  id: e.id,
514
520
  left: e.left,
515
- top: e.top + s.height,
521
+ top: e.top + l.height,
516
522
  width: e.width,
517
- height: e.height - o,
523
+ height: e.height - c,
518
524
  position: d.Bottom,
519
525
  domNode: e.domNode
520
526
  });
521
- return e.addChild(s), e.addChild(c), e.domNode = null, e.id = t(), s;
527
+ return e.addChild(l), e.addChild(u), e.domNode = null, e.id = t(), l;
522
528
  }
523
- function O(e, { size: n, id: r }) {
524
- let a = i(n), o = e.height / 2;
525
- a && (o = a < 1 ? e.height * a : a);
526
- let s = new v({
529
+ function O(e, { size: n, id: r, minWidth: a, minHeight: o }) {
530
+ let s = i(n), c = e.height / 2;
531
+ s && (c = s < 1 ? e.height * s : s);
532
+ let l = new v({
527
533
  id: e.id,
528
534
  top: e.top,
529
535
  left: e.left,
530
536
  width: e.width,
531
- height: e.height - o,
537
+ height: e.height - c,
532
538
  position: d.Top,
533
539
  domNode: e.domNode
534
- }), c = new v({
540
+ }), u = new v({
535
541
  id: r,
536
- top: e.top + s.height,
542
+ top: e.top + l.height,
537
543
  left: e.left,
538
544
  width: e.width,
539
- height: o,
545
+ height: c,
546
+ minWidth: a,
547
+ minHeight: o,
540
548
  position: d.Bottom
541
549
  });
542
- return e.addChild(s), e.addChild(c), e.domNode = null, e.id = t(), c;
550
+ return e.addChild(l), e.addChild(u), e.domNode = null, e.id = t(), u;
543
551
  }
544
552
  function k(e, { position: t, size: n, id: r, minWidth: i, minHeight: a }) {
545
553
  if (t === d.Left) return T(e, {
546
554
  size: n,
547
- id: r
555
+ id: r,
556
+ minWidth: i,
557
+ minHeight: a
548
558
  });
549
559
  if (t === d.Right) return E(e, {
550
560
  size: n,
551
- id: r
561
+ id: r,
562
+ minWidth: i,
563
+ minHeight: a
552
564
  });
553
565
  if (t === d.Top) return D(e, {
554
566
  size: n,
555
- id: r
567
+ id: r,
568
+ minWidth: i,
569
+ minHeight: a
556
570
  });
557
571
  if (t === d.Bottom) return O(e, {
558
572
  size: n,
559
- id: r
573
+ id: r,
574
+ minWidth: i,
575
+ minHeight: a
560
576
  });
561
577
  }
562
578
  //#endregion
@@ -583,16 +599,18 @@ var re = {
583
599
  onPaneUpdate(e, t) {
584
600
  this?.debug && (e.innerHTML = "", e.append(j(e)));
585
601
  },
586
- addPane(e, { position: t, size: n, id: r }) {
602
+ addPane(e, { position: t, size: n, id: r, minWidth: i, minHeight: a }) {
587
603
  if (!t) throw Error("[bwin] Position is required when adding pane");
588
- let i = this.rootSash.getById(e);
589
- if (!i) throw Error("[bwin] Parent sash not found when adding pane");
590
- let a = k(i, {
604
+ let o = this.rootSash.getById(e);
605
+ if (!o) throw Error("[bwin] Parent sash not found when adding pane");
606
+ let s = k(o, {
591
607
  position: t,
592
608
  size: n,
593
- id: r
609
+ id: r,
610
+ minWidth: i,
611
+ minHeight: a
594
612
  });
595
- return this.update(), a;
613
+ return this.update(), s;
596
614
  },
597
615
  removePane(e) {
598
616
  let n = this.rootSash.getDescendantParentById(e);
@@ -1236,20 +1254,22 @@ var De = { enableDetachedGlassResize() {
1236
1254
  }
1237
1255
  onPaneUpdate() {}
1238
1256
  addPane(e, t) {
1239
- let { position: n, size: r, id: i, withGlass: a = !0, ...o } = t, s = super.addPane(e, {
1257
+ let { position: n, size: r, id: i, minWidth: a, minHeight: o, withGlass: s = !0, ...c } = t, l = super.addPane(e, {
1240
1258
  position: n,
1241
1259
  size: r,
1242
- id: i
1260
+ id: i,
1261
+ minWidth: a,
1262
+ minHeight: o
1243
1263
  });
1244
- if (a) {
1264
+ if (s) {
1245
1265
  let e = new H({
1246
- ...o,
1247
- sash: s,
1266
+ ...c,
1267
+ sash: l,
1248
1268
  binaryWindow: this
1249
1269
  });
1250
- s.domNode.append(e.domNode);
1270
+ l.domNode.append(e.domNode);
1251
1271
  }
1252
- return s;
1272
+ return l;
1253
1273
  }
1254
1274
  setTheme(e) {
1255
1275
  if (!e) {
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.4.3",
5
+ "version": "0.4.4",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/bhjsdev/bwin.git"