@sepveneto/dnde-core 0.1.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/LICENSE +21 -0
- package/dist/Widget-BRcHUoH6.d.cts +166 -0
- package/dist/Widget-BRcHUoH6.d.ts +166 -0
- package/dist/chunk-4QIIKQ6B.js +8 -0
- package/dist/chunk-4QVESRP3.js +0 -0
- package/dist/chunk-6FNC3XMI.js +45 -0
- package/dist/chunk-AEGKV2TZ.js +65 -0
- package/dist/chunk-CJZUQN2X.js +50 -0
- package/dist/chunk-D2MSIUE2.js +6 -0
- package/dist/chunk-QYATL3P2.js +15 -0
- package/dist/chunk-TM53N6AZ.js +24 -0
- package/dist/chunk-W776G2UQ.js +36 -0
- package/dist/chunk-WPER3YKQ.js +111 -0
- package/dist/chunk-XJ2IJHKH.js +8 -0
- package/dist/chunk-YSTVVZUQ.js +48 -0
- package/dist/class/Container.cjs +94 -0
- package/dist/class/Container.d.cts +10 -0
- package/dist/class/Container.d.ts +10 -0
- package/dist/class/Container.js +8 -0
- package/dist/class/Node.cjs +167 -0
- package/dist/class/Node.d.cts +49 -0
- package/dist/class/Node.d.ts +49 -0
- package/dist/class/Node.js +9 -0
- package/dist/class/Widget.cjs +84 -0
- package/dist/class/Widget.d.cts +4 -0
- package/dist/class/Widget.d.ts +4 -0
- package/dist/class/Widget.js +7 -0
- package/dist/class/index.cjs +238 -0
- package/dist/class/index.d.cts +6 -0
- package/dist/class/index.d.ts +6 -0
- package/dist/class/index.js +17 -0
- package/dist/helper/EventEmitter.cjs +60 -0
- package/dist/helper/EventEmitter.d.cts +12 -0
- package/dist/helper/EventEmitter.d.ts +12 -0
- package/dist/helper/EventEmitter.js +7 -0
- package/dist/helper/index.cjs +175 -0
- package/dist/helper/index.d.cts +7 -0
- package/dist/helper/index.d.ts +7 -0
- package/dist/helper/index.js +19 -0
- package/dist/helper/schema.cjs +92 -0
- package/dist/helper/schema.d.cts +27 -0
- package/dist/helper/schema.d.ts +27 -0
- package/dist/helper/schema.js +8 -0
- package/dist/helper/widget.cjs +73 -0
- package/dist/helper/widget.d.cts +51 -0
- package/dist/helper/widget.d.ts +51 -0
- package/dist/helper/widget.js +9 -0
- package/dist/index.cjs +211 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +33 -0
- package/dist/internal.cjs +49 -0
- package/dist/internal.d.cts +18 -0
- package/dist/internal.d.ts +18 -0
- package/dist/internal.js +9 -0
- package/dist/tokens.cjs +30 -0
- package/dist/tokens.d.cts +15 -0
- package/dist/tokens.d.ts +15 -0
- package/dist/tokens.js +7 -0
- package/dist/types.cjs +32 -0
- package/dist/types.d.cts +4 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +7 -0
- package/dist/utils.cjs +32 -0
- package/dist/utils.d.cts +3 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +7 -0
- package/package.json +60 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputInstance, InputNumberInstance, SelectInstance, ElOption } from 'element-plus';
|
|
2
|
+
import { j as SchemaItem } from '../Widget-BRcHUoH6.js';
|
|
3
|
+
import 'vue';
|
|
4
|
+
import 'async-validator';
|
|
5
|
+
|
|
6
|
+
type Option = InstanceType<typeof ElOption>;
|
|
7
|
+
interface BaseConfig {
|
|
8
|
+
label: SchemaItem['label'];
|
|
9
|
+
key: SchemaItem['key'];
|
|
10
|
+
required?: boolean | string;
|
|
11
|
+
rules?: SchemaItem['rules'];
|
|
12
|
+
}
|
|
13
|
+
declare const schema: {
|
|
14
|
+
input(config: BaseConfig & {
|
|
15
|
+
attrs?: InputInstance["$props"];
|
|
16
|
+
}): SchemaItem;
|
|
17
|
+
number(config: BaseConfig & {
|
|
18
|
+
attrs?: InputNumberInstance["$props"];
|
|
19
|
+
}): SchemaItem;
|
|
20
|
+
select(config: BaseConfig & {
|
|
21
|
+
attrs?: SelectInstance["$props"];
|
|
22
|
+
options?: Option["$props"][];
|
|
23
|
+
}): SchemaItem;
|
|
24
|
+
styleNumber(config: BaseConfig): SchemaItem;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { schema };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/helper/widget.ts
|
|
21
|
+
var widget_exports = {};
|
|
22
|
+
__export(widget_exports, {
|
|
23
|
+
widget: () => widget,
|
|
24
|
+
widgetType: () => widgetType
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(widget_exports);
|
|
27
|
+
var widgetType = /* @__PURE__ */ ((widgetType2) => {
|
|
28
|
+
widgetType2[widgetType2["WIDGET"] = 0] = "WIDGET";
|
|
29
|
+
widgetType2[widgetType2["GROUP"] = 1] = "GROUP";
|
|
30
|
+
return widgetType2;
|
|
31
|
+
})(widgetType || {});
|
|
32
|
+
var widget = {
|
|
33
|
+
columnContainer(config) {
|
|
34
|
+
return {
|
|
35
|
+
_name: config.name || "\u6805\u683C\u5BB9\u5668",
|
|
36
|
+
_view: "containerGrid",
|
|
37
|
+
_icon: config.icon,
|
|
38
|
+
container: true,
|
|
39
|
+
meta: config.config,
|
|
40
|
+
style: config.defaultStyle,
|
|
41
|
+
schema: {
|
|
42
|
+
props: config.attributes,
|
|
43
|
+
style: config.stylesheet
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
create(config) {
|
|
48
|
+
return {
|
|
49
|
+
_name: config.name,
|
|
50
|
+
_view: config.type,
|
|
51
|
+
_icon: config.icon,
|
|
52
|
+
container: config.isContainer,
|
|
53
|
+
meta: config.config,
|
|
54
|
+
schema: {
|
|
55
|
+
props: config.attributes,
|
|
56
|
+
style: config.stylesheet
|
|
57
|
+
},
|
|
58
|
+
style: config.defaultStyle
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
group(name, list) {
|
|
62
|
+
return {
|
|
63
|
+
type: 1 /* GROUP */,
|
|
64
|
+
name,
|
|
65
|
+
list
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
widget,
|
|
72
|
+
widgetType
|
|
73
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { I as IWidget, j as SchemaItem, W as WidgetPos, B as Base } from '../Widget-BRcHUoH6.cjs';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
import 'element-plus';
|
|
4
|
+
import 'async-validator';
|
|
5
|
+
|
|
6
|
+
declare enum widgetType {
|
|
7
|
+
WIDGET = 0,
|
|
8
|
+
GROUP = 1
|
|
9
|
+
}
|
|
10
|
+
interface CWidget {
|
|
11
|
+
name: IWidget['_name'];
|
|
12
|
+
type: IWidget['_view'];
|
|
13
|
+
icon?: IWidget['_icon'];
|
|
14
|
+
config?: IWidget['meta'];
|
|
15
|
+
isContainer?: IWidget['container'];
|
|
16
|
+
defaultStyle?: IWidget['style'];
|
|
17
|
+
attributes?: SchemaItem[];
|
|
18
|
+
stylesheet?: SchemaItem[];
|
|
19
|
+
}
|
|
20
|
+
interface ColumnContainerWidget {
|
|
21
|
+
name?: IWidget['_name'];
|
|
22
|
+
icon?: IWidget['_icon'];
|
|
23
|
+
config?: IWidget['meta'];
|
|
24
|
+
defaultStyle?: IWidget['style'];
|
|
25
|
+
attributes?: SchemaItem[];
|
|
26
|
+
stylesheet?: SchemaItem[];
|
|
27
|
+
}
|
|
28
|
+
declare const widget: {
|
|
29
|
+
columnContainer(config: ColumnContainerWidget): IWidget;
|
|
30
|
+
create(config: CWidget): {
|
|
31
|
+
_name: string;
|
|
32
|
+
_view: string;
|
|
33
|
+
_icon: string | undefined;
|
|
34
|
+
container: boolean | undefined;
|
|
35
|
+
meta: {
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
} | undefined;
|
|
38
|
+
schema: {
|
|
39
|
+
props: SchemaItem[] | undefined;
|
|
40
|
+
style: SchemaItem[] | undefined;
|
|
41
|
+
};
|
|
42
|
+
style: (vue.CSSProperties & WidgetPos) | undefined;
|
|
43
|
+
};
|
|
44
|
+
group(name: string, list: IWidget[]): {
|
|
45
|
+
type: widgetType;
|
|
46
|
+
name: string;
|
|
47
|
+
list: Base[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { widget, widgetType };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { I as IWidget, j as SchemaItem, W as WidgetPos, B as Base } from '../Widget-BRcHUoH6.js';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
import 'element-plus';
|
|
4
|
+
import 'async-validator';
|
|
5
|
+
|
|
6
|
+
declare enum widgetType {
|
|
7
|
+
WIDGET = 0,
|
|
8
|
+
GROUP = 1
|
|
9
|
+
}
|
|
10
|
+
interface CWidget {
|
|
11
|
+
name: IWidget['_name'];
|
|
12
|
+
type: IWidget['_view'];
|
|
13
|
+
icon?: IWidget['_icon'];
|
|
14
|
+
config?: IWidget['meta'];
|
|
15
|
+
isContainer?: IWidget['container'];
|
|
16
|
+
defaultStyle?: IWidget['style'];
|
|
17
|
+
attributes?: SchemaItem[];
|
|
18
|
+
stylesheet?: SchemaItem[];
|
|
19
|
+
}
|
|
20
|
+
interface ColumnContainerWidget {
|
|
21
|
+
name?: IWidget['_name'];
|
|
22
|
+
icon?: IWidget['_icon'];
|
|
23
|
+
config?: IWidget['meta'];
|
|
24
|
+
defaultStyle?: IWidget['style'];
|
|
25
|
+
attributes?: SchemaItem[];
|
|
26
|
+
stylesheet?: SchemaItem[];
|
|
27
|
+
}
|
|
28
|
+
declare const widget: {
|
|
29
|
+
columnContainer(config: ColumnContainerWidget): IWidget;
|
|
30
|
+
create(config: CWidget): {
|
|
31
|
+
_name: string;
|
|
32
|
+
_view: string;
|
|
33
|
+
_icon: string | undefined;
|
|
34
|
+
container: boolean | undefined;
|
|
35
|
+
meta: {
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
} | undefined;
|
|
38
|
+
schema: {
|
|
39
|
+
props: SchemaItem[] | undefined;
|
|
40
|
+
style: SchemaItem[] | undefined;
|
|
41
|
+
};
|
|
42
|
+
style: (vue.CSSProperties & WidgetPos) | undefined;
|
|
43
|
+
};
|
|
44
|
+
group(name: string, list: IWidget[]): {
|
|
45
|
+
type: widgetType;
|
|
46
|
+
name: string;
|
|
47
|
+
list: Base[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { widget, widgetType };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
EventEmitter: () => EventEmitter,
|
|
24
|
+
createCopy: () => createCopy,
|
|
25
|
+
createDelete: () => createDelete,
|
|
26
|
+
editorContextKey: () => editorContextKey,
|
|
27
|
+
isBox: () => isBox,
|
|
28
|
+
schema: () => schema,
|
|
29
|
+
widget: () => widget,
|
|
30
|
+
widgetType: () => widgetType
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(index_exports);
|
|
33
|
+
|
|
34
|
+
// src/helper/EventEmitter.ts
|
|
35
|
+
var EventEmitter = class {
|
|
36
|
+
constructor(subscribeFn) {
|
|
37
|
+
this.events = /* @__PURE__ */ new Map();
|
|
38
|
+
this.notify = subscribeFn;
|
|
39
|
+
}
|
|
40
|
+
on(event, callback) {
|
|
41
|
+
var _a;
|
|
42
|
+
if (!this.events.has(event)) {
|
|
43
|
+
this.events.set(event, []);
|
|
44
|
+
}
|
|
45
|
+
(_a = this.events.get(event)) == null ? void 0 : _a.push(callback);
|
|
46
|
+
}
|
|
47
|
+
emit(event, ...args) {
|
|
48
|
+
var _a;
|
|
49
|
+
this.notify(event, ...args);
|
|
50
|
+
if (this.events.has(event)) {
|
|
51
|
+
(_a = this.events.get(event)) == null ? void 0 : _a.forEach((callback) => {
|
|
52
|
+
callback(...args);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
off(event, callback) {
|
|
57
|
+
var _a;
|
|
58
|
+
if (this.events.has(event)) {
|
|
59
|
+
this.events.set(event, ((_a = this.events.get(event)) == null ? void 0 : _a.filter((cb) => cb !== callback)) || []);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
clear() {
|
|
63
|
+
this.events.clear();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// src/utils.ts
|
|
68
|
+
function likeArray(val) {
|
|
69
|
+
return Array.isArray(val) ? val : [val];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/helper/schema.ts
|
|
73
|
+
var schema = {
|
|
74
|
+
input(config) {
|
|
75
|
+
const base = {
|
|
76
|
+
label: config.label,
|
|
77
|
+
key: config.key,
|
|
78
|
+
type: "input",
|
|
79
|
+
rules: normalizeRules(config),
|
|
80
|
+
attrs: config.attrs
|
|
81
|
+
};
|
|
82
|
+
return base;
|
|
83
|
+
},
|
|
84
|
+
number(config) {
|
|
85
|
+
return {
|
|
86
|
+
label: config.label,
|
|
87
|
+
key: config.key,
|
|
88
|
+
type: "number",
|
|
89
|
+
rules: normalizeRules(config),
|
|
90
|
+
attrs: config.attrs
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
select(config) {
|
|
94
|
+
return {
|
|
95
|
+
label: config.label,
|
|
96
|
+
key: config.key,
|
|
97
|
+
type: "select",
|
|
98
|
+
attrs: config.attrs,
|
|
99
|
+
rules: normalizeRules(config),
|
|
100
|
+
options: config.options
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
styleNumber(config) {
|
|
104
|
+
return {
|
|
105
|
+
label: config.label,
|
|
106
|
+
key: config.key,
|
|
107
|
+
type: "styleNumber",
|
|
108
|
+
rules: normalizeRules(config)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
function normalizeRules(config) {
|
|
113
|
+
const rules = likeArray(config.rules || []);
|
|
114
|
+
if (config.required) {
|
|
115
|
+
if (typeof config.required === "string") {
|
|
116
|
+
rules.push({
|
|
117
|
+
required: true,
|
|
118
|
+
message: config.required
|
|
119
|
+
});
|
|
120
|
+
} else if (config.required) {
|
|
121
|
+
rules.push({
|
|
122
|
+
required: true,
|
|
123
|
+
message: `\u8BF7\u586B\u5199${config.label}`
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return rules;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/helper/widget.ts
|
|
131
|
+
var widgetType = /* @__PURE__ */ ((widgetType2) => {
|
|
132
|
+
widgetType2[widgetType2["WIDGET"] = 0] = "WIDGET";
|
|
133
|
+
widgetType2[widgetType2["GROUP"] = 1] = "GROUP";
|
|
134
|
+
return widgetType2;
|
|
135
|
+
})(widgetType || {});
|
|
136
|
+
var widget = {
|
|
137
|
+
columnContainer(config) {
|
|
138
|
+
return {
|
|
139
|
+
_name: config.name || "\u6805\u683C\u5BB9\u5668",
|
|
140
|
+
_view: "containerGrid",
|
|
141
|
+
_icon: config.icon,
|
|
142
|
+
container: true,
|
|
143
|
+
meta: config.config,
|
|
144
|
+
style: config.defaultStyle,
|
|
145
|
+
schema: {
|
|
146
|
+
props: config.attributes,
|
|
147
|
+
style: config.stylesheet
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
create(config) {
|
|
152
|
+
return {
|
|
153
|
+
_name: config.name,
|
|
154
|
+
_view: config.type,
|
|
155
|
+
_icon: config.icon,
|
|
156
|
+
container: config.isContainer,
|
|
157
|
+
meta: config.config,
|
|
158
|
+
schema: {
|
|
159
|
+
props: config.attributes,
|
|
160
|
+
style: config.stylesheet
|
|
161
|
+
},
|
|
162
|
+
style: config.defaultStyle
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
group(name, list) {
|
|
166
|
+
return {
|
|
167
|
+
type: 1 /* GROUP */,
|
|
168
|
+
name,
|
|
169
|
+
list
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// src/internal.ts
|
|
175
|
+
function createCopy(ctx) {
|
|
176
|
+
return {
|
|
177
|
+
name: "copy",
|
|
178
|
+
title: "\u590D\u5236",
|
|
179
|
+
action: (node) => {
|
|
180
|
+
ctx.addNode(node.copy(), node.parent, true);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function createDelete(ctx) {
|
|
185
|
+
return {
|
|
186
|
+
name: "delete",
|
|
187
|
+
title: "\u5220\u9664",
|
|
188
|
+
action: (node) => {
|
|
189
|
+
ctx.delNode(node.wid);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// src/tokens.ts
|
|
195
|
+
var editorContextKey = "$_EDITOR";
|
|
196
|
+
|
|
197
|
+
// src/types.ts
|
|
198
|
+
function isBox(schema2) {
|
|
199
|
+
return schema2.type === "box";
|
|
200
|
+
}
|
|
201
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
202
|
+
0 && (module.exports = {
|
|
203
|
+
EventEmitter,
|
|
204
|
+
createCopy,
|
|
205
|
+
createDelete,
|
|
206
|
+
editorContextKey,
|
|
207
|
+
isBox,
|
|
208
|
+
schema,
|
|
209
|
+
widget,
|
|
210
|
+
widgetType
|
|
211
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { EventEmitter } from './helper/EventEmitter.cjs';
|
|
2
|
+
export { schema } from './helper/schema.cjs';
|
|
3
|
+
export { widget, widgetType } from './helper/widget.cjs';
|
|
4
|
+
export { createCopy, createDelete } from './internal.cjs';
|
|
5
|
+
export { EditorContext, editorContextKey } from './tokens.cjs';
|
|
6
|
+
export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BRcHUoH6.cjs';
|
|
7
|
+
import 'element-plus';
|
|
8
|
+
import 'vue';
|
|
9
|
+
import './class/Node.cjs';
|
|
10
|
+
import 'async-validator';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { EventEmitter } from './helper/EventEmitter.js';
|
|
2
|
+
export { schema } from './helper/schema.js';
|
|
3
|
+
export { widget, widgetType } from './helper/widget.js';
|
|
4
|
+
export { createCopy, createDelete } from './internal.js';
|
|
5
|
+
export { EditorContext, editorContextKey } from './tokens.js';
|
|
6
|
+
export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BRcHUoH6.js';
|
|
7
|
+
import 'element-plus';
|
|
8
|
+
import 'vue';
|
|
9
|
+
import './class/Node.js';
|
|
10
|
+
import 'async-validator';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "./chunk-4QVESRP3.js";
|
|
2
|
+
import {
|
|
3
|
+
EventEmitter
|
|
4
|
+
} from "./chunk-W776G2UQ.js";
|
|
5
|
+
import {
|
|
6
|
+
schema
|
|
7
|
+
} from "./chunk-AEGKV2TZ.js";
|
|
8
|
+
import {
|
|
9
|
+
widget,
|
|
10
|
+
widgetType
|
|
11
|
+
} from "./chunk-YSTVVZUQ.js";
|
|
12
|
+
import {
|
|
13
|
+
createCopy,
|
|
14
|
+
createDelete
|
|
15
|
+
} from "./chunk-TM53N6AZ.js";
|
|
16
|
+
import {
|
|
17
|
+
editorContextKey
|
|
18
|
+
} from "./chunk-D2MSIUE2.js";
|
|
19
|
+
import {
|
|
20
|
+
isBox
|
|
21
|
+
} from "./chunk-4QIIKQ6B.js";
|
|
22
|
+
import "./chunk-XJ2IJHKH.js";
|
|
23
|
+
import "./chunk-6FNC3XMI.js";
|
|
24
|
+
export {
|
|
25
|
+
EventEmitter,
|
|
26
|
+
createCopy,
|
|
27
|
+
createDelete,
|
|
28
|
+
editorContextKey,
|
|
29
|
+
isBox,
|
|
30
|
+
schema,
|
|
31
|
+
widget,
|
|
32
|
+
widgetType
|
|
33
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/internal.ts
|
|
21
|
+
var internal_exports = {};
|
|
22
|
+
__export(internal_exports, {
|
|
23
|
+
createCopy: () => createCopy,
|
|
24
|
+
createDelete: () => createDelete
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(internal_exports);
|
|
27
|
+
function createCopy(ctx) {
|
|
28
|
+
return {
|
|
29
|
+
name: "copy",
|
|
30
|
+
title: "\u590D\u5236",
|
|
31
|
+
action: (node) => {
|
|
32
|
+
ctx.addNode(node.copy(), node.parent, true);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function createDelete(ctx) {
|
|
37
|
+
return {
|
|
38
|
+
name: "delete",
|
|
39
|
+
title: "\u5220\u9664",
|
|
40
|
+
action: (node) => {
|
|
41
|
+
ctx.delNode(node.wid);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
createCopy,
|
|
48
|
+
createDelete
|
|
49
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from './class/Node.cjs';
|
|
2
|
+
import 'vue';
|
|
3
|
+
import './Widget-BRcHUoH6.cjs';
|
|
4
|
+
import 'element-plus';
|
|
5
|
+
import 'async-validator';
|
|
6
|
+
|
|
7
|
+
declare function createCopy(ctx: any): {
|
|
8
|
+
name: string;
|
|
9
|
+
title: string;
|
|
10
|
+
action: (node: Node) => void;
|
|
11
|
+
};
|
|
12
|
+
declare function createDelete(ctx: any): {
|
|
13
|
+
name: string;
|
|
14
|
+
title: string;
|
|
15
|
+
action: (node: Node) => void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { createCopy, createDelete };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from './class/Node.js';
|
|
2
|
+
import 'vue';
|
|
3
|
+
import './Widget-BRcHUoH6.js';
|
|
4
|
+
import 'element-plus';
|
|
5
|
+
import 'async-validator';
|
|
6
|
+
|
|
7
|
+
declare function createCopy(ctx: any): {
|
|
8
|
+
name: string;
|
|
9
|
+
title: string;
|
|
10
|
+
action: (node: Node) => void;
|
|
11
|
+
};
|
|
12
|
+
declare function createDelete(ctx: any): {
|
|
13
|
+
name: string;
|
|
14
|
+
title: string;
|
|
15
|
+
action: (node: Node) => void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { createCopy, createDelete };
|
package/dist/internal.js
ADDED
package/dist/tokens.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/tokens.ts
|
|
21
|
+
var tokens_exports = {};
|
|
22
|
+
__export(tokens_exports, {
|
|
23
|
+
editorContextKey: () => editorContextKey
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(tokens_exports);
|
|
26
|
+
var editorContextKey = "$_EDITOR";
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
editorContextKey
|
|
30
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { EventEmitter } from './helper/EventEmitter.cjs';
|
|
3
|
+
import { Node } from './class/Node.cjs';
|
|
4
|
+
import './Widget-BRcHUoH6.cjs';
|
|
5
|
+
import 'element-plus';
|
|
6
|
+
import 'async-validator';
|
|
7
|
+
|
|
8
|
+
interface EditorContext {
|
|
9
|
+
node?: Node;
|
|
10
|
+
plugins?: any;
|
|
11
|
+
bus: EventEmitter;
|
|
12
|
+
}
|
|
13
|
+
declare const editorContextKey: InjectionKey<EditorContext>;
|
|
14
|
+
|
|
15
|
+
export { type EditorContext, editorContextKey };
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { EventEmitter } from './helper/EventEmitter.js';
|
|
3
|
+
import { Node } from './class/Node.js';
|
|
4
|
+
import './Widget-BRcHUoH6.js';
|
|
5
|
+
import 'element-plus';
|
|
6
|
+
import 'async-validator';
|
|
7
|
+
|
|
8
|
+
interface EditorContext {
|
|
9
|
+
node?: Node;
|
|
10
|
+
plugins?: any;
|
|
11
|
+
bus: EventEmitter;
|
|
12
|
+
}
|
|
13
|
+
declare const editorContextKey: InjectionKey<EditorContext>;
|
|
14
|
+
|
|
15
|
+
export { type EditorContext, editorContextKey };
|