@veltra/compositions 1.15.0 → 1.15.2
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/use-component-props/index.d.ts +0 -2
- package/dist/use-component-props/index.js +1 -2
- package/dist/use-config/index.d.ts +0 -2
- package/dist/use-config/index.js +1 -2
- package/dist/use-dnd/index.d.ts +0 -2
- package/dist/use-dnd/index.js +1 -2
- package/dist/use-dnd/merge-view.js +1 -2
- package/dist/use-drag/index.d.ts +0 -2
- package/dist/use-drag/index.js +1 -2
- package/dist/use-fallback-props/index.d.ts +0 -2
- package/dist/use-fallback-props/index.js +1 -2
- package/dist/use-focus/index.d.ts +0 -2
- package/dist/use-focus/index.js +1 -2
- package/dist/use-model/index.d.ts +0 -2
- package/dist/use-model/index.js +1 -2
- package/dist/use-pop/index.d.ts +0 -2
- package/dist/use-pop/index.js +1 -2
- package/dist/use-reactive-size/index.d.ts +0 -2
- package/dist/use-reactive-size/index.js +1 -2
- package/dist/use-resize-observer/index.d.ts +0 -2
- package/dist/use-resize-observer/index.js +1 -2
- package/dist/use-transition/index.d.ts +0 -2
- package/dist/use-transition/index.js +1 -2
- package/dist/use-transition/type.d.ts +0 -2
- package/dist/use-transition/use-css-transition.js +1 -2
- package/dist/use-transition/use-style-transition.js +1 -2
- package/dist/use-transition/utils.js +1 -2
- package/dist/use-user-action/index.d.ts +0 -2
- package/dist/use-user-action/index.js +1 -2
- package/dist/use-virtualizer/index.d.ts +0 -2
- package/dist/use-virtualizer/index.js +1 -2
- package/package.json +1 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Component, MaybeRef } from "vue";
|
|
2
|
-
//#region src/use-component-props/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* 生成一个用于设置组件通用属性的组件
|
|
5
4
|
* @param props 组件通用的属性
|
|
6
5
|
* @returns
|
|
7
6
|
*/
|
|
8
7
|
export declare function useComponentProps<T extends Record<string, any>>(props: MaybeRef<T & Record<string, any>>): Component;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { extractNormalVNodes } from "@veltra/utils";
|
|
2
2
|
import { cloneVNode, createVNode, defineComponent, isRef } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/use-component-props/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* 生成一个用于设置组件通用属性的组件
|
|
6
6
|
* @param props 组件通用的属性
|
|
@@ -48,7 +48,6 @@ tag: { type: String } },
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { useComponentProps };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AiProviderConfig, ComponentSize } from "@veltra/utils";
|
|
2
|
-
//#region src/use-config/index.d.ts
|
|
3
2
|
interface State {
|
|
4
3
|
/** 是否开启动画,机器老可以关闭动画来获得性能 */
|
|
5
4
|
animation: boolean;
|
|
@@ -22,6 +21,5 @@ export declare function useConfig(): {
|
|
|
22
21
|
config: Readonly<State>;
|
|
23
22
|
setConfig: (conf: Partial<State>) => void;
|
|
24
23
|
};
|
|
25
|
-
//#endregion
|
|
26
24
|
export {};
|
|
27
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive, readonly, watch } from "vue";
|
|
2
2
|
import { isObj } from "@cat-kit/core";
|
|
3
|
-
|
|
3
|
+
// src/use-config/index.ts
|
|
4
4
|
const state = reactive({
|
|
5
5
|
animation: true,
|
|
6
6
|
size: "default",
|
|
@@ -52,7 +52,6 @@ function useConfig() {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { setDocumentSize, useConfig };
|
|
57
56
|
|
|
58
57
|
//# sourceMappingURL=index.js.map
|
package/dist/use-dnd/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, Ref } from "vue";
|
|
2
2
|
import { BaseDragState, DNDPlugin, DNDPluginData, DragState, DragendEvent, DragendEventData, DragstartEvent, DragstartEventData, DropSwapConfig, InsertConfig, InsertEvent, NativeDragEffects, Node, NodeData, NodeDragEventData, NodeEventData, NodePointerEventData, NodeRecord, NodeTargetData, ParentConfig, ParentData, ParentDragEventData, ParentEventData, ParentRecord, ParentTargetData, PointeroverNodeEvent, PointeroverParentEvent, SetupNode, SetupNodeData, ShouldSwapData, SortEvent, SortEventData, SynthDragState, TearDownNode, TearDownNodeData, TransferEvent, TransferEventData, animations, dragValues, dropOrSwap, insert, isBrowser, isDragState, isSynthDragState, parentValues, performSort, performTransfer, remapNodes, setParentValues, tearDown as tearDown$1, updateConfig } from "@formkit/drag-and-drop";
|
|
3
3
|
import { VueDragAndDropData, VueElement, VueParentConfig, VueParentConfig as VueParentConfig$1, dragAndDrop as dragAndDrop$1, useDragAndDrop } from "@formkit/drag-and-drop/vue";
|
|
4
|
-
//#region src/use-dnd/index.d.ts
|
|
5
4
|
export interface UseDnDOptions<T> extends VueParentConfig<T> {
|
|
6
5
|
/**
|
|
7
6
|
* 列表数据。排序/跨容器转移后自动写回:
|
|
@@ -72,6 +71,5 @@ export interface UseDnDResult<T> {
|
|
|
72
71
|
* ```
|
|
73
72
|
*/
|
|
74
73
|
export declare function useDnD<T>(options?: UseDnDOptions<T>): UseDnDResult<T>;
|
|
75
|
-
//#endregion
|
|
76
74
|
export { type BaseDragState, type DNDPlugin, type DNDPluginData, type DragState, type DragendEvent, type DragendEventData, type DragstartEvent, type DragstartEventData, type DropSwapConfig, type InsertConfig, type InsertEvent, type NativeDragEffects, type Node, type NodeData, type NodeDragEventData, type NodeEventData, type NodePointerEventData, type NodeRecord, type NodeTargetData, type ParentConfig, type ParentData, type ParentDragEventData, type ParentEventData, type ParentRecord, type ParentTargetData, type PointeroverNodeEvent, type PointeroverParentEvent, type SetupNode, type SetupNodeData, type ShouldSwapData, type SortEvent, type SortEventData, type SynthDragState, type TearDownNode, type TearDownNodeData, type TransferEvent, type TransferEventData, type VueDragAndDropData, type VueElement, type VueParentConfig$1 as VueParentConfig, animations, dragAndDrop$1 as dragAndDrop, dragValues, dropOrSwap, insert, isBrowser, isDragState, isSynthDragState, parentValues, performSort, performTransfer, remapNodes, setParentValues, tearDown$1 as tearDown, updateConfig, useDragAndDrop };
|
|
77
75
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-dnd/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { mergeView } from "./merge-view.js";
|
|
|
2
2
|
import { computed, isReactive, isReadonly, isRef, onBeforeUnmount, ref, toValue, watch } from "vue";
|
|
3
3
|
import { animations, dragValues, dropOrSwap, insert, isBrowser, isDragState, isSynthDragState, parentValues, performSort, performTransfer, remapNodes, setParentValues, tearDown, tearDown as tearDown$1, updateConfig } from "@formkit/drag-and-drop";
|
|
4
4
|
import { dragAndDrop, dragAndDrop as dragAndDrop$1, useDragAndDrop } from "@formkit/drag-and-drop/vue";
|
|
5
|
-
|
|
5
|
+
// src/use-dnd/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* 拖拽排序组合式方法,基于 `@formkit/drag-and-drop` 的 Vue 适配层封装。
|
|
8
8
|
*
|
|
@@ -110,7 +110,6 @@ function useDnD(options = {}) {
|
|
|
110
110
|
updateConfig
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
//#endregion
|
|
114
113
|
export { animations, dragAndDrop$1 as dragAndDrop, dragValues, dropOrSwap, insert, isBrowser, isDragState, isSynthDragState, parentValues, performSort, performTransfer, remapNodes, setParentValues, tearDown$1 as tearDown, updateConfig, useDnD, useDragAndDrop };
|
|
115
114
|
|
|
116
115
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/use-dnd/merge-view.ts
|
|
2
2
|
/**
|
|
3
3
|
* 将“拖拽视图”的新顺序稳定合并回完整数组。
|
|
4
4
|
*
|
|
@@ -37,7 +37,6 @@ function mergeView(source, prevView, nextView) {
|
|
|
37
37
|
}
|
|
38
38
|
return result.concat(queue);
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { mergeView };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=merge-view.js.map
|
package/dist/use-drag/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Ref, ShallowRef } from "vue";
|
|
2
|
-
//#region src/use-drag/index.d.ts
|
|
3
2
|
interface DragParams {
|
|
4
3
|
/** 本次拖动水平距离 */
|
|
5
4
|
x: number;
|
|
@@ -41,6 +40,5 @@ export declare function useDrag(options: DragOptions): {
|
|
|
41
40
|
offsetY?: number;
|
|
42
41
|
}) => void;
|
|
43
42
|
};
|
|
44
|
-
//#endregion
|
|
45
43
|
export {};
|
|
46
44
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-drag/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onBeforeUnmount, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-drag/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* 拖动组合式方法
|
|
5
5
|
* @param options 拖动选项
|
|
@@ -81,7 +81,6 @@ function useDrag(options) {
|
|
|
81
81
|
if (options.offsetY !== void 0) offsetY = options.offsetY;
|
|
82
82
|
} };
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { useDrag };
|
|
86
85
|
|
|
87
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentSize } from "@veltra/utils";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
//#region src/use-fallback-props/index.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* 使用回滚属性,用于控制多级属性的使用优先级,如果多级属性中不存在该值,则使用全局配置中的属性,如再不存在则为undefined
|
|
6
5
|
* @param propsList 属性列表,最右边的属性优先级最高
|
|
@@ -25,6 +24,5 @@ export declare function useFormFallbackProps(propsList: Record<string, any>[]):
|
|
|
25
24
|
* @returns
|
|
26
25
|
*/
|
|
27
26
|
export declare function useFormFallbackProps<F extends Partial<FormFallbackProps>>(propsList: Record<string, any>[], fallbackProps: F): { [key in keyof F]: key extends keyof FormFallbackProps ? ComputedRef<FormFallbackProps[key]> : never; };
|
|
28
|
-
//#endregion
|
|
29
27
|
export {};
|
|
30
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useConfig } from "../use-config/index.js";
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/use-fallback-props/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* 使用回滚属性,用于控制多级属性的使用优先级,如果多级属性中不存在该值,则使用全局配置中的属性,如再不存在则为undefined
|
|
6
6
|
* @param propsList 属性列表,最右边的属性优先级最高
|
|
@@ -29,7 +29,6 @@ function useFormFallbackProps(propsList, fallbackProps) {
|
|
|
29
29
|
};
|
|
30
30
|
return useFallbackProps(propsList, fallbackProps);
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { useFallbackProps, useFormFallbackProps };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Ref } from "vue";
|
|
2
|
-
//#region src/use-focus/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* 聚焦
|
|
5
4
|
* @param cb 回调
|
|
@@ -10,5 +9,4 @@ export declare function useFocus(cb?: (focused: boolean) => void): {
|
|
|
10
9
|
handleBlur: () => void;
|
|
11
10
|
handleFocus: () => void;
|
|
12
11
|
};
|
|
13
|
-
//#endregion
|
|
14
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-focus/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-focus/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* 聚焦
|
|
5
5
|
* @param cb 回调
|
|
@@ -21,7 +21,6 @@ function useFocus(cb) {
|
|
|
21
21
|
handleFocus
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { useFocus };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Ref } from "vue";
|
|
2
|
-
//#region src/use-model/index.d.ts
|
|
3
2
|
interface ModelOptions<Props extends Record<string, unknown>, Name extends keyof Props> {
|
|
4
3
|
/** 组件定义的属性 */
|
|
5
4
|
props: Props;
|
|
@@ -29,6 +28,5 @@ export declare function useModel<Props extends Record<string, any>, Name extends
|
|
|
29
28
|
__v_isRef: boolean;
|
|
30
29
|
value: Props[Name];
|
|
31
30
|
};
|
|
32
|
-
//#endregion
|
|
33
31
|
export {};
|
|
34
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-model/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, shallowRef, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-model/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* 返回一个基于提供的选项的响应式模型值。
|
|
5
5
|
* 该方法在将来可能会被替代, 目前使用是为了类型提示可用
|
|
@@ -40,7 +40,6 @@ function useModel(options) {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { useModel };
|
|
45
44
|
|
|
46
45
|
//# sourceMappingURL=index.js.map
|
package/dist/use-pop/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ShallowRef } from "vue";
|
|
2
2
|
import { ComputePositionReturn } from "@floating-ui/dom";
|
|
3
|
-
//#region src/use-pop/index.d.ts
|
|
4
3
|
type TipDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
5
4
|
type TipAlign = 'center' | 'start' | 'end';
|
|
6
5
|
interface Options {
|
|
@@ -47,6 +46,5 @@ interface PopResult {
|
|
|
47
46
|
* @returns
|
|
48
47
|
*/
|
|
49
48
|
export declare function usePop(options: Options): PopResult;
|
|
50
|
-
//#endregion
|
|
51
49
|
export {};
|
|
52
50
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/use-pop/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useResizeObserver } from "../use-resize-observer/index.js";
|
|
|
2
2
|
import { getScrollParents, setStyles } from "@veltra/utils";
|
|
3
3
|
import { isRef, onBeforeUnmount, watch } from "vue";
|
|
4
4
|
import { arrow, computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
5
|
-
|
|
5
|
+
// src/use-pop/index.ts
|
|
6
6
|
let popperContainer = null;
|
|
7
7
|
const popperContainerId = "pop-container";
|
|
8
8
|
/**
|
|
@@ -122,7 +122,6 @@ function usePop(options) {
|
|
|
122
122
|
popperContainerId
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
//#endregion
|
|
126
125
|
export { usePop };
|
|
127
126
|
|
|
128
127
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RefElement } from "../use-resize-observer/index.js";
|
|
2
|
-
//#region src/use-reactive-size/index.d.ts
|
|
3
2
|
interface ElementSize {
|
|
4
3
|
width: number;
|
|
5
4
|
height: number;
|
|
@@ -11,6 +10,5 @@ interface ElementSize {
|
|
|
11
10
|
*/
|
|
12
11
|
export declare function useReactiveSize(target: RefElement): ElementSize;
|
|
13
12
|
export declare function useReactiveSize(targets: RefElement[]): ElementSize[];
|
|
14
|
-
//#endregion
|
|
15
13
|
export {};
|
|
16
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useResizeObserver } from "../use-resize-observer/index.js";
|
|
2
2
|
import { computed, reactive } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/use-reactive-size/index.ts
|
|
4
4
|
function useReactiveSize(targets) {
|
|
5
5
|
const sizes = Array.isArray(targets) ? targets.map(() => {
|
|
6
6
|
return reactive({
|
|
@@ -34,7 +34,6 @@ function useReactiveSize(targets) {
|
|
|
34
34
|
});
|
|
35
35
|
return sizes;
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { useReactiveSize };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Ref, ShallowRef } from "vue";
|
|
2
|
-
//#region src/use-resize-observer/index.d.ts
|
|
3
2
|
export type RefElement = ShallowRef<HTMLElement | undefined | null> | Ref<HTMLElement | undefined | null>;
|
|
4
3
|
interface ResizeObserverOptions {
|
|
5
4
|
/** 目标节点 */
|
|
@@ -28,6 +27,5 @@ export declare function useObserverCallback(): {
|
|
|
28
27
|
}) => void) => void;
|
|
29
28
|
unobserveEl: (el: HTMLElement) => void;
|
|
30
29
|
};
|
|
31
|
-
//#endregion
|
|
32
30
|
export {};
|
|
33
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onBeforeUnmount, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-resize-observer/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* 取消监听
|
|
5
5
|
* @param targets 目标节点
|
|
@@ -86,7 +86,6 @@ function useObserverCallback() {
|
|
|
86
86
|
unobserveEl
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
//#endregion
|
|
90
89
|
export { useObserverCallback, useResizeObserver };
|
|
91
90
|
|
|
92
91
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CssTransitionOptions, Returned, StyleTransitionOptions } from "./type.js";
|
|
2
|
-
//#region src/use-transition/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* 使用CSS类过渡
|
|
5
4
|
* @param type 过渡类型
|
|
@@ -12,5 +11,4 @@ export declare function useTransition(type: 'css', options: CssTransitionOptions
|
|
|
12
11
|
* @param options 过渡选项
|
|
13
12
|
*/
|
|
14
13
|
export declare function useTransition(type: 'style', options: StyleTransitionOptions): Returned;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useCssTransition } from "./use-css-transition.js";
|
|
2
2
|
import { useStyleTransition } from "./use-style-transition.js";
|
|
3
|
-
|
|
3
|
+
// src/use-transition/index.ts
|
|
4
4
|
function useTransition(type, options) {
|
|
5
5
|
if (type === "css") return useCssTransition(options);
|
|
6
6
|
return useStyleTransition(options);
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { useTransition };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties, Ref, ShallowRef } from "vue";
|
|
2
|
-
//#region src/use-transition/type.d.ts
|
|
3
2
|
export interface TransitionBase {
|
|
4
3
|
/** 被应用的目标元素 */
|
|
5
4
|
target: ShallowRef<HTMLElement | undefined> | HTMLElement;
|
|
@@ -41,5 +40,4 @@ export interface Returned {
|
|
|
41
40
|
*/
|
|
42
41
|
leave(): void;
|
|
43
42
|
}
|
|
44
|
-
//#endregion
|
|
45
43
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createToggle } from "@veltra/utils";
|
|
2
2
|
import { computed, isRef, onBeforeUnmount } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/use-transition/use-css-transition.ts
|
|
4
4
|
/** 解析 CSS 时间值(s / ms)为毫秒 */
|
|
5
5
|
const parseTime = (time) => {
|
|
6
6
|
const t = time.trim();
|
|
@@ -125,7 +125,6 @@ function useCssTransition(options) {
|
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
export { useCssTransition };
|
|
130
129
|
|
|
131
130
|
//# sourceMappingURL=use-css-transition.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { watchTransition } from "./utils.js";
|
|
2
2
|
import { createToggle, nextFrame, setStyles } from "@veltra/utils";
|
|
3
3
|
import { isRef, watch } from "vue";
|
|
4
|
-
|
|
4
|
+
// src/use-transition/use-style-transition.ts
|
|
5
5
|
function useStyleTransition(options) {
|
|
6
6
|
const { enterTo, enterActive, leaveActive, target, afterEnter, afterLeave, enterCanceled, leaveCanceled } = options;
|
|
7
7
|
const getDom = () => isRef(target) ? target.value : target;
|
|
@@ -121,7 +121,6 @@ function useStyleTransition(options) {
|
|
|
121
121
|
leave: () => toggle(false)
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
//#endregion
|
|
125
124
|
export { useStyleTransition };
|
|
126
125
|
|
|
127
126
|
//# sourceMappingURL=use-style-transition.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onBeforeUnmount, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-transition/utils.ts
|
|
3
3
|
/**
|
|
4
4
|
* 监听过渡
|
|
5
5
|
* @param domGetter 元素获取函数
|
|
@@ -35,7 +35,6 @@ function watchTransition(domGetter, config) {
|
|
|
35
35
|
removeEvent(domGetter());
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { watchTransition };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/use-user-action/index.d.ts
|
|
2
1
|
export type UserAction = <T extends (...args: any[]) => void | Promise<void>>(fn: T) => (...args: Parameters<T>) => Promise<void>;
|
|
3
2
|
export interface UserActionResult {
|
|
4
3
|
isUserActive: () => boolean;
|
|
@@ -27,5 +26,4 @@ export interface UserActionResult {
|
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
28
|
export declare function useUserAction(): UserActionResult;
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nextTick } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/use-user-action/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* 创建用户活动
|
|
5
5
|
* @description
|
|
@@ -44,7 +44,6 @@ function useUserAction() {
|
|
|
44
44
|
userAction
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { useUserAction };
|
|
49
48
|
|
|
50
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
|
2
2
|
import { VirtualItem, VirtualSnapshot, Virtualizer, VirtualizerOptions } from "@cat-kit/fe";
|
|
3
|
-
//#region src/use-virtualizer/index.d.ts
|
|
4
3
|
type MaybeEl = HTMLElement | null | undefined;
|
|
5
4
|
export interface UseVirtualizerOptions extends Omit<VirtualizerOptions, 'count'> {
|
|
6
5
|
/** 响应式虚拟项总数;内部 `watch` 驱动 `virtualizer.setCount`。 */
|
|
@@ -63,6 +62,5 @@ export interface UseVirtualizerReturned {
|
|
|
63
62
|
* - 消费者若需运行时切换 `estimateSize` / `getItemKey` 等字段,调用 `virtualizer.setOptions(...)`。
|
|
64
63
|
*/
|
|
65
64
|
export declare function useVirtualizer(options: UseVirtualizerOptions): UseVirtualizerReturned;
|
|
66
|
-
//#endregion
|
|
67
65
|
export {};
|
|
68
66
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onScopeDispose, shallowRef, toValue, watch } from "vue";
|
|
2
2
|
import { Virtualizer } from "@cat-kit/fe";
|
|
3
|
-
|
|
3
|
+
// src/use-virtualizer/index.ts
|
|
4
4
|
function writeSize(el, size, horizontal) {
|
|
5
5
|
if (!el) return;
|
|
6
6
|
if (horizontal) el.style.width = `${size}px`;
|
|
@@ -81,7 +81,6 @@ function useVirtualizer(options) {
|
|
|
81
81
|
isScrolling
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { useVirtualizer };
|
|
86
85
|
|
|
87
86
|
//# sourceMappingURL=index.js.map
|