@havue/components 1.1.1 → 1.2.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.
Files changed (29) hide show
  1. package/dist/components.full.js +1291 -286
  2. package/dist/components.full.min.js +1 -1
  3. package/dist/components.full.min.js.map +1 -1
  4. package/dist/components.mjs +164 -0
  5. package/dist/components.umd.js +162 -2
  6. package/dist/style.css +1 -1
  7. package/dist/types/color-picker/src/color-picker-normal/ColorPicker.vue.d.ts +16 -0
  8. package/dist/types/color-picker/src/color-picker-normal/children/ColorArea/ColorArea.vue.d.ts +18 -0
  9. package/dist/types/color-picker/src/color-picker-normal/children/ColorArea/hooks/useInteraction.d.ts +9 -0
  10. package/dist/types/color-picker/src/color-picker-normal/children/ColorForm/ColorForm.vue.d.ts +11 -0
  11. package/dist/types/color-picker/src/color-picker-rainbow/ColorPicker.vue.d.ts +15 -0
  12. package/dist/types/color-picker/src/{children → color-picker-rainbow/children}/ColorForm/ColorForm.vue.d.ts +1 -0
  13. package/dist/types/color-picker/src/color-picker-rainbow/children/PresetColors/PresetColors.vue.d.ts +10 -0
  14. package/dist/types/color-picker/src/{hooks → color-picker-rainbow/hooks}/useOperateEvent.d.ts +4 -1
  15. package/dist/types/color-picker/src/{utils → color-picker-rainbow/utils}/color.d.ts +6 -6
  16. package/dist/types/color-picker/src/constants/index.d.ts +1 -0
  17. package/dist/types/color-picker/src/index.d.ts +24 -2
  18. package/dist/types/drag-and-drop/src/Draggable.vue.d.ts +2 -2
  19. package/dist/types/drag-and-drop/src/Droppable.vue.d.ts +1 -0
  20. package/dist/types/drag-and-drop/src/manager/index.d.ts +14 -17
  21. package/dist/types/ip-input/src/IpInput.vue.d.ts +13 -0
  22. package/dist/types/ip-input/src/index.d.ts +3 -0
  23. package/dist/types/ip-input/src/utils/index.d.ts +14 -0
  24. package/dist/types/src/index.d.ts +1 -0
  25. package/package.json +5 -5
  26. package/dist/types/color-picker/src/ColorPicker.vue.d.ts +0 -18
  27. /package/dist/types/color-picker/src/{children → color-picker-normal/children}/PresetColors/PresetColors.vue.d.ts +0 -0
  28. /package/dist/types/color-picker/src/{hooks → color-picker-rainbow/hooks}/useColorArea.d.ts +0 -0
  29. /package/dist/types/color-picker/src/{utils → color-picker-rainbow/utils}/tools.d.ts +0 -0
@@ -4,7 +4,7 @@ export type DragAndDropPoint = {
4
4
  y: number;
5
5
  };
6
6
  export type DragAndDropDragType = string | number | symbol;
7
- type Events = {
7
+ export type DnDManagerEvents = {
8
8
  down: (p: DragAndDropPoint) => void;
9
9
  'first-move': (p: DragAndDropPoint, e: MouseEvent | TouchEvent) => void;
10
10
  start: (p: DragAndDropPoint) => void;
@@ -19,51 +19,49 @@ type Events = {
19
19
  point: DragAndDropPoint;
20
20
  }) => void;
21
21
  };
