hyper-windowtint 0.3.1 → 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.
Files changed (3) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/index.js +10 -66
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ 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
+
30
+ ## [0.3.2] - 2026-05-16
31
+
32
+ ### Added
33
+ - Colored side stripes on each tab. Each tab now renders a 3–4px full-height
34
+ bar on its left and right edge in the tab's project color, so the boundary
35
+ between two tabs visibly shows both projects' colors. Tab colors are now
36
+ legible at a glance without making a tab active.
37
+
8
38
  ## [0.3.1] - 2026-05-16
9
39
 
10
40
  ### Fixed
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 !== false,
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,67 +598,15 @@ exports.decorateConfig = (config) => {
602
598
  });
603
599
  };
604
600
 
605
- exports.decorateTab = (Tab, { React }) => {
606
- return class WindowTintTab extends React.PureComponent {
607
- render() {
608
- const uid = this.props.windowTintUid;
609
- const color = this.props.windowTintColor || null;
610
- const accent = React.createElement('span', {
611
- className: 'windowtint_tabAccent',
612
- 'data-windowtint-uid': uid,
613
- style: {
614
- position: 'absolute',
615
- left: 0,
616
- right: 0,
617
- bottom: 0,
618
- height: this.props.isActive ? 3 : 2,
619
- background: color ? color.hex : 'transparent',
620
- boxShadow: color ? `0 0 12px ${withAlpha(color.hex, '66')}` : 'none',
621
- opacity: color ? (this.props.isActive ? 1 : 0.65) : 0,
622
- pointerEvents: 'none',
623
- transition: 'background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, height 0.2s ease',
624
- },
625
- });
626
- const existing = this.props.customChildrenBefore;
627
- const customChildrenBefore = existing ? [accent].concat(existing) : accent;
628
- return React.createElement(Tab, Object.assign({}, this.props, { customChildrenBefore }));
629
- }
630
- };
631
- };
632
-
633
- exports.getTabProps = (tab, parentProps, props) => {
634
- try {
635
- if (!tab || !tab.uid) return props;
636
- const colors = parentProps && parentProps.windowTintTabColors;
637
- return Object.assign({}, props, {
638
- windowTintUid: tab.uid,
639
- windowTintColor: colors && colors[tab.uid] ? colors[tab.uid] : null,
640
- windowTintVersion: parentProps && parentProps.windowTintVersion,
641
- });
642
- } catch (e) {
643
- return props;
644
- }
645
- };
646
-
647
- exports.mapHeaderState = (state, props) => {
648
- try {
649
- const colors = {};
650
- const activeSessions = state.termGroups && state.termGroups.activeSessions;
651
- if (activeSessions) {
652
- Object.keys(activeSessions).forEach((rootGroupUid) => {
653
- const sessionUid = activeSessions[rootGroupUid];
654
- const color = uidToColor.get(sessionUid);
655
- if (color) colors[rootGroupUid] = color;
656
- });
657
- }
658
- return Object.assign({}, props, {
659
- windowTintTabColors: colors,
660
- windowTintVersion: state.ui && state.ui.windowTintVersion,
661
- });
662
- } catch (e) {
663
- return props;
664
- }
665
- };
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).
666
610
 
667
611
  exports.reduceUI = (state, action) => {
668
612
  if (!action || action.type !== WINDOWTINT_COLOR_CHANGE) return state;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyper-windowtint",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Give Hyper terminal tabs distinct color tints, matching tabs from the same project during the current Hyper session.",
5
5
  "main": "index.js",
6
6
  "files": [