@wodzik/cubecore 0.1.9 → 0.1.10
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/bluetooth/index.d.ts +3 -0
- package/bluetooth/index.js +3 -0
- package/bluetooth/timer.d.ts +10 -0
- package/bluetooth/timer.js +9 -0
- package/package.json +1 -1
package/bluetooth/index.d.ts
CHANGED
|
@@ -5,3 +5,6 @@ export * from "./simulated.js";
|
|
|
5
5
|
export * from "./cubeSkins.js";
|
|
6
6
|
export * from "./grips.js";
|
|
7
7
|
export * from "./rotations.js";
|
|
8
|
+
export * from "./timer.js";
|
|
9
|
+
/** The MAC a cube's connection found (kept per device — QiYi's handshake needs it; offer it back when asking the user for one). */
|
|
10
|
+
export { getCachedMacForDevice, removeCachedMacForDevice } from "./vendor/smartcube-web-bluetooth/smartcube/attachment/address-hints.js";
|
package/bluetooth/index.js
CHANGED
|
@@ -5,3 +5,6 @@ export * from "./simulated.js";
|
|
|
5
5
|
export * from "./cubeSkins.js";
|
|
6
6
|
export * from "./grips.js";
|
|
7
7
|
export * from "./rotations.js";
|
|
8
|
+
export * from "./timer.js";
|
|
9
|
+
/** The MAC a cube's connection found (kept per device — QiYi's handshake needs it; offer it back when asking the user for one). */
|
|
10
|
+
export { getCachedMacForDevice, removeCachedMacForDevice } from "./vendor/smartcube-web-bluetooth/smartcube/attachment/address-hints.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GAN smart timer (Halo / Smart Timer) over Bluetooth — hands on / get
|
|
3
|
+
* set / running / stopped, and the recorded times — from the vendored
|
|
4
|
+
* smartcube-web-bluetooth.
|
|
5
|
+
*
|
|
6
|
+
* const timer = await connectGanTimer(); // needs a user gesture
|
|
7
|
+
* timer.events$.subscribe((e) => { if (e.state === GanTimerState.STOPPED) … });
|
|
8
|
+
*/
|
|
9
|
+
export { connectGanTimer, GanTimerState, makeTime, makeTimeFromTimestamp } from "./vendor/smartcube-web-bluetooth/gan-smart-timer.js";
|
|
10
|
+
export type { GanTimerConnection, GanTimerEvent, GanTimerTime, GanTimerRecordedTimes } from "./vendor/smartcube-web-bluetooth/gan-smart-timer.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GAN smart timer (Halo / Smart Timer) over Bluetooth — hands on / get
|
|
3
|
+
* set / running / stopped, and the recorded times — from the vendored
|
|
4
|
+
* smartcube-web-bluetooth.
|
|
5
|
+
*
|
|
6
|
+
* const timer = await connectGanTimer(); // needs a user gesture
|
|
7
|
+
* timer.events$.subscribe((e) => { if (e.state === GanTimerState.STOPPED) … });
|
|
8
|
+
*/
|
|
9
|
+
export { connectGanTimer, GanTimerState, makeTime, makeTimeFromTimestamp } from "./vendor/smartcube-web-bluetooth/gan-smart-timer.js";
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.10",
|
|
7
7
|
"description": "A 3×3×3 cube library for the web, built around smart (Bluetooth) cubes: state, notation, methods, solvers and scrambles, a three.js renderer with skins, pictures, web components, React bindings.",
|
|
8
8
|
"license": "MPL-2.0",
|
|
9
9
|
"author": "Tomasz Wodzikowski <wodziszczakow@gmail.com>",
|