22
- export declare class DnDManager extends EventBus<Events> {
23
- /** 是否开始拖动 */
22
+ export declare class DnDManager extends EventBus<DnDManagerEvents> {
23
+ /** 是否开始拖动 | Whether to start dragging */
24
24
  isDragStart: boolean;
25
- /** 拖动元素类型 */
25
+ /** 拖动元素类型 | Drag type */
26
26
  dragType: DragAndDropDragType | undefined;
27
- /** Draggable传递的数据,
28
- * 供Droppable使用
29
- */
27
+ /** Draggable传递的数据,供Droppable使用 | Draggable passes data for use by Droppable */
30
28
  dragData: any;
31
29
  private isSendFirstMovePos;
32
- /** 移动端长按一定时间才触发 onStart */
30
+ /** 长按一定时间才触发 onStart | Press and hold for a certain amount of time to trigger onStart */
33
31
  private touchStartPressTime;
34
- /** touchstart事件触发的时的时间 */
32
+ /** 点击触发时的时间 | The time at which the click is triggered */
35
33
  private touchStartTime;
36
- /** touchstart时间触发的位置 */
34
+ /** 点击触发的位置 | The position where the click event is triggered */
37
35
  private touchStartPosition;
38
- /** onMove最后位置 */
36
+ /** onMove最后位置 | onMove last position */
39
37
  private lastMovePoint;
40
38
  private emitTouchStartTimer;
41
39
  private destroy;
42
40
  constructor();
43
41
  updateDargInfo(type: Exclude<DragAndDropDragType, undefined>, data: any): void;
44
42
  /**
45
- * 通知 Draggable 开始点击
43
+ * 通知 Draggable 开始点击 | Tell Draggable to start clicking
46
44
  * @param point
47
45
  */
48
46
  private onDown;
49
47
  /**
50
- * 通知 Draggable 拖拽开始
48
+ * 第一次移动时,通知 Draggable | On the first move, notify Draggable
51
49
  * @param point
52
50
  */
53
51
  private onFirstMove;
54
52
  /**
55
- * 通知 Draggable 拖拽开始
53
+ * 通知 Draggable 拖拽开始 | Notify Draggable to begin the drag
56
54
  * @param point
57
55
  */
58
56
  private onStart;
59
57
  /**
60
- * 通知 Draggable 移动
58
+ * 通知 Draggable 移动 | Notify Draggable to move
61
59
  * @param point
62
60
  * @returns
63
61
  */
64
62
  private onMove;
65
63
  /**
66
- * 结束拖拽
64
+ * 结束拖拽 | Ending drag
67
65
  * @returns
68
66
  */
69
67
  private onEnd;
@@ -78,4 +76,3 @@ export declare class DnDManager extends EventBus<Events> {
78
76
  destroyed(): void;
79
77
  }
80
78
  export declare const DnDManagerInstance: DnDManager;
81
- export {};
@@ -0,0 +1,13 @@
1
+ type __VLS_Props = {
2
+ modelValue: string | undefined;
3
+ disabled?: boolean;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
+ "update:model-value": (value: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:model-value"?: ((value: string) => any) | undefined;
9
+ }>, {
10
+ modelValue: string | undefined;
11
+ disabled: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { SFCWithInstall } from '@havue/utils';
2
+ import IpInput from './IpInput.vue';
3
+ export declare const HvIpInput: SFCWithInstall<typeof IpInput>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * IP每一项值是否有效 | IP Whether each entry value is valid
3
+ * @param val 单个IP值 | Single IP value
4
+ */
5
+ export declare function getValidIPItemValue(val: string | number): string;
6
+ /**
7
+ * 光标在输入框文本中的位置 | The position of the cursor within the text of the input field
8
+ * @param { HTMLInputElement } el
9
+ */
10
+ export declare function getRange(el: HTMLInputElement): {
11
+ begin: number | null;
12
+ end: number | null;
13
+ result: string | null;
14
+ };
@@ -1,3 +1,4 @@
1
1
  export * from '@havue/color-picker';
2
2
  export * from '@havue/drag-and-drop';
3
3
  export * from '@havue/drag-and-scale';
4
+ export * from '@havue/ip-input';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@havue/components",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Some components for Vue3",
5
5
  "keywords": [
6
6
  "havue",
@@ -14,10 +14,10 @@
14
14
  "url": "git+https://github.com/HappyPedestrian/havue.git"
15
15
  },
16
16
  "dependencies": {
17
- "@havue/shared": "^1.1.1",
18
- "@havue/color-picker": "^1.1.1",
19
- "@havue/drag-and-drop": "^1.1.1",
20
- "@havue/drag-and-scale": "^1.1.1"
17
+ "@havue/shared": "^1.2.0",
18
+ "@havue/color-picker": "^1.2.0",
19
+ "@havue/drag-and-scale": "^1.2.0",
20
+ "@havue/drag-and-drop": "^1.2.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "vue": "^3.3.0"
@@ -1,18 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- presetTitle?: string;
4
- presetColors?: string[];
5
- };
6
- declare const color: import("vue").ModelRef<string, string, string, string>;
7
- type __VLS_PublicProps = __VLS_Props & {
8
- modelValue?: typeof color['value'];
9
- };
10
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- "update:modelValue": (value: string) => any;
12
- } & {
13
- "update:model-value": (value: string) => any;
14
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
16
- "onUpdate:model-value"?: ((value: string) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
- export default _default;