hyper-windowtint 0.3.2 → 0.3.3
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 +22 -0
- package/index.js +10 -105
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ 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.3] - 2026-05-16
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Corner color-name badge now defaults to **off**. Opt back in with
|
|
12
|
+
`config.windowTint.showBadge: true` in `~/.hyper.js`.
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
- The bottom underline accent and the left/right edge stripes that 0.3.2
|
|
16
|
+
added via `decorateTab`'s `customChildrenBefore`. Hyper 3.x's Tab
|
|
17
|
+
component does not render plugin-injected children, so these decorations
|
|
18
|
+
were never actually painting on most users' screens. The `decorateTab`,
|
|
19
|
+
`getTabProps`, and `mapHeaderState` exports have been removed entirely
|
|
20
|
+
since they only served those non-rendering decorations.
|
|
21
|
+
- The dead-code path that depended on those exports.
|
|
22
|
+
|
|
23
|
+
### Note
|
|
24
|
+
- The window-level signals — colored window border, top line in the tab
|
|
25
|
+
bar, and the active-tab background gradient — all still work and remain
|
|
26
|
+
the primary at-a-glance project indicator. Per-tab outlines for inactive
|
|
27
|
+
tabs are deferred to a future release pending a different mechanism
|
|
28
|
+
(likely a renderer-side DOM observer) that bypasses Hyper's prop-dropping.
|
|
29
|
+
|
|
8
30
|
## [0.3.2] - 2026-05-16
|
|
9
31
|
|
|
10
32
|
### Added
|
package/index.js
CHANGED
|
@@ -99,7 +99,7 @@ function readUserConfig(config) {
|
|
|
99
99
|
return {
|
|
100
100
|
palette: palette.length ? palette : DEFAULT_PALETTE,
|
|
101
101
|
borderWidth: typeof u.borderWidth === 'string' ? u.borderWidth : '3px',
|
|
102
|
-
showBadge: u.showBadge
|
|
102
|
+
showBadge: u.showBadge === true,
|
|
103
103
|
glow: u.glow !== false,
|
|
104
104
|
};
|
|
105
105
|
}
|
|
@@ -590,10 +590,6 @@ exports.decorateConfig = (config) => {
|
|
|
590
590
|
.hyper_main .tab_tab.tab_active {
|
|
591
591
|
background: linear-gradient(180deg, var(--tint-tab-bg, transparent), transparent);
|
|
592
592
|
}
|
|
593
|
-
.hyper_main .tab_tab.tab_active .windowtint_tabAccent {
|
|
594
|
-
height: 3px;
|
|
595
|
-
opacity: 1;
|
|
596
|
-
}
|
|
597
593
|
${badgeCSS}
|
|
598
594
|
`;
|
|
599
595
|
|
|
@@ -602,106 +598,15 @@ exports.decorateConfig = (config) => {
|
|
|
602
598
|
});
|
|
603
599
|
};
|
|
604
600
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
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',
|
|
646
|
-
className: 'windowtint_tabAccent',
|
|
647
|
-
'data-windowtint-uid': uid,
|
|
648
|
-
style: {
|
|
649
|
-
position: 'absolute',
|
|
650
|
-
left: 0,
|
|
651
|
-
right: 0,
|
|
652
|
-
bottom: 0,
|
|
653
|
-
height: this.props.isActive ? 3 : 2,
|
|
654
|
-
background: hex,
|
|
655
|
-
boxShadow: color ? `0 0 12px ${withAlpha(color.hex, '66')}` : 'none',
|
|
656
|
-
opacity: baseOpacity,
|
|
657
|
-
pointerEvents: 'none',
|
|
658
|
-
transition: 'background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, height 0.2s ease',
|
|
659
|
-
},
|
|
660
|
-
});
|
|
661
|
-
|
|
662
|
-
const existing = this.props.customChildrenBefore;
|
|
663
|
-
const accents = [sideAccentLeft, sideAccentRight, bottomAccent];
|
|
664
|
-
const customChildrenBefore = existing
|
|
665
|
-
? accents.concat(Array.isArray(existing) ? existing : [existing])
|
|
666
|
-
: accents;
|
|
667
|
-
return React.createElement(Tab, Object.assign({}, this.props, { customChildrenBefore }));
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
exports.getTabProps = (tab, parentProps, props) => {
|
|
673
|
-
try {
|
|
674
|
-
if (!tab || !tab.uid) return props;
|
|
675
|
-
const colors = parentProps && parentProps.windowTintTabColors;
|
|
676
|
-
return Object.assign({}, props, {
|
|
677
|
-
windowTintUid: tab.uid,
|
|
678
|
-
windowTintColor: colors && colors[tab.uid] ? colors[tab.uid] : null,
|
|
679
|
-
windowTintVersion: parentProps && parentProps.windowTintVersion,
|
|
680
|
-
});
|
|
681
|
-
} catch (e) {
|
|
682
|
-
return props;
|
|
683
|
-
}
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
exports.mapHeaderState = (state, props) => {
|
|
687
|
-
try {
|
|
688
|
-
const colors = {};
|
|
689
|
-
const activeSessions = state.termGroups && state.termGroups.activeSessions;
|
|
690
|
-
if (activeSessions) {
|
|
691
|
-
Object.keys(activeSessions).forEach((rootGroupUid) => {
|
|
692
|
-
const sessionUid = activeSessions[rootGroupUid];
|
|
693
|
-
const color = uidToColor.get(sessionUid);
|
|
694
|
-
if (color) colors[rootGroupUid] = color;
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
return Object.assign({}, props, {
|
|
698
|
-
windowTintTabColors: colors,
|
|
699
|
-
windowTintVersion: state.ui && state.ui.windowTintVersion,
|
|
700
|
-
});
|
|
701
|
-
} catch (e) {
|
|
702
|
-
return props;
|
|
703
|
-
}
|
|
704
|
-
};
|
|
601
|
+
// No `decorateTab` export in this version. Hyper 3.x's Tab component drops
|
|
602
|
+
// most plugin-injected props (`customChildrenBefore`, `style`, `className`,
|
|
603
|
+
// `borderColor` all observed dropped on this user's build), so per-tab
|
|
604
|
+
// decoration via the documented API doesn't actually paint. The window-level
|
|
605
|
+
// CSS variables set by the middleware already communicate the active
|
|
606
|
+
// project's color via the window border, the active-tab background gradient,
|
|
607
|
+
// and the colored top line in the tab bar — that's enough for now.
|
|
608
|
+
// Per-tab outlines for inactive tabs may come back in a future release using
|
|
609
|
+
// a different mechanism (e.g. a renderer-side DOM observer).
|
|
705
610
|
|
|
706
611
|
exports.reduceUI = (state, action) => {
|
|
707
612
|
if (!action || action.type !== WINDOWTINT_COLOR_CHANGE) return state;
|
package/package.json
CHANGED