magic-canvas-yonava 1.0.6 → 1.0.8

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.
@@ -1,9 +1,10 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{
1
+ declare const _default: import('vue').DefineComponent<{
2
2
  canvasRef: (canvas: HTMLCanvasElement) => void;
3
3
  cleanup: (canvas: HTMLCanvasElement) => void;
4
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
4
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
5
5
  canvasRef: (canvas: HTMLCanvasElement) => void;
6
6
  cleanup: (canvas: HTMLCanvasElement) => void;
7
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
- declare const _default: typeof __VLS_export;
7
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
8
+ canvas: HTMLCanvasElement;
9
+ }, HTMLCanvasElement>;
9
10
  export default _default;
@@ -1,5 +1,5 @@
1
- import type { Camera } from './camera';
2
- import type { Coordinate, DrawFns } from './types';
1
+ import { Camera } from './camera';
2
+ import { Coordinate, DrawFns } from './types';
3
3
  export type DrawPattern = (ctx: CanvasRenderingContext2D, at: Coordinate, alpha: string) => void;
4
4
  export declare const useBackgroundPattern: ({ panX, panY, zoom }: Camera["state"], drawPattern: DrawFns["backgroundPattern"]) => {
5
5
  draw: (ctx: CanvasRenderingContext2D) => void;
@@ -1,4 +1,4 @@
1
- import type { Ref } from 'vue';
1
+ import { Ref } from 'vue';
2
2
  export declare const useCamera: (canvas: Ref<HTMLCanvasElement | undefined>, storageKey: string) => {
3
3
  transformAndClear: (ctx: CanvasRenderingContext2D) => void;
4
4
  actions: {
@@ -6,9 +6,9 @@ export declare const useCamera: (canvas: Ref<HTMLCanvasElement | undefined>, sto
6
6
  zoomOut: (decrement?: number) => void;
7
7
  };
8
8
  state: {
9
- panX: import("@vueuse/shared").RemovableRef<number>;
10
- panY: import("@vueuse/shared").RemovableRef<number>;
11
- zoom: import("@vueuse/shared").RemovableRef<number>;
9
+ panX: import('@vueuse/shared').RemovableRef<number>;
10
+ panY: import('@vueuse/shared').RemovableRef<number>;
11
+ zoom: import('@vueuse/shared').RemovableRef<number>;
12
12
  };
13
13
  cleanup: (ref: HTMLCanvasElement) => void;
14
14
  };
@@ -1,4 +1,4 @@
1
- import { type Ref } from "vue";
1
+ import { Ref } from 'vue';
2
2
  export declare const MIN_ZOOM = 0.2;
3
3
  export declare const MAX_ZOOM = 10;
4
4
  export declare const ZOOM_SENSITIVITY = 0.02;
@@ -9,9 +9,9 @@ export declare const usePanAndZoom: (canvas: Ref<HTMLCanvasElement | undefined>,
9
9
  zoomOut: (decrement?: number) => void;
10
10
  };
11
11
  state: {
12
- panX: import("@vueuse/shared").RemovableRef<number>;
13
- panY: import("@vueuse/shared").RemovableRef<number>;
14
- zoom: import("@vueuse/shared").RemovableRef<number>;
12
+ panX: import('@vueuse/shared').RemovableRef<number>;
13
+ panY: import('@vueuse/shared').RemovableRef<number>;
14
+ zoom: import('@vueuse/shared').RemovableRef<number>;
15
15
  };
16
16
  getTransform: () => {
17
17
  scaleX: number;
@@ -1,5 +1,5 @@
1
- import { type Ref } from "vue";
2
- import { Coordinate } from "../types";
1
+ import { Ref } from 'vue';
2
+ import { Coordinate } from '../types';
3
3
  export declare const getCanvasTransform: (ctx: CanvasRenderingContext2D) => {
4
4
  panX: number;
5
5
  panY: number;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,15 @@
1
- import MagicCanvas from "./MagicCanvas.vue";
2
- import { App } from "vue";
3
- export * from "./types.js";
4
- export * from "./useMagicCanvas.js";
5
- export * from "./coordinates/index.js";
6
- export { getDevicePixelRatio } from "./camera/utils.js";
1
+ import { default as MagicCanvas } from './MagicCanvas.vue';
2
+ import { App } from 'vue';
3
+ export * from './types.js';
4
+ export * from './useMagicCanvas.js';
5
+ export * from './coordinates/index.js';
6
+ export { getDevicePixelRatio } from './camera/utils.js';
7
7
  export { MagicCanvas };
8
8
  declare module "vue" {
9
9
  interface GlobalComponents {
10
10
  MagicCanvas: typeof MagicCanvas;
11
11
  }
12
12
  }
13
- declare const _default: {
13
+ export declare const MagicCanvasPlugin: {
14
14
  install(app: App): void;
15
15
  };
16
- export default _default;