Skip to content

Commit c7293a0

Browse files
Merge pull request #26 from webdevnerdstuff/dev
v3.1.0
2 parents 48be334 + f21f1d0 commit c7293a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3672
-3839
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trim_trailing_whitespace = false
1616
[*.{yml,yaml}]
1717
indent_size = 2
1818

19-
[*.{js,ts,vue}]
19+
[*.{js,ts,mts,vue}]
2020
indent_size = 2
2121
indent_style = tab
2222

.eslintrc.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ module.exports = {
1313
],
1414
ignorePatterns: [
1515
'.eslintrc.js',
16-
'vite.build.config.ts',
17-
'vite.config.ts',
16+
'vite.build.config.mts',
17+
'vite.config.mts',
1818
'*.bk.vue',
19+
'*.spec.ts',
1920
],
2021
overrides: [
2122
{
@@ -40,11 +41,6 @@ module.exports = {
4041
'vue',
4142
],
4243
root: true,
43-
settings: {
44-
'import/resolver': {
45-
'babel-module': {},
46-
},
47-
},
4844
rules: {
4945
'@typescript-eslint/ban-ts-comment': 0,
5046
'@typescript-eslint/ban-types': [

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged && npm run test:build

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-version=20.10.0

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19
1+
20.10.0

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Change Log
22
All notable changes to the "vuetify-resize-drawer" plugin will be documented in this file.
33

4+
## v3.1.0
5+
01-09-24
6+
[main] (@webdevnerdstuff)
7+
* Fix typescript issues
8+
* Reorganizing
9+
* Add vitest
10+
* Update node version to v20.10.0
11+
412
## v3.0.0
513
11-10-23
614
[main] (@webdevnerdstuff)

dist/plugin/VResizeDrawer.vue.d.ts

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Props } from '../types';
1+
import { Props } from './types';
22
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
33
absolute?: boolean | undefined;
44
expandOnHover?: boolean | undefined;
@@ -7,9 +7,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
77
handleColor?: string | undefined;
88
handleIcon?: string | undefined;
99
handleIconSize?: string | undefined;
10-
handlePosition?: import('../types').HandlePositions | undefined;
10+
handlePosition?: import('./types').HandlePositions | undefined;
1111
height?: string | number | undefined;
12-
location?: import('../types').DrawerLocations;
12+
image?: string | undefined;
13+
location?: import('./types').DrawerLocations;
1314
maxWidth?: string | number | undefined;
1415
minWidth?: string | number | undefined;
1516
modelValue?: boolean | null | undefined;
@@ -19,14 +20,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
1920
resizable?: boolean | undefined;
2021
saveWidth?: boolean | undefined;
2122
storageName?: string | undefined;
22-
storageType?: import('../types').StorageType | undefined;
23+
storageType?: import('./types').StorageType | undefined;
2324
tag?: string | undefined;
2425
temporary?: boolean | undefined;
25-
touchless?: boolean | undefined;
2626
theme?: string | undefined;
27+
touchless?: boolean | undefined;
2728
width?: string | number | undefined;
2829
widthSnapBack?: boolean | undefined;
2930
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31+
close: (...args: any[]) => void;
32+
"drawer:mouseenter": (...args: any[]) => void;
33+
"drawer:mouseleave": (...args: any[]) => void;
3034
"handle:click": (...args: any[]) => void;
3135
"handle:dblclick": (...args: any[]) => void;
3236
"handle:drag": (...args: any[]) => void;
@@ -35,21 +39,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
3539
"handle:touchend": (...args: any[]) => void;
3640
"handle:touchmove": (...args: any[]) => void;
3741
"handle:touchstart": (...args: any[]) => void;
38-
close: (...args: any[]) => void;
39-
"drawer:mouseenter": (...args: any[]) => void;
40-
"drawer:mouseleave": (...args: any[]) => void;
4142
"update:modelValue": (...args: any[]) => void;
42-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
43+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
4344
absolute?: boolean | undefined;
4445
expandOnHover?: boolean | undefined;
4546
floating?: boolean | undefined;
4647
handleBorderWidth?: string | number | undefined;
4748
handleColor?: string | undefined;
4849
handleIcon?: string | undefined;
4950
handleIconSize?: string | undefined;
50-
handlePosition?: import('../types').HandlePositions | undefined;
51+
handlePosition?: import('./types').HandlePositions | undefined;
5152
height?: string | number | undefined;
52-
location?: import('../types').DrawerLocations;
53+
image?: string | undefined;
54+
location?: import('./types').DrawerLocations;
5355
maxWidth?: string | number | undefined;
5456
minWidth?: string | number | undefined;
5557
modelValue?: boolean | null | undefined;
@@ -59,15 +61,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
5961
resizable?: boolean | undefined;
6062
saveWidth?: boolean | undefined;
6163
storageName?: string | undefined;
62-
storageType?: import('../types').StorageType | undefined;
64+
storageType?: import('./types').StorageType | undefined;
6365
tag?: string | undefined;
6466
temporary?: boolean | undefined;
65-
touchless?: boolean | undefined;
6667
theme?: string | undefined;
68+
touchless?: boolean | undefined;
6769
width?: string | number | undefined;
6870
widthSnapBack?: boolean | undefined;
6971
}>>> & {
7072
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
73+
onClose?: ((...args: any[]) => any) | undefined;
74+
"onDrawer:mouseenter"?: ((...args: any[]) => any) | undefined;
75+
"onDrawer:mouseleave"?: ((...args: any[]) => any) | undefined;
7176
"onHandle:click"?: ((...args: any[]) => any) | undefined;
7277
"onHandle:dblclick"?: ((...args: any[]) => any) | undefined;
7378
"onHandle:drag"?: ((...args: any[]) => any) | undefined;
@@ -76,9 +81,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
7681
"onHandle:touchend"?: ((...args: any[]) => any) | undefined;
7782
"onHandle:touchmove"?: ((...args: any[]) => any) | undefined;
7883
"onHandle:touchstart"?: ((...args: any[]) => any) | undefined;
79-
onClose?: ((...args: any[]) => any) | undefined;
80-
"onDrawer:mouseenter"?: ((...args: any[]) => any) | undefined;
81-
"onDrawer:mouseleave"?: ((...args: any[]) => any) | undefined;
8284
}, {
8385
theme: string;
8486
tag: string;
@@ -89,21 +91,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
8991
modelValue: boolean | null;
9092
rail: boolean | null;
9193
railWidth: string | number;
94+
image: string;
9295
temporary: boolean;
9396
touchless: boolean;
9497
width: string | number;
95-
location: "end" | "start" | "left" | "right";
96-
storageName: string;
98+
location: "start" | "end" | "left" | "right";
9799
saveWidth: boolean;
98-
handlePosition: import('../types').HandlePositions;
99-
maxWidth: string | number;
100-
minWidth: string | number;
101-
widthSnapBack: boolean;
102-
handleBorderWidth: string | number;
100+
storageName: string;
101+
storageType: import('./types').StorageType;
102+
handlePosition: import('./types').HandlePositions;
103103
handleColor: string;
104+
handleBorderWidth: string | number;
104105
handleIconSize: string;
105-
storageType: import('../types').StorageType;
106106
height: string | number;
107+
maxWidth: string | number;
108+
minWidth: string | number;
109+
widthSnapBack: boolean;
107110
handleIcon: string;
108111
resizable: boolean;
109112
}, {}>, {

dist/plugin/composables/classes.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UseDrawerClasses, UseHandleContainerClasses, UseHandleIconClasses } from '../../types';
1+
import { UseDrawerClasses, UseHandleContainerClasses, UseHandleIconClasses } from '../types';
22
export declare const useDrawerClasses: UseDrawerClasses;
33
export declare const useHandleContainerClasses: UseHandleContainerClasses;
44
export declare const useHandleIconClasses: UseHandleIconClasses;

dist/plugin/composables/helpers.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { UseConvertToUnit } from '../../types';
1+
import { UseConvertToUnit } from '../types';
22
export declare const useConvertToUnit: UseConvertToUnit;
33
export declare const useConvertToNumber: (val: string | number) => number;

dist/plugin/composables/icons.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import { UseGetIcon } from '../../types';
1+
import { UseGetIcon } from '../types';
22
export declare const useGetIcon: UseGetIcon;

dist/plugin/composables/storage.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { UseSetStorage } from '../../types';
1+
import { UseSetStorage } from '../types';
22
export declare function useGetStorage(storageType: string, storageName: string): string | null;
33
export declare const useSetStorage: UseSetStorage;

dist/plugin/composables/styles.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UseDrawerStyles, UseHandleContainerStyles, UseHandleIconStyles } from '../../types';
1+
import { UseDrawerStyles, UseHandleContainerStyles, UseHandleIconStyles } from '../types';
22
export declare const useDrawerStyles: UseDrawerStyles;
33
export declare const useHandleContainerStyles: UseHandleContainerStyles;
44
export declare const useHandleIconStyles: UseHandleIconStyles;

dist/plugin/index.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
export { default as VResizeDrawer } from '../plugin/VResizeDrawer.vue';
1+
import type { App } from 'vue';
2+
import type { GlobalOptions } from './types';
3+
import VResizeDrawer from './VResizeDrawer.vue';
4+
export declare const globalOptions: unique symbol;
5+
export declare function createVResizeDrawer(options?: GlobalOptions): {
6+
install: (app: App) => void;
7+
};
8+
export default VResizeDrawer;
9+
export { VResizeDrawer, };

dist/types/index.d.ts renamed to dist/plugin/types/index.d.ts

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { CSSProperties, MaybeRef } from 'vue';
22
import type { IconOptions, ThemeInstance } from 'vuetify';
3+
import VResizeDrawer from '../VResizeDrawer.vue';
34
import type { VNavigationDrawer } from 'vuetify/components';
5+
export * from '../index';
46
export type Classes = {
57
[key: string]: boolean | undefined;
68
};
@@ -12,37 +14,40 @@ export type HEXColor = string;
1214
export type HSLColor = [number, number, number];
1315
export type RGBColor = [number, number, number];
1416
export interface Props {
15-
absolute?: VNavigationDrawer['$props']['absolute'];
16-
expandOnHover?: VNavigationDrawer['$props']['expandOnHover'];
17-
floating?: VNavigationDrawer['$props']['floating'];
17+
absolute?: VNavigationDrawer['absolute'];
18+
expandOnHover?: VNavigationDrawer['expandOnHover'];
19+
floating?: VNavigationDrawer['floating'];
1820
handleBorderWidth?: number | string;
1921
handleColor?: string | undefined;
2022
handleIcon?: string | undefined;
2123
handleIconSize?: string | undefined;
2224
handlePosition?: HandlePositions;
2325
height?: number | string | undefined;
26+
image?: VNavigationDrawer['image'];
2427
location?: DrawerLocations;
25-
maxWidth?: VNavigationDrawer['$props']['width'];
26-
minWidth?: VNavigationDrawer['$props']['width'];
27-
modelValue?: VNavigationDrawer['$props']['modelValue'];
28-
name?: string;
29-
rail?: VNavigationDrawer['$props']['rail'];
30-
railWidth?: VNavigationDrawer['$props']['railWidth'];
28+
maxWidth?: VNavigationDrawer['width'];
29+
minWidth?: VNavigationDrawer['width'];
30+
modelValue?: VNavigationDrawer['modelValue'];
31+
name?: VNavigationDrawer['name'];
32+
rail?: VNavigationDrawer['rail'];
33+
railWidth?: VNavigationDrawer['railWidth'];
3134
resizable?: boolean | undefined;
3235
saveWidth?: boolean | undefined;
3336
storageName?: string | undefined;
3437
storageType?: StorageType;
35-
tag?: VNavigationDrawer['$props']['tag'];
36-
temporary?: VNavigationDrawer['$props']['temporary'];
38+
tag?: VNavigationDrawer['tag'];
39+
temporary?: VNavigationDrawer['temporary'];
40+
theme?: VNavigationDrawer['theme'];
3741
touchless?: boolean | undefined;
38-
theme?: VNavigationDrawer['$props']['theme'];
39-
width?: VNavigationDrawer['$props']['width'];
42+
width?: VNavigationDrawer['width'];
4043
widthSnapBack?: boolean | undefined;
4144
}
45+
export interface GlobalOptions extends Props {
46+
}
4247
export interface UseConvertToUnit {
4348
(options: {
44-
str: string | number;
4549
unit?: string;
50+
value: string | number;
4651
}): string | void;
4752
}
4853
export interface UseSetStorage {
@@ -109,8 +114,15 @@ export interface UseHandleIconStyles {
109114
}
110115
export interface UseGetIcon {
111116
(options: {
112-
icon: string | undefined;
117+
icon: Props['handleIcon'];
113118
iconOptions: IconOptions | undefined;
114-
position: Props['handlePosition'];
115-
}): string;
119+
name: Props['handlePosition'];
120+
}): Props['handleIcon'];
121+
}
122+
declare module "vue" {
123+
interface ComponentCustomProperties {
124+
}
125+
interface GlobalComponents {
126+
VResizeDrawer: typeof VResizeDrawer;
127+
}
116128
}

dist/plugin/utils/props.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import { Props } from '../../types';
1+
import { Props } from '../types';
22
export declare const AllProps: Props;

0 commit comments

Comments
 (0)