pi-crew 0.3.4 → 0.3.5
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/package.json +1 -1
- package/src/ui/mascot.ts +3 -1
package/package.json
CHANGED
package/src/ui/mascot.ts
CHANGED
|
@@ -122,6 +122,7 @@ export class AnimatedMascot {
|
|
|
122
122
|
private gridVersion = 0;
|
|
123
123
|
private cachedWidth = 0;
|
|
124
124
|
private cachedVersion = -1;
|
|
125
|
+
private cachedFrame = -1;
|
|
125
126
|
private cachedLines: string[] = [];
|
|
126
127
|
|
|
127
128
|
constructor(themeLike: unknown, onDone: () => void, options: AnimatedMascotOptions = {}) {
|
|
@@ -398,7 +399,7 @@ export class AnimatedMascot {
|
|
|
398
399
|
}
|
|
399
400
|
|
|
400
401
|
render(width: number): string[] {
|
|
401
|
-
if (width === this.cachedWidth && this.cachedVersion === this.gridVersion && this.cachedLines.length) {
|
|
402
|
+
if (width === this.cachedWidth && this.cachedVersion === this.gridVersion && this.cachedFrame === this.frame && this.cachedLines.length) {
|
|
402
403
|
return this.cachedLines;
|
|
403
404
|
}
|
|
404
405
|
const safeWidth = Math.max(20, width);
|
|
@@ -424,6 +425,7 @@ export class AnimatedMascot {
|
|
|
424
425
|
result.push(`${this.theme.fg("border", "╰")}${horizontal}${this.theme.fg("border", "╯")}`);
|
|
425
426
|
this.cachedWidth = safeWidth;
|
|
426
427
|
this.cachedVersion = this.gridVersion;
|
|
428
|
+
this.cachedFrame = this.frame;
|
|
427
429
|
this.cachedLines = result;
|
|
428
430
|
return result;
|
|
429
431
|
}
|