@sepveneto/dnde 0.8.10 → 0.8.12
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 +1 -1
- package/dist/Editor.vue.d.ts +36 -30
- package/dist/components/NodePlugin.vue.d.ts +35 -29
- package/dist/components/NodeWrap.vue.d.ts +6 -0
- package/dist/editor.js +51419 -51412
- package/dist/layout/widgetsMenu.vue.d.ts +4 -1
- package/dist/store/app.d.ts +4 -1
- package/dist/store/editor.d.ts +16 -19
- package/package.json +1 -1
|
@@ -5,14 +5,17 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5
5
|
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
6
6
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
7
7
|
widgetMap: Map<string, Widget>;
|
|
8
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
8
9
|
}, "widgets" | "widgetMap">, Pick<{
|
|
9
10
|
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
10
11
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
11
12
|
widgetMap: Map<string, Widget>;
|
|
12
|
-
|
|
13
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
14
|
+
}, "widgetsFlat">, Pick<{
|
|
13
15
|
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
14
16
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
15
17
|
widgetMap: Map<string, Widget>;
|
|
18
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
16
19
|
}, "setWidgets">>;
|
|
17
20
|
hasGroup: (list?: (Widget | WidgetGroup)[]) => list is WidgetGroup[];
|
|
18
21
|
handleClone: (original: Widget) => Node;
|
package/dist/store/app.d.ts
CHANGED
|
@@ -14,12 +14,15 @@ export declare const useApp: import("pinia").StoreDefinition<"app", Pick<{
|
|
|
14
14
|
setWidgets: (data: LikeWidget[]) => void;
|
|
15
15
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
16
16
|
widgetMap: Map<string, Widget>;
|
|
17
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
17
18
|
}, "widgets" | "widgetMap">, Pick<{
|
|
18
19
|
setWidgets: (data: LikeWidget[]) => void;
|
|
19
20
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
20
21
|
widgetMap: Map<string, Widget>;
|
|
21
|
-
|
|
22
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
23
|
+
}, "widgetsFlat">, Pick<{
|
|
22
24
|
setWidgets: (data: LikeWidget[]) => void;
|
|
23
25
|
widgets: import("vue").ShallowRef<(Widget | WidgetGroup)[] | undefined, (Widget | WidgetGroup)[] | undefined>;
|
|
24
26
|
widgetMap: Map<string, Widget>;
|
|
27
|
+
widgetsFlat: import("vue").ComputedRef<Widget[]>;
|
|
25
28
|
}, "setWidgets">>;
|
package/dist/store/editor.d.ts
CHANGED
|
@@ -33,12 +33,6 @@ export interface ConfigPanelOptions {
|
|
|
33
33
|
name: string;
|
|
34
34
|
/** 根节点(页面级)配置项,由业务侧定义 */
|
|
35
35
|
attributes?: SchemaItem[];
|
|
36
|
-
/**
|
|
37
|
-
* 可选:位置固定、组件区(widgets)不自由提供的组件(如浮窗)。
|
|
38
|
-
* 提供时编辑器会以预览态渲染它,并可在选中后配置其内容;
|
|
39
|
-
* 不提供则只是一个纯配置标签。
|
|
40
|
-
*/
|
|
41
|
-
component?: IWidget;
|
|
42
36
|
}
|
|
43
37
|
export interface ConfigPanel {
|
|
44
38
|
/** 稳定的标识,用于标签定位 */
|
|
@@ -56,22 +50,19 @@ export interface ConfigPanel {
|
|
|
56
50
|
/**
|
|
57
51
|
* 根节点(页面级)配置的补充入口(config pane 提供的额外标签)。
|
|
58
52
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* 因此不可拖曳、不可删除,始终以预览态渲染);组件的两份配置相互独立、都由业务侧定义:
|
|
65
|
-
* - 根配置(`attributes`):本标签里的配置项;
|
|
66
|
-
* - 组件内容(`component.schema.props`):选中该组件后于「属性」里编辑。
|
|
53
|
+
* 每个标签绑定一个固定组件 Node,但组件数据和配置页都属于根节点:
|
|
54
|
+
* - 数据写入 `rootNode.data[type]`,通过 `getData()` 输出,不进入页面拖拽列表;
|
|
55
|
+
* - 配置项由该 Widget 的 `schema.props` 定义;
|
|
56
|
+
* - 只有 `data.isShow` 为真时才渲染固定组件预览,纯配置标签不会加载组件视图;
|
|
57
|
+
* - 点击固定组件预览时应回到根节点,并激活对应配置标签,而不是独立选中该组件。
|
|
67
58
|
*/
|
|
68
59
|
declare class ConfigPlugin {
|
|
69
60
|
ctx: ConfigPluginContext;
|
|
70
|
-
list:
|
|
61
|
+
list: Node[];
|
|
71
62
|
constructor(ctx: ConfigPluginContext);
|
|
72
63
|
get defaultPane(): string;
|
|
73
|
-
/**
|
|
74
|
-
addPanel(options:
|
|
64
|
+
/** 注册一个根节点配置标签及其固定组件视图 */
|
|
65
|
+
addPanel(options: IWidget): Node;
|
|
75
66
|
validate(): Promise<boolean>;
|
|
76
67
|
}
|
|
77
68
|
export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
@@ -80,7 +71,9 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
80
71
|
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
81
72
|
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
82
73
|
selectNode: (wid?: string) => void;
|
|
74
|
+
selectConfigPane: (wid: string) => void;
|
|
83
75
|
selected: import("vue").Ref<string, string>;
|
|
76
|
+
activeConfigPane: import("vue").Ref<string, string>;
|
|
84
77
|
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
85
78
|
selectedNode: import("vue").ComputedRef<Node>;
|
|
86
79
|
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
@@ -99,13 +92,15 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
99
92
|
getData: () => Record<string, any>;
|
|
100
93
|
setData: (data: any) => void;
|
|
101
94
|
setSchema: (schema: IWidget["schema"]) => void;
|
|
102
|
-
}, "plugins" | "hovering" | "dragging" | "rootNode" | "nodeMap" | "shadowRoot" | "elementRoot" | "selected" | "isPreview">, Pick<{
|
|
95
|
+
}, "plugins" | "hovering" | "dragging" | "rootNode" | "nodeMap" | "shadowRoot" | "elementRoot" | "selected" | "activeConfigPane" | "isPreview">, Pick<{
|
|
103
96
|
rootNode: import("vue").Ref<Raw<Node>, Raw<Node>>;
|
|
104
97
|
nodeMap: Map<string, Node>;
|
|
105
98
|
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
106
99
|
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
107
100
|
selectNode: (wid?: string) => void;
|
|
101
|
+
selectConfigPane: (wid: string) => void;
|
|
108
102
|
selected: import("vue").Ref<string, string>;
|
|
103
|
+
activeConfigPane: import("vue").Ref<string, string>;
|
|
109
104
|
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
110
105
|
selectedNode: import("vue").ComputedRef<Node>;
|
|
111
106
|
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
@@ -130,7 +125,9 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
130
125
|
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
131
126
|
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
132
127
|
selectNode: (wid?: string) => void;
|
|
128
|
+
selectConfigPane: (wid: string) => void;
|
|
133
129
|
selected: import("vue").Ref<string, string>;
|
|
130
|
+
activeConfigPane: import("vue").Ref<string, string>;
|
|
134
131
|
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
135
132
|
selectedNode: import("vue").ComputedRef<Node>;
|
|
136
133
|
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
@@ -149,5 +146,5 @@ export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
|
149
146
|
getData: () => Record<string, any>;
|
|
150
147
|
setData: (data: any) => void;
|
|
151
148
|
setSchema: (schema: IWidget["schema"]) => void;
|
|
152
|
-
}, "selectNode" | "addNode" | "delNode" | "setRoot" | "getData" | "setData" | "setSchema">>;
|
|
149
|
+
}, "selectNode" | "selectConfigPane" | "addNode" | "delNode" | "setRoot" | "getData" | "setData" | "setSchema">>;
|
|
153
150
|
export {};
|