@xiaou66/picture-types 0.0.3 → 0.0.5
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/index.d.ts +2 -9
- package/dist/scripts/set-dev-types.d.ts +1 -0
- package/dist/scripts/set-publish-types.d.ts +1 -0
- package/dist/{Flow.d.ts → src/Flow.d.ts} +7 -7
- package/dist/{Plugin.d.ts → src/Plugin.d.ts} +3 -0
- package/dist/{Storage.d.ts → src/Storage.d.ts} +6 -2
- package/dist/src/UITemplate.d.ts +45 -0
- package/dist/src/index.d.ts +10 -0
- package/package.json +6 -2
- /package/dist/{Common.d.ts → src/Common.d.ts} +0 -0
- /package/dist/{File.d.ts → src/File.d.ts} +0 -0
- /package/dist/{Store.d.ts → src/Store.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AsyncComponentLoader } from 'vue';
|
|
2
|
-
import { PluginInfo } from './Plugin';
|
|
2
|
+
import { PluginConfig, PluginInfo } from './Plugin';
|
|
3
3
|
import { FileUpdateInfoItem } from './File';
|
|
4
4
|
import { FileLibraryItem, SceneInfoItem } from './Store';
|
|
5
|
+
import { UITemplateConfig } from './UITemplate';
|
|
5
6
|
/**
|
|
6
7
|
* 流程节点
|
|
7
8
|
*/
|
|
@@ -34,7 +35,7 @@ export interface FlowProvide {
|
|
|
34
35
|
removeNode: (id: string) => void;
|
|
35
36
|
updateNodeField: (id: string, field: string, value: any) => void;
|
|
36
37
|
updateNode: (id: string, nodeData: Record<string, any>) => void;
|
|
37
|
-
createNode: (node:
|
|
38
|
+
createNode: (node: FlowNodePluginConfig) => void;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* 流程节点分组类型
|
|
@@ -59,14 +60,13 @@ export interface FlowNodePluginInfo extends PluginInfo {
|
|
|
59
60
|
/**
|
|
60
61
|
* 流程节点插件
|
|
61
62
|
*/
|
|
62
|
-
export interface
|
|
63
|
+
export interface FlowNodePluginConfig extends PluginConfig<FlowNodePluginInfo> {
|
|
63
64
|
/**
|
|
64
|
-
*
|
|
65
|
+
* 配置 ui, 与 {@link uiConfigComponent} 属性二选一
|
|
65
66
|
*/
|
|
66
|
-
|
|
67
|
-
pluginInfo: FlowNodePluginInfo;
|
|
67
|
+
uiConfig?: UITemplateConfig;
|
|
68
68
|
/**
|
|
69
|
-
* 自定义配置 UI
|
|
69
|
+
* 自定义配置 UI, 与 {@link uiConfig} 属性二选一
|
|
70
70
|
*/
|
|
71
71
|
uiConfigComponent?: AsyncComponentLoader;
|
|
72
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AsyncComponentLoader, AsyncComponentOptions } from 'vue';
|
|
2
2
|
import { PluginInfo, PluginConfig } from './Plugin';
|
|
3
|
+
import { UITemplateConfig } from './UITemplate';
|
|
3
4
|
/**
|
|
4
5
|
* 上传文件结果
|
|
5
6
|
*/
|
|
@@ -82,7 +83,7 @@ export interface StorageUIFormElement {
|
|
|
82
83
|
customComponent?: AsyncComponentLoader | AsyncComponentOptions;
|
|
83
84
|
formItem: {
|
|
84
85
|
rules?: Record<string, any>;
|
|
85
|
-
|
|
86
|
+
name: string;
|
|
86
87
|
label: string;
|
|
87
88
|
[key: string]: any;
|
|
88
89
|
};
|
|
@@ -114,6 +115,9 @@ export interface StorageUIConfig {
|
|
|
114
115
|
export interface StoragePluginInfo extends PluginInfo {
|
|
115
116
|
/**
|
|
116
117
|
* 插件分组
|
|
118
|
+
* cloudVendor 云厂商
|
|
119
|
+
* self 自建
|
|
120
|
+
* other 其他
|
|
117
121
|
*/
|
|
118
122
|
pluginGroup: 'cloudVendor' | 'self' | 'other';
|
|
119
123
|
}
|
|
@@ -124,5 +128,5 @@ export interface StoragePluginConfig extends PluginConfig<StoragePluginInfo> {
|
|
|
124
128
|
/**
|
|
125
129
|
* 配置 ui
|
|
126
130
|
*/
|
|
127
|
-
uiConfig?:
|
|
131
|
+
uiConfig?: UITemplateConfig;
|
|
128
132
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AsyncComponentLoader, AsyncComponentOptions } from 'vue';
|
|
2
|
+
export type DynamicFormItemType = 'input' | 'input-format' | 'radio-group' | 'switch' | 'input-button' | 'select' | 'custom';
|
|
3
|
+
/**
|
|
4
|
+
* 动态表单项
|
|
5
|
+
*/
|
|
6
|
+
export interface DynamicFormItem {
|
|
7
|
+
/**
|
|
8
|
+
* 表单项类型
|
|
9
|
+
*/
|
|
10
|
+
type: DynamicFormItemType;
|
|
11
|
+
/**
|
|
12
|
+
* 自定义表单组件
|
|
13
|
+
*/
|
|
14
|
+
customComponent?: AsyncComponentLoader | AsyncComponentOptions;
|
|
15
|
+
/**
|
|
16
|
+
* 表单项基本属性值
|
|
17
|
+
*/
|
|
18
|
+
formItem: {
|
|
19
|
+
rules?: Record<string, any>;
|
|
20
|
+
name: string;
|
|
21
|
+
label: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 元素属性值
|
|
26
|
+
*/
|
|
27
|
+
elementProperty: Record<string, any>;
|
|
28
|
+
/**
|
|
29
|
+
* 元素事件
|
|
30
|
+
*/
|
|
31
|
+
elementEvent?: Record<string, any>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 动态表单配置
|
|
35
|
+
*/
|
|
36
|
+
export interface UITemplateConfig {
|
|
37
|
+
/**
|
|
38
|
+
* 提示
|
|
39
|
+
*/
|
|
40
|
+
tips: string;
|
|
41
|
+
/**
|
|
42
|
+
* 表单
|
|
43
|
+
*/
|
|
44
|
+
forms: DynamicFormItem[];
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiaou66/picture-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Picture bed plugin system",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -15,11 +15,15 @@
|
|
|
15
15
|
"build": "vite build",
|
|
16
16
|
"dev": "vite",
|
|
17
17
|
"prepare": "npm run build",
|
|
18
|
-
"
|
|
18
|
+
"prepublishOnly": "tsx scripts/set-publish-types.ts",
|
|
19
|
+
"postpublish": "tsx scripts/set-dev-types.ts",
|
|
20
|
+
"release": "npm publish"
|
|
19
21
|
},
|
|
20
22
|
"author": "xiaou",
|
|
21
23
|
"license": "ISC",
|
|
22
24
|
"devDependencies": {
|
|
25
|
+
"@types/node": "^22.17.1",
|
|
26
|
+
"tsx": "^4.21.0",
|
|
23
27
|
"typescript": "^5.0.0",
|
|
24
28
|
"vite": "npm:rolldown-vite@^7.2.11",
|
|
25
29
|
"vite-plugin-dts": "^4.5.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|