@easy-editor/materials-dashboard-text 0.0.10 → 0.0.12

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/meta.js CHANGED
@@ -1,64 +1,33 @@
1
- /* @easy-editor/materials-dashboard-text v0.0.9 (meta) */
1
+ /* @easy-editor/materials-dashboard-text v0.0.11 (meta) */
2
2
  (function (global, factory) {
3
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
4
- typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
5
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsTextMeta = {}, global.jsxRuntime));
6
- })(this, (function (exports, jsxRuntime) { 'use strict';
7
-
8
- const MaterialGroup = {
9
- BASIC: 'basic'};
10
-
11
- const COMPONENT_NAME = 'EasyEditorMaterialsText';
12
- const PACKAGE_NAME = '@easy-editor/materials-dashboard-text';
13
-
14
- const Text = props => {
15
- const {
16
- ref,
17
- text = 'Text',
18
- fontSize = 14,
19
- color = '#ffffff',
20
- fontWeight = 'normal',
21
- textAlign = 'left',
22
- lineHeight = 1.5,
23
- className = '',
24
- style: externalStyle
25
- } = props;
26
- const internalStyle = {
27
- width: '100%',
28
- height: '100%',
29
- fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,
30
- color,
31
- fontWeight,
32
- textAlign,
33
- lineHeight,
34
- wordBreak: 'break-word',
35
- whiteSpace: 'pre-wrap'
36
- };
37
- const mergedStyle = {
38
- ...internalStyle,
39
- ...externalStyle
40
- };
41
- return /*#__PURE__*/jsxRuntime.jsx("div", {
42
- className: className,
43
- ref: ref,
44
- style: mergedStyle,
45
- children: text
46
- });
47
- };
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.EasyEditorMaterialsTextMeta = {}));
6
+ })(this, (function (exports) { 'use strict';
48
7
 
49
8
  const configure = {
50
9
  props: [{
51
10
  type: 'group',
52
- title: '功能',
11
+ title: '属性',
53
12
  setter: 'TabSetter',
54
13
  items: [{
55
14
  type: 'group',
56
- key: 'basic',
57
- title: '基本',
58
- items: [{
15
+ key: 'config',
16
+ title: '配置',
17
+ setter: {
18
+ componentName: 'CollapseSetter',
19
+ props: {
20
+ icon: false
21
+ }
22
+ },
23
+ items: [
24
+ {
59
25
  name: 'id',
60
26
  title: 'ID',
61
- setter: 'NodeIdSetter'
27
+ setter: 'NodeIdSetter',
28
+ extraProps: {
29
+ label: false
30
+ }
62
31
  }, {
63
32
  name: 'title',
64
33
  title: '标题',
@@ -93,13 +62,56 @@
93
62
  }
94
63
  }
95
64
  }]
96
- }, {
97
- name: 'text',
98
- title: '文本内容',
99
- setter: 'StringSetter'
65
+ },
66
+ {
67
+ type: 'group',
68
+ title: '内容',
69
+ setter: {
70
+ componentName: 'CollapseSetter',
71
+ props: {
72
+ icon: false
73
+ }
74
+ },
75
+ items: [{
76
+ name: 'content',
77
+ title: '文本内容',
78
+ setter: 'TextAreaSetter',
79
+ extraProps: {
80
+ defaultValue: '文本内容'
81
+ }
82
+ }, {
83
+ name: 'isLink',
84
+ title: '作为链接',
85
+ setter: 'SwitchSetter',
86
+ extraProps: {
87
+ defaultValue: false
88
+ }
89
+ }, {
90
+ name: 'href',
91
+ title: '链接地址',
92
+ setter: 'StringSetter'
93
+ }, {
94
+ name: 'target',
95
+ title: '打开方式',
96
+ setter: {
97
+ componentName: 'SelectSetter',
98
+ props: {
99
+ options: [{
100
+ label: '新窗口',
101
+ value: '_blank'
102
+ }, {
103
+ label: '当前窗口',
104
+ value: '_self'
105
+ }]
106
+ }
107
+ },
108
+ extraProps: {
109
+ defaultValue: '_blank'
110
+ }
111
+ }]
100
112
  }, {
101
113
  type: 'group',
102
- title: '字体样式',
114
+ title: '字体',
103
115
  setter: {
104
116
  componentName: 'CollapseSetter',
105
117
  props: {
@@ -111,14 +123,32 @@
111
123
  title: '字体大小',
112
124
  setter: 'NumberSetter',
113
125
  extraProps: {
114
- defaultValue: 14
126
+ defaultValue: 16
127
+ }
128
+ }, {
129
+ name: 'fontWeight',
130
+ title: '字体粗细',
131
+ setter: {
132
+ componentName: 'SelectSetter',
133
+ props: {
134
+ options: [{
135
+ label: '正常',
136
+ value: 'normal'
137
+ }, {
138
+ label: '粗体',
139
+ value: 'bold'
140
+ }]
141
+ }
142
+ },
143
+ extraProps: {
144
+ defaultValue: 'normal'
115
145
  }
116
146
  }, {
117
147
  name: 'color',
118
- title: '文字颜色',
148
+ title: '颜色',
119
149
  setter: 'ColorSetter',
120
150
  extraProps: {
121
- defaultValue: '#000000'
151
+ defaultValue: '#ffffff'
122
152
  }
123
153
  }, {
124
154
  name: 'lineHeight',
@@ -128,14 +158,9 @@
128
158
  defaultValue: 1.5
129
159
  }
130
160
  }]
131
- }]
132
- }, {
133
- type: 'group',
134
- key: 'advanced',
135
- title: '高级',
136
- items: [{
161
+ }, {
137
162
  type: 'group',
138
- title: '高级设置',
163
+ title: '对齐',
139
164
  setter: {
140
165
  componentName: 'CollapseSetter',
141
166
  props: {
@@ -143,38 +168,121 @@
143
168
  }
144
169
  },
145
170
  items: [{
146
- title: '显隐',
147
- setter: 'SwitchSetter',
171
+ name: 'textAlign',
172
+ title: '水平对齐',
173
+ setter: {
174
+ componentName: 'SegmentedSetter',
175
+ props: {
176
+ options: [{
177
+ label: '左',
178
+ value: 'left'
179
+ }, {
180
+ label: '中',
181
+ value: 'center'
182
+ }, {
183
+ label: '右',
184
+ value: 'right'
185
+ }]
186
+ }
187
+ },
148
188
  extraProps: {
149
- supportVariable: true,
150
- getValue(target) {
151
- return target.getExtraPropValue('condition');
152
- },
153
- setValue(target, value) {
154
- target.setExtraPropValue('condition', value);
189
+ defaultValue: 'left'
190
+ }
191
+ }, {
192
+ name: 'verticalAlign',
193
+ title: '垂直对齐',
194
+ setter: {
195
+ componentName: 'SegmentedSetter',
196
+ props: {
197
+ options: [{
198
+ label: '上',
199
+ value: 'top'
200
+ }, {
201
+ label: '中',
202
+ value: 'middle'
203
+ }, {
204
+ label: '下',
205
+ value: 'bottom'
206
+ }]
155
207
  }
208
+ },
209
+ extraProps: {
210
+ defaultValue: 'middle'
211
+ }
212
+ }]
213
+ }, {
214
+ type: 'group',
215
+ title: '效果',
216
+ setter: {
217
+ componentName: 'CollapseSetter',
218
+ props: {
219
+ icon: false
220
+ }
221
+ },
222
+ items: [{
223
+ name: 'underline',
224
+ title: '下划线',
225
+ setter: 'SwitchSetter',
226
+ extraProps: {
227
+ defaultValue: false
228
+ }
229
+ }, {
230
+ name: 'glowEnable',
231
+ title: '发光效果',
232
+ setter: 'SwitchSetter',
233
+ extraProps: {
234
+ defaultValue: false
235
+ }
236
+ }, {
237
+ name: 'glowColor',
238
+ title: '发光颜色',
239
+ setter: 'ColorSetter',
240
+ extraProps: {
241
+ defaultValue: '#00d4ff'
156
242
  }
157
243
  }]
158
244
  }]
245
+ }, {
246
+ type: 'group',
247
+ key: 'data',
248
+ title: '数据',
249
+ items: [{
250
+ name: 'dataBinding',
251
+ title: '数据绑定',
252
+ setter: 'DataBindingSetter'
253
+ }]
254
+ }, {
255
+ type: 'group',
256
+ key: 'advanced',
257
+ title: '高级',
258
+ items: [{
259
+ name: 'condition',
260
+ title: '显隐控制',
261
+ setter: 'SwitchSetter',
262
+ extraProps: {
263
+ defaultValue: true,
264
+ supportVariable: true
265
+ }
266
+ }]
159
267
  }]
160
268
  }],
161
269
  component: {},
162
270
  supports: {},
163
- advanced: {
164
- view: Text
165
- }
271
+ advanced: {}
166
272
  };
167
273
 
274
+ const COMPONENT_NAME = 'EasyEditorMaterialsText';
275
+ const PACKAGE_NAME = '@easy-editor/materials-dashboard-text';
276
+
168
277
  const snippets = [{
169
- title: 'Text',
170
- screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',
278
+ title: '普通文本',
279
+ screenshot: '',
171
280
  schema: {
172
281
  componentName: COMPONENT_NAME,
173
282
  props: {
174
- text: 'Text Text Text',
175
- fontSize: 14,
176
- color: '#ffffff',
177
- textAlign: 'left'
283
+ content: '这是一段普通文本',
284
+ fontSize: 16,
285
+ color: '#ffffff'
178
286
  },
179
287
  $dashboard: {
180
288
  rect: {
@@ -184,44 +292,92 @@
184
292
  }
185
293
  }
186
294
  }, {
187
- title: 'Heading',
188
- screenshot: 'https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg',
295
+ title: '标题文本',
296
+ screenshot: '',
189
297
  schema: {
190
298
  componentName: COMPONENT_NAME,
191
299
  props: {
192
- text: 'Heading',
193
- fontSize: 24,
194
- color: '#ffffff',
300
+ content: '标题文本',
301
+ fontSize: 32,
195
302
  fontWeight: 'bold',
303
+ color: '#ffffff',
196
304
  textAlign: 'center'
197
305
  },
198
306
  $dashboard: {
199
307
  rect: {
200
308
  width: 200,
201
- height: 50
309
+ height: 60
310
+ }
311
+ }
312
+ }
313
+ }, {
314
+ title: '发光标题',
315
+ screenshot: '',
316
+ schema: {
317
+ componentName: COMPONENT_NAME,
318
+ props: {
319
+ content: '发光标题',
320
+ fontSize: 36,
321
+ fontWeight: 'bold',
322
+ color: '#00d4ff',
323
+ textAlign: 'center',
324
+ glowEnable: true,
325
+ glowColor: '#00d4ff',
326
+ glowIntensity: 1.5
327
+ },
328
+ $dashboard: {
329
+ rect: {
330
+ width: 240,
331
+ height: 80
332
+ }
333
+ }
334
+ }
335
+ }, {
336
+ title: '链接文本',
337
+ screenshot: '',
338
+ schema: {
339
+ componentName: COMPONENT_NAME,
340
+ props: {
341
+ content: '点击跳转',
342
+ fontSize: 16,
343
+ color: '#00d4ff',
344
+ isLink: true,
345
+ href: 'https://easy-editor-docs.vercel.app/',
346
+ target: '_blank',
347
+ underline: true
348
+ },
349
+ $dashboard: {
350
+ rect: {
351
+ width: 120,
352
+ height: 40
202
353
  }
203
354
  }
204
355
  }
205
356
  }];
206
357
 
358
+ const MaterialGroup = {
359
+ BASIC: 'basic'};
360
+
361
+ var version = "0.0.11";
362
+ var pkg = {
363
+ version: version};
364
+
207
365
  const meta = {
208
366
  componentName: COMPONENT_NAME,
209
- title: 'Text',
367
+ title: '文本',
210
368
  group: MaterialGroup.BASIC,
211
369
  devMode: 'proCode',
212
370
  npm: {
213
371
  package: PACKAGE_NAME,
214
- version: 'latest',
372
+ version: pkg.version,
215
373
  globalName: COMPONENT_NAME,
216
374
  componentName: COMPONENT_NAME
217
375
  },
218
- snippets,
219
- configure
376
+ configure,
377
+ snippets
220
378
  };
221
379
 
222
- exports.default = meta;
223
-
224
- Object.defineProperty(exports, '__esModule', { value: true });
380
+ exports.meta = meta;
225
381
 
226
382
  }));
