@sepveneto/dnde 0.8.12 → 0.9.0-beta.1
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/App.vue.d.ts +10 -10
- package/dist/Editor.vue.d.ts +10 -10
- package/dist/editor.js +2785 -2775
- package/dist/props.d.ts +4 -4
- package/package.json +1 -1
- package/dist/agents/context.d.ts +0 -14
- package/dist/agents/types.d.ts +0 -44
package/dist/props.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export declare const editorProps: {
|
|
|
14
14
|
readonly default: () => {};
|
|
15
15
|
};
|
|
16
16
|
readonly agent: BooleanConstructor;
|
|
17
|
-
readonly
|
|
18
|
-
readonly type: PropType<any
|
|
19
|
-
readonly default: () =>
|
|
17
|
+
readonly agentApi: {
|
|
18
|
+
readonly type: PropType<Record<string, any>>;
|
|
19
|
+
readonly default: () => {};
|
|
20
20
|
};
|
|
21
|
-
readonly
|
|
21
|
+
readonly agentTools: {
|
|
22
22
|
readonly type: PropType<any[]>;
|
|
23
23
|
readonly default: () => never[];
|
|
24
24
|
};
|
package/package.json
CHANGED
package/dist/agents/context.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { LayoutWidgetDescriptor } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* 把编辑器组件列表拍平成 Layout Agent 需要的描述。
|
|
4
|
-
*
|
|
5
|
-
* 输入可能是分组、Widget 实例或原始 IWidget,这里统一递归处理。
|
|
6
|
-
* 只有带 `agent` 描述的组件才会进入布局候选。
|
|
7
|
-
*/
|
|
8
|
-
export declare function toLayoutWidgets(widgets?: any[]): LayoutWidgetDescriptor[];
|
|
9
|
-
/** 当前页面节点的轻量快照,供 Edit Agent 定位组件。 */
|
|
10
|
-
export declare function snapshotNodes(nodes?: any[]): Array<{
|
|
11
|
-
wid: string;
|
|
12
|
-
type: string;
|
|
13
|
-
name: string;
|
|
14
|
-
}>;
|
package/dist/agents/types.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent 相关的轻量类型定义。
|
|
3
|
-
*
|
|
4
|
-
* 这些结构本来来自可选的 `@sepveneto/dnde-agent` 包,但编辑器不应当强依赖它
|
|
5
|
-
* (业务侧可以不安装)。因此这里保留编辑器真正用到的字段做本地声明,
|
|
6
|
-
* 运行时由 agent web component 通过事件/属性传回,结构保持一致即可。
|
|
7
|
-
*/
|
|
8
|
-
/** 供 Layout Agent 选取组件的描述信息。 */
|
|
9
|
-
export interface LayoutWidgetDescriptor {
|
|
10
|
-
typeId: string;
|
|
11
|
-
description: string;
|
|
12
|
-
layout: Record<string, any>;
|
|
13
|
-
}
|
|
14
|
-
/** Layout Agent 生成的一个组件片段。 */
|
|
15
|
-
export interface LayoutWidgetItem {
|
|
16
|
-
widget: string;
|
|
17
|
-
items: Array<{
|
|
18
|
-
category: string;
|
|
19
|
-
id: any;
|
|
20
|
-
}>;
|
|
21
|
-
}
|
|
22
|
-
export type LayoutIR = LayoutWidgetItem[];
|
|
23
|
-
export interface AddComponentIR {
|
|
24
|
-
type: 'add-component';
|
|
25
|
-
widget: string;
|
|
26
|
-
items: Array<Record<string, any>>;
|
|
27
|
-
}
|
|
28
|
-
export interface DeleteComponentIR {
|
|
29
|
-
type: 'delete-component';
|
|
30
|
-
target: string;
|
|
31
|
-
}
|
|
32
|
-
export interface UpdateComponentIR {
|
|
33
|
-
type: 'update-component';
|
|
34
|
-
target: string;
|
|
35
|
-
changes: Record<string, any>;
|
|
36
|
-
}
|
|
37
|
-
export interface MoveComponentIR {
|
|
38
|
-
type: 'move-component';
|
|
39
|
-
target: string;
|
|
40
|
-
before?: string;
|
|
41
|
-
after?: string;
|
|
42
|
-
}
|
|
43
|
-
/** Edit Agent 生成的单条编辑指令。 */
|
|
44
|
-
export type EditIR = AddComponentIR | DeleteComponentIR | UpdateComponentIR | MoveComponentIR;
|