gan-web-bluetooth
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -42,2 +42,4 @@ /// <reference types="web-bluetooth" /> | ||
type: "MOVE"; | ||
/** Serial number, value range 0-255, increased in a circle on each facelets state change */ | ||
serial: number; | ||
} & GanCubeMove; | ||
@@ -62,2 +64,4 @@ /** | ||
type: "FACELETS"; | ||
/** Serial number, value range 0-255, increased in a circle on each facelets state change */ | ||
serial: number; | ||
/** Cube facelets state in the Kociemba notation like "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB" */ | ||
@@ -64,0 +68,0 @@ facelets: string; |
{ | ||
"name": "gan-web-bluetooth", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Library for interaction with GAN Smart Timers and GAN Smart Cubes using Web Bluetooth API", | ||
@@ -41,2 +41,3 @@ "private": false, | ||
"dependencies": { | ||
"@types/web-bluetooth": "^0.0.20", | ||
"aes-js": "^3.1.2", | ||
@@ -46,6 +47,6 @@ "rxjs": ">= 7" | ||
"devDependencies": { | ||
"@types/node": "^20.11.2", | ||
"@types/aes-js": "^3.1.4", | ||
"@types/web-bluetooth": "^0.0.20", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"rollup": "^4.9.4", | ||
"rollup": "^4.9.5", | ||
"typescript": "^5.3.3" | ||
@@ -52,0 +53,0 @@ }, |
@@ -48,3 +48,7 @@ | ||
*/ | ||
type GanCubeMoveEvent = { type: "MOVE" } & GanCubeMove; | ||
type GanCubeMoveEvent = { | ||
type: "MOVE"; | ||
/** Serial number, value range 0-255, increased in a circle on each facelets state change */ | ||
serial: number; | ||
} & GanCubeMove; | ||
@@ -70,2 +74,4 @@ /** | ||
type: "FACELETS"; | ||
/** Serial number, value range 0-255, increased in a circle on each facelets state change */ | ||
serial: number; | ||
/** Cube facelets state in the Kociemba notation like "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB" */ | ||
@@ -391,2 +397,3 @@ facelets: string; | ||
type: "MOVE", | ||
serial: (serial - i) & 0xFF, | ||
timestamp: timestamp, | ||
@@ -432,2 +439,3 @@ localTimestamp: i == 0 ? timestamp : null, // Missed and recovered events has no meaningfull local timestamps | ||
type: "FACELETS", | ||
serial: serial, | ||
timestamp: timestamp, | ||
@@ -539,2 +547,3 @@ facelets: toKociembaFacelets(cp, co, ep, eo), | ||
type: "MOVE", | ||
serial: serial, | ||
timestamp: timestamp, | ||
@@ -577,2 +586,3 @@ localTimestamp: timestamp, | ||
type: "FACELETS", | ||
serial: serial, | ||
timestamp: timestamp, | ||
@@ -579,0 +589,0 @@ facelets: toKociembaFacelets(cp, co, ep, eo), |
@@ -10,5 +10,7 @@ | ||
const now: () => number = | ||
typeof window.performance?.now == 'function' ? | ||
typeof window?.performance?.now == 'function' ? | ||
() => Math.floor(window.performance.now()) : | ||
() => Date.now(); | ||
typeof process?.hrtime?.bigint == 'function' ? | ||
() => Number(process.hrtime.bigint() / 1_000_000n) : | ||
() => Date.now(); | ||
@@ -15,0 +17,0 @@ function linregress(X: Array<number | null>, Y: Array<number | null>) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
141202
3200
3
+ Added@types/web-bluetooth@^0.0.20
+ Added@types/web-bluetooth@0.0.20(transitive)