starfish-editor-custom 1.0.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/auto-imports.d.ts +10 -0
- package/babel.config.js +8 -0
- package/components.d.ts +46 -0
- package/dist/ConditionModule.js +892 -0
- package/dist/ConditionSelect.js +483 -0
- package/dist/CustomDialog.js +105 -0
- package/dist/formStyle.js +245 -0
- package/dist/globalFormList.js +59 -0
- package/dist/jsonCode.js +74 -0
- package/dist/jsonEditor.js +71 -0
- package/dist/main.js +3319 -0
- package/dist/starfish-editor.es.js +30 -0
- package/dist/style.css +1 -0
- package/dist/types/editor/src/common/ConditionSelect/ConditionGroup.vue.d.ts +61 -0
- package/dist/types/editor/src/common/ConditionSelect/ConditionModule.vue.d.ts +43 -0
- package/dist/types/editor/src/common/ConditionSelect/ConditionTanc.vue.d.ts +48 -0
- package/dist/types/editor/src/common/ConditionSelect.vue.d.ts +72 -0
- package/dist/types/editor/src/common/CustomDialog.vue.d.ts +25 -0
- package/dist/types/editor/src/common/Loading.vue.d.ts +3 -0
- package/dist/types/editor/src/common/formJson.d.ts +80 -0
- package/dist/types/editor/src/common/jsonCode.vue.d.ts +110 -0
- package/dist/types/editor/src/components/ComponentList.vue.d.ts +32 -0
- package/dist/types/editor/src/components/FormPreview.vue.d.ts +25 -0
- package/dist/types/editor/src/components/Nav.vue.d.ts +9 -0
- package/dist/types/editor/src/components/PropsPanel.vue.d.ts +53 -0
- package/dist/types/editor/src/components/Shape.vue.d.ts +40 -0
- package/dist/types/editor/src/components/Workspace.vue.d.ts +22 -0
- package/dist/types/editor/src/components/globalFormList.vue.d.ts +6 -0
- package/dist/types/editor/src/components/jsonEditor.vue.d.ts +6 -0
- package/dist/types/editor/src/controller/action.d.ts +18 -0
- package/dist/types/editor/src/controller/form.d.ts +24 -0
- package/dist/types/editor/src/controller/history.d.ts +12 -0
- package/dist/types/editor/src/controller/shortcut.d.ts +20 -0
- package/dist/types/editor/src/controller/ui.d.ts +10 -0
- package/dist/types/editor/src/layouts/ControlEditSize.vue.d.ts +17 -0
- package/dist/types/editor/src/layouts/Framework.vue.d.ts +33 -0
- package/dist/types/editor/src/layouts/Resizer.vue.d.ts +13 -0
- package/dist/types/editor/src/layouts/ShortcutKey.vue.d.ts +8 -0
- package/dist/types/editor/src/main.d.ts +5 -0
- package/dist/types/editor/src/shims-vue.d.ts +23 -0
- package/dist/types/editor/src/starfish-editor.vue.d.ts +109 -0
- package/dist/types/editor/src/type.d.ts +224 -0
- package/dist/types/editor/src/utils/_.d.ts +33 -0
- package/dist/types/editor/src/utils/formKeycon.d.ts +18 -0
- package/dist/types/editor/src/utils/shortcutKey.d.ts +3 -0
- package/dist/types/editor/src/utils/vm.d.ts +3 -0
- package/dist/types/starfish-editor.d.ts +3 -0
- package/package.json +55 -0
- package/src/common/ConditionSelect/ConditionGroup.vue +167 -0
- package/src/common/ConditionSelect/ConditionModule.vue +118 -0
- package/src/common/ConditionSelect/ConditionTanc.vue +319 -0
- package/src/common/ConditionSelect.vue +268 -0
- package/src/common/CustomDialog.vue +77 -0
- package/src/common/Loading.vue +10 -0
- package/src/common/formJson.ts +143 -0
- package/src/common/formStyle.vue +170 -0
- package/src/common/jsonCode.vue +45 -0
- package/src/components/ComponentList.vue +156 -0
- package/src/components/FormPreview.vue +197 -0
- package/src/components/Nav.vue +128 -0
- package/src/components/NavList.vue +560 -0
- package/src/components/PropsPanel.vue +376 -0
- package/src/components/Shape.vue +178 -0
- package/src/components/Workspace.vue +258 -0
- package/src/components/globalFormList.vue +30 -0
- package/src/components/jsonEditor.vue +41 -0
- package/src/controller/action.ts +37 -0
- package/src/controller/form.ts +207 -0
- package/src/controller/history.ts +57 -0
- package/src/controller/shortcut.ts +81 -0
- package/src/controller/ui.ts +91 -0
- package/src/layouts/ControlEditSize.vue +52 -0
- package/src/layouts/Framework.vue +76 -0
- package/src/layouts/Resizer.vue +54 -0
- package/src/layouts/ShortcutKey.vue +61 -0
- package/src/main.ts +56 -0
- package/src/shims-vue.d.ts +23 -0
- package/src/starfish-editor.vue +176 -0
- package/src/styles/common/normalize.css +455 -0
- package/src/styles/component-list.scss +64 -0
- package/src/styles/condition-select.scss +176 -0
- package/src/styles/control_edit_size.scss +36 -0
- package/src/styles/custom-dialog.scss +110 -0
- package/src/styles/form-preview.scss +47 -0
- package/src/styles/framework.scss +150 -0
- package/src/styles/iconfont/iconfont.css +247 -0
- package/src/styles/iconfont/iconfont.js +1 -0
- package/src/styles/iconfont/iconfont.json +415 -0
- package/src/styles/iconfont/iconfont.ttf +0 -0
- package/src/styles/iconfont/iconfont.woff +0 -0
- package/src/styles/iconfont/iconfont.woff2 +0 -0
- package/src/styles/index.scss +18 -0
- package/src/styles/nav-list.scss +59 -0
- package/src/styles/nav.scss +46 -0
- package/src/styles/props-panel.scss +115 -0
- package/src/styles/resizer.scss +15 -0
- package/src/styles/shape.scss +101 -0
- package/src/styles/shortcutkey.scss +44 -0
- package/src/styles/variables.scss +36 -0
- package/src/styles/work-space.scss +126 -0
- package/src/type.ts +240 -0
- package/src/utils/_.ts +349 -0
- package/src/utils/formKeycon.ts +42 -0
- package/src/utils/shortcutKey.ts +46 -0
- package/src/utils/vm.ts +3 -0
- package/stats.html +4949 -0
- package/tsconfig.json +19 -0
- package/vite.config.ts +111 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "../..",
|
|
5
|
+
"paths": {
|
|
6
|
+
"~editor/*": [
|
|
7
|
+
"./src/pages/Editor/components/*"
|
|
8
|
+
],
|
|
9
|
+
"@/*": [
|
|
10
|
+
"src/*"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"exclude": [
|
|
16
|
+
"node_modules",
|
|
17
|
+
"**/dist/**/*"
|
|
18
|
+
],
|
|
19
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import dts from 'vite-plugin-dts';
|
|
3
|
+
import vue from "@vitejs/plugin-vue";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import pkg from './package.json';
|
|
6
|
+
import visualizer from 'rollup-plugin-visualizer'
|
|
7
|
+
import AutoImport from "unplugin-auto-import/vite";
|
|
8
|
+
import Components from "unplugin-vue-components/vite";
|
|
9
|
+
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
10
|
+
const alias: any = [
|
|
11
|
+
{
|
|
12
|
+
find: "@",
|
|
13
|
+
replacement: path.resolve(__dirname, "./src"),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
find: "~editor",
|
|
17
|
+
replacement: path.resolve(__dirname, "./src/components"),
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
if (process.env.NODE_ENV != "production") {
|
|
21
|
+
alias.push({ find: /^starfish-form$/, replacement: path.join(__dirname, "../form/src/main.ts") });
|
|
22
|
+
}
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
plugins: [
|
|
25
|
+
dts({
|
|
26
|
+
outputDir: path.join(path.resolve(__dirname, 'dist'), "types"),
|
|
27
|
+
include: ['src/**/*'],
|
|
28
|
+
staticImport: true,
|
|
29
|
+
insertTypesEntry: true,
|
|
30
|
+
logDiagnostics: true
|
|
31
|
+
}),
|
|
32
|
+
vue(),
|
|
33
|
+
visualizer({
|
|
34
|
+
open: true, //在默认用户代理中打开生成的文件
|
|
35
|
+
}),
|
|
36
|
+
AutoImport({
|
|
37
|
+
resolvers: [ElementPlusResolver()],
|
|
38
|
+
}),
|
|
39
|
+
Components({
|
|
40
|
+
resolvers: [ElementPlusResolver()],
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
resolve: {
|
|
44
|
+
alias,
|
|
45
|
+
},
|
|
46
|
+
css: {
|
|
47
|
+
//css预处理
|
|
48
|
+
preprocessorOptions: {
|
|
49
|
+
scss: {
|
|
50
|
+
additionalData: '@import "./src/styles/variables.scss";',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
postcss: {
|
|
54
|
+
plugins: [
|
|
55
|
+
{
|
|
56
|
+
postcssPlugin: "internal:charset-removal",
|
|
57
|
+
AtRule: {
|
|
58
|
+
charset: (atRule) => {
|
|
59
|
+
if (atRule.name === "charset") {
|
|
60
|
+
atRule.remove();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
server: {
|
|
69
|
+
host: "0.0.0.0",
|
|
70
|
+
port: 8888,
|
|
71
|
+
},
|
|
72
|
+
build: {
|
|
73
|
+
cssCodeSplit: false, // 如果设置为false,整个项目中的所有 CSS 将被提取到一个 CSS 文件中
|
|
74
|
+
sourcemap: false, // 构建后是否生成 source map 文件。如果为 true,将会创建一个独立的 source map 文件
|
|
75
|
+
target: "esnext", // 设置最终构建的浏览器兼容目标。默认值是一个 Vite 特有的值——'modules' 还可设置为 'es2015' 'es2016'等
|
|
76
|
+
minify: "terser", // 'terser' 相对较慢,但大多数情况下构建后的文件体积更小。'esbuild' 最小化混淆更快但构建后的文件相对更大。
|
|
77
|
+
// terserOptions: {
|
|
78
|
+
// compress: {
|
|
79
|
+
// drop_console: true, // 生产环境去除console
|
|
80
|
+
// drop_debugger: true, // 生产环境去除debugger
|
|
81
|
+
// },
|
|
82
|
+
// },
|
|
83
|
+
lib: {
|
|
84
|
+
entry: "src/main.ts",
|
|
85
|
+
name: "StarfishEditor",
|
|
86
|
+
fileName: "starfish-editor",
|
|
87
|
+
formats: ['es'],
|
|
88
|
+
},
|
|
89
|
+
rollupOptions: {
|
|
90
|
+
// input: {
|
|
91
|
+
// main: path.resolve(__dirname, "index.html"),
|
|
92
|
+
// },
|
|
93
|
+
// manualChunks(id) {
|
|
94
|
+
// if (id.includes("node_modules") && id.includes("element-plus")) {
|
|
95
|
+
// return "element-plus";
|
|
96
|
+
// } else if (id.includes("node_modules") && id.includes("vue")) {
|
|
97
|
+
// return "vue";
|
|
98
|
+
// } else if (id.includes("node_modules") && id.includes("wangeditor")) {
|
|
99
|
+
// return "vendor";
|
|
100
|
+
// } else if (id.includes("node_modules") && id.includes("jsoneditor")) {
|
|
101
|
+
// return "jsoneditor";
|
|
102
|
+
// } else {
|
|
103
|
+
// return "vendor";
|
|
104
|
+
// }
|
|
105
|
+
// },
|
|
106
|
+
external(id: string) {
|
|
107
|
+
return Object.keys(pkg.dependencies).some((k) => new RegExp(`^${k}`).test(id));
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
});
|