Compare commits

..

No commits in common. "master" and "v0.5.0" have entirely different histories.

4 changed files with 8 additions and 6 deletions

View file

@ -19,8 +19,8 @@ const { Dialog, GlkOte, send } =
```js ```js
send('open door', inputType, targetWindow) send('open door', inputType, targetWindow)
``` ```
You can obtain `inputType` and `id` of `targetWindow` inside the `onUpdateInputs` handler.<br> You can receive `inputType` and `id` of `targetWindow` in `onUpdateInputs` handler.<br>
You can specify `targetWindow` by its `id` inside the `onUpdateWindows` handler.<br> You can receive `targetWindow` by its `is` in `onUpdateWindows` handler.<br>
As I know, `inputType` can be `line` or `char`. As I know, `inputType` can be `line` or `char`.
### Output and lifecycle ### Output and lifecycle

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "cheap-glkote", "name": "cheap-glkote",
"version": "0.5.1", "version": "0.5.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "cheap-glkote", "name": "cheap-glkote",
"version": "0.5.1", "version": "0.5.0",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"ansi-escapes": "^4.0.0", "ansi-escapes": "^4.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "cheap-glkote", "name": "cheap-glkote",
"version": "0.5.1", "version": "0.5.0",
"description": "Abstract JavaScript implementation of GlkOte", "description": "Abstract JavaScript implementation of GlkOte",
"author": "He4eT <He4eTHb1u@gmail.com>", "author": "He4eT <He4eTHb1u@gmail.com>",
"license": "MIT", "license": "MIT",

View file

@ -2,6 +2,8 @@
* @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-term.js * @see: https://github.com/curiousdannii/glkote-term/blob/master/src/glkote-term.js
*/ */
import packageJSON from '../../package.json' assert { type: 'json' }
class GlkOte { class GlkOte {
constructor({width, height}) { constructor({width, height}) {
this.width = width this.width = width
@ -11,7 +13,7 @@ class GlkOte {
this.disabled = false this.disabled = false
this.generation = 0 this.generation = 0
this.interface = null this.interface = null
this.version = '0.5.1' this.version = packageJSON.version
} }
measure_window() { measure_window() {