@sepveneto/dnde 0.7.4 → 0.8.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.
- package/dist/{lib/App.vue.d.ts → App.vue.d.ts} +21 -0
- package/dist/{lib/Editor.vue.d.ts → Editor.vue.d.ts} +29 -2
- package/dist/agent-Dkke4idy.js +647 -0
- package/dist/agents/context.d.ts +14 -0
- package/dist/{lib/components → components}/NodePlugin.vue.d.ts +8 -2
- package/dist/composables/dragCore.d.ts +69 -0
- package/dist/composables/useNodeListDrag.d.ts +15 -0
- package/dist/editor.js +4 -69498
- package/dist/layout/treePanel.vue.d.ts +2 -0
- package/dist/main-CGf8hRhv.js +123122 -0
- package/dist/main.d.ts +19 -0
- package/dist/{lib/props.d.ts → props.d.ts} +9 -0
- package/dist/{lib/store → store}/editor.d.ts +8 -2
- package/dist/{lib/utils.d.ts → utils.d.ts} +9 -0
- package/package.json +6 -5
- package/dist/lib/main.d.ts +0 -5
- /package/dist/{lib/assets → assets}/container.vue.d.ts +0 -0
- /package/dist/{lib/assets/puzzle.vue.d.ts → assets/leftArrow.vue.d.ts} +0 -0
- /package/dist/{lib/assets/widget.vue.d.ts → assets/puzzle.vue.d.ts} +0 -0
- /package/dist/{lib/layout/treePanel.vue.d.ts → assets/widget.vue.d.ts} +0 -0
- /package/dist/{lib/components → components}/ColorPicker.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/ConfigForm.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/ConfigItem.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/ConfigRender.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/NodeContainer.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/NodeOperate.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/NodeWrap.vue.d.ts +0 -0
- /package/dist/{lib/components → components}/StyleNumber.vue.d.ts +0 -0
- /package/dist/{lib/layout → layout}/configPanel.vue.d.ts +0 -0
- /package/dist/{lib/layout → layout}/treePanel.item.vue.d.ts +0 -0
- /package/dist/{lib/layout → layout}/widgetsMenu.vue.d.ts +0 -0
- /package/dist/{lib/store → store}/app.d.ts +0 -0
- /package/dist/{lib/store → store}/index.d.ts +0 -0
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Main from './Editor.vue';
|
|
2
|
+
import { injectPopperStyles } from './utils.js';
|
|
3
|
+
export type EditorInstance = InstanceType<typeof Main>;
|
|
4
|
+
export { injectPopperStyles };
|
|
5
|
+
export interface RegisterOptions {
|
|
6
|
+
/**
|
|
7
|
+
* 组件视图的远程地址
|
|
8
|
+
*/
|
|
9
|
+
remoteUrl: string;
|
|
10
|
+
/**
|
|
11
|
+
* 是否把 element-plus 主题再挂一份到宿主页面的 `document.head`(默认开启)。
|
|
12
|
+
*
|
|
13
|
+
* 弹层(`ElDialog` / `ElSelect` 下拉 / `ElTooltip` 等)会 teleport 到 `document.body`,
|
|
14
|
+
* 不在 shadow DOM 内,拿不到编辑器内部的样式,需要这份 light DOM 的样式兜底。
|
|
15
|
+
* 关闭后需要宿主自行保证这些弹层的样式。
|
|
16
|
+
*/
|
|
17
|
+
injectGlobalStyle?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function register(options: RegisterOptions): Promise<boolean>;
|
|
@@ -13,4 +13,13 @@ export declare const editorProps: {
|
|
|
13
13
|
readonly type: PropType<Record<string, any>>;
|
|
14
14
|
readonly default: () => {};
|
|
15
15
|
};
|
|
16
|
+
readonly agent: BooleanConstructor;
|
|
17
|
+
readonly capabilities: {
|
|
18
|
+
readonly type: PropType<any[]>;
|
|
19
|
+
readonly default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
readonly workflows: {
|
|
22
|
+
readonly type: PropType<any[]>;
|
|
23
|
+
readonly default: () => never[];
|
|
24
|
+
};
|
|
16
25
|
};
|
|
@@ -42,6 +42,7 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
42
42
|
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
43
43
|
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
44
44
|
delNode: (wid: string) => void;
|
|
45
|
+
setRoot: (node: Node) => void;
|
|
45
46
|
isPreview: import("vue").Ref<boolean, boolean>;
|
|
46
47
|
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
47
48
|
plugins: {
|
|
@@ -49,6 +50,7 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
49
50
|
widget: WidgetPlugin;
|
|
50
51
|
config: ConfigPlugin;
|
|
51
52
|
};
|
|
53
|
+
showTopbar: import("vue").ComputedRef<boolean>;
|
|
52
54
|
getData: () => Record<string, any>;
|
|
53
55
|
setData: (data: any) => void;
|
|
54
56
|
setSchema: (schema: IWidget["schema"]) => void;
|
|
@@ -65,6 +67,7 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
65
67
|
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
66
68
|
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
67
69
|
delNode: (wid: string) => void;
|
|
70
|
+
setRoot: (node: Node) => void;
|
|
68
71
|
isPreview: import("vue").Ref<boolean, boolean>;
|
|
69
72
|
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
70
73
|
plugins: {
|
|
@@ -72,10 +75,11 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
72
75
|
widget: WidgetPlugin;
|
|
73
76
|
config: ConfigPlugin;
|
|
74
77
|
};
|
|
78
|
+
showTopbar: import("vue").ComputedRef<boolean>;
|
|
75
79
|
getData: () => Record<string, any>;
|
|
76
80
|
setData: (data: any) => void;
|
|
77
81
|
setSchema: (schema: IWidget["schema"]) => void;
|
|
78
|
-
}, "selectedNode" | "selectedNodes" | "selectedNodeOperates">, Pick<{
|
|
82
|
+
}, "selectedNode" | "selectedNodes" | "selectedNodeOperates" | "showTopbar">, Pick<{
|
|
79
83
|
rootNode: import("vue").Ref<Raw<Node>, Raw<Node>>;
|
|
80
84
|
nodeMap: Map<string, Node>;
|
|
81
85
|
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
@@ -88,6 +92,7 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
88
92
|
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
89
93
|
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
90
94
|
delNode: (wid: string) => void;
|
|
95
|
+
setRoot: (node: Node) => void;
|
|
91
96
|
isPreview: import("vue").Ref<boolean, boolean>;
|
|
92
97
|
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
93
98
|
plugins: {
|
|
@@ -95,8 +100,9 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
95
100
|
widget: WidgetPlugin;
|
|
96
101
|
config: ConfigPlugin;
|
|
97
102
|
};
|
|
103
|
+
showTopbar: import("vue").ComputedRef<boolean>;
|
|
98
104
|
getData: () => Record<string, any>;
|
|
99
105
|
setData: (data: any) => void;
|
|
100
106
|
setSchema: (schema: IWidget["schema"]) => void;
|
|
101
|
-
}, "selectNode" | "addNode" | "delNode" | "getData" | "setData" | "setSchema">>;
|
|
107
|
+
}, "selectNode" | "addNode" | "delNode" | "setRoot" | "getData" | "setData" | "setSchema">>;
|
|
102
108
|
export {};
|
|
@@ -2,6 +2,15 @@ import type { ModuleFederation } from '@module-federation/enhanced/runtime';
|
|
|
2
2
|
import type { AppContext, CSSProperties, InjectionKey, Ref, VNode } from 'vue';
|
|
3
3
|
import debug from 'debug';
|
|
4
4
|
import * as Vue from 'vue';
|
|
5
|
+
/**
|
|
6
|
+
* 把 element-plus 主题(mpd 命名空间)再投放到 light DOM。
|
|
7
|
+
*
|
|
8
|
+
* 弹层(ElDialog / ElSelect / ElTooltip / ElPopover ...)默认 teleport 到 document.body,
|
|
9
|
+
* 不在 shadow DOM 里,拿不到编辑器注入到 shadow root 的样式;而它们的类名带的是编辑器自己的
|
|
10
|
+
* `mpd-` 前缀,宿主页面里的 element-plus 全局样式(`el-`)也匹配不到。
|
|
11
|
+
* 这里补一份同样命名空间的主题样式放在 document.head,专门兜住这部分弹层。
|
|
12
|
+
*/
|
|
13
|
+
export declare function injectPopperStyles(): void;
|
|
5
14
|
export declare function initMf(url: string): ModuleFederation;
|
|
6
15
|
export declare function loadFromRemote(scope: string, module: string): new () => Vue.ComponentPublicInstance;
|
|
7
16
|
type RemovePopperFn = (() => void) & {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sepveneto/dnde",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "GPL",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./core": {
|
|
21
21
|
"types": "./dist/main.d.ts",
|
|
22
|
-
"
|
|
22
|
+
"import": "./dist/editor.js",
|
|
23
23
|
"require": "./dist/editor.js",
|
|
24
24
|
"default": "./dist/editor.js"
|
|
25
25
|
},
|
|
26
26
|
".": {
|
|
27
27
|
"types": "./dist/main.d.ts",
|
|
28
|
-
"
|
|
28
|
+
"import": "./dist/editor.js",
|
|
29
29
|
"require": "./dist/editor.js",
|
|
30
30
|
"default": "./dist/editor.js"
|
|
31
31
|
}
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"uuid": "^11.1.0",
|
|
48
48
|
"vue": "3.5.40",
|
|
49
49
|
"vue-router": "^4.5.1",
|
|
50
|
-
"vuedraggable": "^4.1.0"
|
|
50
|
+
"vuedraggable": "^4.1.0",
|
|
51
|
+
"@agent/sdk": "1.0.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"sass-embedded": "^1.89.0",
|
|
@@ -70,6 +71,6 @@
|
|
|
70
71
|
"build:dev": "vite build",
|
|
71
72
|
"build": "vite build && pnpm run gen",
|
|
72
73
|
"gen": "vue-tsc -p tsconfig.build.json",
|
|
73
|
-
"test": "
|
|
74
|
+
"test": "node --test \"tests/**/*.test.ts\""
|
|
74
75
|
}
|
|
75
76
|
}
|
package/dist/lib/main.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|