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.
- package/dist/MagicCanvas.vue.d.ts +5 -4
- package/dist/backgroundPattern.d.ts +2 -2
- package/dist/camera/index.d.ts +4 -4
- package/dist/camera/panZoom.d.ts +4 -4
- package/dist/coordinates/index.d.ts +2 -2
- package/dist/index.d.ts +7 -8
- package/dist/index.es.js +3335 -0
- package/dist/index.umd.js +1 -0
- package/dist/types.d.ts +3 -3
- package/dist/useMagicCanvas.d.ts +1 -1
- package/package.json +8 -5
- package/src/index.ts +1 -1
- package/tsconfig.json +1 -1
- package/vite.config.ts +29 -0
- package/dist/MagicCanvas.vue.js +0 -36
- package/dist/backgroundPattern.js +0 -36
- package/dist/camera/index.js +0 -20
- package/dist/camera/panZoom.js +0 -100
- package/dist/camera/utils.js +0 -18
- package/dist/coordinates/index.js +0 -58
- package/dist/index.js +0 -11
- package/dist/localStorage.js +0 -20
- package/dist/types.js +0 -1
- package/dist/useMagicCanvas.js +0 -54
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
2
|
canvasRef: (canvas: HTMLCanvasElement) => void;
|
|
3
3
|
cleanup: (canvas: HTMLCanvasElement) => void;
|
|
4
|
-
}, {}, {}, {}, {}, import(
|
|
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(
|
|
8
|
-
|
|
7
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
8
|
+
canvas: HTMLCanvasElement;
|
|
9
|
+
}, HTMLCanvasElement>;
|
|
9
10
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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;
|
package/dist/camera/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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(
|
|
10
|
-
panY: import(
|
|
11
|
-
zoom: import(
|
|
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
|
};
|
package/dist/camera/panZoom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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(
|
|
13
|
-
panY: import(
|
|
14
|
-
zoom: import(
|
|
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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import MagicCanvas from
|
|
2
|
-
import { App } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export { getDevicePixelRatio } from
|
|
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
|
|
13
|
+
export declare const MagicCanvasPlugin: {
|
|
14
14
|
install(app: App): void;
|
|
15
15
|
};
|
|
16
|
-
export default _default;
|