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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.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;;ACHnE,QAAMC,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,EAAE,MAAM;MACdV,QAAQ,EAAE,OAAOA,QAAQ,KAAK,QAAQ,GAAG,CAAA,EAAGA,QAAQ,CAAA,EAAA,CAAI,GAAGA,QAAQ;MACnEC,KAAK;MACLC,UAAU;MACVC,SAAS;MACTC,UAAU;EACVO,IAAAA,SAAS,EAAE,YAAY;EACvBC,IAAAA,UAAU,EAAE;KACb;EAED,EAAA,MAAMC,WAAW,GAAG;EAAE,IAAA,GAAGL,aAAa;MAAE,GAAGD;KAAe;EAE1D,EAAA,oBACEO,cAAA,CAAA,KAAA,EAAA;EAAKT,IAAAA,SAAS,EAAEA,SAAU;EAACP,IAAAA,GAAG,EAAEA,GAAI;EAACQ,IAAA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C,EAAAA,MAAM,EAAE;EACNV,IAAAA,aAAa,EAAEpC,cAAc;EAC7BG,IAAAA,KAAK,EAAE;EACLE,MAAAA,IAAI,EAAE,SAAS;EACfC,MAAAA,QAAQ,EAAE,EAAE;EACZC,MAAAA,KAAK,EAAE,SAAS;EAChBC,MAAAA,UAAU,EAAE,MAAM;EAClBC,MAAAA,SAAS,EAAE;OACZ;EACDsC,IAAAA,UAAU,EAAE;EACVC,MAAAA,IAAI,EAAE;EACJjC,QAAAA,KAAK,EAAE,GAAG;EACVC,QAAAA,MAAM,EAAE;EACV;EACF;EACF;EACF,CAAC,CACF;;ACrCD,QAAMiC,IAAuB,GAAG;EAC9Bb,EAAAA,aAAa,EAAEpC,cAAc;EAC7BwB,EAAAA,KAAK,EAAE,MAAM;IACb0B,KAAK,EAAErD,aAAa,CAACE,KAAK;EAC1BoD,EAAAA,OAAO,EAAE,SAAS;EAClBC,EAAAA,GAAG,EAAE;EACHC,IAAAA,OAAO,EAAEpD,YAAY;EACrBqD,IAAAA,OAAO,EAAE,QAAQ;EACjBC,IAAAA,UAAU,EAAEvD,cAAc;EAC1BoC,IAAAA,aAAa,EAAEpC;KAChB;IACD4C,QAAQ;EACRtB,EAAAA;EACF;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../../../../shared/src/lib/utils.ts","../../../../shared/src/index.ts","../../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/component.tsx","../src/configure.ts","../src/constants.ts","../src/snippets.ts","../src/meta.ts"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { clsx, type ClassValue } from 'clsx'\n\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs)\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","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Text Component\n * 文本组件 - 支持普通文本、链接、标题、发光效果\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TextAlign = 'left' | 'center' | 'right'\nexport type VerticalAlign = 'top' | 'middle' | 'bottom'\n\nexport interface TextProps {\n ref?: Ref<HTMLDivElement>\n /** 文本内容 */\n content?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体粗细 */\n fontWeight?: number | 'normal' | 'bold'\n /** 字体家族 */\n fontFamily?: string\n /** 颜色 */\n color?: string\n /** 水平对齐 */\n textAlign?: TextAlign\n /** 垂直对齐 */\n verticalAlign?: VerticalAlign\n /** 行高 */\n lineHeight?: number\n /** 字间距 */\n letterSpacing?: number\n /** 是否为链接 */\n isLink?: boolean\n /** 链接地址 */\n href?: string\n /** 链接打开方式 */\n target?: '_self' | '_blank'\n /** 下划线 */\n underline?: boolean\n /** 发光效果 */\n glowEnable?: boolean\n /** 发光颜色 */\n glowColor?: string\n /** 发光强度 */\n glowIntensity?: number\n /** 显隐控制 */\n condition?: boolean\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst getAlignClass = (align: TextAlign): string => {\n switch (align) {\n case 'left':\n return styles.alignLeft\n case 'center':\n return styles.alignCenter\n case 'right':\n return styles.alignRight\n default:\n return styles.alignLeft\n }\n}\n\nconst getValignClass = (align: VerticalAlign): string => {\n switch (align) {\n case 'top':\n return styles.valignTop\n case 'middle':\n return styles.valignMiddle\n case 'bottom':\n return styles.valignBottom\n default:\n return styles.valignMiddle\n }\n}\n\nexport const Text: React.FC<TextProps> = ({\n ref,\n content = '文本内容',\n fontSize = 16,\n fontWeight = 'normal',\n fontFamily = 'inherit',\n color = '#ffffff',\n textAlign = 'left',\n verticalAlign = 'middle',\n lineHeight = 1.5,\n letterSpacing = 0,\n isLink = false,\n href = '',\n target = '_blank',\n underline = false,\n glowEnable = false,\n glowColor = '#00d4ff',\n glowIntensity = 1,\n style: externalStyle,\n}) => {\n // 计算发光效果\n const textShadow = glowEnable\n ? `0 0 ${10 * glowIntensity}px ${glowColor}, 0 0 ${20 * glowIntensity}px ${glowColor}, 0 0 ${30 * glowIntensity}px ${glowColor}`\n : undefined\n\n const textStyle: CSSProperties = {\n fontSize,\n fontWeight,\n fontFamily,\n color,\n lineHeight,\n letterSpacing,\n textShadow,\n }\n\n const containerClass = cn(styles.container, getAlignClass(textAlign), getValignClass(verticalAlign))\n\n const textClass = cn(styles.text, isLink && styles.link, underline && styles.underline)\n\n // 链接模式\n if (isLink && href) {\n const relValue = target === '_blank' ? 'noopener noreferrer' : ''\n return (\n <div className={containerClass} ref={ref} style={externalStyle}>\n <a className={textClass} href={href} rel={relValue} style={textStyle} target={target}>\n {content}\n </a>\n </div>\n )\n }\n\n // 普通文本\n return (\n <div className={containerClass} ref={ref} style={externalStyle}>\n <span className={textClass} style={textStyle}>\n {content}\n </span>\n </div>\n )\n}\n\nexport default Text\n","/**\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 * 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 category: 'dashboard',\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":["cn","inputs","clsx","MaterialGroup","INNER","BASIC","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","getAlignClass","align","styles","alignLeft","alignCenter","alignRight","getValignClass","valignTop","valignMiddle","valignBottom","Text","content","fontSize","fontWeight","fontFamily","color","textAlign","verticalAlign","lineHeight","letterSpacing","isLink","href","target","underline","glowEnable","glowColor","glowIntensity","externalStyle","textShadow","undefined","textStyle","containerClass","container","textClass","text","link","relValue","_jsx","className","children","rel","configure","props","title","setter","items","key","componentName","icon","name","extraProps","label","getValue","getExtraPropValue","setValue","value","setExtraPropValue","defaultValue","options","supportVariable","component","supports","advanced","COMPONENT_NAME","PACKAGE_NAME","snippets","screenshot","schema","$dashboard","rect","width","height","meta","category","group","devMode","npm","package","version","pkg","globalName"],"mappings":";;;;;;;EAAA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAQ,SAAS,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;;ECExW,SAASA,EAAEA,CAAC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AAM,EAAE;EACV;EACF;EACF;EACF,CAAC,CACF;;;;;;AChFM,QAAMC,IAAuB,GAAG;EACrCzB,EAAAA,aAAa,EAAEgB,cAAc;EAC7BpB,EAAAA,KAAK,EAAE,IAAI;EACX8B,EAAAA,QAAQ,EAAE,WAAW;IACrBC,KAAK,EAAE7F,aAAa,CAACE,KAAK;EAC1B4F,EAAAA,OAAO,EAAE,SAAS;EAClBC,EAAAA,GAAG,EAAE;EACHC,IAAAA,OAAO,EAAEb,YAAY;MACrBc,OAAO,EAAEC,GAAG,CAACD,OAAO;EACpBE,IAAAA,UAAU,EAAEjB,cAAc;EAC1BhB,IAAAA,aAAa,EAAEgB;KAChB;IACDtB,SAAS;EACTwB,EAAAA;EACF;;;;;;;;;","x_google_ignoreList":[0,3]}
package/dist/index.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).EasyEditorMaterialsText={},e.jsxRuntime)}(this,function(e,t){"use strict";const r="EasyEditorMaterialsText",o=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,m={...{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:m,children:o})},i={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:o}}};e.component=o,e.meta=i});
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).EasyEditorMaterialsText={},e.jsxRuntime)}(this,function(e,t){"use strict";function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function n(...e){return function(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}(e)}var r="component-module__container___VbZSk",l="component-module__text___nFUOn",a="component-module__link___20asF",i="component-module__underline___0oAJz",s="component-module__alignLeft___IOvpO",p="component-module__alignCenter___EIwIC",c="component-module__alignRight___p3ReL",m="component-module__valignTop___-5DmK",d="component-module__valignMiddle___i0are",u="component-module__valignBottom___97zzw";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk{display:flex;height:100%;width:100%}.component-module__text___nFUOn{display:inline-block;word-break:break-word}.component-module__link___20asF{cursor:pointer;text-decoration:none;transition:opacity .2s ease}.component-module__link___20asF:hover{opacity:.8}.component-module__underline___0oAJz{text-decoration:underline}.component-module__alignLeft___IOvpO{justify-content:flex-start;text-align:left}.component-module__alignCenter___EIwIC{justify-content:center;text-align:center}.component-module__alignRight___p3ReL{justify-content:flex-end;text-align:right}.component-module__valignTop___-5DmK{align-items:flex-start}.component-module__valignMiddle___i0are{align-items:center}.component-module__valignBottom___97zzw{align-items:flex-end}");const f="EasyEditorMaterialsText";const _={componentName:f,title:"文本",category:"dashboard",group:"basic",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-text",version:"0.0.10",globalName:f,componentName:f},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:f,props:{content:"这是一段普通文本",fontSize:16,color:"#ffffff"},$dashboard:{rect:{width:120,height:40}}}},{title:"标题文本",screenshot:"",schema:{componentName:f,props:{content:"标题文本",fontSize:32,fontWeight:"bold",color:"#ffffff",textAlign:"center"},$dashboard:{rect:{width:200,height:60}}}},{title:"发光标题",screenshot:"",schema:{componentName:f,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:f,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.component=({ref:e,content:o="文本内容",fontSize:f=16,fontWeight:_="normal",fontFamily:g="inherit",color:h="#ffffff",textAlign:x="left",verticalAlign:S="middle",lineHeight:b=1.5,letterSpacing:y=0,isLink:v=!1,href:w="",target:N="_blank",underline:V=!1,glowEnable:k=!1,glowColor:C="#00d4ff",glowIntensity:P=1,style:E})=>{const z={fontSize:f,fontWeight:_,fontFamily:g,color:h,lineHeight:b,letterSpacing:y,textShadow:k?`0 0 ${10*P}px ${C}, 0 0 ${20*P}px ${C}, 0 0 ${30*P}px ${C}`:void 0},j=n(r,(e=>{switch(e){case"left":default:return s;case"center":return p;case"right":return c}})(x),(e=>{switch(e){case"top":return m;case"middle":default:return d;case"bottom":return u}})(S)),A=n(l,v&&a,V&&i);if(v&&w){const n="_blank"===N?"noopener noreferrer":"";return t.jsx("div",{className:j,ref:e,style:E,children:t.jsx("a",{className:A,href:w,rel:n,style:z,target:N,children:o})})}return t.jsx("div",{className:j,ref:e,style:E,children:t.jsx("span",{className:A,style:z,children:o})})},e.meta=_});
2
2
  //# sourceMappingURL=index.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.min.js","sources":["../../../shared/src/types.ts","../src/constants.ts","../src/component.tsx","../src/meta.ts","../src/snippets.ts","../src/configure.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 { 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"],"names":["COMPONENT_NAME","Text","props","ref","text","fontSize","color","fontWeight","textAlign","lineHeight","className","style","externalStyle","mergedStyle","width","height","wordBreak","whiteSpace","_jsx","children","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","$dashboard","rect","configure","type","setter","items","key","name","extraProps","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","icon","defaultValue","supportVariable","component","supports","advanced","view"],"mappings":"8TAIO,MCQMA,EAAiB,0BCExBC,EAAQC,IACZ,MAAMC,IACJA,EAAGC,KACHA,EAAO,OAAMC,SACbA,EAAW,GAAEC,MACbA,EAAQ,UAASC,WACjBA,EAAa,SAAQC,UACrBA,EAAY,OAAMC,WAClBA,EAAa,IAAGC,UAChBA,EAAY,GACZC,MAAOC,GACLV,EAcEW,EAAc,IAZiB,CACnCC,MAAO,OACPC,OAAQ,OACRV,SAA8B,iBAAbA,EAAwB,GAAGA,MAAeA,EAC3DC,QACAC,aACAC,YACAC,aACAO,UAAW,aACXC,WAAY,eAG6BL,GAE3C,OACEM,EAAAA,IAAA,MAAA,CAAKR,UAAWA,EAAWP,IAAKA,EAAKQ,MAAOE,EAAYM,SACrDf,KCrCDgB,EAA0B,CAC9BC,cAAerB,EACfsB,MAAO,OACPC,MHDO,QGEPC,QAAS,UACTC,IAAK,CACHC,QFKwB,wCEJxBC,QAAS,SACTC,WAAY5B,EACZqB,cAAerB,GAEjB6B,SCd0B,CAC1B,CACEP,MAAO,OACPQ,WAAY,8FACZC,OAAQ,CACNV,cAAerB,EACfE,MAAO,CACLE,KAAM,iBACNC,SAAU,GACVC,MAAO,UACPE,UAAW,QAEbwB,WAAY,CACVC,KAAM,CACJnB,MAAO,IACPC,OAAQ,OAKhB,CACEO,MAAO,UACPQ,WAAY,8FACZC,OAAQ,CAC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L,CACEf,MAAO,KACPc,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,KAAMpD"}
