create-better-t-stack 3.11.0-bun-compile-opentui.ffee16a → 3.11.0-bun-compile-opentui.2583611

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/package.json +7 -7
  2. package/src/tui/app.tsx +96 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.11.0-bun-compile-opentui.ffee16a",
3
+ "version": "3.11.0-bun-compile-opentui.2583611",
4
4
  "description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5
5
  "keywords": [
6
6
  "better-auth",
@@ -68,7 +68,7 @@
68
68
  "prepublishOnly": "echo 'Build binaries separately before publishing'"
69
69
  },
70
70
  "dependencies": {
71
- "@better-t-stack/types": "3.11.0-bun-compile-opentui.ffee16a",
71
+ "@better-t-stack/types": "3.11.0-bun-compile-opentui.2583611",
72
72
  "@clack/prompts": "^1.0.0-alpha.8",
73
73
  "@opentui/core": "^0.1.62",
74
74
  "@opentui/react": "^0.1.62",
@@ -93,11 +93,11 @@
93
93
  "typescript": "^5.9.3"
94
94
  },
95
95
  "optionalDependencies": {
96
- "@better-t-stack/cli-darwin-arm64": "3.11.0-bun-compile-opentui.ffee16a",
97
- "@better-t-stack/cli-darwin-x64": "3.11.0-bun-compile-opentui.ffee16a",
98
- "@better-t-stack/cli-linux-arm64": "3.11.0-bun-compile-opentui.ffee16a",
99
- "@better-t-stack/cli-linux-x64": "3.11.0-bun-compile-opentui.ffee16a",
100
- "@better-t-stack/cli-windows-x64": "3.11.0-bun-compile-opentui.ffee16a",
96
+ "@better-t-stack/cli-darwin-arm64": "3.11.0-bun-compile-opentui.2583611",
97
+ "@better-t-stack/cli-darwin-x64": "3.11.0-bun-compile-opentui.2583611",
98
+ "@better-t-stack/cli-linux-arm64": "3.11.0-bun-compile-opentui.2583611",
99
+ "@better-t-stack/cli-linux-x64": "3.11.0-bun-compile-opentui.2583611",
100
+ "@better-t-stack/cli-windows-x64": "3.11.0-bun-compile-opentui.2583611",
101
101
  "@opentui/core-darwin-arm64": "0.1.63",
102
102
  "@opentui/core-darwin-x64": "0.1.63",
103
103
  "@opentui/core-linux-arm64": "0.1.63",
package/src/tui/app.tsx CHANGED
@@ -559,6 +559,86 @@ export async function renderTui(options: TuiOptions): Promise<void> {
559
559
  });
560
560
  }
561
561
 
562
+ // Custom ASCII art logo - split into two parts for responsive layout
563
+ const LOGO_BETTER = [
564
+ " ██████╗ ███████╗████████╗████████╗███████╗██████╗ ",
565
+ " ██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██╔════╝██╔══██╗",
566
+ " ██████╔╝█████╗ ██║ ██║ █████╗ ██████╔╝",
567
+ " ██╔══██╗██╔══╝ ██║ ██║ ██╔══╝ ██╔══██╗",
568
+ " ██████╔╝███████╗ ██║ ██║ ███████╗██║ ██║",
569
+ " ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝",
570
+ ];
571
+
572
+ const LOGO_T_STACK = [
573
+ " ████████╗ ███████╗████████╗ █████╗ ██████╗██╗ ██╗",
574
+ " ╚══██╔══╝ ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝",
575
+ " ██║ ███████╗ ██║ ███████║██║ █████╔╝ ",
576
+ " ██║ ╚════██║ ██║ ██╔══██║██║ ██╔═██╗ ",
577
+ " ██║ ███████║ ██║ ██║ ██║╚██████╗██║ ██╗",
578
+ " ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝",
579
+ ];
580
+
581
+ // Catppuccin-inspired gradient colors (top to bottom)
582
+ const GRADIENT_COLORS = [
583
+ "#F5C2E7", // pink
584
+ "#CBA6F7", // mauve
585
+ "#B4BEFE", // lavender
586
+ "#89DCEB", // sky
587
+ "#94E2D5", // teal
588
+ "#A6E3A1", // green
589
+ ];
590
+
591
+ // Compact version for very narrow terminals
592
+ const LOGO_TEXT = "Better T Stack";
593
+
594
+ function Logo() {
595
+ const { width } = useTerminalDimensions();
596
+
597
+ // Full width: show both parts side by side (needs ~108 cols)
598
+ if (width >= 110) {
599
+ return (
600
+ <box style={{ flexDirection: "column" }}>
601
+ {LOGO_BETTER.map((line, i) => (
602
+ <text key={i}>
603
+ <span fg={GRADIENT_COLORS[i]}>{line}</span>
604
+ <span fg={GRADIENT_COLORS[i]}> </span>
605
+ <span fg={GRADIENT_COLORS[i]}>{LOGO_T_STACK[i]}</span>
606
+ </text>
607
+ ))}
608
+ </box>
609
+ );
610
+ }
611
+
612
+ // Medium width: show stacked vertically (needs ~58 cols)
613
+ if (width >= 58) {
614
+ return (
615
+ <box style={{ flexDirection: "column" }}>
616
+ {/* BETTER section */}
617
+ {LOGO_BETTER.map((line, i) => (
618
+ <text key={`b${i}`}>
619
+ <span fg={GRADIENT_COLORS[i]}>{line}</span>
620
+ </text>
621
+ ))}
622
+ {/* Empty line for spacing */}
623
+ <text> </text>
624
+ {/* T STACK section */}
625
+ {LOGO_T_STACK.map((line, i) => (
626
+ <text key={`t${i}`}>
627
+ <span fg={GRADIENT_COLORS[i]}>{line}</span>
628
+ </text>
629
+ ))}
630
+ </box>
631
+ );
632
+ }
633
+
634
+ // Narrow: plain text with gradient first color
635
+ return (
636
+ <text>
637
+ <span fg={GRADIENT_COLORS[0]}>{LOGO_TEXT}</span>
638
+ </text>
639
+ );
640
+ }
641
+
562
642
  // Spinner component using useEffect interval
563
643
  function Spinner(props: { text: string }) {
564
644
  const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
@@ -732,18 +812,24 @@ function App(props: {
732
812
  ? "pnpm run"
733
813
  : "bun run";
734
814
 
815
+ // Responsive: hide header on very narrow terminals
816
+ const showHeader = width >= 50;
817
+
735
818
  return (
736
819
  <box style={{ width, height, backgroundColor: theme.bg, flexDirection: "column" }}>
737
- <box
738
- style={{
739
- height: 6,
740
- justifyContent: "center",
741
- alignItems: "center",
742
- backgroundColor: theme.surface,
743
- }}
744
- >
745
- <ascii-font text="Better T Stack" font="block" />
746
- </box>
820
+ {/* Header - hidden on very narrow terminals */}
821
+ {showHeader && (
822
+ <box
823
+ style={{
824
+ justifyContent: "center",
825
+ alignItems: "flex-start",
826
+ // backgroundColor: theme.surface,
827
+ padding: 1,
828
+ }}
829
+ >
830
+ <Logo />
831
+ </box>
832
+ )}
747
833
 
748
834
  <box
749
835
  style={{