hyper-windowtint 0.3.0 → 0.3.2
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/CHANGELOG.md +20 -0
- package/index.js +55 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to `hyper-windowtint` will be documented here.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.2] - 2026-05-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Colored side stripes on each tab. Each tab now renders a 3–4px full-height
|
|
12
|
+
bar on its left and right edge in the tab's project color, so the boundary
|
|
13
|
+
between two tabs visibly shows both projects' colors. Tab colors are now
|
|
14
|
+
legible at a glance without making a tab active.
|
|
15
|
+
|
|
16
|
+
## [0.3.1] - 2026-05-16
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Critical: plugin CSS no longer overrides `.hyper_main`'s `position: fixed`.
|
|
20
|
+
In 0.3.0 the plugin added `position: relative`, which Hyper's CSS-in-JS
|
|
21
|
+
scoping elevated to higher specificity than Hyper's own rule. `.hyper_main`
|
|
22
|
+
then collapsed to its content-height (~2px) and the entire terminal area
|
|
23
|
+
rendered as an unusable black rectangle (visible tint border + corner badge,
|
|
24
|
+
but no tabs and no terminal canvas). The border is now drawn as an inset
|
|
25
|
+
`box-shadow` directly on `.hyper_main` without touching `position`, so the
|
|
26
|
+
fixed-positioning context from Hyper is preserved.
|
|
27
|
+
|
|
8
28
|
## [0.3.0] - 2026-05-16
|
|
9
29
|
|
|
10
30
|
### Added
|
package/index.js
CHANGED
|
@@ -568,20 +568,20 @@ exports.decorateConfig = (config) => {
|
|
|
568
568
|
z-index: 1000;
|
|
569
569
|
}` : '';
|
|
570
570
|
|
|
571
|
+
// Render the border as an inset box-shadow directly on `.hyper_main`. Hyper
|
|
572
|
+
// sets `.hyper_main` to `position: fixed; inset: 0` so it fills the window;
|
|
573
|
+
// we must NOT override `position` here, or the element collapses to its
|
|
574
|
+
// content-height (~2px) and the entire terminal disappears. The badge
|
|
575
|
+
// pseudo-element below stays inside `.hyper_main`'s fixed positioning
|
|
576
|
+
// context, so `position: absolute` on the badge still anchors correctly.
|
|
577
|
+
const borderWidth = userOpts.borderWidth || '3px';
|
|
571
578
|
const css = `
|
|
572
|
-
/* hyper-windowtint v0.
|
|
579
|
+
/* hyper-windowtint v0.3 */
|
|
573
580
|
.hyper_main {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
position: absolute;
|
|
579
|
-
inset: 0;
|
|
580
|
-
pointer-events: none;
|
|
581
|
-
border: ${userOpts.borderWidth} solid var(--tint-color, transparent);
|
|
582
|
-
box-shadow: inset 0 0 28px -10px var(--tint-glow, transparent);
|
|
583
|
-
z-index: 999;
|
|
584
|
-
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
581
|
+
box-shadow:
|
|
582
|
+
inset 0 0 0 ${borderWidth} var(--tint-color, transparent),
|
|
583
|
+
inset 0 0 28px -10px var(--tint-glow, transparent);
|
|
584
|
+
transition: box-shadow 0.25s ease;
|
|
585
585
|
}
|
|
586
586
|
.hyper_main .tabs_title,
|
|
587
587
|
.hyper_main .tabs_borderShim {
|
|
@@ -607,7 +607,42 @@ exports.decorateTab = (Tab, { React }) => {
|
|
|
607
607
|
render() {
|
|
608
608
|
const uid = this.props.windowTintUid;
|
|
609
609
|
const color = this.props.windowTintColor || null;
|
|
610
|
-
const
|
|
610
|
+
const hex = color ? color.hex : 'transparent';
|
|
611
|
+
const baseOpacity = color ? (this.props.isActive ? 1 : 0.7) : 0;
|
|
612
|
+
|
|
613
|
+
// Left- and right-edge stripes — full tab height, project color. Two
|
|
614
|
+
// adjacent tabs put their stripes back-to-back at the boundary, so the
|
|
615
|
+
// separator visually shows both projects' colors. The first tab's left
|
|
616
|
+
// edge is often hidden under macOS traffic lights, so doing both sides
|
|
617
|
+
// means the color is always visible somewhere on every tab.
|
|
618
|
+
const stripeStyle = (side) => ({
|
|
619
|
+
position: 'absolute',
|
|
620
|
+
[side]: 0,
|
|
621
|
+
top: 0,
|
|
622
|
+
bottom: 0,
|
|
623
|
+
width: this.props.isActive ? 4 : 3,
|
|
624
|
+
background: hex,
|
|
625
|
+
opacity: color ? 1 : 0,
|
|
626
|
+
boxShadow: color ? `0 0 8px ${withAlpha(color.hex, '44')}` : 'none',
|
|
627
|
+
pointerEvents: 'none',
|
|
628
|
+
transition: 'background 0.2s ease, opacity 0.2s ease, width 0.2s ease, box-shadow 0.2s ease',
|
|
629
|
+
});
|
|
630
|
+
const sideAccentLeft = React.createElement('span', {
|
|
631
|
+
key: 'windowtint-side-left',
|
|
632
|
+
className: 'windowtint_tabAccentSide windowtint_tabAccentSideLeft',
|
|
633
|
+
'data-windowtint-uid': uid,
|
|
634
|
+
style: stripeStyle('left'),
|
|
635
|
+
});
|
|
636
|
+
const sideAccentRight = React.createElement('span', {
|
|
637
|
+
key: 'windowtint-side-right',
|
|
638
|
+
className: 'windowtint_tabAccentSide windowtint_tabAccentSideRight',
|
|
639
|
+
'data-windowtint-uid': uid,
|
|
640
|
+
style: stripeStyle('right'),
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
// Bottom accent — kept for the soft glow under the active tab.
|
|
644
|
+
const bottomAccent = React.createElement('span', {
|
|
645
|
+
key: 'windowtint-bottom',
|
|
611
646
|
className: 'windowtint_tabAccent',
|
|
612
647
|
'data-windowtint-uid': uid,
|
|
613
648
|
style: {
|
|
@@ -616,15 +651,19 @@ exports.decorateTab = (Tab, { React }) => {
|
|
|
616
651
|
right: 0,
|
|
617
652
|
bottom: 0,
|
|
618
653
|
height: this.props.isActive ? 3 : 2,
|
|
619
|
-
background:
|
|
654
|
+
background: hex,
|
|
620
655
|
boxShadow: color ? `0 0 12px ${withAlpha(color.hex, '66')}` : 'none',
|
|
621
|
-
opacity:
|
|
656
|
+
opacity: baseOpacity,
|
|
622
657
|
pointerEvents: 'none',
|
|
623
658
|
transition: 'background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, height 0.2s ease',
|
|
624
659
|
},
|
|
625
660
|
});
|
|
661
|
+
|
|
626
662
|
const existing = this.props.customChildrenBefore;
|
|
627
|
-
const
|
|
663
|
+
const accents = [sideAccentLeft, sideAccentRight, bottomAccent];
|
|
664
|
+
const customChildrenBefore = existing
|
|
665
|
+
? accents.concat(Array.isArray(existing) ? existing : [existing])
|
|
666
|
+
: accents;
|
|
628
667
|
return React.createElement(Tab, Object.assign({}, this.props, { customChildrenBefore }));
|
|
629
668
|
}
|
|
630
669
|
};
|
package/package.json
CHANGED