@zyui/components 0.0.84 → 0.0.86
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/es/index.js +61 -61
- package/es/index.mjs +12648 -12597
- package/es/src/components/NodesEditor/ContextMenu/index.vue.d.ts +8 -0
- package/es/src/components/NodesEditor/contextUI.d.ts +3 -1
- package/es/src/components/NodesEditor/helper.d.ts +2 -2
- package/es/src/components/NodesEditor/hooks/useContextMenu.d.ts +2 -0
- package/es/src/components/NodesEditor/hooks/useNodes.d.ts +1 -1
- package/es/style.css +1 -1
- package/lib/src/components/NodesEditor/ContextMenu/index.vue.d.ts +8 -0
- package/lib/src/components/NodesEditor/contextUI.d.ts +3 -1
- package/lib/src/components/NodesEditor/helper.d.ts +2 -2
- package/lib/src/components/NodesEditor/hooks/useContextMenu.d.ts +2 -0
- package/lib/src/components/NodesEditor/hooks/useNodes.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
6
6
|
type: import('vue').PropType<ContextMenuPosition>;
|
|
7
7
|
required: true;
|
|
8
8
|
};
|
|
9
|
+
direction: {
|
|
10
|
+
type: import('vue').PropType<"top" | "bottom">;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
9
13
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
14
|
select: (action: string) => void;
|
|
11
15
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -14,6 +18,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
14
18
|
type: import('vue').PropType<ContextMenuPosition>;
|
|
15
19
|
required: true;
|
|
16
20
|
};
|
|
21
|
+
direction: {
|
|
22
|
+
type: import('vue').PropType<"top" | "bottom">;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
17
25
|
}>> & Readonly<{
|
|
18
26
|
onSelect?: ((action: string) => any) | undefined;
|
|
19
27
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -6,6 +6,8 @@ export type NodesUIContext = {
|
|
|
6
6
|
shadowHost?: Ref<HTMLElement | null>;
|
|
7
7
|
/**富文本的dom */
|
|
8
8
|
containerRef: Ref<HTMLElement | null>;
|
|
9
|
+
/**菜单的ref */
|
|
10
|
+
contextMenuRef?: Ref<any>;
|
|
9
11
|
/**渲染组件ref */
|
|
10
12
|
htmlRenderRef: Ref<any>;
|
|
11
13
|
/**选中的元素 */
|
|
@@ -31,7 +33,7 @@ export type NodesUIContext = {
|
|
|
31
33
|
renderNodes: Ref<WrappedNode[]>;
|
|
32
34
|
/** html是否已经渲染 */
|
|
33
35
|
uiReady: Ref<boolean>;
|
|
34
|
-
nodesGroups?: NodesGroups[]
|
|
36
|
+
nodesGroups?: Ref<NodesGroups[]>;
|
|
35
37
|
isFocused: Ref<boolean>;
|
|
36
38
|
};
|
|
37
39
|
export declare const nodesUIKey: unique symbol;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NodeItem, NodesGroups, WrappedNode } from './type';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* 获取元素的
|
|
4
|
+
* 获取元素的selector路径
|
|
5
5
|
* @param element - 目标HTML元素
|
|
6
|
-
* @returns 元素的
|
|
6
|
+
* @returns 元素的selector路径,如果无法获取则返回null
|
|
7
7
|
*/
|
|
8
8
|
export declare function getElementnodePath(element: HTMLElement): string | null;
|
|
9
9
|
export declare function getElementById(id: string, container: HTMLElement | null): HTMLElement | null;
|
|
@@ -11,6 +11,8 @@ export declare function useContextMenu(params: any): {
|
|
|
11
11
|
left: string;
|
|
12
12
|
top: string;
|
|
13
13
|
}>;
|
|
14
|
+
contextMenuRef: import('vue').Ref<any, any> | undefined;
|
|
14
15
|
onContextMenu: (e: MouseEvent) => void;
|
|
15
16
|
closeContextMenu: (e: MouseEvent) => void;
|
|
17
|
+
direction: import('vue').Ref<string, string>;
|
|
16
18
|
};
|
|
@@ -3,7 +3,7 @@ import { NodeItem } from '../type';
|
|
|
3
3
|
export declare const useNodes: () => {
|
|
4
4
|
nodes: import('vue').Ref<any[], any[]>;
|
|
5
5
|
addNode: (node: NodeItem | NodeItem[]) => void;
|
|
6
|
-
removeNode: (nodeId: string | string[]) => void
|
|
6
|
+
removeNode: (nodeId: string | string[]) => Promise<void>;
|
|
7
7
|
editNodes: (node: NodeItem | NodeItem[]) => void;
|
|
8
8
|
insertNodeAt: (node: NodeItem, index: number) => void;
|
|
9
9
|
moveNode: (fromIndex: number, toIndex: number) => void;
|