227
383
  //# sourceMappingURL=meta.js.map
package/dist/meta.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"meta.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: 'lineHeight',\n title: '行高',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 1.5,\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","supportVariable","component","supports","advanced","view","snippets","screenshot","schema","$dashboard","rect","meta","group","devMode","npm","package","version","globalName"],"mappings":";;;;;;;EAIO,MAAMA,aAAa,GAAG;EAE3BC,EAEAC,KAAK,EAAE,OAOT,CAAU;;ECHH,MAAMC,cAAc,GAAG,yBAAyB;EAKhD,MAAMC,YAAY,GAAG,uCAAuC;;ECHnE,MAAMC,IAAI,GAAIC,KAAgB,IAAK;IACjC,MAAM;MACJC,GAAG;EACHC,IAAAA,IAAI,GAAG,MAAM;EACbC,IAAAA,QAAQ,GAAG,EAAE;EACbC,IAAAA,KAAK,GAAG,SAAS;EACjBC,IAAAA,UAAU,GAAG,QAAQ;EACrBC,IAAAA,SAAS,GAAG,MAAM;EAClBC,IAAAA,UAAU,GAAG,GAAG;EAChBC,IAAAA,SAAS,GAAG,EAAE;EACdC,IAAAA,KAAK,EAAEC;EACT,GAAC,GAAGV,KAAK;EAET,EAAA,MAAMW,aAA4B,GAAG;EACnCC,IAAAA,KAAK,EAAE,MAAM;EACbC,IAAAA,MAAM,EAA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src/configure.ts","../src/constants.ts","../src/snippets.ts","../../../../shared/src/index.ts","../src/meta.ts"],"sourcesContent":["/**\n * Text 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: 'content',\n title: '文本内容',\n setter: 'TextAreaSetter',\n extraProps: {\n defaultValue: '文本内容',\n },\n },\n {\n name: 'isLink',\n title: '作为链接',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'href',\n title: '链接地址',\n setter: 'StringSetter',\n },\n {\n name: 'target',\n title: '打开方式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '新窗口', value: '_blank' },\n { label: '当前窗口', value: '_self' },\n ],\n },\n },\n extraProps: {\n defaultValue: '_blank',\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: 'fontSize',\n title: '字体大小',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 16,\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 ],\n },\n },\n extraProps: {\n defaultValue: 'normal',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#ffffff',\n },\n },\n {\n name: 'lineHeight',\n title: '行高',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 1.5,\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: 'textAlign',\n title: '水平对齐',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '左', value: 'left' },\n { label: '中', value: 'center' },\n { label: '右', value: 'right' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'left',\n },\n },\n {\n name: 'verticalAlign',\n title: '垂直对齐',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上', value: 'top' },\n { label: '中', value: 'middle' },\n { label: '下', value: 'bottom' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'middle',\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: 'underline',\n title: '下划线',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'glowEnable',\n title: '发光效果',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'glowColor',\n title: '发光颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\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","/**\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","/**\n * Text 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 content: '这是一段普通文本',\n fontSize: 16,\n color: '#ffffff',\n },\n $dashboard: {\n rect: {\n width: 120,\n height: 40,\n },\n },\n },\n },\n {\n title: '标题文本',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '标题文本',\n fontSize: 32,\n fontWeight: 'bold',\n color: '#ffffff',\n textAlign: 'center',\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 60,\n },\n },\n },\n },\n {\n title: '发光标题',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '发光标题',\n fontSize: 36,\n fontWeight: 'bold',\n color: '#00d4ff',\n textAlign: 'center',\n glowEnable: true,\n glowColor: '#00d4ff',\n glowIntensity: 1.5,\n },\n $dashboard: {\n rect: {\n width: 240,\n height: 80,\n },\n },\n },\n },\n {\n title: '链接文本',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '点击跳转',\n fontSize: 16,\n color: '#00d4ff',\n isLink: true,\n href: 'https://easy-editor-docs.vercel.app/',\n target: '_blank',\n underline: true,\n },\n $dashboard: {\n rect: {\n width: 120,\n height: 40,\n },\n },\n },\n },\n]\n","/**\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 * Text Meta\n * 文本组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { configure } from './configure'\nimport { snippets } from './snippets'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '文本',\n group: MaterialGroup.BASIC,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n configure,\n snippets,\n}\n"],"names":["configure","props","type","title","setter","items","key","componentName","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","defaultValue","options","supportVariable","component","supports","advanced","COMPONENT_NAME","PACKAGE_NAME","snippets","screenshot","schema","content","fontSize","color","$dashboard","rect","width","height","fontWeight","textAlign","glowEnable","glowColor","glowIntensity","isLink","href","underline","MaterialGroup","INNER","BASIC","meta","group","devMode","npm","package","version","pkg","globalName"],"mappings":";;;;;;;EAOO,MAAMA,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,EAAE;EACf,YAAA,OAAOA,MAAM,CAACC,iBAAiB,CAAC,OAAO,CAAC;YAC1C,CAAC;EACDC,UAAAA,QAAQA,CAACF,MAAM,EAAEG,KAAK,EAAE;EACtBH,YAAAA,MAAM,CAACI,iBAAiB,CAAC,OAAO,EAAED,KAAK,CAAC;EAC1C,UAAA;EACF;EACF,OAAC,EACD;EACEd,QAAAA,IAAI,EAAE,OAAO;EACbC,QAAAA,KAAK,EAAE,MAAM;EACbC,QAAAA,MAAM,EAAE;EACNG,UAAAA,aAAa,EAAE,gBAAgB;EAC/BN,UAAAA,KAAK,EAAE;EACLO,YAAAA,IAAI,EAAE;EACR;WACD;EACDH,QAAAA,KAAK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,IAAI;IACX6C,KAAK,EAAEJ,aAAa,CAACE,KAAK;EAC1BG,EAAAA,OAAO,EAAE,SAAS;EAClBC,EAAAA,GAAG,EAAE;EACHC,IAAAA,OAAO,EAAE1B,YAAY;MACrB2B,OAAO,EAAEC,GAAG,CAACD,OAAO;EACpBE,IAAAA,UAAU,EAAE9B,cAAc;EAC1BjB,IAAAA,aAAa,EAAEiB;KAChB;IACDxB,SAAS;EACT0B,EAAAA;EACF;;;;;;;;"}
package/dist/meta.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsTextMeta={},e.jsxRuntime)}(this,function(e,t){"use strict";const r="EasyEditorMaterialsText",o={componentName:r,title:"Text",group:"basic",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-text",version:"latest",globalName:r,componentName:r},snippets:[{title:"Text",screenshot:"https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg",schema:{componentName:r,props:{text:"Text Text Text",fontSize:14,color:"#ffffff",textAlign:"left"},$dashboard:{rect:{width:120,height:40}}}},{title:"Heading",screenshot:"https://img.alicdn.com/imgextra/i3/O1CN01n5wpxc1bi862KuXFz_!!6000000003498-55-tps-50-50.svg",schema:{componentName:r,props:{text:"Heading",fontSize:24,color:"#ffffff",fontWeight:"bold",textAlign:"center"},$dashboard:{rect:{width:200,height:50}}}}],configure:{props:[{type:"group",title:"功能",setter:"TabSetter",items:[{type:"group",key:"basic",title:"基本",items:[{name:"id",title:"ID",setter:"NodeIdSetter"},{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)}}}]},{name:"text",title:"文本内容",setter:"StringSetter"},{type:"group",title:"字体样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"fontSize",title:"字体大小",setter:"NumberSetter",extraProps:{defaultValue:14}},{name:"color",title:"文字颜色",setter:"ColorSetter",extraProps:{defaultValue:"#000000"}},{name:"lineHeight",title:"行高",setter:"NumberSetter",extraProps:{defaultValue:1.5}}]}]},{type:"group",key:"advanced",title:"高级",items:[{type:"group",title:"高级设置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{title:"显隐",setter:"SwitchSetter",extraProps:{supportVariable:!0,getValue:e=>e.getExtraPropValue("condition"),setValue(e,t){e.setExtraPropValue("condition",t)}}}]}]}]}],component:{},supports:{},advanced:{view:e=>{const{ref:r,text:o="Text",fontSize:i=14,color:a="#ffffff",fontWeight:s="normal",textAlign:n="left",lineHeight:l=1.5,className:p="",style:c}=e,d={...{width:"100%",height:"100%",fontSize:"number"==typeof i?`${i}px`:i,color:a,fontWeight:s,textAlign:n,lineHeight:l,wordBreak:"break-word",whiteSpace:"pre-wrap"},...c};return t.jsx("div",{className:p,ref:r,style:d,children:o})}}}};e.default=o,Object.defineProperty(e,"__esModule",{value:!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).EasyEditorMaterialsTextMeta={})}(this,function(e){"use strict";const t="EasyEditorMaterialsText";const o={componentName:t,title:"文本",group:"basic",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-text",version:"0.0.11",globalName:t,componentName:t},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:"content",title:"文本内容",setter:"TextAreaSetter",extraProps:{defaultValue:"文本内容"}},{name:"isLink",title:"作为链接",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"href",title:"链接地址",setter:"StringSetter"},{name:"target",title:"打开方式",setter:{componentName:"SelectSetter",props:{options:[{label:"新窗口",value:"_blank"},{label:"当前窗口",value:"_self"}]}},extraProps:{defaultValue:"_blank"}}]},{type:"group",title:"字体",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"fontSize",title:"字体大小",setter:"NumberSetter",extraProps:{defaultValue:16}},{name:"fontWeight",title:"字体粗细",setter:{componentName:"SelectSetter",props:{options:[{label:"正常",value:"normal"},{label:"粗体",value:"bold"}]}},extraProps:{defaultValue:"normal"}},{name:"color",title:"颜色",setter:"ColorSetter",extraProps:{defaultValue:"#ffffff"}},{name:"lineHeight",title:"行高",setter:"NumberSetter",extraProps:{defaultValue:1.5}}]},{type:"group",title:"对齐",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"textAlign",title:"水平对齐",setter:{componentName:"SegmentedSetter",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},extraProps:{defaultValue:"left"}},{name:"verticalAlign",title:"垂直对齐",setter:{componentName:"SegmentedSetter",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},extraProps:{defaultValue:"middle"}}]},{type:"group",title:"效果",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"underline",title:"下划线",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"glowEnable",title:"发光效果",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"glowColor",title:"发光颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00d4ff"}}]}]},{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:{}},snippets:[{title:"普通文本",screenshot:"",schema:{componentName:t,props:{content:"这是一段普通文本",fontSize:16,color:"#ffffff"},$dashboard:{rect:{width:120,height:40}}}},{title:"标题文本",screenshot:"",schema:{componentName:t,props:{content:"标题文本",fontSize:32,fontWeight:"bold",color:"#ffffff",textAlign:"center"},$dashboard:{rect:{width:200,height:60}}}},{title:"发光标题",screenshot:"",schema:{componentName:t,props:{content:"发光标题",fontSize:36,fontWeight:"bold",color:"#00d4ff",textAlign:"center",glowEnable:!0,glowColor:"#00d4ff",glowIntensity:1.5},$dashboard:{rect:{width:240,height:80}}}},{title:"链接文本",screenshot:"",schema:{componentName:t,props:{content:"点击跳转",fontSize:16,color:"#00d4ff",isLink:!0,href:"https://easy-editor-docs.vercel.app/",target:"_blank",underline:!0},$dashboard:{rect:{width:120,height:40}}}}]};e.meta=o});
2
2
  //# sourceMappingURL=meta.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.min.js","sources":["../../../shared/src/types.ts","../src/constants.ts","../src/meta.ts","../src/snippets.ts","../src/configure.ts","../src/component.tsx"],"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 { 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","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 { 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: 'lineHeight',\n title: '行高',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 1.5,\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 { 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":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","text","fontSize","color","textAlign","$dashboard","rect","width","height","fontWeight","configure","type","setter","items","key","name","extraProps","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","icon","defaultValue","supportVariable","component","supports","advanced","view","ref","lineHeight","className","style","externalStyle","mergedStyle","wordBreak","whiteSpace","_jsx","children"],"mappings":"kUAIO,MCQMA,EAAiB,0BCNxBC,EAA0B,CAC9BC,cAAeF,EACfG,MAAO,OACPC,MFDO,QEEPC,QAAS,UACTC,IAAK,CACHC,QDKwB,wCCJxBC,QAAS,SACTC,WAAYT,EACZE,cAAeF,GAEjBU,SCd0B,CAC1B,CACEP,MAAO,OACPQ,WAAY,8FACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,K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AO1B,CACEb,KAAM,QACNG,IAAK,WACLxB,MAAO,KACPuB,MAAO,CACL,CACEF,KAAM,QACNrB,MAAO,OACPsB,OAAQ,CACNvB,cAAe,iBACfW,MAAO,CACLuB,MAAM,IAGVV,MAAO,CACL,CACEvB,MAAO,KACPsB,OAAQ,eACRI,WAAY,CACVS,iBAAiB,EACjBR,SAASC,GACAA,EAAOC,kBAAkB,aAElCC,QAAAA,CAASF,EAAQG,GACfH,EAAOI,kBAAkB,YAAaD,EACxC,WAUlBK,UAAW,CAAA,EACXC,SAAU,CAAA,EACVC,SAAU,CACRC,KC7HU7B,IACZ,MAAM8B,IACJA,EAAG7B,KACHA,EAAO,OAAMC,SACbA,EAAW,GAAEC,MACbA,EAAQ,UAASM,WACjBA,EAAa,SAAQL,UACrBA,EAAY,OAAM2B,WAClBA,EAAa,IAAGC,UAChBA,EAAY,GACZC,MAAOC,GACLlC,EAcEmC,EAAc,IAZiB,CACnC5B,MAAO,OACPC,OAAQ,OACRN,SAA8B,iBAAbA,EAAwB,GAAGA,MAAeA,EAC3DC,QACAM,aACAL,YACA2B,aACAK,UAAW,aACXC,WAAY,eAG6BH,GAE3C,OACEI,EAAAA,IAAA,MAAA,CAAKN,UAAWA,EAAWF,IAAKA,EAAKG,MAAOE,EAAYI,SACrDtC"}
1
+ {"version":3,"file":"meta.min.js","sources":["../src/configure.ts","../src/constants.ts","../src/meta.ts","../../../../shared/src/index.ts","../src/snippets.ts"],"sourcesContent":["/**\n * Text 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: 'content',\n title: '文本内容',\n setter: 'TextAreaSetter',\n extraProps: {\n defaultValue: '文本内容',\n },\n },\n {\n name: 'isLink',\n title: '作为链接',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'href',\n title: '链接地址',\n setter: 'StringSetter',\n },\n {\n name: 'target',\n title: '打开方式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '新窗口', value: '_blank' },\n { label: '当前窗口', value: '_self' },\n ],\n },\n },\n extraProps: {\n defaultValue: '_blank',\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: 'fontSize',\n title: '字体大小',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 16,\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 ],\n },\n },\n extraProps: {\n defaultValue: 'normal',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#ffffff',\n },\n },\n {\n name: 'lineHeight',\n title: '行高',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 1.5,\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: 'textAlign',\n title: '水平对齐',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '左', value: 'left' },\n { label: '中', value: 'center' },\n { label: '右', value: 'right' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'left',\n },\n },\n {\n name: 'verticalAlign',\n title: '垂直对齐',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上', value: 'top' },\n { label: '中', value: 'middle' },\n { label: '下', value: 'bottom' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'middle',\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: 'underline',\n title: '下划线',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'glowEnable',\n title: '发光效果',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'glowColor',\n title: '发光颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\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","/**\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","/**\n * Text Meta\n * 文本组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { configure } from './configure'\nimport { snippets } from './snippets'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '文本',\n group: MaterialGroup.BASIC,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n configure,\n snippets,\n}\n","/**\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 * Text 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 content: '这是一段普通文本',\n fontSize: 16,\n color: '#ffffff',\n },\n $dashboard: {\n rect: {\n width: 120,\n height: 40,\n },\n },\n },\n },\n {\n title: '标题文本',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '标题文本',\n fontSize: 32,\n fontWeight: 'bold',\n color: '#ffffff',\n textAlign: 'center',\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 60,\n },\n },\n },\n },\n {\n title: '发光标题',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '发光标题',\n fontSize: 36,\n fontWeight: 'bold',\n color: '#00d4ff',\n textAlign: 'center',\n glowEnable: true,\n glowColor: '#00d4ff',\n glowIntensity: 1.5,\n },\n $dashboard: {\n rect: {\n width: 240,\n height: 80,\n },\n },\n },\n },\n {\n title: '链接文本',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n content: '点击跳转',\n fontSize: 16,\n color: '#00d4ff',\n isLink: true,\n href: 'https://easy-editor-docs.vercel.app/',\n target: '_blank',\n underline: true,\n },\n $dashboard: {\n rect: {\n width: 120,\n height: 40,\n },\n },\n },\n },\n]\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","configure","props","type","setter","items","key","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","defaultValue","options","supportVariable","component","supports","advanced","snippets","screenshot","schema","content","fontSize","color","$dashboard","rect","width","height","fontWeight","textAlign","glowEnable","glowColor","glowIntensity","isLink","href","underline"],"mappings":"kQAOO,MCKMA,EAAiB,0BCAvB,MAAMC,EAA0B,CACrCC,cAAeF,EACfG,MAAO,KACPC,MCLO,QDMPC,QAAS,UACTC,IAAK,CACHC,QDDwB,wCCExBC,iBACAC,WAAYT,EACZE,cAAeF,GAEjBU,UFhBkC,CAClCC,MAAO,CACL,CACEC,KAAM,QACNT,MAAO,KACPU,OAAQ,YACRC,MAAO,CACL,CACEF,KAAM,QACNG,IAAK,SACLZ,MAAO,KACPU,OAAQ,CACNX,cAAe,iBACfS,MAAO,CACLK,MAAM,IAGVF,MAAO,CAEL,CACEG,KAAM,KACNd,MAAO,KACPU,OA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