minitel-standalone
Advanced tools
Comparing version 1.8.2 to 1.8.3
@@ -17,3 +17,3 @@ /// <reference types="node" /> | ||
key: [string]; | ||
frame: []; | ||
frame: [boolean]; | ||
}> { | ||
@@ -42,4 +42,4 @@ static defaultScreenAttributes: CharAttributes; | ||
queueCommandAsync(command: string, expected: string | RegExp): Promise<string>; | ||
requestAnimationFrame(callback: () => any): void; | ||
requestAnimationFrame(callback: (isArtificial: boolean) => any): void; | ||
get colors(): number[][]; | ||
} |
@@ -172,2 +172,3 @@ "use strict"; | ||
outputString.push(this.toCursorMove(+lineIdx, +charIdx)); | ||
lastAttributes.charset = 0; | ||
} | ||
@@ -258,3 +259,3 @@ // outputString.push('\x09'.repeat(skippedACharCounter)); | ||
this.stream.write(renderMe); | ||
setTimeout((function () { this.emit('frame'); }).bind(this), renderMe.length * (8000 / (this.speed || 300))); | ||
setTimeout((function () { this.emit('frame', false); }).bind(this), renderMe.length * (8000 / (this.speed || 300))); | ||
} | ||
@@ -270,3 +271,4 @@ queueCommand(command, expected, callback = ((_arg0) => { })) { | ||
requestAnimationFrame(callback) { | ||
this.once('frame', () => callback()); | ||
this.once('frame', callback); | ||
setTimeout((function () { callback(false); this.off('frame', callback); }).bind(this), 100); | ||
} | ||
@@ -273,0 +275,0 @@ get colors() { |
{ | ||
"name": "minitel-standalone", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"description": "A standalone package for minitel components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -22,3 +22,3 @@ import { Duplex } from 'stream'; | ||
export class Minitel extends Container<ContainerAttributes, { key: [string], frame: [] }> { | ||
export class Minitel extends Container<ContainerAttributes, { key: [string], frame: [boolean] }> { | ||
static defaultScreenAttributes: CharAttributes = { | ||
@@ -186,3 +186,3 @@ fg: 7, | ||
let lastAttributes: Readonly<CharAttributes> = Minitel.defaultScreenAttributes; | ||
let lastAttributes: CharAttributes = Minitel.defaultScreenAttributes; | ||
let skippedACharCounter = 0; | ||
@@ -227,2 +227,3 @@ let lastChar: [RichChar<string> | RichChar<null>, RichChar<string> | RichChar<null>] | null = null; | ||
outputString.push(this.toCursorMove(+lineIdx, +charIdx)); | ||
lastAttributes.charset = 0; | ||
} | ||
@@ -321,3 +322,3 @@ // outputString.push('\x09'.repeat(skippedACharCounter)); | ||
this.stream.write(renderMe); | ||
setTimeout((function (this: Minitel) { this.emit('frame') }).bind(this), renderMe.length * (8000 / (this.speed || 300))); | ||
setTimeout((function (this: Minitel) { this.emit('frame', false) }).bind(this), renderMe.length * (8000 / (this.speed || 300))); | ||
} | ||
@@ -334,4 +335,5 @@ queueCommand(command: string, expected: string | RegExp, callback: ((_arg0: string) => any) = ((_arg0: string) => {})) { | ||
} | ||
requestAnimationFrame(callback: () => any) { | ||
this.once('frame', () => callback()); | ||
requestAnimationFrame(callback: (isArtificial: boolean) => any) { | ||
this.once('frame', callback); | ||
setTimeout((function (this: Minitel) { callback(false); this.off('frame', callback) }).bind(this), 100); | ||
} | ||
@@ -338,0 +340,0 @@ get colors() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194032
14
4234