@vnejs/plugins.views.cursor 0.1.3 → 0.1.5

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/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ import "@vnejs/plugins.views.cursor.contract";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "@vnejs/plugins.views.cursor.contract";
1
2
  import { regPlugin } from "@vnejs/shared";
2
3
  import { PLUGIN_NAME } from "@vnejs/plugins.views.cursor.contract";
3
4
  import { CursorController } from "./modules/controller.js";
@@ -9,5 +9,5 @@ export declare class CursorController extends ModuleController<CursorViewPluginE
9
9
  onMoved: () => Promise<unknown[]> | undefined;
10
10
  onMemoryCleared: () => "" | Promise<unknown[] | undefined> | undefined;
11
11
  changeView: (view?: string) => Promise<unknown[] | undefined>;
12
- loadIconMedia: (view: string, type: string) => Promise<unknown> | undefined;
12
+ loadIconMedia: (view: string, type: string) => Promise<HTMLImageElement>;
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.cursor",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import "@vnejs/plugins.views.cursor.contract";
2
+
1
3
  import { regPlugin } from "@vnejs/shared";
2
4
  import { PLUGIN_NAME } from "@vnejs/plugins.views.cursor.contract";
3
5
 
@@ -36,11 +36,11 @@ export class CursorController extends ModuleController<
36
36
  const [mediaDefault, mediaHover] = await Promise.all([this.loadIconMedia(view, "default"), this.loadIconMedia(view, "pointer")]);
37
37
 
38
38
  return this.updateStateAndViewFast({
39
- srcDefault: (mediaDefault as { src: string }).src,
40
- srcPointer: (mediaHover as { src: string }).src,
39
+ srcDefault: mediaDefault.src,
40
+ srcPointer: mediaHover.src,
41
41
  });
42
42
  };
43
43
 
44
44
  loadIconMedia = (view: string, type: string) =>
45
- this.loadImageMedia(`cursor/${view}/${type}`, "icons", this.shared.settings[this.SETTINGS.LAYER.QUALITY] as string | number);
45
+ this.loadImageMedia(`cursor/${view}/${type}`, "icons", this.shared.settings[this.SETTINGS.LAYER.QUALITY]);
46
46
  }