1
+ {"version":3,"file":"index.min.js","sources":["../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../../../../shared/src/lib/utils.ts","../../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/component.tsx","../src/constants.ts","../src/meta.ts","../../../../shared/src/index.ts","../src/configure.ts","../src/snippets.ts"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { clsx, type ClassValue } from 'clsx'\n\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs)\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Text Component\n * 文本组件 - 支持普通文本、链接、标题、发光效果\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TextAlign = 'left' | 'center' | 'right'\nexport type VerticalAlign = 'top' | 'middle' | 'bottom'\n\nexport interface TextProps {\n ref?: Ref<HTMLDivElement>\n /** 文本内容 */\n content?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体粗细 */\n fontWeight?: number | 'normal' | 'bold'\n /** 字体家族 */\n fontFamily?: string\n /** 颜色 */\n color?: string\n /** 水平对齐 */\n textAlign?: TextAlign\n /** 垂直对齐 */\n verticalAlign?: VerticalAlign\n /** 行高 */\n lineHeight?: number\n /** 字间距 */\n letterSpacing?: number\n /** 是否为链接 */\n isLink?: boolean\n /** 链接地址 */\n href?: string\n /** 链接打开方式 */\n target?: '_self' | '_blank'\n /** 下划线 */\n underline?: boolean\n /** 发光效果 */\n glowEnable?: boolean\n /** 发光颜色 */\n glowColor?: string\n /** 发光强度 */\n glowIntensity?: number\n /** 显隐控制 */\n condition?: boolean\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst getAlignClass = (align: TextAlign): string => {\n switch (align) {\n case 'left':\n return styles.alignLeft\n case 'center':\n return styles.alignCenter\n case 'right':\n return styles.alignRight\n default:\n return styles.alignLeft\n }\n}\n\nconst getValignClass = (align: VerticalAlign): string => {\n switch (align) {\n case 'top':\n return styles.valignTop\n case 'middle':\n return styles.valignMiddle\n case 'bottom':\n return styles.valignBottom\n default:\n return styles.valignMiddle\n }\n}\n\nexport const Text: React.FC<TextProps> = ({\n ref,\n content = '文本内容',\n fontSize = 16,\n fontWeight = 'normal',\n fontFamily = 'inherit',\n color = '#ffffff',\n textAlign = 'left',\n verticalAlign = 'middle',\n lineHeight = 1.5,\n letterSpacing = 0,\n isLink = false,\n href = '',\n target = '_blank',\n underline = false,\n glowEnable = false,\n glowColor = '#00d4ff',\n glowIntensity = 1,\n style: externalStyle,\n}) => {\n // 计算发光效果\n const textShadow = glowEnable\n ? `0 0 ${10 * glowIntensity}px ${glowColor}, 0 0 ${20 * glowIntensity}px ${glowColor}, 0 0 ${30 * glowIntensity}px ${glowColor}`\n : undefined\n\n const textStyle: CSSProperties = {\n fontSize,\n fontWeight,\n fontFamily,\n color,\n lineHeight,\n letterSpacing,\n textShadow,\n }\n\n const containerClass = cn(styles.container, getAlignClass(textAlign), getValignClass(verticalAlign))\n\n const textClass = cn(styles.text, isLink && styles.link, underline && styles.underline)\n\n // 链接模式\n if (isLink && href) {\n const relValue = target === '_blank' ? 'noopener noreferrer' : ''\n return (\n <div className={containerClass} ref={ref} style={externalStyle}>\n <a className={textClass} href={href} rel={relValue} style={textStyle} target={target}>\n {content}\n </a>\n </div>\n )\n }\n\n // 普通文本\n return (\n <div className={containerClass} ref={ref} style={externalStyle}>\n <span className={textClass} style={textStyle}>\n {content}\n </span>\n </div>\n )\n}\n\nexport default Text\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 category: 'dashboard',\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 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 * 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":["r","e","t","f","n","Array","isArray","o","length","cn","inputs","arguments","clsx","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","COMPONENT_NAME","meta","componentName","title","category","group","devMode","npm","package","version","globalName","configure","props","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","Text","fontFamily","verticalAlign","lineHeight","letterSpacing","externalStyle","textStyle","textShadow","undefined","containerClass","styles","align","getAlignClass","getValignClass","textClass","relValue","_jsx","className","children","rel"],"mappings":"8TAAA,SAASA,EAAEC,GAAG,IAAIC,EAAEC,EAAEC,EAAE,GAAG,GAAG,iBAAiBH,GAAG,iBAAiBA,EAAEG,GAAGH,OAAO,GAAG,iBAAiBA,EAAE,GAAGI,MAAMC,QAAQL,GAAG,CAAC,IAAIM,EAAEN,EAAEO,OAAO,IAAIN,EAAE,EAAEA,EAAEK,EAAEL,IAAID,EAAEC,KAAKC,EAAEH,EAAEC,EAAEC,OAAOE,IAAIA,GAAG,KAAKA,GAAGD,EAAE,MAAM,IAAIA,KAAKF,EAAEA,EAAEE,KAAKC,IAAIA,GAAG,KAAKA,GAAGD,GAAG,OAAOC,CAAC,CCEzO,SAASK,KAAMC,GACpB,ODHsP,WAAgB,IAAI,IAAIT,EAAEC,EAAEC,EAAE,EAAEC,EAAE,GAAGG,EAAEI,UAAU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