@tmagic/editor 1.3.5 → 1.3.7
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/LICENSE +5432 -0
- package/dist/style.css +88 -62
- package/dist/tmagic-editor.js +2448 -2016
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +2453 -2019
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +23 -23
- package/src/Editor.vue +15 -7
- package/src/components/CodeBlockEditor.vue +2 -2
- package/src/components/ContentMenu.vue +5 -5
- package/src/components/FloatingBox.vue +117 -0
- package/src/components/ScrollBar.vue +2 -2
- package/src/components/ScrollViewer.vue +2 -2
- package/src/components/SplitView.vue +2 -2
- package/src/components/Tree.vue +5 -0
- package/src/components/TreeNode.vue +10 -4
- package/src/editorProps.ts +20 -3
- package/src/fields/PageFragmentSelect.vue +55 -0
- package/src/hooks/use-filter.ts +55 -0
- package/src/hooks/use-getso.ts +2 -2
- package/src/hooks/use-node-status.ts +48 -0
- package/src/hooks/use-stage.ts +19 -1
- package/src/index.ts +3 -0
- package/src/initService.ts +43 -17
- package/src/layouts/AddPageBox.vue +16 -4
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +17 -3
- package/src/layouts/PropsPanel.vue +2 -2
- package/src/layouts/page-bar/AddButton.vue +48 -0
- package/src/layouts/page-bar/PageBar.vue +158 -0
- package/src/layouts/{workspace → page-bar}/PageBarScrollContainer.vue +61 -35
- package/src/layouts/page-bar/SwitchTypeButton.vue +45 -0
- package/src/layouts/sidebar/Sidebar.vue +9 -2
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +55 -65
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +2 -1
- package/src/layouts/sidebar/data-source/DataSourceList.vue +63 -59
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +1 -1
- package/src/layouts/sidebar/layer/LayerMenu.vue +39 -27
- package/src/layouts/sidebar/layer/LayerPanel.vue +31 -8
- package/src/layouts/sidebar/layer/use-click.ts +5 -3
- package/src/layouts/sidebar/layer/use-keybinding.ts +8 -8
- package/src/layouts/sidebar/layer/use-node-status.ts +10 -13
- package/src/layouts/workspace/Workspace.vue +6 -7
- package/src/layouts/workspace/viewer/NodeListMenu.vue +68 -129
- package/src/layouts/workspace/viewer/Stage.vue +14 -6
- package/src/layouts/workspace/viewer/ViewerMenu.vue +94 -86
- package/src/services/BaseService.ts +63 -26
- package/src/services/codeBlock.ts +7 -1
- package/src/services/dep.ts +12 -8
- package/src/services/editor.ts +131 -64
- package/src/services/history.ts +6 -2
- package/src/services/keybinding.ts +48 -13
- package/src/services/props.ts +70 -12
- package/src/services/storage.ts +23 -13
- package/src/services/ui.ts +4 -1
- package/src/theme/code-block.scss +0 -16
- package/src/theme/floating-box.scss +30 -0
- package/src/theme/layer-panel.scss +19 -0
- package/src/theme/page-bar.scss +18 -1
- package/src/theme/stage.scss +24 -0
- package/src/theme/theme.scss +1 -1
- package/src/theme/tree.scss +12 -1
- package/src/type.ts +28 -10
- package/src/utils/compose.ts +25 -6
- package/src/utils/content-menu.ts +6 -7
- package/src/utils/editor.ts +34 -18
- package/src/utils/operator.ts +5 -6
- package/types/components/CodeBlockEditor.vue.d.ts +6 -2
- package/types/components/CodeParams.vue.d.ts +3 -1
- package/types/components/ContentMenu.vue.d.ts +13 -5
- package/types/components/FloatingBox.vue.d.ts +78 -0
- package/types/components/Resizer.vue.d.ts +6 -1
- package/types/components/ScrollBar.vue.d.ts +3 -1
- package/types/components/ScrollViewer.vue.d.ts +3 -3
- package/types/components/SearchInput.vue.d.ts +3 -1
- package/types/components/SplitView.vue.d.ts +8 -4
- package/types/components/ToolButton.vue.d.ts +3 -3
- package/types/components/Tree.vue.d.ts +27 -8
- package/types/components/TreeNode.vue.d.ts +24 -7
- package/types/editorProps.d.ts +16 -1
- package/types/fields/Code.vue.d.ts +6 -2
- package/types/fields/CodeLink.vue.d.ts +5 -3
- package/types/fields/CodeSelect.vue.d.ts +3 -1
- package/types/fields/CodeSelectCol.vue.d.ts +3 -1
- package/types/fields/DataSourceFieldSelect.vue.d.ts +3 -1
- package/types/fields/DataSourceFields.vue.d.ts +5 -3
- package/types/fields/DataSourceInput.vue.d.ts +8 -4
- package/types/fields/DataSourceMethodSelect.vue.d.ts +3 -1
- package/types/fields/DataSourceMethods.vue.d.ts +5 -3
- package/types/fields/DataSourceMocks.vue.d.ts +5 -3
- package/types/fields/DataSourceSelect.vue.d.ts +5 -3
- package/types/fields/EventSelect.vue.d.ts +3 -1
- package/types/fields/KeyValue.vue.d.ts +2 -2
- package/types/fields/PageFragmentSelect.vue.d.ts +31 -0
- package/types/fields/UISelect.vue.d.ts +3 -1
- package/types/hooks/use-code-block-edit.d.ts +14 -5
- package/types/hooks/use-data-source-method.d.ts +14 -5
- package/types/hooks/use-filter.d.ts +7 -0
- package/types/hooks/use-node-status.d.ts +6 -0
- package/types/index.d.ts +1 -0
- package/types/layouts/AddPageBox.vue.d.ts +14 -1
- package/types/layouts/CodeEditor.vue.d.ts +4 -1
- package/types/layouts/Framework.vue.d.ts +14 -1
- package/types/layouts/PropsPanel.vue.d.ts +19 -13
- package/types/layouts/{workspace/viewer/NodeListMenuTitle.vue.d.ts → page-bar/AddButton.vue.d.ts} +3 -2
- package/types/layouts/page-bar/PageBar.vue.d.ts +28 -0
- package/types/layouts/page-bar/PageBarScrollContainer.vue.d.ts +24 -0
- package/types/layouts/page-bar/SwitchTypeButton.vue.d.ts +20 -0
- package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +1 -1
- package/types/layouts/sidebar/Sidebar.vue.d.ts +7 -5
- package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +9 -3
- package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +1 -1
- package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +3 -1
- package/types/layouts/sidebar/data-source/DataSourceList.vue.d.ts +8 -2
- package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +1 -1
- package/types/layouts/sidebar/layer/LayerMenu.vue.d.ts +26 -3
- package/types/layouts/sidebar/layer/LayerPanel.vue.d.ts +3 -1
- package/types/layouts/sidebar/layer/use-click.d.ts +37 -6
- package/types/layouts/sidebar/layer/use-keybinding.d.ts +1 -1
- package/types/layouts/sidebar/layer/use-node-status.d.ts +3 -4
- package/types/layouts/workspace/Workspace.vue.d.ts +3 -1
- package/types/layouts/workspace/viewer/NodeListMenu.vue.d.ts +1 -14
- package/types/layouts/workspace/viewer/Stage.vue.d.ts +2 -0
- package/types/layouts/workspace/viewer/ViewerMenu.vue.d.ts +9 -1
- package/types/services/BaseService.d.ts +4 -1
- package/types/services/dataSource.d.ts +1 -0
- package/types/services/dep.d.ts +6 -5
- package/types/services/editor.d.ts +12 -5
- package/types/services/history.d.ts +3 -2
- package/types/services/keybinding.d.ts +21 -1
- package/types/services/props.d.ts +25 -1
- package/types/services/storage.d.ts +7 -7
- package/types/type.d.ts +32 -17
- package/types/utils/compose.d.ts +1 -1
- package/types/utils/editor.d.ts +14 -8
- package/src/layouts/sidebar/layer/use-filter.ts +0 -59
- package/src/layouts/workspace/PageBar.vue +0 -87
- package/src/layouts/workspace/viewer/NodeListMenuTitle.vue +0 -68
- package/src/theme/dep-list.scss +0 -59
- package/types/layouts/sidebar/layer/use-filter.d.ts +0 -7
- package/types/layouts/workspace/PageBar.vue.d.ts +0 -15
- package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +0 -9
|
@@ -5,14 +5,26 @@ export declare const useClick: (services: Services | undefined, isCtrlKeyDown: R
|
|
|
5
5
|
menu: Ref<({
|
|
6
6
|
$: import("vue").ComponentInternalInstance;
|
|
7
7
|
$data: {};
|
|
8
|
-
$props: Partial<{
|
|
8
|
+
$props: Partial<{
|
|
9
|
+
layerContentMenu: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
10
|
+
customContentMenu: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
11
|
+
}> & Omit<{
|
|
9
12
|
readonly layerContentMenu: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
13
|
+
readonly customContentMenu: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
14
|
+
"onCollapse-all"?: (() => any) | undefined;
|
|
10
15
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
11
16
|
layerContentMenu: {
|
|
12
17
|
type: import("vue").PropType<(import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
13
18
|
required: true;
|
|
19
|
+
default: () => never[];
|
|
14
20
|
};
|
|
15
|
-
|
|
21
|
+
customContentMenu: {
|
|
22
|
+
type: import("vue").PropType<(menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
23
|
+
default: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
24
|
+
};
|
|
25
|
+
}>> & {
|
|
26
|
+
"onCollapse-all"?: (() => any) | undefined;
|
|
27
|
+
}, "layerContentMenu" | "customContentMenu">;
|
|
16
28
|
$attrs: {
|
|
17
29
|
[x: string]: unknown;
|
|
18
30
|
};
|
|
@@ -24,16 +36,28 @@ export declare const useClick: (services: Services | undefined, isCtrlKeyDown: R
|
|
|
24
36
|
}>;
|
|
25
37
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
26
38
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
27
|
-
$emit: (event:
|
|
39
|
+
$emit: (event: "collapse-all") => void;
|
|
28
40
|
$el: any;
|
|
29
41
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
30
42
|
layerContentMenu: {
|
|
31
43
|
type: import("vue").PropType<(import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
32
44
|
required: true;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
customContentMenu: {
|
|
48
|
+
type: import("vue").PropType<(menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
49
|
+
default: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
33
50
|
};
|
|
34
|
-
}
|
|
51
|
+
}>> & {
|
|
52
|
+
"onCollapse-all"?: (() => any) | undefined;
|
|
53
|
+
}, {
|
|
35
54
|
show: (e: MouseEvent) => void;
|
|
36
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
55
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
"collapse-all": () => void;
|
|
57
|
+
}, string, {
|
|
58
|
+
layerContentMenu: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
59
|
+
customContentMenu: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
60
|
+
}, {}, string, {}> & {
|
|
37
61
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
38
62
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
39
63
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -57,8 +81,15 @@ export declare const useClick: (services: Services | undefined, isCtrlKeyDown: R
|
|
|
57
81
|
layerContentMenu: {
|
|
58
82
|
type: import("vue").PropType<(import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
59
83
|
required: true;
|
|
84
|
+
default: () => never[];
|
|
85
|
+
};
|
|
86
|
+
customContentMenu: {
|
|
87
|
+
type: import("vue").PropType<(menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[], type: string) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]>;
|
|
88
|
+
default: (menus: (import("../../../type").MenuButton | import("../../../type").MenuComponent)[]) => (import("../../../type").MenuButton | import("../../../type").MenuComponent)[];
|
|
60
89
|
};
|
|
61
|
-
}>> &
|
|
90
|
+
}>> & {
|
|
91
|
+
"onCollapse-all"?: (() => any) | undefined;
|
|
92
|
+
} & import("vue").ShallowUnwrapRef<{
|
|
62
93
|
show: (e: MouseEvent) => void;
|
|
63
94
|
}> & {} & import("vue").ComponentCustomProperties & {}) | undefined>;
|
|
64
95
|
nodeClickHandler: (event: MouseEvent, data: TreeNodeData) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import Tree from '../../../components/Tree.vue';
|
|
3
3
|
import type { Services } from '../../../type';
|
|
4
|
-
export declare const useKeybinding: (services: Services | undefined,
|
|
4
|
+
export declare const useKeybinding: (services: Services | undefined, container: Ref<InstanceType<typeof Tree> | undefined>) => {
|
|
5
5
|
isCtrlKeyDown: Ref<boolean>;
|
|
6
6
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Id, MPage } from '@tmagic/schema';
|
|
1
|
+
import type { Id } from '@tmagic/schema';
|
|
3
2
|
import { LayerNodeStatus, Services } from '../../../type';
|
|
4
|
-
export declare const useNodeStatus: (services: Services | undefined
|
|
3
|
+
export declare const useNodeStatus: (services: Services | undefined) => {
|
|
5
4
|
nodeStatusMaps: import("vue").Ref<Map<Id, Map<Id, LayerNodeStatus>>>;
|
|
6
|
-
nodeStatusMap: ComputedRef<Map<Id, LayerNodeStatus> | undefined>;
|
|
5
|
+
nodeStatusMap: import("vue").ComputedRef<Map<Id, LayerNodeStatus> | undefined>;
|
|
7
6
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { MenuButton, MenuComponent, WorkspaceSlots } from '../../type';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
4
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
4
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
6
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
6
|
-
|
|
7
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
8
|
+
}>>>, {}, {}>, Readonly<WorkspaceSlots>>;
|
|
7
9
|
export default _default;
|
|
8
10
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
11
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
isMultiSelect?: boolean | undefined;
|
|
3
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
isMultiSelect?: boolean | undefined;
|
|
5
|
-
}>>>, {}, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
6
2
|
export default _default;
|
|
7
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
-
} : {
|
|
12
|
-
type: import('vue').PropType<T[K]>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type MenuButton, type MenuComponent } from '../../../type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
4
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
4
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
6
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
7
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
6
8
|
}>>>, {}, {}>;
|
|
7
9
|
export default _default;
|
|
8
10
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,17 +2,25 @@ import { MenuButton, MenuComponent } from '../../../type';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
isMultiSelect?: boolean | undefined;
|
|
4
4
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
5
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
5
6
|
}>, {
|
|
6
7
|
isMultiSelect: boolean;
|
|
8
|
+
stageContentMenu: () => never[];
|
|
9
|
+
customContentMenu: (menus: (MenuButton | MenuComponent)[]) => (MenuButton | MenuComponent)[];
|
|
7
10
|
}>, {
|
|
8
|
-
show: (e: MouseEvent) =>
|
|
11
|
+
show: (e: MouseEvent) => void;
|
|
9
12
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
13
|
isMultiSelect?: boolean | undefined;
|
|
11
14
|
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
15
|
+
customContentMenu?: ((menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[]) | undefined;
|
|
12
16
|
}>, {
|
|
13
17
|
isMultiSelect: boolean;
|
|
18
|
+
stageContentMenu: () => never[];
|
|
19
|
+
customContentMenu: (menus: (MenuButton | MenuComponent)[]) => (MenuButton | MenuComponent)[];
|
|
14
20
|
}>>>, {
|
|
21
|
+
customContentMenu: (menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[];
|
|
15
22
|
isMultiSelect: boolean;
|
|
23
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
16
24
|
}, {}>;
|
|
17
25
|
export default _default;
|
|
18
26
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -52,7 +52,10 @@ export default class extends EventEmitter {
|
|
|
52
52
|
private middleware;
|
|
53
53
|
private taskList;
|
|
54
54
|
private doingTask;
|
|
55
|
-
constructor(methods?:
|
|
55
|
+
constructor(methods?: {
|
|
56
|
+
name: string;
|
|
57
|
+
isAsync: boolean;
|
|
58
|
+
}[], serialMethods?: string[]);
|
|
56
59
|
use(options: Record<string, Function>): void;
|
|
57
60
|
usePlugin(options: Record<string, Function>): void;
|
|
58
61
|
removeAllPlugins(): void;
|
|
@@ -33,6 +33,7 @@ declare class DataSource extends BaseService {
|
|
|
33
33
|
fields: import("@tmagic/schema").DataSchema[];
|
|
34
34
|
methods: import("@tmagic/schema").CodeBlockContent[];
|
|
35
35
|
mocks?: import("@tmagic/schema").MockSchema[] | undefined;
|
|
36
|
+
disabledInitInJsEngine?: string[] | undefined;
|
|
36
37
|
};
|
|
37
38
|
update(config: DataSourceSchema): DataSourceSchema;
|
|
38
39
|
remove(id: string): void;
|
package/types/services/dep.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Target } from '@tmagic/dep';
|
|
1
|
+
import { DepTargetType, type Target } from '@tmagic/dep';
|
|
2
2
|
import type { Id, MNode } from '@tmagic/schema';
|
|
3
3
|
import BaseService from './BaseService';
|
|
4
4
|
declare class Dep extends BaseService {
|
|
@@ -8,13 +8,14 @@ declare class Dep extends BaseService {
|
|
|
8
8
|
[targetId: string]: Target;
|
|
9
9
|
[targetId: number]: Target;
|
|
10
10
|
};
|
|
11
|
-
getTarget(id: Id): Target
|
|
11
|
+
getTarget(id: Id, type?: string): Target;
|
|
12
12
|
addTarget(target: Target): void;
|
|
13
|
-
removeTarget(id: Id): void;
|
|
13
|
+
removeTarget(id: Id, type?: string): void;
|
|
14
14
|
clearTargets(): void;
|
|
15
|
-
collect(nodes: MNode[], deep?: boolean): void;
|
|
15
|
+
collect(nodes: MNode[], deep?: boolean, type?: DepTargetType): void;
|
|
16
16
|
clear(nodes?: MNode[]): void;
|
|
17
|
-
hasTarget(id: Id): boolean;
|
|
17
|
+
hasTarget(id: Id, type?: string): boolean;
|
|
18
|
+
hasSpecifiedTypeTarget(type?: string): boolean;
|
|
18
19
|
}
|
|
19
20
|
export type DepService = Dep;
|
|
20
21
|
declare const _default: Dep;
|
|
@@ -8,13 +8,13 @@ declare class Editor extends BaseService {
|
|
|
8
8
|
constructor();
|
|
9
9
|
/**
|
|
10
10
|
* 设置当前指点节点配置
|
|
11
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength'
|
|
11
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
12
12
|
* @param value MNode
|
|
13
13
|
*/
|
|
14
14
|
set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T): void;
|
|
15
15
|
/**
|
|
16
16
|
* 获取当前指点节点配置
|
|
17
|
-
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength'
|
|
17
|
+
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
18
18
|
* @returns MNode
|
|
19
19
|
*/
|
|
20
20
|
get<K extends StoreStateKey>(name: K): StoreState[K];
|
|
@@ -63,6 +63,7 @@ declare class Editor extends BaseService {
|
|
|
63
63
|
* @returns 加入多选的节点配置
|
|
64
64
|
*/
|
|
65
65
|
multiSelect(ids: Id[]): void;
|
|
66
|
+
selectRoot(): void;
|
|
66
67
|
doAdd(node: MNode, parent: MContainer): Promise<MNode>;
|
|
67
68
|
/**
|
|
68
69
|
* 向指点容器添加组件节点
|
|
@@ -92,11 +93,17 @@ declare class Editor extends BaseService {
|
|
|
92
93
|
*/
|
|
93
94
|
sort(id1: Id, id2: Id): Promise<void>;
|
|
94
95
|
/**
|
|
95
|
-
*
|
|
96
|
+
* 将组件节点配置存储到localStorage中
|
|
96
97
|
* @param config 组件节点配置
|
|
97
|
-
* @returns
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
copy(config: MNode | MNode[]): void;
|
|
101
|
+
/**
|
|
102
|
+
* 复制时会带上组件关联的依赖
|
|
103
|
+
* @param config 组件节点配置
|
|
104
|
+
* @returns
|
|
98
105
|
*/
|
|
99
|
-
|
|
106
|
+
copyWithRelated(config: MNode | MNode[]): void;
|
|
100
107
|
/**
|
|
101
108
|
* 从localStorage中获取节点,然后添加到当前容器中
|
|
102
109
|
* @param position 粘贴的坐标
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MPage } from '@tmagic/schema';
|
|
1
|
+
import type { MPage, MPageFragment } from '@tmagic/schema';
|
|
2
2
|
import type { StepValue } from '../type';
|
|
3
3
|
import { UndoRedo } from '../utils/undo-redo';
|
|
4
4
|
import BaseService from './BaseService';
|
|
@@ -11,7 +11,8 @@ declare class History extends BaseService {
|
|
|
11
11
|
};
|
|
12
12
|
constructor();
|
|
13
13
|
reset(): void;
|
|
14
|
-
|
|
14
|
+
resetPage(): void;
|
|
15
|
+
changePage(page: MPage | MPageFragment): void;
|
|
15
16
|
resetState(): void;
|
|
16
17
|
push(state: StepValue): StepValue | null;
|
|
17
18
|
undo(): StepValue | null;
|
|
@@ -5,11 +5,31 @@ declare class Keybinding extends BaseService {
|
|
|
5
5
|
private controllers;
|
|
6
6
|
private bindingList;
|
|
7
7
|
private commands;
|
|
8
|
+
registerCommand(command: string, handler: (e: KeyboardEvent) => void | Promise<void>): void;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
*/
|
|
8
12
|
registeCommand(command: string, handler: (e: KeyboardEvent) => void | Promise<void>): void;
|
|
13
|
+
unregisterCommand(command: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
9
17
|
unregisteCommand(command: string): void;
|
|
18
|
+
registerEl(name: string, el?: HTMLElement): void;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
*/
|
|
10
22
|
registeEl(name: string, el?: HTMLElement): void;
|
|
23
|
+
unregisterEl(name: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
11
27
|
unregisteEl(name: string): void;
|
|
12
|
-
|
|
28
|
+
register(maps: KeyBindingItem[]): void;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
32
|
+
registe(map: KeyBindingItem[]): void;
|
|
13
33
|
reset(): void;
|
|
14
34
|
destroy(): void;
|
|
15
35
|
private bind;
|
|
@@ -45,9 +45,11 @@ declare class Props extends BaseService {
|
|
|
45
45
|
createId(type: string | number): Promise<string>;
|
|
46
46
|
/**
|
|
47
47
|
* 将组件与组件的子元素配置中的id都设置成一个新的ID
|
|
48
|
+
* 如果没有相同ID并且force为false则保持不变
|
|
48
49
|
* @param {Object} config 组件配置
|
|
50
|
+
* @param {Boolean} force 是否强制设置新的ID
|
|
49
51
|
*/
|
|
50
|
-
setNewItemId(config: MNode): Promise<MNode>;
|
|
52
|
+
setNewItemId(config: MNode, force?: boolean): Promise<MNode>;
|
|
51
53
|
/**
|
|
52
54
|
* 获取默认属性配置
|
|
53
55
|
* @param type 组件类型
|
|
@@ -67,7 +69,29 @@ declare class Props extends BaseService {
|
|
|
67
69
|
items?: undefined;
|
|
68
70
|
}>;
|
|
69
71
|
resetState(): void;
|
|
72
|
+
/**
|
|
73
|
+
* 替换关联ID
|
|
74
|
+
* @param originConfigs 原组件配置
|
|
75
|
+
* @param targetConfigs 待替换的组件配置
|
|
76
|
+
*/
|
|
77
|
+
replaceRelateId(originConfigs: MNode[], targetConfigs: MNode[]): void;
|
|
78
|
+
/**
|
|
79
|
+
* 清除setNewItemId前后映射关系
|
|
80
|
+
*/
|
|
81
|
+
clearRelateId(): void;
|
|
70
82
|
destroy(): void;
|
|
83
|
+
/**
|
|
84
|
+
* 获取setNewItemId前后映射关系
|
|
85
|
+
* @param oldId 原组件ID
|
|
86
|
+
* @returns 新旧ID映射
|
|
87
|
+
*/
|
|
88
|
+
private getRelateIdMap;
|
|
89
|
+
/**
|
|
90
|
+
* 记录setNewItemId前后映射关系
|
|
91
|
+
* @param oldId 原组件ID
|
|
92
|
+
* @param newId 分配的新ID
|
|
93
|
+
*/
|
|
94
|
+
private setRelateId;
|
|
71
95
|
}
|
|
72
96
|
export type PropsService = Props;
|
|
73
97
|
declare const _default: Props;
|
|
@@ -27,28 +27,28 @@ export declare class WebStorage extends BaseService {
|
|
|
27
27
|
* },
|
|
28
28
|
* });
|
|
29
29
|
*/
|
|
30
|
-
getStorage():
|
|
31
|
-
getNamespace():
|
|
30
|
+
getStorage(): Storage;
|
|
31
|
+
getNamespace(): string;
|
|
32
32
|
/**
|
|
33
33
|
* 清理,支持storageService.usePlugin
|
|
34
34
|
*/
|
|
35
|
-
clear():
|
|
35
|
+
clear(): void;
|
|
36
36
|
/**
|
|
37
37
|
* 获取存储项,支持storageService.usePlugin
|
|
38
38
|
*/
|
|
39
|
-
getItem(key: string, options?: Options):
|
|
39
|
+
getItem(key: string, options?: Options): any;
|
|
40
40
|
/**
|
|
41
41
|
* 获取指定索引位置的key
|
|
42
42
|
*/
|
|
43
|
-
key(index: number):
|
|
43
|
+
key(index: number): string | null;
|
|
44
44
|
/**
|
|
45
45
|
* 移除存储项,支持storageService.usePlugin
|
|
46
46
|
*/
|
|
47
|
-
removeItem(key: string, options?: Options):
|
|
47
|
+
removeItem(key: string, options?: Options): void;
|
|
48
48
|
/**
|
|
49
49
|
* 设置存储项,支持storageService.usePlugin
|
|
50
50
|
*/
|
|
51
|
-
setItem(key: string, value: any, options?: Options):
|
|
51
|
+
setItem(key: string, value: any, options?: Options): void;
|
|
52
52
|
destroy(): void;
|
|
53
53
|
private getValueAndProtocol;
|
|
54
54
|
}
|
package/types/type.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
import type { ColumnConfig, FilterFunction, FormConfig, FormItem } from '@tmagic/form';
|
|
3
|
-
import type { CodeBlockContent, CodeBlockDSL, Id, MApp, MContainer, MNode, MPage } from '@tmagic/schema';
|
|
3
|
+
import type { CodeBlockContent, CodeBlockDSL, Id, MApp, MContainer, MNode, MPage, MPageFragment } from '@tmagic/schema';
|
|
4
4
|
import type StageCore from '@tmagic/stage';
|
|
5
|
-
import type { ContainerHighlightType, CustomizeMoveableOptionsCallbackConfig, MoveableOptions, UpdateDragEl } from '@tmagic/stage';
|
|
5
|
+
import type { ContainerHighlightType, CustomizeMoveableOptionsCallbackConfig, GuidesOptions, MoveableOptions, RenderType, UpdateDragEl } from '@tmagic/stage';
|
|
6
6
|
import type { CodeBlockService } from './services/codeBlock';
|
|
7
7
|
import type { ComponentListService } from './services/componentList';
|
|
8
8
|
import type { DataSourceService } from './services/dataSource';
|
|
@@ -26,17 +26,17 @@ export interface FrameworkSlots {
|
|
|
26
26
|
workspace(props: {}): any;
|
|
27
27
|
'props-panel'(props: {}): any;
|
|
28
28
|
'footer'(props: {}): any;
|
|
29
|
-
}
|
|
30
|
-
export interface WorkspaceSlots {
|
|
31
|
-
stage(props: {}): any;
|
|
32
|
-
'workspace-content'(props: {}): any;
|
|
33
29
|
'page-bar-title'(props: {
|
|
34
|
-
page: MPage;
|
|
30
|
+
page: MPage | MPageFragment;
|
|
35
31
|
}): any;
|
|
36
32
|
'page-bar-popover'(props: {
|
|
37
|
-
page: MPage;
|
|
33
|
+
page: MPage | MPageFragment;
|
|
38
34
|
}): any;
|
|
39
35
|
}
|
|
36
|
+
export interface WorkspaceSlots {
|
|
37
|
+
stage(props: {}): any;
|
|
38
|
+
'workspace-content'(props: {}): any;
|
|
39
|
+
}
|
|
40
40
|
export interface ComponentListPanelSlots {
|
|
41
41
|
'component-list-panel-header'(props: {}): any;
|
|
42
42
|
'component-list-item'(props: {
|
|
@@ -50,7 +50,7 @@ export interface CodeBlockListPanelSlots extends CodeBlockListSlots {
|
|
|
50
50
|
export interface CodeBlockListSlots {
|
|
51
51
|
'code-block-panel-tool'(props: {
|
|
52
52
|
id: Id;
|
|
53
|
-
data:
|
|
53
|
+
data: any;
|
|
54
54
|
}): any;
|
|
55
55
|
}
|
|
56
56
|
export interface DataSourceListSlots {
|
|
@@ -62,16 +62,16 @@ export interface LayerNodeSlots {
|
|
|
62
62
|
'layer-node-content'(props: {
|
|
63
63
|
data: MNode;
|
|
64
64
|
}): any;
|
|
65
|
-
}
|
|
66
|
-
export interface LayerPanelSlots extends LayerNodeSlots {
|
|
67
|
-
'layer-panel-header'(props: {}): any;
|
|
68
65
|
'layer-node-tool'(props: {
|
|
69
66
|
data: MNode;
|
|
70
67
|
}): any;
|
|
71
|
-
'layer-node-
|
|
68
|
+
'layer-node-label'(props: {
|
|
72
69
|
data: MNode;
|
|
73
70
|
}): any;
|
|
74
71
|
}
|
|
72
|
+
export interface LayerPanelSlots extends LayerNodeSlots {
|
|
73
|
+
'layer-panel-header'(props: {}): any;
|
|
74
|
+
}
|
|
75
75
|
export interface PropsPanelSlots {
|
|
76
76
|
'props-panel-header'(props: {}): any;
|
|
77
77
|
}
|
|
@@ -107,22 +107,29 @@ export interface StageOptions {
|
|
|
107
107
|
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
108
108
|
isContainer: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
109
109
|
updateDragEl: UpdateDragEl;
|
|
110
|
+
renderType: RenderType;
|
|
111
|
+
guidesOptions: Partial<GuidesOptions>;
|
|
112
|
+
disabledMultiSelect?: boolean;
|
|
110
113
|
}
|
|
111
114
|
export interface StoreState {
|
|
112
115
|
root: MApp | null;
|
|
113
|
-
page: MPage | null;
|
|
116
|
+
page: MPage | MPageFragment | null;
|
|
114
117
|
parent: MContainer | null;
|
|
115
118
|
node: MNode | null;
|
|
116
119
|
highlightNode: MNode | null;
|
|
117
120
|
nodes: MNode[];
|
|
118
121
|
stage: StageCore | null;
|
|
122
|
+
stageLoading: boolean;
|
|
119
123
|
modifiedNodeIds: Map<Id, Id>;
|
|
120
124
|
pageLength: number;
|
|
125
|
+
pageFragmentLength: number;
|
|
126
|
+
disabledMultiSelect: boolean;
|
|
121
127
|
}
|
|
122
128
|
export type StoreStateKey = keyof StoreState;
|
|
123
129
|
export interface PropsState {
|
|
124
130
|
propsConfigMap: Record<string, FormConfig>;
|
|
125
131
|
propsValueMap: Record<string, Partial<MNode>>;
|
|
132
|
+
relateIdMap: Record<Id, Id>;
|
|
126
133
|
}
|
|
127
134
|
export interface ComponentGroupState {
|
|
128
135
|
list: ComponentGroup[];
|
|
@@ -183,7 +190,7 @@ export interface UiState {
|
|
|
183
190
|
export interface EditorNodeInfo {
|
|
184
191
|
node: MNode | null;
|
|
185
192
|
parent: MContainer | null;
|
|
186
|
-
page: MPage | null;
|
|
193
|
+
page: MPage | MPageFragment | null;
|
|
187
194
|
}
|
|
188
195
|
export interface AddMNode {
|
|
189
196
|
type: string;
|
|
@@ -405,7 +412,7 @@ export interface CodeParamStatement {
|
|
|
405
412
|
[key: string]: any;
|
|
406
413
|
}
|
|
407
414
|
export interface StepValue {
|
|
408
|
-
data: MPage;
|
|
415
|
+
data: MPage | MPageFragment;
|
|
409
416
|
modifiedNodeIds: Map<Id, Id>;
|
|
410
417
|
nodeId: Id;
|
|
411
418
|
}
|
|
@@ -483,7 +490,7 @@ export interface KeyBindingCacheItem {
|
|
|
483
490
|
command: KeyBindingCommand | string;
|
|
484
491
|
keybinding?: string | string[];
|
|
485
492
|
eventType: 'keyup' | 'keydown';
|
|
486
|
-
|
|
493
|
+
bound: boolean;
|
|
487
494
|
}
|
|
488
495
|
export interface CodeSelectColConfig {
|
|
489
496
|
type: 'code-select-col';
|
|
@@ -493,6 +500,14 @@ export interface CodeSelectColConfig {
|
|
|
493
500
|
disabled?: boolean | FilterFunction;
|
|
494
501
|
display?: boolean | FilterFunction;
|
|
495
502
|
}
|
|
503
|
+
export interface PageFragmentSelectConfig {
|
|
504
|
+
type: 'page-fragment-select';
|
|
505
|
+
name: string;
|
|
506
|
+
text: string;
|
|
507
|
+
labelWidth?: number | string;
|
|
508
|
+
disabled?: boolean | FilterFunction;
|
|
509
|
+
display?: boolean | FilterFunction;
|
|
510
|
+
}
|
|
496
511
|
export interface DataSourceMethodSelectConfig {
|
|
497
512
|
type: 'data-source-method-select';
|
|
498
513
|
name: string;
|
package/types/utils/compose.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @param {Array} middleware
|
|
3
3
|
* @return {Function}
|
|
4
4
|
*/
|
|
5
|
-
export declare const compose: (middleware: Function[]) => (args: any[], next?: Function) => Promise<void>;
|
|
5
|
+
export declare const compose: (middleware: Function[], isAsync: boolean) => (args: any[], next?: Function) => void | Promise<void>;
|
package/types/utils/editor.d.ts
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import type { Id, MApp, MContainer, MNode, MPage } from '@tmagic/schema';
|
|
1
|
+
import type { Id, MApp, MContainer, MNode, MPage, MPageFragment } from '@tmagic/schema';
|
|
2
|
+
import { NodeType } from '@tmagic/schema';
|
|
2
3
|
import type StageCore from '@tmagic/stage';
|
|
3
4
|
import { Layout } from '../type';
|
|
4
5
|
export declare const COPY_STORAGE_KEY = "$MagicEditorCopyData";
|
|
5
6
|
/**
|
|
6
7
|
* 获取所有页面配置
|
|
7
|
-
* @param
|
|
8
|
+
* @param root DSL跟节点
|
|
8
9
|
* @returns 所有页面配置
|
|
9
10
|
*/
|
|
10
|
-
export declare const getPageList: (
|
|
11
|
+
export declare const getPageList: (root?: MApp | null) => MPage[];
|
|
12
|
+
export declare const getPageFragmentList: (root?: MApp | null) => MPageFragment[];
|
|
11
13
|
/**
|
|
12
14
|
* 获取所有页面名称
|
|
13
15
|
* @param pages 所有页面配置
|
|
14
16
|
* @returns 所有页面名称
|
|
15
17
|
*/
|
|
16
|
-
export declare const getPageNameList: (pages: MPage[]) => string[];
|
|
18
|
+
export declare const getPageNameList: (pages: (MPage | MPageFragment)[]) => string[];
|
|
17
19
|
/**
|
|
18
20
|
* 新增页面时,生成页面名称
|
|
19
21
|
* @param {Object} pageNameList 所有页面名称
|
|
20
22
|
* @returns {string}
|
|
21
23
|
*/
|
|
22
|
-
export declare const generatePageName: (pageNameList: string[]) => string;
|
|
24
|
+
export declare const generatePageName: (pageNameList: string[], type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
23
25
|
/**
|
|
24
26
|
* 新增页面时,生成页面名称
|
|
25
27
|
* @param {Object} app 所有页面配置
|
|
26
28
|
* @returns {string}
|
|
27
29
|
*/
|
|
28
|
-
export declare const generatePageNameByApp: (app: MApp) => string;
|
|
30
|
+
export declare const generatePageNameByApp: (app: MApp, type: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => string;
|
|
29
31
|
/**
|
|
30
32
|
* @param {Object} node
|
|
31
33
|
* @returns {boolean}
|
|
@@ -34,7 +36,7 @@ export declare const isFixed: (node: MNode) => boolean;
|
|
|
34
36
|
export declare const getNodeIndex: (id: Id, parent: MContainer | MApp) => number;
|
|
35
37
|
export declare const getRelativeStyle: (style?: Record<string, any>) => Record<string, any>;
|
|
36
38
|
export declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
|
|
37
|
-
export declare const
|
|
39
|
+
export declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
|
|
38
40
|
export declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
|
|
39
41
|
export declare const change2Fixed: (node: MNode, root: MApp) => {
|
|
40
42
|
left: number;
|
|
@@ -47,4 +49,8 @@ export declare const fixNodePosition: (config: MNode, parent: MContainer, stage:
|
|
|
47
49
|
[key: string]: any;
|
|
48
50
|
} | undefined;
|
|
49
51
|
export declare const serializeConfig: (config: any) => string;
|
|
50
|
-
export
|
|
52
|
+
export interface NodeItem {
|
|
53
|
+
items?: NodeItem[];
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
export declare const traverseNode: <T extends NodeItem = NodeItem>(node: T, cb: (node: T, parents: T[]) => void, parents?: T[]) => void;
|