@easy-editor/materials-dashboard-progress 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/CHANGELOG.md +27 -13
- package/easypack.config.ts +10 -0
- package/package.json +4 -8
- package/src/component.tsx +56 -12
- package/src/configure.ts +168 -265
- package/src/index.tsx +7 -7
- package/src/meta.ts +2 -2
- package/src/snippets.ts +69 -60
- package/tsconfig.json +20 -9
- package/.vite/plugins/vite-plugin-external-deps.ts +0 -224
- package/.vite/plugins/vite-plugin-material-dev.ts +0 -218
- package/dist/component.esm.js +0 -257
- package/dist/component.esm.js.map +0 -1
- package/dist/component.js +0 -265
- package/dist/component.js.map +0 -1
- package/dist/component.min.js +0 -2
- package/dist/component.min.js.map +0 -1
- package/dist/index.cjs +0 -560
- package/dist/index.cjs.map +0 -1
- package/dist/index.esm.js +0 -557
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -564
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist/meta.esm.js +0 -304
- package/dist/meta.esm.js.map +0 -1
- package/dist/meta.js +0 -315
- package/dist/meta.js.map +0 -1
- package/dist/meta.min.js +0 -2
- package/dist/meta.min.js.map +0 -1
- package/dist/src/component.d.ts +0 -36
- package/dist/src/configure.d.ts +0 -7
- package/dist/src/constants.d.ts +0 -36
- package/dist/src/index.d.ts +0 -6
- package/dist/src/meta.d.ts +0 -7
- package/dist/src/snippets.d.ts +0 -7
- package/rollup.config.js +0 -212
- package/tsconfig.build.json +0 -12
- package/tsconfig.test.json +0 -7
- package/vite.config.ts +0 -54
package/dist/meta.js
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-progress v0.0.2 (meta) */
|
|
2
|
-
(function (global, factory) {
|
|
3
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgressMeta = {}));
|
|
6
|
-
})(this, (function (exports) { 'use strict';
|
|
7
|
-
|
|
8
|
-
const MaterialGroup = {
|
|
9
|
-
DISPLAY: 'display'};
|
|
10
|
-
|
|
11
|
-
const COMPONENT_NAME = 'EasyEditorMaterialsProgress';
|
|
12
|
-
const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress';
|
|
13
|
-
|
|
14
|
-
const configure = {
|
|
15
|
-
props: [{
|
|
16
|
-
type: 'group',
|
|
17
|
-
title: '属性',
|
|
18
|
-
setter: 'TabSetter',
|
|
19
|
-
items: [{
|
|
20
|
-
type: 'group',
|
|
21
|
-
key: 'config',
|
|
22
|
-
title: '配置',
|
|
23
|
-
setter: {
|
|
24
|
-
componentName: 'CollapseSetter',
|
|
25
|
-
props: {
|
|
26
|
-
icon: false
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
items: [
|
|
30
|
-
{
|
|
31
|
-
name: 'id',
|
|
32
|
-
title: 'ID',
|
|
33
|
-
setter: 'NodeIdSetter',
|
|
34
|
-
extraProps: {
|
|
35
|
-
label: false
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
name: 'title',
|
|
39
|
-
title: '标题',
|
|
40
|
-
setter: 'StringSetter',
|
|
41
|
-
extraProps: {
|
|
42
|
-
getValue(target) {
|
|
43
|
-
return target.getExtraPropValue('title');
|
|
44
|
-
},
|
|
45
|
-
setValue(target, value) {
|
|
46
|
-
target.setExtraPropValue('title', value);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
type: 'group',
|
|
51
|
-
title: '基础属性',
|
|
52
|
-
setter: {
|
|
53
|
-
componentName: 'CollapseSetter',
|
|
54
|
-
props: {
|
|
55
|
-
icon: false
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
items: [{
|
|
59
|
-
name: 'rect',
|
|
60
|
-
title: '位置尺寸',
|
|
61
|
-
setter: 'RectSetter',
|
|
62
|
-
extraProps: {
|
|
63
|
-
getValue(target) {
|
|
64
|
-
return target.getExtraPropValue('$dashboard.rect');
|
|
65
|
-
},
|
|
66
|
-
setValue(target, value) {
|
|
67
|
-
target.setExtraPropValue('$dashboard.rect', value);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: 'group',
|
|
74
|
-
title: '数值',
|
|
75
|
-
setter: {
|
|
76
|
-
componentName: 'CollapseSetter',
|
|
77
|
-
props: {
|
|
78
|
-
icon: false
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
items: [{
|
|
82
|
-
name: 'value',
|
|
83
|
-
title: '当前值',
|
|
84
|
-
setter: 'NumberSetter',
|
|
85
|
-
extraProps: {
|
|
86
|
-
defaultValue: 0
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
name: 'maxValue',
|
|
90
|
-
title: '最大值',
|
|
91
|
-
setter: 'NumberSetter',
|
|
92
|
-
extraProps: {
|
|
93
|
-
defaultValue: 100
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
name: 'valueFormat',
|
|
97
|
-
title: '值格式',
|
|
98
|
-
setter: {
|
|
99
|
-
componentName: 'SelectSetter',
|
|
100
|
-
props: {
|
|
101
|
-
options: [{
|
|
102
|
-
label: '百分比',
|
|
103
|
-
value: 'percent'
|
|
104
|
-
}, {
|
|
105
|
-
label: '数值',
|
|
106
|
-
value: 'number'
|
|
107
|
-
}]
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
extraProps: {
|
|
111
|
-
defaultValue: 'percent'
|
|
112
|
-
}
|
|
113
|
-
}]
|
|
114
|
-
}, {
|
|
115
|
-
type: 'group',
|
|
116
|
-
title: '显示',
|
|
117
|
-
setter: {
|
|
118
|
-
componentName: 'CollapseSetter',
|
|
119
|
-
props: {
|
|
120
|
-
icon: false
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
items: [{
|
|
124
|
-
name: 'type',
|
|
125
|
-
title: '进度条类型',
|
|
126
|
-
setter: {
|
|
127
|
-
componentName: 'SelectSetter',
|
|
128
|
-
props: {
|
|
129
|
-
options: [{
|
|
130
|
-
label: '环形',
|
|
131
|
-
value: 'ring'
|
|
132
|
-
}, {
|
|
133
|
-
label: '线性',
|
|
134
|
-
value: 'bar'
|
|
135
|
-
}]
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
extraProps: {
|
|
139
|
-
defaultValue: 'ring'
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
name: 'showValue',
|
|
143
|
-
title: '显示数值',
|
|
144
|
-
setter: 'SwitchSetter',
|
|
145
|
-
extraProps: {
|
|
146
|
-
defaultValue: true
|
|
147
|
-
}
|
|
148
|
-
}, {
|
|
149
|
-
name: 'showLabel',
|
|
150
|
-
title: '显示标签',
|
|
151
|
-
setter: 'SwitchSetter',
|
|
152
|
-
extraProps: {
|
|
153
|
-
defaultValue: false
|
|
154
|
-
}
|
|
155
|
-
}, {
|
|
156
|
-
name: 'label',
|
|
157
|
-
title: '标签文本',
|
|
158
|
-
setter: 'StringSetter'
|
|
159
|
-
}]
|
|
160
|
-
}, {
|
|
161
|
-
type: 'group',
|
|
162
|
-
title: '样式',
|
|
163
|
-
setter: {
|
|
164
|
-
componentName: 'CollapseSetter',
|
|
165
|
-
props: {
|
|
166
|
-
icon: false
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
items: [{
|
|
170
|
-
name: 'strokeWidthRatio',
|
|
171
|
-
title: '线条粗细',
|
|
172
|
-
setter: {
|
|
173
|
-
componentName: 'SliderSetter',
|
|
174
|
-
props: {
|
|
175
|
-
min: 0.02,
|
|
176
|
-
max: 0.2,
|
|
177
|
-
step: 0.01
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
extraProps: {
|
|
181
|
-
defaultValue: 0.07
|
|
182
|
-
}
|
|
183
|
-
}, {
|
|
184
|
-
name: 'trackColor',
|
|
185
|
-
title: '轨道颜色',
|
|
186
|
-
setter: 'ColorSetter',
|
|
187
|
-
extraProps: {
|
|
188
|
-
defaultValue: 'rgba(255, 255, 255, 0.1)'
|
|
189
|
-
}
|
|
190
|
-
}, {
|
|
191
|
-
name: 'progressColor',
|
|
192
|
-
title: '进度颜色',
|
|
193
|
-
setter: 'ColorSetter',
|
|
194
|
-
extraProps: {
|
|
195
|
-
defaultValue: '#00ffff'
|
|
196
|
-
}
|
|
197
|
-
}, {
|
|
198
|
-
name: 'gradientEnable',
|
|
199
|
-
title: '启用渐变',
|
|
200
|
-
setter: 'SwitchSetter',
|
|
201
|
-
extraProps: {
|
|
202
|
-
defaultValue: false
|
|
203
|
-
}
|
|
204
|
-
}, {
|
|
205
|
-
name: 'gradientColors',
|
|
206
|
-
title: '渐变颜色',
|
|
207
|
-
setter: 'ColorSetter',
|
|
208
|
-
extraProps: {
|
|
209
|
-
defaultValue: ['#00d4ff', '#9b59b6']
|
|
210
|
-
}
|
|
211
|
-
}]
|
|
212
|
-
}]
|
|
213
|
-
}, {
|
|
214
|
-
type: 'group',
|
|
215
|
-
key: 'data',
|
|
216
|
-
title: '数据',
|
|
217
|
-
items: [{
|
|
218
|
-
name: 'dataBinding',
|
|
219
|
-
title: '数据绑定',
|
|
220
|
-
setter: 'DataBindingSetter'
|
|
221
|
-
}]
|
|
222
|
-
}, {
|
|
223
|
-
type: 'group',
|
|
224
|
-
key: 'advanced',
|
|
225
|
-
title: '高级',
|
|
226
|
-
items: [{
|
|
227
|
-
name: 'condition',
|
|
228
|
-
title: '显隐控制',
|
|
229
|
-
setter: 'SwitchSetter',
|
|
230
|
-
extraProps: {
|
|
231
|
-
defaultValue: true,
|
|
232
|
-
supportVariable: true
|
|
233
|
-
}
|
|
234
|
-
}]
|
|
235
|
-
}]
|
|
236
|
-
}],
|
|
237
|
-
component: {},
|
|
238
|
-
supports: {},
|
|
239
|
-
advanced: {}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
const snippets = [{
|
|
243
|
-
title: '进度环',
|
|
244
|
-
screenshot: '',
|
|
245
|
-
schema: {
|
|
246
|
-
componentName: COMPONENT_NAME,
|
|
247
|
-
props: {
|
|
248
|
-
value: 75,
|
|
249
|
-
maxValue: 100,
|
|
250
|
-
type: 'ring',
|
|
251
|
-
showValue: true,
|
|
252
|
-
showLabel: false,
|
|
253
|
-
valueFormat: 'percent',
|
|
254
|
-
strokeWidthRatio: 0.07,
|
|
255
|
-
progressColor: '#00ffff'
|
|
256
|
-
},
|
|
257
|
-
$dashboard: {
|
|
258
|
-
rect: {
|
|
259
|
-
width: 140,
|
|
260
|
-
height: 140
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}, {
|
|
265
|
-
title: '线性进度条',
|
|
266
|
-
screenshot: '',
|
|
267
|
-
schema: {
|
|
268
|
-
componentName: COMPONENT_NAME,
|
|
269
|
-
props: {
|
|
270
|
-
value: 85,
|
|
271
|
-
maxValue: 100,
|
|
272
|
-
type: 'bar',
|
|
273
|
-
showValue: true,
|
|
274
|
-
showLabel: true,
|
|
275
|
-
label: '完成率',
|
|
276
|
-
valueFormat: 'percent',
|
|
277
|
-
progressColor: '#00ff88',
|
|
278
|
-
gradientEnable: true,
|
|
279
|
-
gradientColors: ['#00ff88', '#00d4ff']
|
|
280
|
-
},
|
|
281
|
-
$dashboard: {
|
|
282
|
-
rect: {
|
|
283
|
-
width: 300,
|
|
284
|
-
height: 50
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}];
|
|
289
|
-
|
|
290
|
-
var version = "0.0.2";
|
|
291
|
-
var pkg = {
|
|
292
|
-
version: version};
|
|
293
|
-
|
|
294
|
-
const meta = {
|
|
295
|
-
componentName: COMPONENT_NAME,
|
|
296
|
-
title: '进度条',
|
|
297
|
-
group: MaterialGroup.DISPLAY,
|
|
298
|
-
devMode: 'proCode',
|
|
299
|
-
npm: {
|
|
300
|
-
package: PACKAGE_NAME,
|
|
301
|
-
version: pkg.version,
|
|
302
|
-
globalName: COMPONENT_NAME,
|
|
303
|
-
componentName: COMPONENT_NAME
|
|
304
|
-
},
|
|
305
|
-
snippets,
|
|
306
|
-
configure
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
exports.default = meta;
|
|
310
|
-
exports.meta = meta;
|
|
311
|
-
|
|
312
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
313
|
-
|
|
314
|
-
}));
|
|
315
|
-
//# sourceMappingURL=meta.js.map
|
package/dist/meta.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/configure.ts","../src/snippets.ts","../src/meta.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n","/**\n * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n"],"names":["MaterialGroup","INNER","DISPLAY","COMPONENT_NAME","PACKAGE_NAME","configure","props","type","title","setter","items","key","componentName","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced","snippets","screenshot","schema","maxValue","showValue","showLabel","valueFormat","strokeWidthRatio","progressColor","$dashboard","rect","width","height","gradientEnable","gradientColors","meta","group","devMode","npm","package","version","pkg","globalName"],"mappings":";;;;;;;EAMO,MAAMA,aAAa,GAAG;EAE3BC,EAMAC,OAAO,EAAE,SAOX,CAAU;;ECTH,MAAMC,cAAc,GAAG,6BAA6B;EAKpD,MAAMC,YAAY,GAAG,2CAA2C;;ECVhE,MAAMC,SAAoB,GAAG;EAClCC,EAAAA,KAAK,EAAE,CACL;EACEC,IAAAA,IAAI,EAAE,OAAO;EACbC,IAAAA,KAAK,EAAE,IAAI;EACXC,IAAAA,MAAM,EAAE,WAAW;EACnBC,IAAAA,KAAK,EAAE,CACL;EACEH,MAAAA,IAAI,EAAE,OAAO;EACbI,MAAAA,GAAG,EAAE,QAAQ;EACbH,MAAAA,KAAK,EAAE,IAAI;EACXC,MAAAA,MAAM,EAAE;EACNG,QAAAA,aAAa,EAAE,gBAAgB;EAC/BN,QAAAA,KAAK,EAAE;EACLO,UAAAA,IAAI,EAAE;EACR;SACD;EACDH,MAAAA,KAAK,EAAE;EAEL,MAAA;EACEI,QAAAA,IAAI,EAAE,IAAI;EACVN,QAAAA,KAAK,EAAE,IAAI;EACXC,QAAAA,MAAM,EAAE,cAAc;EACtBM,QAAAA,UAAU,EAAE;EAEVC,UAAAA,KAAK,EAAE;EACT;EACF,OAAC,EACD;EACEF,QAAAA,IAAI,EAAE,OAAO;EACbN,QAAAA,KAAK,EAAE,IAAI;EACXC,QAAAA,MAAM,EAAE,cAAc;EACtBM,QAAAA,UAAU,EAAE;YACVE,QAAQA,CAACC,MAAM,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AE,SAAS;EAClBC,EAAAA,GAAG,EAAE;EACHC,IAAAA,OAAO,EAAE/C,YAAY;MACrBgD,OAAO,EAAEC,GAAG,CAACD,OAAO;EACpBE,IAAAA,UAAU,EAAEnD,cAAc;EAC1BS,IAAAA,aAAa,EAAET;KAChB;IACD6B,QAAQ;EACR3B,EAAAA;EACF;;;;;;;;;;;"}
|
package/dist/meta.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgressMeta={})}(this,function(e){"use strict";const t="EasyEditorMaterialsProgress";const r={componentName:t,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.2",globalName:t,componentName:t},snippets:[{title:"进度环",screenshot:"",schema:{componentName:t,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:t,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.default=r,e.meta=r,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
|
-
//# sourceMappingURL=meta.min.js.map
|
package/dist/meta.min.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.min.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/meta.ts","../src/snippets.ts","../src/configure.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","value","maxValue","type","showValue","showLabel","valueFormat","strokeWidthRatio","progressColor","$dashboard","rect","width","height","label","gradientEnable","gradientColors","configure","setter","items","key","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced"],"mappings":"sQAMO,MCMMA,EAAiB,8BCAvB,MAAMC,EAA0B,CACrCC,c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CACVM,aAAc,6BAGlB,CACEP,KAAM,gBACN/B,MAAO,OACP2B,OAAQ,cACRK,WAAY,CACVM,aAAc,YAGlB,CACEP,KAAM,iBACN/B,MAAO,OACP2B,OAAQ,eACRK,WAAY,CACVM,cAAc,IAGlB,CACEP,KAAM,iBACN/B,MAAO,OACP2B,OAAQ,cACRK,WAAY,CACVM,aAAc,CAAC,UAAW,iBAOtC,CACEzB,KAAM,QACNgB,IAAK,OACL7B,MAAO,KACP4B,MAAO,CACL,CACEG,KAAM,cACN/B,MAAO,OACP2B,OAAQ,uBAId,CACEd,KAAM,QACNgB,IAAK,WACL7B,MAAO,KACP4B,MAAO,CACL,CACEG,KAAM,YACN/B,MAAO,OACP2B,OAAQ,eACRK,WAAY,CACVM,cAAc,EACdK,iBAAiB,SAQ/BC,UAAW,CAAA,EACXC,SAAU,CAAA,EACVC,SAAU,CAAA"}
|
package/dist/src/component.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progress Component
|
|
3
|
-
* 进度组件 - 支持环形和线性进度条
|
|
4
|
-
*/
|
|
5
|
-
import { type CSSProperties, type Ref } from 'react';
|
|
6
|
-
export interface ProgressProps {
|
|
7
|
-
ref?: Ref<HTMLDivElement>;
|
|
8
|
-
/** 当前值 */
|
|
9
|
-
value?: number;
|
|
10
|
-
/** 最大值 */
|
|
11
|
-
maxValue?: number;
|
|
12
|
-
/** 进度条类型 */
|
|
13
|
-
type?: 'ring' | 'bar';
|
|
14
|
-
/** 是否显示数值 */
|
|
15
|
-
showValue?: boolean;
|
|
16
|
-
/** 是否显示标签 */
|
|
17
|
-
showLabel?: boolean;
|
|
18
|
-
/** 标签文本 */
|
|
19
|
-
label?: string;
|
|
20
|
-
/** 数值格式 */
|
|
21
|
-
valueFormat?: 'percent' | 'number';
|
|
22
|
-
/** 线条宽度比例(相对于尺寸的百分比) */
|
|
23
|
-
strokeWidthRatio?: number;
|
|
24
|
-
/** 轨道颜色 */
|
|
25
|
-
trackColor?: string;
|
|
26
|
-
/** 进度颜色 */
|
|
27
|
-
progressColor?: string;
|
|
28
|
-
/** 是否启用渐变 */
|
|
29
|
-
gradientEnable?: boolean;
|
|
30
|
-
/** 渐变颜色 [起始色, 结束色] */
|
|
31
|
-
gradientColors?: [string, string];
|
|
32
|
-
/** 外部样式 */
|
|
33
|
-
style?: CSSProperties;
|
|
34
|
-
}
|
|
35
|
-
export declare const Progress: React.FC<ProgressProps>;
|
|
36
|
-
export default Progress;
|
package/dist/src/configure.d.ts
DELETED
package/dist/src/constants.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 物料常量配置
|
|
3
|
-
* 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* UMD 全局变量基础名称
|
|
7
|
-
* 用于构建:
|
|
8
|
-
* - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)
|
|
9
|
-
* - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)
|
|
10
|
-
* - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)
|
|
11
|
-
*/
|
|
12
|
-
export declare const COMPONENT_NAME = "EasyEditorMaterialsProgress";
|
|
13
|
-
/**
|
|
14
|
-
* 包名
|
|
15
|
-
*/
|
|
16
|
-
export declare const PACKAGE_NAME = "@easy-editor/materials-dashboard-progress";
|
|
17
|
-
/**
|
|
18
|
-
* 值格式类型
|
|
19
|
-
*/
|
|
20
|
-
export declare const VALUE_FORMATS: readonly ["percent", "number"];
|
|
21
|
-
/**
|
|
22
|
-
* 默认轨道颜色
|
|
23
|
-
*/
|
|
24
|
-
export declare const DEFAULT_TRACK_COLOR = "rgba(255, 255, 255, 0.1)";
|
|
25
|
-
/**
|
|
26
|
-
* 默认进度颜色
|
|
27
|
-
*/
|
|
28
|
-
export declare const DEFAULT_PROGRESS_COLOR = "#00ffff";
|
|
29
|
-
/**
|
|
30
|
-
* 默认渐变颜色
|
|
31
|
-
*/
|
|
32
|
-
export declare const DEFAULT_GRADIENT_COLORS: [string, string];
|
|
33
|
-
/**
|
|
34
|
-
* 默认发光颜色
|
|
35
|
-
*/
|
|
36
|
-
export declare const DEFAULT_GLOW_COLOR = "#00ffff";
|
package/dist/src/index.d.ts
DELETED
package/dist/src/meta.d.ts
DELETED