@zyui/components 1.0.48 → 1.0.49
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 +78 -72
- package/es/index.mjs +30384 -30002
- package/es/index.umd.js +79 -73
- package/es/src/components/NodesEditor/HtmlRender/FormatToolbar.vue.d.ts +19 -0
- package/es/src/components/NodesEditor/HtmlRender/index.vue.d.ts +9 -0
- package/es/src/components/NodesEditor/NodesUIProvider.vue.d.ts +9 -0
- package/es/src/components/NodesEditor/contextUI.d.ts +2 -0
- package/es/src/components/NodesEditor/hooks/useFormatToolbar.d.ts +32 -0
- package/es/src/components/NodesEditor/index.vue.d.ts +9 -0
- package/es/src/components/ProEditor/plugins/firstlineindent.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/src/components/NodesEditor/HtmlRender/FormatToolbar.vue.d.ts +19 -0
- package/lib/src/components/NodesEditor/HtmlRender/index.vue.d.ts +9 -0
- package/lib/src/components/NodesEditor/NodesUIProvider.vue.d.ts +9 -0
- package/lib/src/components/NodesEditor/contextUI.d.ts +2 -0
- package/lib/src/components/NodesEditor/hooks/useFormatToolbar.d.ts +32 -0
- package/lib/src/components/NodesEditor/index.vue.d.ts +9 -0
- package/lib/src/components/ProEditor/plugins/firstlineindent.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
containerRef: any;
|
|
3
|
+
bodyRef: any;
|
|
4
|
+
wrapperRef?: any;
|
|
5
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
containerRef: any;
|
|
7
|
+
bodyRef: any;
|
|
8
|
+
wrapperRef?: any;
|
|
9
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('vue').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -19,6 +19,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
19
19
|
type: StringConstructor;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
|
+
enableFormatToolbar: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
22
26
|
}>, {
|
|
23
27
|
renderHtml: () => void;
|
|
24
28
|
getInnerHTML: () => any;
|
|
@@ -47,10 +51,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
47
51
|
type: StringConstructor;
|
|
48
52
|
default: string;
|
|
49
53
|
};
|
|
54
|
+
enableFormatToolbar: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
50
58
|
}>> & Readonly<{
|
|
51
59
|
onOnUiReady?: ((...args: any[]) => any) | undefined;
|
|
52
60
|
}>, {
|
|
53
61
|
class: string;
|
|
62
|
+
enableFormatToolbar: boolean;
|
|
54
63
|
pagesize: string;
|
|
55
64
|
headerHtml: string;
|
|
56
65
|
footerHtml: string;
|
|
@@ -26,6 +26,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
26
26
|
type: BooleanConstructor;
|
|
27
27
|
default: boolean;
|
|
28
28
|
};
|
|
29
|
+
enableFormatToolbar: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
29
33
|
}>, {
|
|
30
34
|
setSelectedNodes: (values: any) => void;
|
|
31
35
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -56,6 +60,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
56
60
|
type: BooleanConstructor;
|
|
57
61
|
default: boolean;
|
|
58
62
|
};
|
|
63
|
+
enableFormatToolbar: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
59
67
|
}>> & Readonly<{
|
|
60
68
|
onOnSelectedNodes?: ((...args: any[]) => any) | undefined;
|
|
61
69
|
"onUpdate:selectedNodes"?: ((...args: any[]) => any) | undefined;
|
|
@@ -64,6 +72,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
64
72
|
selectable: boolean;
|
|
65
73
|
selectedNodes: unknown[];
|
|
66
74
|
editorId: string;
|
|
75
|
+
enableFormatToolbar: boolean;
|
|
67
76
|
htmlRenderRef: any;
|
|
68
77
|
nodesGroups: unknown[];
|
|
69
78
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -37,6 +37,8 @@ export type NodesUIContext = {
|
|
|
37
37
|
isFocused: Ref<boolean>;
|
|
38
38
|
/** 是否可选择 */
|
|
39
39
|
selectable?: Ref<boolean>;
|
|
40
|
+
/** 是否启用格式工具栏 */
|
|
41
|
+
enableFormatToolbar?: Ref<boolean>;
|
|
40
42
|
};
|
|
41
43
|
export declare const nodesUIKey: unique symbol;
|
|
42
44
|
export declare const useNodesUIContext: () => NodesUIContext;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface FormatToolbarState {
|
|
4
|
+
toolbarVisible: Ref<boolean>;
|
|
5
|
+
toolbarPosition: Ref<{
|
|
6
|
+
top: string;
|
|
7
|
+
left: string;
|
|
8
|
+
}>;
|
|
9
|
+
currentFontSize: Ref<string>;
|
|
10
|
+
currentTextAlign: Ref<string>;
|
|
11
|
+
currentLineHeight: Ref<string>;
|
|
12
|
+
currentLetterSpacing: Ref<string>;
|
|
13
|
+
applyFontSize: (size: string) => void;
|
|
14
|
+
applyTextAlign: (align: 'left' | 'center' | 'right') => void;
|
|
15
|
+
applyLineHeight: (value: string) => void;
|
|
16
|
+
applyLetterSpacing: (value: string) => void;
|
|
17
|
+
applyFontSizeCustom: (size: string) => void;
|
|
18
|
+
applyLineHeightCustom: (value: string) => void;
|
|
19
|
+
applyLetterSpacingCustom: (value: string) => void;
|
|
20
|
+
closeToolbar: () => void;
|
|
21
|
+
isUpdatingModelValue: boolean;
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 格式工具栏 hook
|
|
26
|
+
* 管理选区跟踪、工具栏定位、样式应用逻辑
|
|
27
|
+
*/
|
|
28
|
+
export declare function useFormatToolbar(containerRef: any, bodyRef: any, wrapperRef?: any): FormatToolbarState;
|
|
29
|
+
/**
|
|
30
|
+
* 返回一个空的对象,当 enableFormatToolbar 为 false 时使用
|
|
31
|
+
*/
|
|
32
|
+
export declare function getEmptyFormatToolbar(): FormatToolbarState;
|
|
@@ -88,6 +88,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
88
88
|
type: ArrayConstructor;
|
|
89
89
|
default: () => never[];
|
|
90
90
|
};
|
|
91
|
+
enableFormatToolbar: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
91
95
|
}>, {
|
|
92
96
|
formRef: {
|
|
93
97
|
validate: () => any;
|
|
@@ -187,6 +191,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
187
191
|
type: ArrayConstructor;
|
|
188
192
|
default: () => never[];
|
|
189
193
|
};
|
|
194
|
+
enableFormatToolbar: {
|
|
195
|
+
type: BooleanConstructor;
|
|
196
|
+
default: boolean;
|
|
197
|
+
};
|
|
190
198
|
}>> & Readonly<{
|
|
191
199
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
192
200
|
onOnSelectedNodes?: ((...args: any[]) => any) | undefined;
|
|
@@ -201,6 +209,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
201
209
|
formData: Record<string, any>;
|
|
202
210
|
renderType: RenderType;
|
|
203
211
|
disabledNodes: unknown[];
|
|
212
|
+
enableFormatToolbar: boolean;
|
|
204
213
|
inputTypes: unknown[];
|
|
205
214
|
nodesGroups: unknown[];
|
|
206
215
|
dynamicNodes: unknown[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyui/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.mjs",
|
|
6
6
|
"types": "./es/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vue-hooks-plus": "^2.2.1",
|
|
47
47
|
"xmldom": "^0.6.0",
|
|
48
48
|
"xpath": "^0.0.34",
|
|
49
|
-
"@zyui/
|
|
50
|
-
"@zyui/
|
|
49
|
+
"@zyui/hooks": "0.0.5",
|
|
50
|
+
"@zyui/utils": "0.0.9"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/lodash-es": "^4.17.12"
|