Skip to content

Commit fb59a80

Browse files
Reorganizing
1 parent 368f37e commit fb59a80

File tree

19 files changed

+1501
-1407
lines changed

19 files changed

+1501
-1407
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ 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',
1919
],
2020
overrides: [

dist/plugin/VColorField.vue.d.ts

Lines changed: 35 additions & 35 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 function toggleColorPicker(trigger?: string | Event): void;
33
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
44
appendIcon: undefined;
@@ -32,10 +32,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
3232
readonlyInput: boolean;
3333
required: boolean;
3434
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35-
"update:modelValue": (...args: any[]) => void;
3635
update: (...args: any[]) => void;
3736
"update:mode": (...args: any[]) => void;
38-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
37+
"update:modelValue": (...args: any[]) => void;
38+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
3939
appendIcon: undefined;
4040
appendInnerIcon: undefined;
4141
cardFieldWidth: boolean;
@@ -67,57 +67,49 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
6767
readonlyInput: boolean;
6868
required: boolean;
6969
}>>> & {
70-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
71-
"onUpdate:mode"?: ((...args: any[]) => any) | undefined;
7270
onUpdate?: ((...args: any[]) => any) | undefined;
71+
"onUpdate:mode"?: ((...args: any[]) => any) | undefined;
72+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
7373
}, {
7474
color: string;
75-
density: "default" | "comfortable" | "compact" | null;
7675
appendIcon: string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent;
77-
prependIcon: string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent;
7876
appendInnerIcon: string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent;
7977
cardFieldWidth: boolean;
8078
cardOffsetX: string | number;
8179
cardOffsetY: string | number;
8280
cardPadding: string | number;
83-
cardProps: import('../types').VCardProps;
81+
cardProps: import('./types').VCardProps;
8482
colorPickerProps: Partial<{
8583
width: NonNullable<string | number>;
8684
style: globalThis.StyleValue;
8785
disabled: boolean;
8886
tag: string;
89-
mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa";
87+
mode: "rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa";
9088
rounded: string | number | boolean;
9189
dotSize: string | number;
92-
modes: readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[];
90+
modes: readonly ("rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa")[];
9391
canvasHeight: string | number;
9492
hideCanvas: boolean;
9593
hideSliders: boolean;
9694
hideInputs: boolean;
9795
showSwatches: boolean;
9896
swatchesMaxHeight: string | number;
9997
}> & Omit<{
100-
readonly width: NonNullable<string | number>;
101-
readonly style: globalThis.StyleValue;
102-
readonly disabled: boolean;
103-
readonly tag: string;
104-
readonly mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa";
105-
readonly dotSize: string | number;
106-
readonly modes: readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[];
10798
readonly canvasHeight: string | number;
99+
readonly dotSize: string | number;
108100
readonly hideCanvas: boolean;
109-
readonly hideSliders: boolean;
110101
readonly hideInputs: boolean;
102+
readonly hideSliders: boolean;
103+
readonly mode: "rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa";
104+
readonly modes: readonly ("rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa")[];
111105
readonly showSwatches: boolean;
112106
readonly swatchesMaxHeight: string | number;
113-
readonly border?: string | number | boolean | undefined;
107+
readonly tag: string;
108+
readonly style: globalThis.StyleValue;
109+
readonly width: NonNullable<string | number>;
110+
readonly disabled: boolean;
114111
readonly color?: string | undefined;
115-
readonly position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
116-
readonly class?: any;
117-
readonly elevation?: string | number | undefined;
118112
readonly theme?: string | undefined;
119-
readonly rounded?: string | number | boolean | undefined;
120-
readonly modelValue?: string | Record<string, unknown> | null | undefined;
121113
readonly swatches?: readonly (readonly (string | number | {
122114
readonly r: number;
123115
readonly g: number;
@@ -134,8 +126,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
134126
readonly l: number;
135127
readonly a?: number | undefined;
136128
})[])[] | undefined;
129+
readonly class?: any;
130+
readonly rounded?: string | number | boolean | undefined;
131+
readonly position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
132+
readonly elevation?: string | number | undefined;
133+
readonly border?: string | number | boolean | undefined;
134+
readonly modelValue?: string | Record<string, unknown> | null | undefined;
137135
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
138-
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
136+
"onUpdate:mode"?: ((mode: "rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
139137
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
140138
width: {
141139
type: globalThis.PropType<NonNullable<string | number>>;
@@ -144,7 +142,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
144142
border: (BooleanConstructor | StringConstructor | NumberConstructor)[];
145143
color: StringConstructor;
146144
position: {
147-
type: globalThis.PropType<"fixed" | "absolute" | "static" | "relative" | "sticky">;
145+
type: globalThis.PropType<"fixed" | "absolute" | "static" | "sticky" | "relative">;
148146
validator: (v: any) => boolean;
149147
};
150148
style: {
@@ -178,12 +176,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
178176
hideSliders: BooleanConstructor;
179177
hideInputs: BooleanConstructor;
180178
mode: {
181-
type: globalThis.PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
179+
type: globalThis.PropType<"rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa">;
182180
default: string;
183181
validator: (v: string) => boolean;
184182
};
185183
modes: {
186-
type: globalThis.PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
184+
type: globalThis.PropType<readonly ("rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa")[]>;
187185
default: () => string[];
188186
validator: (v: any) => boolean;
189187
};
@@ -213,10 +211,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
213211
};
214212
}>> & {
215213
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
216-
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
217-
}, "width" | "style" | "tag" | "rounded" | "canvasHeight" | "disabled" | "dotSize" | "hideCanvas" | "hideSliders" | "hideInputs" | "mode" | "modes" | "showSwatches" | "swatchesMaxHeight"> & {
214+
"onUpdate:mode"?: ((mode: "rgba" | "rgb" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
215+
}, "canvasHeight" | "dotSize" | "hideCanvas" | "hideInputs" | "hideSliders" | "mode" | "modes" | "showSwatches" | "swatchesMaxHeight" | "tag" | "style" | "rounded" | "width" | "disabled"> & {
218216
hideModeSwitch?: boolean | undefined;
219217
};
218+
density: "default" | "comfortable" | "compact" | null;
220219
hint: string;
221220
iconHoverColor: string | boolean;
222221
iconSize: string | number;
@@ -226,16 +225,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
226225
open: string;
227226
persistentHint: boolean;
228227
persistentPlaceholder: boolean;
228+
pip: boolean;
229+
pipBorder: string | null;
230+
pipBorderRadius: string;
231+
pipIcon: boolean | (string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent) | null;
232+
pipSlot: string;
229233
placeholder: string;
234+
prependIcon: string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent;
230235
prependInnerIcon: boolean | (string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent) | null;
231236
readonly: boolean | null;
232237
readonlyInput: boolean | null;
233238
required: boolean;
234-
pipIcon: boolean | (string | (string | [path: string, opacity: number])[] | import("vue").JSXComponent) | null;
235-
pipBorder: string | null;
236-
pipBorderRadius: string;
237-
pip: boolean;
238-
pipSlot: string;
239239
}, {}>, Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
240240
prepend?(_: {
241241
toggleColorPicker: typeof toggleColorPicker;

dist/plugin/components/ColorPickerIcon.vue.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { ColorPickerIconProps } from '../../types';
1+
import { ColorPickerIconProps } from '../types';
22
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColorPickerIconProps>, {
33
icon: string;
44
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
55
click: (...args: any[]) => void;
6-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColorPickerIconProps>, {
6+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColorPickerIconProps>, {
77
icon: string;
88
}>>> & {
99
onClick?: ((...args: any[]) => any) | undefined;

dist/plugin/components/PipComponent.vue.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { PipComponentProps } from '../../types';
1+
import type { PipComponentProps } from '../types';
22
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PipComponentProps>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
click: (...args: any[]) => void;
4-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PipComponentProps>, {}>>> & {
4+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PipComponentProps>, {}>>> & {
55
onClick?: ((...args: any[]) => any) | undefined;
66
}, {}, {}>;
77
export default _default;

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 { UseCardClasses, UseHintClasses, UsePipClasses, UseTextFieldClasses } from '../../types';
1+
import { UseCardClasses, UseHintClasses, UsePipClasses, UseTextFieldClasses } from '../types';
22
export declare const usePipClasses: UsePipClasses;
33
export declare const useTextFieldClasses: UseTextFieldClasses;
44
export declare const useHintClasses: UseHintClasses;

dist/plugin/composables/helpers.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UseConvertToUnit } from '../../types';
1+
import { UseConvertToUnit } from '../types';
22
/**
33
* Converts a string to a number with a unit.
44
*/

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/styles.d.ts

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

dist/plugin/index.d.ts

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

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { CSSProperties } from 'vue';
22
import type { IconOptions } from 'vuetify';
3+
import VColorField from '../VColorField.vue';
34
import type { VCard, VColorPicker, VIcon, VTextField } from 'vuetify/components';
5+
export * from '../index';
46
export type Mode = VColorPicker['$props']['mode'];
57
export interface KeyStringAny<T = any> {
68
[key: string]: T;
@@ -57,6 +59,8 @@ export interface Props extends PipProps {
5759
swatches?: VColorPicker['$props']['swatches'];
5860
swatchesMaxHeight?: VColorPicker['$props']['swatchesMaxHeight'];
5961
}
62+
export interface GlobalOptions extends Props {
63+
}
6064
export interface PipComponentProps extends PipProps {
6165
modelValue?: any;
6266
}
@@ -129,3 +133,10 @@ export interface CardStylesObject extends CSSProperties {
129133
top?: string | number;
130134
width?: string | number;
131135
}
136+
declare module "vue" {
137+
interface ComponentCustomProperties {
138+
}
139+
interface GlobalComponents {
140+
VColorField: typeof VColorField;
141+
}
142+
}

0 commit comments

Comments
 (0)