@clowder-ai/companion 0.1.0-alpha.5 → 0.1.0-alpha.6

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/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pluginId": "official.companion",
3
- "version": "0.1.0-alpha.5",
3
+ "version": "0.1.0-alpha.6",
4
4
  "contractVersion": "0.1.0",
5
5
  "name": "猫猫球",
6
6
  "icon": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clowder-ai/companion",
3
- "version": "0.1.0-alpha.5",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "The desktop voice body for your Clowder companion",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/plugin.yaml CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pluginId": "official.companion",
3
- "version": "0.1.0-alpha.5",
3
+ "version": "0.1.0-alpha.6",
4
4
  "contractVersion": "0.1.0",
5
5
  "name": "猫猫球",
6
6
  "icon": {
@@ -22,8 +22,10 @@ const staticSkins = { 'ragdoll-v1': 'ragdoll-v1.png', 'yarn-ball': 'yarn-ball.pn
22
22
  export class PetMotion {
23
23
  constructor(element, options = {}) {
24
24
  this.element = element;
25
- this.setTimer = options.setTimer ?? setTimeout;
26
- this.clearTimer = options.clearTimer ?? clearTimeout;
25
+ const setTimer = options.setTimer ?? globalThis.setTimeout;
26
+ const clearTimer = options.clearTimer ?? globalThis.clearTimeout;
27
+ this.setTimer = (callback, delay) => setTimer.call(globalThis, callback, delay);
28
+ this.clearTimer = id => clearTimer.call(globalThis, id);
27
29
  this.reducedMotion = options.reducedMotion ?? globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;
28
30
  this.skin = 'xianxian-codex';
29
31
  this.phase = 'idle';