@autohq/cli 0.1.185 → 0.1.186

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.
@@ -26571,7 +26571,7 @@ Object.assign(lookup, {
26571
26571
  // package.json
26572
26572
  var package_default = {
26573
26573
  name: "@autohq/cli",
26574
- version: "0.1.185",
26574
+ version: "0.1.186",
26575
26575
  license: "SEE LICENSE IN README.md",
26576
26576
  publishConfig: {
26577
26577
  access: "public"
package/dist/index.js CHANGED
@@ -21412,7 +21412,7 @@ var init_package = __esm({
21412
21412
  "package.json"() {
21413
21413
  package_default = {
21414
21414
  name: "@autohq/cli",
21415
- version: "0.1.185",
21415
+ version: "0.1.186",
21416
21416
  license: "SEE LICENSE IN README.md",
21417
21417
  publishConfig: {
21418
21418
  access: "public"
@@ -29500,9 +29500,11 @@ function SplashView({
29500
29500
  const { stdout } = useStdout8();
29501
29501
  const termWidth = stdout?.columns ?? 120;
29502
29502
  const termHeight = stdout?.rows ?? 24;
29503
- const logo = autoLogo(void 0, Math.min(termWidth, SPLASH_LOGO_MAX_WIDTH));
29503
+ const logo = splashLogo(termWidth);
29504
29504
  const logoWidth2 = Math.max(...logo.map((line) => line.length));
29505
29505
  const logoRows = keyedLogoRows(logo);
29506
+ const shimmerStep = splashLogoShimmerStep(logoWidth2);
29507
+ const shimmerRadius = splashLogoShimmerRadius(logoWidth2);
29506
29508
  const [step, setStep] = useState4(0);
29507
29509
  const [frame, setFrame] = useState4(0);
29508
29510
  useEffect4(() => {
@@ -29558,7 +29560,9 @@ function SplashView({
29558
29560
  {
29559
29561
  frame,
29560
29562
  line: row.line,
29561
- rowIndex: row.rowIndex
29563
+ rowIndex: row.rowIndex,
29564
+ shimmerStep,
29565
+ shimmerRadius
29562
29566
  },
29563
29567
  row.key
29564
29568
  ))
@@ -29585,6 +29589,27 @@ function SplashView({
29585
29589
  }
29586
29590
  );
29587
29591
  }
29592
+ function splashLogo(termWidth) {
29593
+ return autoLogo(
29594
+ void 0,
29595
+ Math.max(0, termWidth - SPLASH_LOGO_OPTICAL_OFFSET)
29596
+ );
29597
+ }
29598
+ function splashLogoShimmerStep(logoWidth2) {
29599
+ if (splashUsesLargeLogoTreatment(logoWidth2)) {
29600
+ return LARGE_LOGO_SHIMMER_STEP;
29601
+ }
29602
+ if (logoWidth2 === MEDIUM_LOGO_WIDTH) {
29603
+ return MEDIUM_LOGO_SHIMMER_STEP;
29604
+ }
29605
+ return DEFAULT_SHIMMER_STEP;
29606
+ }
29607
+ function splashLogoShimmerRadius(logoWidth2) {
29608
+ return splashUsesLargeLogoTreatment(logoWidth2) ? LARGE_LOGO_SHIMMER_RADIUS : DEFAULT_SHIMMER_RADIUS;
29609
+ }
29610
+ function splashUsesLargeLogoTreatment(logoWidth2) {
29611
+ return logoWidth2 >= LARGE_LOGO_WIDTH;
29612
+ }
29588
29613
  function keyedLogoRows(logo) {
29589
29614
  const seen = /* @__PURE__ */ new Map();
29590
29615
  return logo.map((line, rowIndex) => {
@@ -29596,9 +29621,11 @@ function keyedLogoRows(logo) {
29596
29621
  function ShimmerLogoLine({
29597
29622
  frame,
29598
29623
  line,
29599
- rowIndex
29624
+ rowIndex,
29625
+ shimmerStep,
29626
+ shimmerRadius
29600
29627
  }) {
29601
- const highlight = frame * 2 % (line.length + 8);
29628
+ const highlight = frame * shimmerStep % (line.length + 8);
29602
29629
  return /* @__PURE__ */ jsx15(Text15, { children: Array.from(line).map((char, index) => {
29603
29630
  const distance = Math.abs(index - highlight + rowIndex);
29604
29631
  const key = `${index}:${char}`;
@@ -29608,16 +29635,16 @@ function ShimmerLogoLine({
29608
29635
  return /* @__PURE__ */ jsx15(
29609
29636
  Text15,
29610
29637
  {
29611
- color: distance <= 1 ? "white" : "cyan",
29612
- bold: distance <= 1,
29613
- dimColor: distance > 4,
29638
+ color: distance <= shimmerRadius ? "white" : "cyan",
29639
+ bold: distance <= shimmerRadius,
29640
+ dimColor: distance > shimmerRadius + 3,
29614
29641
  children: char
29615
29642
  },
29616
29643
  key
29617
29644
  );
29618
29645
  }) });
29619
29646
  }
29620
- var STEPS, STEP_MS, FRAME_MS, SPLASH_LOGO_MAX_WIDTH, SPLASH_LOGO_OPTICAL_OFFSET, SPLASH_STATUS_OPTICAL_OFFSET;
29647
+ var STEPS, STEP_MS, FRAME_MS, SPLASH_LOGO_OPTICAL_OFFSET, SPLASH_STATUS_OPTICAL_OFFSET, LARGE_LOGO_WIDTH, MEDIUM_LOGO_WIDTH, DEFAULT_SHIMMER_STEP, LARGE_LOGO_SHIMMER_STEP, MEDIUM_LOGO_SHIMMER_STEP, DEFAULT_SHIMMER_RADIUS, LARGE_LOGO_SHIMMER_RADIUS;
29621
29648
  var init_SplashView = __esm({
29622
29649
  "src/tui/SplashView.tsx"() {
29623
29650
  "use strict";
@@ -29630,9 +29657,15 @@ var init_SplashView = __esm({
29630
29657
  ];
29631
29658
  STEP_MS = 380;
29632
29659
  FRAME_MS = 90;
29633
- SPLASH_LOGO_MAX_WIDTH = 36;
29634
29660
  SPLASH_LOGO_OPTICAL_OFFSET = 4;
29635
29661
  SPLASH_STATUS_OPTICAL_OFFSET = 2;
29662
+ LARGE_LOGO_WIDTH = 100;
29663
+ MEDIUM_LOGO_WIDTH = 66;
29664
+ DEFAULT_SHIMMER_STEP = 2;
29665
+ LARGE_LOGO_SHIMMER_STEP = 6;
29666
+ MEDIUM_LOGO_SHIMMER_STEP = 4;
29667
+ DEFAULT_SHIMMER_RADIUS = 1;
29668
+ LARGE_LOGO_SHIMMER_RADIUS = 3;
29636
29669
  }
29637
29670
  });
29638
29671
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.185",
3
+ "version": "0.1.186",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"