vuedit-image-editor 0.2.1 → 0.3.0
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/LICENSE +21 -0
- package/dist/index.d.ts +724 -0
- package/dist/vuedit-image-editor.css +1 -0
- package/dist/vuedit-image-editor.es.js +3887 -8873
- package/dist/vuedit-image-editor.es.js.map +1 -1
- package/dist/vuedit-image-editor.umd.js +41 -504
- package/dist/vuedit-image-editor.umd.js.map +1 -1
- package/package.json +31 -50
- package/README.md +0 -222
- package/dist/style.css +0 -1
- package/dist/types/components/VueditImageEditor.vue.d.ts +0 -91
- package/dist/types/components/VueditImageEditorModal.vue.d.ts +0 -71
- package/dist/types/components/canvas/FabricCanvas.vue.d.ts +0 -5
- package/dist/types/components/panels/CropPanel.vue.d.ts +0 -32
- package/dist/types/components/panels/DrawPanel.vue.d.ts +0 -24
- package/dist/types/components/panels/FilterPanel.vue.d.ts +0 -28
- package/dist/types/components/panels/ResizePanel.vue.d.ts +0 -35
- package/dist/types/components/panels/RotateFlipPanel.vue.d.ts +0 -31
- package/dist/types/components/panels/ShapePanel.vue.d.ts +0 -26
- package/dist/types/components/panels/TextPanel.vue.d.ts +0 -26
- package/dist/types/components/shared/ColorPicker.vue.d.ts +0 -21
- package/dist/types/components/shared/ConfirmBar.vue.d.ts +0 -23
- package/dist/types/components/shared/RangeSlider.vue.d.ts +0 -27
- package/dist/types/components/toolbar/EditorToolbar.vue.d.ts +0 -26
- package/dist/types/components/toolbar/ToolButton.vue.d.ts +0 -30
- package/dist/types/composables/useCrop.d.ts +0 -18
- package/dist/types/composables/useDraw.d.ts +0 -12
- package/dist/types/composables/useEditorState.d.ts +0 -7
- package/dist/types/composables/useFabricCanvas.d.ts +0 -16
- package/dist/types/composables/useFilters.d.ts +0 -18
- package/dist/types/composables/useHistory.d.ts +0 -11
- package/dist/types/composables/useResize.d.ts +0 -16
- package/dist/types/composables/useRotateFlip.d.ts +0 -12
- package/dist/types/composables/useShapes.d.ts +0 -12
- package/dist/types/composables/useText.d.ts +0 -16
- package/dist/types/composables/useZoom.d.ts +0 -11
- package/dist/types/i18n/ar.d.ts +0 -54
- package/dist/types/i18n/en.d.ts +0 -55
- package/dist/types/i18n/index.d.ts +0 -7
- package/dist/types/icons/CropIcon.vue.d.ts +0 -2
- package/dist/types/icons/DrawIcon.vue.d.ts +0 -2
- package/dist/types/icons/FilterIcon.vue.d.ts +0 -2
- package/dist/types/icons/FlipHIcon.vue.d.ts +0 -2
- package/dist/types/icons/FlipVIcon.vue.d.ts +0 -2
- package/dist/types/icons/RedoIcon.vue.d.ts +0 -2
- package/dist/types/icons/ResizeIcon.vue.d.ts +0 -2
- package/dist/types/icons/RotateIcon.vue.d.ts +0 -2
- package/dist/types/icons/RotateLeftIcon.vue.d.ts +0 -2
- package/dist/types/icons/RotateRightIcon.vue.d.ts +0 -2
- package/dist/types/icons/ShapeIcon.vue.d.ts +0 -2
- package/dist/types/icons/TextIcon.vue.d.ts +0 -2
- package/dist/types/icons/UndoIcon.vue.d.ts +0 -2
- package/dist/types/icons/ZoomInIcon.vue.d.ts +0 -2
- package/dist/types/icons/ZoomOutIcon.vue.d.ts +0 -2
- package/dist/types/icons/index.d.ts +0 -15
- package/dist/types/index.d.ts +0 -9
- package/dist/types/types/index.d.ts +0 -43
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ShapeConfig } from '../../types';
|
|
2
|
-
import { TranslationKeys } from '../../i18n/en';
|
|
3
|
-
|
|
4
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
config: ShapeConfig;
|
|
6
|
-
t: (key: TranslationKeys) => string;
|
|
7
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
update: (key: keyof ShapeConfig, value: string | number) => void;
|
|
9
|
-
addShape: () => void;
|
|
10
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
-
config: ShapeConfig;
|
|
12
|
-
t: (key: TranslationKeys) => string;
|
|
13
|
-
}>>> & Readonly<{
|
|
14
|
-
onUpdate?: ((key: keyof ShapeConfig, value: string | number) => any) | undefined;
|
|
15
|
-
onAddShape?: (() => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TextConfig } from '../../types';
|
|
2
|
-
import { TranslationKeys } from '../../i18n/en';
|
|
3
|
-
|
|
4
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
config: TextConfig;
|
|
6
|
-
t: (key: TranslationKeys) => string;
|
|
7
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
update: (key: keyof TextConfig, value: string | number) => void;
|
|
9
|
-
addText: () => void;
|
|
10
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
-
config: TextConfig;
|
|
12
|
-
t: (key: TranslationKeys) => string;
|
|
13
|
-
}>>> & Readonly<{
|
|
14
|
-
onAddText?: (() => any) | undefined;
|
|
15
|
-
onUpdate?: ((key: keyof TextConfig, value: string | number) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
modelValue: string;
|
|
3
|
-
label?: string;
|
|
4
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
"update:modelValue": (value: string) => void;
|
|
6
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
-
modelValue: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
}>>> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
11
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: import('vue').PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
applyLabel?: string;
|
|
3
|
-
cancelLabel?: string;
|
|
4
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
apply: () => void;
|
|
6
|
-
cancel: () => void;
|
|
7
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
-
applyLabel?: string;
|
|
9
|
-
cancelLabel?: string;
|
|
10
|
-
}>>> & Readonly<{
|
|
11
|
-
onCancel?: (() => any) | undefined;
|
|
12
|
-
onApply?: (() => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
label: string;
|
|
3
|
-
modelValue: number;
|
|
4
|
-
min?: number;
|
|
5
|
-
max?: number;
|
|
6
|
-
step?: number;
|
|
7
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (value: number) => void;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
-
label: string;
|
|
11
|
-
modelValue: number;
|
|
12
|
-
min?: number;
|
|
13
|
-
max?: number;
|
|
14
|
-
step?: number;
|
|
15
|
-
}>>> & Readonly<{
|
|
16
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ToolType } from '../../types';
|
|
2
|
-
import { TranslationKeys } from '../../i18n/en';
|
|
3
|
-
|
|
4
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
tools: ToolType[];
|
|
6
|
-
activeTool: ToolType | null;
|
|
7
|
-
t: (key: TranslationKeys) => string;
|
|
8
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
-
selectTool: (tool: ToolType) => void;
|
|
10
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
-
tools: ToolType[];
|
|
12
|
-
activeTool: ToolType | null;
|
|
13
|
-
t: (key: TranslationKeys) => string;
|
|
14
|
-
}>>> & Readonly<{
|
|
15
|
-
onSelectTool?: ((tool: ToolType) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
default?(_: {}): any;
|
|
3
|
-
};
|
|
4
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
label: string;
|
|
6
|
-
active?: boolean;
|
|
7
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
click: () => void;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
-
label: string;
|
|
11
|
-
active?: boolean;
|
|
12
|
-
}>>> & Readonly<{
|
|
13
|
-
onClick?: (() => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
-
new (): {
|
|
28
|
-
$slots: S;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas, FabricImage } from 'fabric';
|
|
3
|
-
import { CropAspectRatio } from '../types';
|
|
4
|
-
|
|
5
|
-
export declare function useCrop(canvas: ShallowRef<Canvas | null>, originalImage: ShallowRef<FabricImage | null>, onAfterCrop: () => void): {
|
|
6
|
-
isCropping: import('vue').Ref<boolean, boolean>;
|
|
7
|
-
selectedRatio: import('vue').Ref<{
|
|
8
|
-
label: string;
|
|
9
|
-
value: number | null;
|
|
10
|
-
} | null, CropAspectRatio | {
|
|
11
|
-
label: string;
|
|
12
|
-
value: number | null;
|
|
13
|
-
} | null>;
|
|
14
|
-
startCrop: (ratio?: CropAspectRatio) => void;
|
|
15
|
-
setAspectRatio: (ratio: CropAspectRatio) => void;
|
|
16
|
-
applyCrop: () => Promise<void>;
|
|
17
|
-
cancelCrop: () => void;
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useDraw(canvas: ShallowRef<Canvas | null>, onAfterDraw: () => void): {
|
|
5
|
-
config: {
|
|
6
|
-
width: number;
|
|
7
|
-
color: string;
|
|
8
|
-
opacity: number;
|
|
9
|
-
};
|
|
10
|
-
enableDrawing: () => void;
|
|
11
|
-
disableDrawing: () => void;
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { Canvas, FabricImage } from 'fabric';
|
|
3
|
-
import { ImageSource, ExportOptions } from '../types';
|
|
4
|
-
|
|
5
|
-
export declare function useFabricCanvas(): {
|
|
6
|
-
canvas: import('vue').ShallowRef<Canvas | null, Canvas | null>;
|
|
7
|
-
originalImage: import('vue').ShallowRef<FabricImage<Partial<import('fabric').ImageProps>, import('fabric').SerializedImageProps, import('fabric').ObjectEvents> | null, FabricImage<Partial<import('fabric').ImageProps>, import('fabric').SerializedImageProps, import('fabric').ObjectEvents> | null>;
|
|
8
|
-
isLoading: Ref<boolean, boolean>;
|
|
9
|
-
imageWidth: Ref<number, number>;
|
|
10
|
-
imageHeight: Ref<number, number>;
|
|
11
|
-
init: (canvasEl: HTMLCanvasElement, container: HTMLElement) => void;
|
|
12
|
-
fitToContainer: (container: HTMLElement) => void;
|
|
13
|
-
loadImage: (source: ImageSource) => Promise<void>;
|
|
14
|
-
exportImage: (options: ExportOptions) => Promise<File | Blob | string | HTMLCanvasElement>;
|
|
15
|
-
dispose: () => void;
|
|
16
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas, FabricImage } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useFilters(canvas: ShallowRef<Canvas | null>, backgroundImage: ShallowRef<FabricImage | null>, onAfterFilter: () => void): {
|
|
5
|
-
state: {
|
|
6
|
-
brightness: number;
|
|
7
|
-
contrast: number;
|
|
8
|
-
saturation: number;
|
|
9
|
-
exposure: number;
|
|
10
|
-
blur: number;
|
|
11
|
-
grayscale: boolean;
|
|
12
|
-
sepia: boolean;
|
|
13
|
-
invert: boolean;
|
|
14
|
-
};
|
|
15
|
-
applyFilters: () => void;
|
|
16
|
-
resetFilters: () => void;
|
|
17
|
-
commitFilters: () => void;
|
|
18
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useHistory(canvas: ShallowRef<Canvas | null>, maxStates?: number): {
|
|
5
|
-
canUndo: import('vue').ComputedRef<boolean>;
|
|
6
|
-
canRedo: import('vue').ComputedRef<boolean>;
|
|
7
|
-
saveState: () => void;
|
|
8
|
-
undo: () => void;
|
|
9
|
-
redo: () => void;
|
|
10
|
-
clearHistory: () => void;
|
|
11
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas, FabricImage } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useResize(canvas: ShallowRef<Canvas | null>, originalImage: ShallowRef<FabricImage | null>, imageWidth: {
|
|
5
|
-
value: number;
|
|
6
|
-
}, imageHeight: {
|
|
7
|
-
value: number;
|
|
8
|
-
}, onAfterResize: () => void): {
|
|
9
|
-
newWidth: import('vue').Ref<number, number>;
|
|
10
|
-
newHeight: import('vue').Ref<number, number>;
|
|
11
|
-
lockRatio: import('vue').Ref<boolean, boolean>;
|
|
12
|
-
initResize: () => void;
|
|
13
|
-
setWidth: (w: number) => void;
|
|
14
|
-
setHeight: (h: number) => void;
|
|
15
|
-
applyResize: () => Promise<void>;
|
|
16
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas, FabricImage } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useRotateFlip(canvas: ShallowRef<Canvas | null>, originalImage: ShallowRef<FabricImage | null>, onAfterTransform: () => void): {
|
|
5
|
-
rotation: import('vue').Ref<number, number>;
|
|
6
|
-
flippedX: import('vue').Ref<boolean, boolean>;
|
|
7
|
-
flippedY: import('vue').Ref<boolean, boolean>;
|
|
8
|
-
rotate90: (direction: "left" | "right") => void;
|
|
9
|
-
setRotation: (degrees: number) => void;
|
|
10
|
-
flipHorizontal: () => void;
|
|
11
|
-
flipVertical: () => void;
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useShapes(canvas: ShallowRef<Canvas | null>, onAfterAdd: () => void): {
|
|
5
|
-
config: {
|
|
6
|
-
type: "rect" | "circle" | "arrow" | "line";
|
|
7
|
-
strokeColor: string;
|
|
8
|
-
fillColor: string;
|
|
9
|
-
strokeWidth: number;
|
|
10
|
-
};
|
|
11
|
-
addShape: () => void;
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useText(canvas: ShallowRef<Canvas | null>, onAfterAdd: () => void): {
|
|
5
|
-
config: {
|
|
6
|
-
text: string;
|
|
7
|
-
fontFamily: string;
|
|
8
|
-
fontSize: number;
|
|
9
|
-
fill: string;
|
|
10
|
-
fontWeight: "normal" | "bold";
|
|
11
|
-
fontStyle: "normal" | "italic";
|
|
12
|
-
textAlign: "left" | "center" | "right";
|
|
13
|
-
};
|
|
14
|
-
addText: () => void;
|
|
15
|
-
updateSelectedText: () => void;
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
|
-
import { Canvas } from 'fabric';
|
|
3
|
-
|
|
4
|
-
export declare function useZoom(canvas: ShallowRef<Canvas | null>): {
|
|
5
|
-
zoomLevel: import('vue').Ref<number, number>;
|
|
6
|
-
setZoom: (level: number) => void;
|
|
7
|
-
zoomIn: () => void;
|
|
8
|
-
zoomOut: () => void;
|
|
9
|
-
resetZoom: () => void;
|
|
10
|
-
enableWheelZoom: () => void;
|
|
11
|
-
};
|
package/dist/types/i18n/ar.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
declare const ar: {
|
|
2
|
-
readonly crop: "قص";
|
|
3
|
-
readonly rotate: "تدوير";
|
|
4
|
-
readonly filter: "فلتر";
|
|
5
|
-
readonly text: "نص";
|
|
6
|
-
readonly draw: "رسم";
|
|
7
|
-
readonly shape: "شكل";
|
|
8
|
-
readonly resize: "تغيير الحجم";
|
|
9
|
-
readonly save: "حفظ";
|
|
10
|
-
readonly cancel: "إلغاء";
|
|
11
|
-
readonly apply: "تطبيق";
|
|
12
|
-
readonly reset: "إعادة تعيين";
|
|
13
|
-
readonly undo: "تراجع";
|
|
14
|
-
readonly redo: "إعادة";
|
|
15
|
-
readonly zoomIn: "تكبير";
|
|
16
|
-
readonly zoomOut: "تصغير";
|
|
17
|
-
readonly resetZoom: "إعادة تعيين التكبير";
|
|
18
|
-
readonly freeform: "حر";
|
|
19
|
-
readonly original: "أصلي";
|
|
20
|
-
readonly rotateLeft: "تدوير لليسار";
|
|
21
|
-
readonly rotateRight: "تدوير لليمين";
|
|
22
|
-
readonly flipHorizontal: "قلب أفقي";
|
|
23
|
-
readonly flipVertical: "قلب عمودي";
|
|
24
|
-
readonly degrees: "درجة";
|
|
25
|
-
readonly brightness: "السطوع";
|
|
26
|
-
readonly contrast: "التباين";
|
|
27
|
-
readonly saturation: "التشبع";
|
|
28
|
-
readonly exposure: "التعريض";
|
|
29
|
-
readonly blur: "ضبابية";
|
|
30
|
-
readonly grayscale: "رمادي";
|
|
31
|
-
readonly sepia: "بني داكن";
|
|
32
|
-
readonly invert: "عكس";
|
|
33
|
-
readonly addText: "إضافة نص";
|
|
34
|
-
readonly fontFamily: "الخط";
|
|
35
|
-
readonly fontSize: "الحجم";
|
|
36
|
-
readonly fontColor: "اللون";
|
|
37
|
-
readonly bold: "غامق";
|
|
38
|
-
readonly italic: "مائل";
|
|
39
|
-
readonly brushSize: "حجم الفرشاة";
|
|
40
|
-
readonly brushColor: "اللون";
|
|
41
|
-
readonly opacity: "الشفافية";
|
|
42
|
-
readonly rectangle: "مستطيل";
|
|
43
|
-
readonly circle: "دائرة";
|
|
44
|
-
readonly arrow: "سهم";
|
|
45
|
-
readonly line: "خط";
|
|
46
|
-
readonly strokeColor: "لون الحد";
|
|
47
|
-
readonly fillColor: "لون التعبئة";
|
|
48
|
-
readonly strokeWidth: "عرض الحد";
|
|
49
|
-
readonly width: "العرض";
|
|
50
|
-
readonly height: "الارتفاع";
|
|
51
|
-
readonly lockAspectRatio: "قفل نسبة العرض للارتفاع";
|
|
52
|
-
readonly pixels: "بكسل";
|
|
53
|
-
};
|
|
54
|
-
export default ar;
|
package/dist/types/i18n/en.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
declare const en: {
|
|
2
|
-
readonly crop: "Crop";
|
|
3
|
-
readonly rotate: "Rotate";
|
|
4
|
-
readonly filter: "Filter";
|
|
5
|
-
readonly text: "Text";
|
|
6
|
-
readonly draw: "Draw";
|
|
7
|
-
readonly shape: "Shape";
|
|
8
|
-
readonly resize: "Resize";
|
|
9
|
-
readonly save: "Save";
|
|
10
|
-
readonly cancel: "Cancel";
|
|
11
|
-
readonly apply: "Apply";
|
|
12
|
-
readonly reset: "Reset";
|
|
13
|
-
readonly undo: "Undo";
|
|
14
|
-
readonly redo: "Redo";
|
|
15
|
-
readonly zoomIn: "Zoom In";
|
|
16
|
-
readonly zoomOut: "Zoom Out";
|
|
17
|
-
readonly resetZoom: "Reset Zoom";
|
|
18
|
-
readonly freeform: "Freeform";
|
|
19
|
-
readonly original: "Original";
|
|
20
|
-
readonly rotateLeft: "Rotate Left";
|
|
21
|
-
readonly rotateRight: "Rotate Right";
|
|
22
|
-
readonly flipHorizontal: "Flip Horizontal";
|
|
23
|
-
readonly flipVertical: "Flip Vertical";
|
|
24
|
-
readonly degrees: "Degrees";
|
|
25
|
-
readonly brightness: "Brightness";
|
|
26
|
-
readonly contrast: "Contrast";
|
|
27
|
-
readonly saturation: "Saturation";
|
|
28
|
-
readonly exposure: "Exposure";
|
|
29
|
-
readonly blur: "Blur";
|
|
30
|
-
readonly grayscale: "Grayscale";
|
|
31
|
-
readonly sepia: "Sepia";
|
|
32
|
-
readonly invert: "Invert";
|
|
33
|
-
readonly addText: "Add Text";
|
|
34
|
-
readonly fontFamily: "Font";
|
|
35
|
-
readonly fontSize: "Size";
|
|
36
|
-
readonly fontColor: "Color";
|
|
37
|
-
readonly bold: "Bold";
|
|
38
|
-
readonly italic: "Italic";
|
|
39
|
-
readonly brushSize: "Brush Size";
|
|
40
|
-
readonly brushColor: "Color";
|
|
41
|
-
readonly opacity: "Opacity";
|
|
42
|
-
readonly rectangle: "Rectangle";
|
|
43
|
-
readonly circle: "Circle";
|
|
44
|
-
readonly arrow: "Arrow";
|
|
45
|
-
readonly line: "Line";
|
|
46
|
-
readonly strokeColor: "Stroke";
|
|
47
|
-
readonly fillColor: "Fill";
|
|
48
|
-
readonly strokeWidth: "Stroke Width";
|
|
49
|
-
readonly width: "Width";
|
|
50
|
-
readonly height: "Height";
|
|
51
|
-
readonly lockAspectRatio: "Lock aspect ratio";
|
|
52
|
-
readonly pixels: "px";
|
|
53
|
-
};
|
|
54
|
-
export type TranslationKeys = keyof typeof en;
|
|
55
|
-
export default en;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { default as en, TranslationKeys } from './en';
|
|
2
|
-
|
|
3
|
-
export type VueditTranslations = Record<TranslationKeys, string>;
|
|
4
|
-
export declare function resolveTranslations(locale: string | VueditTranslations): (key: TranslationKeys) => string;
|
|
5
|
-
export declare function mergeTranslations(base: Partial<VueditTranslations>, overrides: Partial<VueditTranslations>): VueditTranslations;
|
|
6
|
-
export { en as defaultTranslations };
|
|
7
|
-
export type { TranslationKeys };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { default as CropIcon } from './CropIcon.vue';
|
|
2
|
-
export { default as RotateIcon } from './RotateIcon.vue';
|
|
3
|
-
export { default as FilterIcon } from './FilterIcon.vue';
|
|
4
|
-
export { default as TextIcon } from './TextIcon.vue';
|
|
5
|
-
export { default as DrawIcon } from './DrawIcon.vue';
|
|
6
|
-
export { default as ShapeIcon } from './ShapeIcon.vue';
|
|
7
|
-
export { default as ResizeIcon } from './ResizeIcon.vue';
|
|
8
|
-
export { default as UndoIcon } from './UndoIcon.vue';
|
|
9
|
-
export { default as RedoIcon } from './RedoIcon.vue';
|
|
10
|
-
export { default as ZoomInIcon } from './ZoomInIcon.vue';
|
|
11
|
-
export { default as ZoomOutIcon } from './ZoomOutIcon.vue';
|
|
12
|
-
export { default as FlipHIcon } from './FlipHIcon.vue';
|
|
13
|
-
export { default as FlipVIcon } from './FlipVIcon.vue';
|
|
14
|
-
export { default as RotateLeftIcon } from './RotateLeftIcon.vue';
|
|
15
|
-
export { default as RotateRightIcon } from './RotateRightIcon.vue';
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as VueditImageEditor } from './components/VueditImageEditor.vue';
|
|
2
|
-
import { default as VueditImageEditorModal } from './components/VueditImageEditorModal.vue';
|
|
3
|
-
|
|
4
|
-
export { VueditImageEditor, VueditImageEditorModal };
|
|
5
|
-
export { useFabricCanvas } from './composables/useFabricCanvas';
|
|
6
|
-
export { useHistory } from './composables/useHistory';
|
|
7
|
-
export type { ImageSource, OutputFormat, ToolType, CropAspectRatio, ExportOptions, FilterState, BrushConfig, ShapeConfig, TextConfig, } from './types';
|
|
8
|
-
export { defaultTranslations, mergeTranslations, resolveTranslations } from './i18n';
|
|
9
|
-
export type { VueditTranslations, TranslationKeys } from './i18n';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export type ImageSource = File | Blob | string;
|
|
2
|
-
export type OutputFormat = 'file' | 'blob' | 'dataurl' | 'canvas';
|
|
3
|
-
export type ToolType = 'crop' | 'rotate' | 'filter' | 'text' | 'draw' | 'shape' | 'resize';
|
|
4
|
-
export interface CropAspectRatio {
|
|
5
|
-
label: string;
|
|
6
|
-
value: number | null;
|
|
7
|
-
}
|
|
8
|
-
export interface ExportOptions {
|
|
9
|
-
format: OutputFormat;
|
|
10
|
-
mimeType: string;
|
|
11
|
-
quality: number;
|
|
12
|
-
fileName: string;
|
|
13
|
-
}
|
|
14
|
-
export interface FilterState {
|
|
15
|
-
brightness: number;
|
|
16
|
-
contrast: number;
|
|
17
|
-
saturation: number;
|
|
18
|
-
exposure: number;
|
|
19
|
-
blur: number;
|
|
20
|
-
grayscale: boolean;
|
|
21
|
-
sepia: boolean;
|
|
22
|
-
invert: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface BrushConfig {
|
|
25
|
-
width: number;
|
|
26
|
-
color: string;
|
|
27
|
-
opacity: number;
|
|
28
|
-
}
|
|
29
|
-
export interface ShapeConfig {
|
|
30
|
-
type: 'rect' | 'circle' | 'arrow' | 'line';
|
|
31
|
-
strokeColor: string;
|
|
32
|
-
fillColor: string;
|
|
33
|
-
strokeWidth: number;
|
|
34
|
-
}
|
|
35
|
-
export interface TextConfig {
|
|
36
|
-
text: string;
|
|
37
|
-
fontFamily: string;
|
|
38
|
-
fontSize: number;
|
|
39
|
-
fill: string;
|
|
40
|
-
fontWeight: 'normal' | 'bold';
|
|
41
|
-
fontStyle: 'normal' | 'italic';
|
|
42
|
-
textAlign: 'left' | 'center' | 'right';
|
|
43
|
-
}
|