@easy-editor/materials-dashboard-text 0.0.7 → 0.0.9
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 +12 -0
- package/dist/component.esm.js +40 -0
- package/dist/component.esm.js.map +1 -0
- package/dist/component.js +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.esm.js +288 -0
- package/dist/meta.esm.js.map +1 -0
- package/dist/meta.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* @easy-editor/materials-dashboard-text v0.0.8 (component, esm) */
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
const Text = props => {
|
|
5
|
+
const {
|
|
6
|
+
ref,
|
|
7
|
+
text = 'Text',
|
|
8
|
+
fontSize = 14,
|
|
9
|
+
color = '#ffffff',
|
|
10
|
+
fontWeight = 'normal',
|
|
11
|
+
textAlign = 'left',
|
|
12
|
+
lineHeight = 1.5,
|
|
13
|
+
className = '',
|
|
14
|
+
style: externalStyle
|
|
15
|
+
} = props;
|
|
16
|
+
const internalStyle = {
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '100%',
|
|
19
|
+
fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,
|
|
20
|
+
color,
|
|
21
|
+
fontWeight,
|
|
22
|
+
textAlign,
|
|
23
|
+
lineHeight,
|
|
24
|
+
wordBreak: 'break-word',
|
|
25
|
+
whiteSpace: 'pre-wrap'
|
|
26
|
+
};
|
|
27
|
+
const mergedStyle = {
|
|
28
|
+
...internalStyle,
|
|
29
|
+
...externalStyle
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/jsx("div", {
|
|
32
|
+
className: className,
|
|
33
|
+
ref: ref,
|
|
34
|
+
style: mergedStyle,
|
|
35
|
+
children: text
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { Text as default };
|
|
40
|
+
//# sourceMappingURL=component.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.esm.js","sources":["../src/component.tsx"],"sourcesContent":["import type { CSSProperties, Ref } from 'react'\n\ninterface TextProps {\n ref?: Ref<HTMLDivElement>\n text?: string\n fontSize?: number | string\n color?: string\n fontWeight?: string | number\n textAlign?: 'left' | 'center' | 'right' | 'justify'\n lineHeight?: number | string\n className?: string\n style?: CSSProperties\n}\n\nconst Text = (props: TextProps) => {\n const {\n ref,\n text = 'Text',\n fontSize = 14,\n color = '#ffffff',\n fontWeight = 'normal',\n textAlign = 'left',\n lineHeight = 1.5,\n className = '',\n style: externalStyle,\n } = props\n\n const internalStyle: CSSProperties = {\n width: '100%',\n height: '100%',\n fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,\n color,\n fontWeight,\n textAlign,\n lineHeight,\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n }\n\n const mergedStyle = { ...internalStyle, ...externalStyle }\n\n return (\n <div className={className} ref={ref} style={mergedStyle}>\n {text}\n </div>\n )\n}\n\nexport default Text\n"],"names":["Text","props","ref","text","fontSize","color","fontWeight","textAlign","lineHeight","className","style","externalStyle","internalStyle","width","height","wordBreak","whiteSpace","mergedStyle","_jsx","children"],"mappings":";;;AAcA,MAAMA,IAAI,GAAIC,KAAgB,IAAK;EACjC,MAAM;IACJC,GAAG;AACHC,IAAAA,IAAI,GAAG,MAAM;AACbC,IAAAA,QAAQ,GAAG,EAAE;AACbC,IAAAA,KAAK,GAAG,SAAS;AACjBC,IAAAA,UAAU,GAAG,QAAQ;AACrBC,IAAAA,SAAS,GAAG,MAAM;AAClBC,IAAAA,UAAU,GAAG,GAAG;AAChBC,IAAAA,SAAS,GAAG,EAAE;AACdC,IAAAA,KAAK,EAAEC;AACT,GAAC,GAAGV,KAAK;AAET,EAAA,MAAMW,aAA4B,GAAG;AACnCC,IAAAA,KAAK,EAAE,MAAM;AACbC,IAAAA,MAAM,EAAE,MAAM;IACdV,QAAQ,EAAE,OAAOA,QAAQ,KAAK,QAAQ,GAAG,CAAA,EAAGA,QAAQ,CAAA,EAAA,CAAI,GAAGA,QAAQ;IACnEC,KAAK;IACLC,UAAU;IACVC,SAAS;IACTC,UAAU;AACVO,IAAAA,SAAS,EAAE,YAAY;AACvBC,IAAAA,UAAU,EAAE;GACb;AAED,EAAA,MAAMC,WAAW,GAAG;AAAE,IAAA,GAAGL,aAAa;IAAE,GAAGD;GAAe;AAE1D,EAAA,oBACEO,GAAA,CAAA,KAAA,EAAA;AAAKT,IAAAA,SAAS,EAAEA,SAAU;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACQ,IAAAA,KAAK,EAAEO,WAAY;AAAAE,IAAAA,QAAA,EACrDhB;AAAI,GACF,CAAC;AAEV;;;;"}
|
package/dist/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-text v0.0.
|
|
1
|
+
/* @easy-editor/materials-dashboard-text v0.0.8 (component) */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-text v0.0.
|
|
1
|
+
/* @easy-editor/materials-dashboard-text v0.0.8 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
|
package/dist/meta.esm.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/* @easy-editor/materials-dashboard-text v0.0.8 (meta, esm) */
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
const MaterialGroup = {
|
|
5
|
+
BASIC: 'basic'};
|
|
6
|
+
|
|
7
|
+
const COMPONENT_NAME = 'EasyEditorMaterialsText';
|
|
8
|
+
const PACKAGE_NAME = '@easy-editor/materials-dashboard-text';
|
|
9
|
+
|
|
10
|
+
const Text = props => {
|
|
11
|
+
const {
|
|
12
|
+
ref,
|
|
13
|
+
text = 'Text',
|
|
14
|
+
fontSize = 14,
|
|
15
|
+
color = '#ffffff',
|
|
16
|
+
fontWeight = 'normal',
|
|
17
|
+
textAlign = 'left',
|
|
18
|
+
lineHeight = 1.5,
|
|
19
|
+
className = '',
|
|
20
|
+
style: externalStyle
|
|
21
|
+
} = props;
|
|
22
|
+
const internalStyle = {
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '100%',
|
|
25
|
+
fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,
|
|
26
|
+
color,
|
|
27
|
+
fontWeight,
|
|
28
|
+
textAlign,
|
|
29
|
+
lineHeight,
|
|
30
|
+
wordBreak: 'break-word',
|
|
31
|
+
whiteSpace: 'pre-wrap'
|
|
32
|
+
};
|
|
33
|
+
const mergedStyle = {
|
|
34
|
+
...internalStyle,
|
|
35
|
+
...externalStyle
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/jsx("div", {
|
|
38
|
+
className: className,
|
|
39
|
+
ref: ref,
|
|
40
|
+
style: mergedStyle,
|
|
41
|
+
children: text
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const configure = {
|
|
46
|
+
props: [{
|
|
47
|
+
type: 'group',
|
|
48
|
+
title: '功能',
|
|
49
|
+
setter: 'TabSetter',
|
|
50
|
+
items: [{
|
|
51
|
+
type: 'group',
|
|
52
|
+
key: 'basic',
|
|
53
|
+
title: '基本',
|
|
54
|
+
items: [{
|
|
55
|
+
name: 'id',
|
|
56
|
+
title: 'ID',
|
|
57
|
+
setter: 'NodeIdSetter'
|
|
58
|
+
}, {
|
|
59
|
+
name: 'title',
|
|
60
|
+
title: '标题',
|
|
61
|
+
setter: 'StringSetter',
|
|
62
|
+
extraProps: {
|
|
63
|
+
getValue(target) {
|
|
64
|
+
return target.getExtraPropValue('title');
|
|
65
|
+
},
|
|
66
|
+
setValue(target, value) {
|
|
67
|
+
target.setExtraPropValue('title', value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
type: 'group',
|
|
72
|
+
title: '基础属性',
|
|
73
|
+
setter: {
|
|
74
|
+
componentName: 'CollapseSetter',
|
|
75
|
+
props: {
|
|
76
|
+
icon: false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
items: [{
|
|
80
|
+
name: 'rect',
|
|
81
|
+
title: '位置尺寸',
|
|
82
|
+
setter: 'RectSetter',
|
|
83
|
+
extraProps: {
|
|
84
|
+
getValue(target) {
|
|
85
|
+
return target.getExtraPropValue('$dashboard.rect');
|
|
86
|
+
},
|
|
87
|
+
setValue(target, value) {
|
|
88
|
+
target.setExtraPropValue('$dashboard.rect', value);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}]
|
|
92
|
+
}, {
|
|
93
|
+
name: 'text',
|
|
94
|
+
title: '文本内容',
|
|
95
|
+
setter: 'StringSetter'
|
|
96
|
+
}, {
|
|
97
|
+
type: 'group',
|
|
98
|
+
title: '字体样式',
|
|
99
|
+
setter: {
|
|
100
|
+
componentName: 'CollapseSetter',
|
|
101
|
+
props: {
|
|
102
|
+
icon: false
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
items: [{
|
|
106
|
+
name: 'fontSize',
|
|
107
|
+
title: '字体大小',
|
|
108
|
+
setter: 'NumberSetter',
|
|
109
|
+
extraProps: {
|
|
110
|
+
defaultValue: 14
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
name: 'color',
|
|
114
|
+
title: '文字颜色',
|
|
115
|
+
setter: 'ColorSetter',
|
|
116
|
+
extraProps: {
|
|
117
|
+
defaultValue: '#000000'
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
name: 'fontWeight',
|
|
121
|
+
title: '字体粗细',
|
|
122
|
+
setter: {
|
|
123
|
+
componentName: 'SelectSetter',
|
|
124
|
+
props: {
|
|
125
|
+
options: [{
|
|
126
|
+
label: '正常',
|
|
127
|
+
value: 'normal'
|
|
128
|
+
}, {
|
|
129
|
+
label: '粗体',
|
|
130
|
+
value: 'bold'
|
|
131
|
+
}, {
|
|
132
|
+
label: '100',
|
|
133
|
+
value: '100'
|
|
134
|
+
}, {
|
|
135
|
+
label: '200',
|
|
136
|
+
value: '200'
|
|
137
|
+
}, {
|
|
138
|
+
label: '300',
|
|
139
|
+
value: '300'
|
|
140
|
+
}, {
|
|
141
|
+
label: '400',
|
|
142
|
+
value: '400'
|
|
143
|
+
}, {
|
|
144
|
+
label: '500',
|
|
145
|
+
value: '500'
|
|
146
|
+
}, {
|
|
147
|
+
label: '600',
|
|
148
|
+
value: '600'
|
|
149
|
+
}, {
|
|
150
|
+
label: '700',
|
|
151
|
+
value: '700'
|
|
152
|
+
}, {
|
|
153
|
+
label: '800',
|
|
154
|
+
value: '800'
|
|
155
|
+
}, {
|
|
156
|
+
label: '900',
|
|
157
|
+
value: '900'
|
|
158
|
+
}]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
extraProps: {
|
|
162
|
+
defaultValue: 'normal'
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
name: 'lineHeight',
|
|
166
|
+
title: '行高',
|
|
167
|
+
setter: 'NumberSetter',
|
|
168
|
+
extraProps: {
|
|
169
|
+
defaultValue: 1.5
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
name: 'textAlign',
|
|
173
|
+
title: '文本对齐',
|
|
174
|
+
setter: {
|
|
175
|
+
componentName: 'RadioGroupSetter',
|
|
176
|
+
props: {
|
|
177
|
+
options: [{
|
|
178
|
+
label: '左对齐',
|
|
179
|
+
value: 'left'
|
|
180
|
+
}, {
|
|
181
|
+
label: '居中',
|
|
182
|
+
value: 'center'
|
|
183
|
+
}, {
|
|
184
|
+
label: '右对齐',
|
|
185
|
+
value: 'right'
|
|
186
|
+
}, {
|
|
187
|
+
label: '两端对齐',
|
|
188
|
+
value: 'justify'
|
|
189
|
+
}]
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
extraProps: {
|
|
193
|
+
defaultValue: 'left'
|
|
194
|
+
}
|
|
195
|
+
}]
|
|
196
|
+
}]
|
|
197
|
+
}, {
|
|
198
|
+
type: 'group',
|
|
199
|
+
key: 'advanced',
|
|
200
|
+
title: '高级',
|
|
201
|
+
items: [{
|
|
202
|
+
type: 'group',
|
|
203
|
+
title: '高级设置',
|
|
204
|
+
setter: {
|
|
205
|
+
componentName: 'CollapseSetter',
|
|
206
|
+
props: {
|
|
207
|
+
icon: false
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
items: [{
|
|
211
|
+
title: '显隐',
|
|
212
|
+
setter: 'SwitchSetter',
|
|
213
|
+
extraProps: {
|
|
214
|
+
supportVariable: true,
|
|
215
|
+
getValue(target) {
|
|
216
|
+
return target.getExtraPropValue('condition');
|
|
217
|
+
},
|
|
218
|
+
setValue(target, value) {
|
|
219
|
+
target.setExtraPropValue('condition', value);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}]
|
|
223
|
+
}]
|
|
224
|
+
}]
|
|
225
|
+
}],
|
|
226
|
+
component: {},
|
|
227
|
+
supports: {},
|
|
228
|
+
advanced: {
|
|
229
|
+
view: Text
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const snippets = [{
|
|
234
|
+
title: 'Text',
|
|
235
|
+
screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',
|
|
236
|
+
schema: {
|
|
237
|
+
componentName: COMPONENT_NAME,
|
|
238
|
+
props: {
|
|
239
|
+
text: 'Text Text Text',
|
|
240
|
+
fontSize: 14,
|
|
241
|
+
color: '#ffffff',
|
|
242
|
+
textAlign: 'left'
|
|
243
|
+
},
|
|
244
|
+
$dashboard: {
|
|
245
|
+
rect: {
|
|
246
|
+
width: 120,
|
|
247
|
+
height: 40
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}, {
|
|
252
|
+
title: 'Heading',
|
|
253
|
+
screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',
|
|
254
|
+
schema: {
|
|
255
|
+
componentName: COMPONENT_NAME,
|
|
256
|
+
props: {
|
|
257
|
+
text: 'Heading',
|
|
258
|
+
fontSize: 24,
|
|
259
|
+
color: '#ffffff',
|
|
260
|
+
fontWeight: 'bold',
|
|
261
|
+
textAlign: 'center'
|
|
262
|
+
},
|
|
263
|
+
$dashboard: {
|
|
264
|
+
rect: {
|
|
265
|
+
width: 200,
|
|
266
|
+
height: 50
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}];
|
|
271
|
+
|
|
272
|
+
const meta = {
|
|
273
|
+
componentName: COMPONENT_NAME,
|
|
274
|
+
title: 'Text',
|
|
275
|
+
group: MaterialGroup.BASIC,
|
|
276
|
+
devMode: 'proCode',
|
|
277
|
+
npm: {
|
|
278
|
+
package: PACKAGE_NAME,
|
|
279
|
+
version: 'latest',
|
|
280
|
+
globalName: COMPONENT_NAME,
|
|
281
|
+
componentName: COMPONENT_NAME
|
|
282
|
+
},
|
|
283
|
+
snippets,
|
|
284
|
+
configure
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export { meta as default };
|
|
288
|
+
//# sourceMappingURL=meta.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.esm.js","sources":["../../../shared/src/types.ts","../src/constants.ts","../src/component.tsx","../src/configure.ts","../src/snippets.ts","../src/meta.ts"],"sourcesContent":["/**\n * Material Groups\n * 物料分组常量\n */\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DATA: 'data',\n /** 交互 */\n INTERACTION: 'interaction',\n} as const\n\n/**\n * Material Group Type\n */\nexport type MaterialGroupType = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsTextMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsTextComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsText)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsText'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-text'\n","import type { CSSProperties, Ref } from 'react'\n\ninterface TextProps {\n ref?: Ref<HTMLDivElement>\n text?: string\n fontSize?: number | string\n color?: string\n fontWeight?: string | number\n textAlign?: 'left' | 'center' | 'right' | 'justify'\n lineHeight?: number | string\n className?: string\n style?: CSSProperties\n}\n\nconst Text = (props: TextProps) => {\n const {\n ref,\n text = 'Text',\n fontSize = 14,\n color = '#ffffff',\n fontWeight = 'normal',\n textAlign = 'left',\n lineHeight = 1.5,\n className = '',\n style: externalStyle,\n } = props\n\n const internalStyle: CSSProperties = {\n width: '100%',\n height: '100%',\n fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,\n color,\n fontWeight,\n textAlign,\n lineHeight,\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n }\n\n const mergedStyle = { ...internalStyle, ...externalStyle }\n\n return (\n <div className={className} ref={ref} style={mergedStyle}>\n {text}\n </div>\n )\n}\n\nexport default Text\n","import type { Configure } from '@easy-editor/core'\nimport Text from './component'\n\nconst configure: Configure = {\n props: [\n {\n type: 'group',\n title: '功能',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'basic',\n title: '基本',\n items: [\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\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 name: 'text',\n title: '文本内容',\n setter: 'StringSetter',\n },\n {\n type: 'group',\n title: '字体样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'fontSize',\n title: '字体大小',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 14,\n },\n },\n {\n name: 'color',\n title: '文字颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#000000',\n },\n },\n {\n name: 'fontWeight',\n title: '字体粗细',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '正常', value: 'normal' },\n { label: '粗体', value: 'bold' },\n { label: '100', value: '100' },\n { label: '200', value: '200' },\n { label: '300', value: '300' },\n { label: '400', value: '400' },\n { label: '500', value: '500' },\n { label: '600', value: '600' },\n { label: '700', value: '700' },\n { label: '800', value: '800' },\n { label: '900', value: '900' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'normal',\n },\n },\n {\n name: 'lineHeight',\n title: '行高',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 1.5,\n },\n },\n {\n name: 'textAlign',\n title: '文本对齐',\n setter: {\n componentName: 'RadioGroupSetter',\n props: {\n options: [\n { label: '左对齐', value: 'left' },\n { label: '居中', value: 'center' },\n { label: '右对齐', value: 'right' },\n { label: '两端对齐', value: 'justify' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'left',\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n type: 'group',\n title: '高级设置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n title: '显隐',\n setter: 'SwitchSetter',\n extraProps: {\n supportVariable: true,\n getValue(target) {\n return target.getExtraPropValue('condition')\n },\n setValue(target, value: boolean) {\n target.setExtraPropValue('condition', value)\n },\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {\n view: Text,\n },\n}\n\nexport default configure\n","import type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nconst snippets: Snippet[] = [\n {\n title: 'Text',\n screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n text: 'Text Text Text',\n fontSize: 14,\n color: '#ffffff',\n textAlign: 'left',\n },\n $dashboard: {\n rect: {\n width: 120,\n height: 40,\n },\n },\n },\n },\n {\n title: 'Heading',\n screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n text: 'Heading',\n fontSize: 24,\n color: '#ffffff',\n fontWeight: 'bold',\n textAlign: 'center',\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","import 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'\n\nconst meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: 'Text',\n group: MaterialGroup.BASIC,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: 'latest',\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n"],"names":["MaterialGroup","INNER","BASIC","COMPONENT_NAME","PACKAGE_NAME","Text","props","ref","text","fontSize","color","fontWeight","textAlign","lineHeight","className","style","externalStyle","internalStyle","width","height","wordBreak","whiteSpace","mergedStyle","_jsx","children","configure","type","title","setter","items","key","name","extraProps","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","componentName","icon","defaultValue","options","label","supportVariable","component","supports","advanced","view","snippets","screenshot","schema","$dashboard","rect","meta","group","devMode","npm","package","version","globalName"],"mappings":";;;AAIO,MAAMA,aAAa,GAAG;AAE3BC,EAEAC,KAAK,EAAE,OAOT,CAAU;;ACHH,MAAMC,cAAc,GAAG,yBAAyB;AAKhD,MAAMC,YAAY,GAAG,uCAAuC;;ACHnE,MAAMC,IAAI,GAAIC,KAAgB,IAAK;EACjC,MAAM;IACJC,GAAG;AACHC,IAAAA,IAAI,GAAG,MAAM;AACbC,IAAAA,QAAQ,GAAG,EAAE;AACbC,IAAAA,KAAK,GAAG,SAAS;AACjBC,IAAAA,UAAU,GAAG,QAAQ;AACrBC,IAAAA,SAAS,GAAG,MAAM;AAClBC,IAAAA,UAAU,GAAG,GAAG;AAChBC,IAAAA,SAAS,GAAG,EAAE;AACdC,IAAAA,KAAK,EAAEC;AACT,GAAC,GAAGV,KAAK;AAET,EAAA,MAAMW,aAA4B,GAAG;AACnCC,IAAAA,KAAK,EAAE,MAAM;AACbC,IAAAA,MAAM,EAAE,MAAM;IACdV,QAAQ,EAAE,OAAOA,QAAQ,KAAK,QAAQ,GAAG,CAAA,EAAGA,QAAQ,CAAA,EAAA,CAAI,GAAGA,QAAQ;IACnEC,KAAK;IACLC,UAAU;IACVC,SAAS;IACTC,UAAU;AACVO,IAAAA,SAAS,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EvD,aAAa,CAACE,KAAK;AAC1BsD,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,GAAG,EAAE;AACHC,IAAAA,OAAO,EAAEtD,YAAY;AACrBuD,IAAAA,OAAO,EAAE,QAAQ;AACjBC,IAAAA,UAAU,EAAEzD,cAAc;AAC1BoC,IAAAA,aAAa,EAAEpC;GAChB;EACD8C,QAAQ;AACRxB,EAAAA;AACF;;;;"}
|
package/dist/meta.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-text v0.0.
|
|
1
|
+
/* @easy-editor/materials-dashboard-text v0.0.8 (meta) */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
|