@easy-editor/materials-dashboard-number-flip 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/component.esm.js +1 -1
- package/dist/component.js +2 -2
- package/dist/component.min.js +1 -1
- package/dist/component.min.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3 -3
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/meta.esm.js +2 -2
- package/dist/meta.js +3 -3
- package/dist/meta.min.js +1 -1
- package/dist/meta.min.js.map +1 -1
- package/package.json +1 -1
- package/rollup.config.js +9 -9
package/CHANGELOG.md
CHANGED
package/dist/component.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-
|
|
1
|
+
/* @easy-editor/materials-dashboard-number-flip v0.0.2 (component, esm) */
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
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}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}
|
package/dist/component.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-
|
|
1
|
+
/* @easy-editor/materials-dashboard-number-flip v0.0.2 (component) */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsNumberFlipComponent = {}, global.jsxRuntime));
|
|
6
6
|
})(this, (function (exports, jsxRuntime) { 'use strict';
|
|
7
7
|
|
|
8
8
|
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}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}
|
package/dist/component.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsNumberFlipComponent={},e.jsxRuntime)}(this,function(e,o){"use strict";function t(e){var o,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(o=0;o<l;o++)e[o]&&(n=t(e[o]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function n(...e){return function(){for(var e,o,n=0,i="",l=arguments.length;n<l;n++)(e=arguments[n])&&(o=t(e))&&(i&&(i+=" "),i+=o);return i}(e)}var i="component-module__container___VbZSk",l="component-module__content___344U8",r="component-module__prefix___RIPOo",s="component-module__prefixDigital___Q-IGu",a="component-module__value___Fg70k",d="component-module__valueDigital___saOYz",f="component-module__suffix___9U3yv",_="component-module__suffixDigital___WiYn4",c="component-module__trend___fgbi4";!function(e,o){void 0===o&&(o={});var t=o.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center;width:100%}.component-module__content___344U8{align-items:baseline;display:flex;gap:4px}.component-module__prefix___RIPOo{font-weight:600;opacity:.8}.component-module__prefixDigital___Q-IGu{font-family:Courier New,Courier,monospace}.component-module__value___Fg70k{font-weight:700}.component-module__valueDigital___saOYz{font-family:Courier New,Courier,monospace;letter-spacing:.05em}.component-module__suffix___9U3yv{font-weight:500;margin-left:4px;opacity:.7}.component-module__suffixDigital___WiYn4{font-family:Courier New,Courier,monospace}.component-module__trend___fgbi4{align-items:center;display:flex;font-weight:500;gap:4px}");const u=({type:e,value:t,suffix:n,upColor:i,downColor:l,size:r})=>{let s="#8899aa";return"up"===e?s=i:"down"===e&&(s=l),o.jsxs("div",{className:c,style:{fontSize:.35*r},children:["flat"!==e&&o.jsxs("svg",{"aria-label":`Trend ${e}`,fill:"none",height:.3*r,role:"img",style:{transform:"down"===e?"rotate(180deg)":void 0},viewBox:"0 0 24 24",width:.3*r,children:[o.jsxs("title",{children:["Trend arrow ",e]}),o.jsx("path",{d:"M12 4L20 14H4L12 4Z",fill:s})]}),"flat"===e&&o.jsx("span",{style:{color:s,marginRight:4},children:"—"}),o.jsxs("span",{style:{color:s},children:[t,n]})]})},p=({ref:e,value:t=0,decimals:c=0,separator:p=!0,prefix:m="",suffix:x="",fontSize:y=48,fontFamily:g="digital",color:h="#00d4ff",glowIntensity:v=.5,trendEnable:j=!1,trendValue:b=0,trendType:w="up",trendSuffix:C="%",trendUpColor:N="#52c41a",trendDownColor:S="#ff4d4f",style:z})=>{const $="digital"===g,T=((e,o,t)=>{const n=e.toFixed(o);if(!t)return n;const[i,l]=n.split("."),r=i.replace(/\B(?=(\d{3})+(?!\d))/g,",");return l?`${r}.${l}`:r})(t,c,p),D=v>0?`0 0 ${10*v}px ${h}, 0 0 ${20*v}px ${h}40, 0 0 ${30*v}px ${h}20`:"none";return o.jsxs("div",{className:i,ref:e,style:z,children:[o.jsxs("div",{className:l,children:[m?o.jsx("span",{className:n(r,$&&s),style:{fontSize:.5*y+"px",color:h},children:m}):null,o.jsx("span",{className:n(a,$&&d),style:{fontSize:`${y}px`,color:h,textShadow:D},children:T}),x?o.jsx("span",{className:n(f,$&&_),style:{fontSize:.4*y+"px",color:h},children:x}):null]}),j?o.jsx(u,{downColor:S,size:y,suffix:C,type:w,upColor:N,value:b}):null]})};e.NumberFlip=p,e.default=p,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=component.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.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"],"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 * Number Flip Component\n * 数字翻牌组件 - 用于展示 KPI、统计数字等\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TrendType = 'up' | 'down' | 'flat'\n\nexport interface NumberFlipProps {\n ref?: Ref<HTMLDivElement>\n /** 数值 */\n value?: number\n /** 小数位数 */\n decimals?: number\n /** 是否显示千分位分隔符 */\n separator?: boolean\n /** 前缀 */\n prefix?: string\n /** 后缀 */\n suffix?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体类型 */\n fontFamily?: 'digital' | 'default'\n /** 颜色 */\n color?: string\n /** 发光强度 (0-2) */\n glowIntensity?: number\n /** 是否显示趋势 */\n trendEnable?: boolean\n /** 趋势值 */\n trendValue?: number\n /** 趋势类型 */\n trendType?: TrendType\n /** 趋势后缀 */\n trendSuffix?: string\n /** 趋势上升颜色 */\n trendUpColor?: string\n /** 趋势下降颜色 */\n trendDownColor?: string\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst formatNumber = (value: number, decimals: number, separator: boolean): string => {\n const fixed = value.toFixed(decimals)\n if (!separator) {\n return fixed\n }\n\n const [intPart, decPart] = fixed.split('.')\n const formattedInt = intPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n return decPart ? `${formattedInt}.${decPart}` : formattedInt\n}\n\nconst TrendIndicator: React.FC<{\n type: TrendType\n value: number\n suffix: string\n upColor: string\n downColor: string\n size: number\n}> = ({ type, value, suffix, upColor, downColor, size }) => {\n let color = '#8899aa'\n if (type === 'up') {\n color = upColor\n } else if (type === 'down') {\n color = downColor\n }\n\n return (\n <div className={styles.trend} style={{ fontSize: size * 0.35 }}>\n {type !== 'flat' && (\n <svg\n aria-label={`Trend ${type}`}\n fill='none'\n height={size * 0.3}\n role='img'\n style={{\n transform: type === 'down' ? 'rotate(180deg)' : undefined,\n }}\n viewBox='0 0 24 24'\n width={size * 0.3}\n >\n <title>Trend arrow {type}</title>\n <path d='M12 4L20 14H4L12 4Z' fill={color} />\n </svg>\n )}\n {type === 'flat' && <span style={{ color, marginRight: 4 }}>—</span>}\n <span style={{ color }}>\n {value}\n {suffix}\n </span>\n </div>\n )\n}\n\nexport const NumberFlip: React.FC<NumberFlipProps> = ({\n ref,\n value = 0,\n decimals = 0,\n separator = true,\n prefix = '',\n suffix = '',\n fontSize = 48,\n fontFamily = 'digital',\n color = '#00d4ff',\n glowIntensity = 0.5,\n trendEnable = false,\n trendValue = 0,\n trendType = 'up',\n trendSuffix = '%',\n trendUpColor = '#52c41a',\n trendDownColor = '#ff4d4f',\n style: externalStyle,\n}) => {\n const isDigital = fontFamily === 'digital'\n const formattedValue = formatNumber(value, decimals, separator)\n\n // 计算发光效果的 text-shadow\n const glowShadow =\n glowIntensity > 0\n ? `0 0 ${10 * glowIntensity}px ${color}, 0 0 ${20 * glowIntensity}px ${color}40, 0 0 ${30 * glowIntensity}px ${color}20`\n : 'none'\n\n return (\n <div className={styles.container} ref={ref} style={externalStyle}>\n <div className={styles.content}>\n {prefix ? (\n <span\n className={cn(styles.prefix, isDigital && styles.prefixDigital)}\n style={{\n fontSize: `${fontSize * 0.5}px`,\n color,\n }}\n >\n {prefix}\n </span>\n ) : null}\n <span\n className={cn(styles.value, isDigital && styles.valueDigital)}\n style={{\n fontSize: `${fontSize}px`,\n color,\n textShadow: glowShadow,\n }}\n >\n {formattedValue}\n </span>\n {suffix ? (\n <span\n className={cn(styles.suffix, isDigital && styles.suffixDigital)}\n style={{\n fontSize: `${fontSize * 0.4}px`,\n color,\n }}\n >\n {suffix}\n </span>\n ) : null}\n </div>\n {trendEnable ? (\n <TrendIndicator\n downColor={trendDownColor}\n size={fontSize}\n suffix={trendSuffix}\n type={trendType}\n upColor={trendUpColor}\n value={trendValue}\n />\n ) : null}\n </div>\n )\n}\n\nexport default NumberFlip\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","TrendIndicator","value","suffix","upColor","downColor","size","color","_jsxs","className","styles","fontSize","children","fill","height","role","transform","undefined","viewBox","width","_jsx","d","marginRight","NumberFlip","decimals","separator","prefix","fontFamily","glowIntensity","trendEnable","trendValue","trendType","trendSuffix","trendUpColor","trendDownColor","externalStyle","isDigital","formattedValue","formatNumber","fixed","toFixed","intPart","decPart","split","formattedInt","replace","glowShadow","textShadow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.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"],"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 * Number Flip Component\n * 数字翻牌组件 - 用于展示 KPI、统计数字等\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TrendType = 'up' | 'down' | 'flat'\n\nexport interface NumberFlipProps {\n ref?: Ref<HTMLDivElement>\n /** 数值 */\n value?: number\n /** 小数位数 */\n decimals?: number\n /** 是否显示千分位分隔符 */\n separator?: boolean\n /** 前缀 */\n prefix?: string\n /** 后缀 */\n suffix?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体类型 */\n fontFamily?: 'digital' | 'default'\n /** 颜色 */\n color?: string\n /** 发光强度 (0-2) */\n glowIntensity?: number\n /** 是否显示趋势 */\n trendEnable?: boolean\n /** 趋势值 */\n trendValue?: number\n /** 趋势类型 */\n trendType?: TrendType\n /** 趋势后缀 */\n trendSuffix?: string\n /** 趋势上升颜色 */\n trendUpColor?: string\n /** 趋势下降颜色 */\n trendDownColor?: string\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst formatNumber = (value: number, decimals: number, separator: boolean): string => {\n const fixed = value.toFixed(decimals)\n if (!separator) {\n return fixed\n }\n\n const [intPart, decPart] = fixed.split('.')\n const formattedInt = intPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n return decPart ? `${formattedInt}.${decPart}` : formattedInt\n}\n\nconst TrendIndicator: React.FC<{\n type: TrendType\n value: number\n suffix: string\n upColor: string\n downColor: string\n size: number\n}> = ({ type, value, suffix, upColor, downColor, size }) => {\n let color = '#8899aa'\n if (type === 'up') {\n color = upColor\n } else if (type === 'down') {\n color = downColor\n }\n\n return (\n <div className={styles.trend} style={{ fontSize: size * 0.35 }}>\n {type !== 'flat' && (\n <svg\n aria-label={`Trend ${type}`}\n fill='none'\n height={size * 0.3}\n role='img'\n style={{\n transform: type === 'down' ? 'rotate(180deg)' : undefined,\n }}\n viewBox='0 0 24 24'\n width={size * 0.3}\n >\n <title>Trend arrow {type}</title>\n <path d='M12 4L20 14H4L12 4Z' fill={color} />\n </svg>\n )}\n {type === 'flat' && <span style={{ color, marginRight: 4 }}>—</span>}\n <span style={{ color }}>\n {value}\n {suffix}\n </span>\n </div>\n )\n}\n\nexport const NumberFlip: React.FC<NumberFlipProps> = ({\n ref,\n value = 0,\n decimals = 0,\n separator = true,\n prefix = '',\n suffix = '',\n fontSize = 48,\n fontFamily = 'digital',\n color = '#00d4ff',\n glowIntensity = 0.5,\n trendEnable = false,\n trendValue = 0,\n trendType = 'up',\n trendSuffix = '%',\n trendUpColor = '#52c41a',\n trendDownColor = '#ff4d4f',\n style: externalStyle,\n}) => {\n const isDigital = fontFamily === 'digital'\n const formattedValue = formatNumber(value, decimals, separator)\n\n // 计算发光效果的 text-shadow\n const glowShadow =\n glowIntensity > 0\n ? `0 0 ${10 * glowIntensity}px ${color}, 0 0 ${20 * glowIntensity}px ${color}40, 0 0 ${30 * glowIntensity}px ${color}20`\n : 'none'\n\n return (\n <div className={styles.container} ref={ref} style={externalStyle}>\n <div className={styles.content}>\n {prefix ? (\n <span\n className={cn(styles.prefix, isDigital && styles.prefixDigital)}\n style={{\n fontSize: `${fontSize * 0.5}px`,\n color,\n }}\n >\n {prefix}\n </span>\n ) : null}\n <span\n className={cn(styles.value, isDigital && styles.valueDigital)}\n style={{\n fontSize: `${fontSize}px`,\n color,\n textShadow: glowShadow,\n }}\n >\n {formattedValue}\n </span>\n {suffix ? (\n <span\n className={cn(styles.suffix, isDigital && styles.suffixDigital)}\n style={{\n fontSize: `${fontSize * 0.4}px`,\n color,\n }}\n >\n {suffix}\n </span>\n ) : null}\n </div>\n {trendEnable ? (\n <TrendIndicator\n downColor={trendDownColor}\n size={fontSize}\n suffix={trendSuffix}\n type={trendType}\n upColor={trendUpColor}\n value={trendValue}\n />\n ) : null}\n </div>\n )\n}\n\nexport default NumberFlip\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","TrendIndicator","value","suffix","upColor","downColor","size","color","_jsxs","className","styles","fontSize","children","fill","height","role","transform","undefined","viewBox","width","_jsx","d","marginRight","NumberFlip","decimals","separator","prefix","fontFamily","glowIntensity","trendEnable","trendValue","trendType","trendSuffix","trendUpColor","trendDownColor","externalStyle","isDigital","formattedValue","formatNumber","fixed","toFixed","intPart","decPart","split","formattedInt","replace","glowShadow","textShadow"],"mappings":"6UAAA,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,UAAUH,OAAOL,EAAEI,EAAEJ,KAAKF,EAAEU,UAAUR,MAAMD,EAAEF,EAAEC,MAAMG,IAAIA,GAAG,KAAKA,GAAGF,GAAG,OAAOE,CAAC,CCGtWQ,CAAKF,EACd,yWCJA,SAAqBG,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,C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AAMC,EAA2B,YAAfT,EACZU,EAzEaC,EAACpC,EAAesB,EAAkBC,KACrD,MAAMc,EAAQrC,EAAMsC,QAAQhB,GAC5B,IAAKC,EACH,OAAOc,EAGT,MAAOE,EAASC,GAAWH,EAAMI,MAAM,KACjCC,EAAeH,EAAQI,QAAQ,wBAAyB,KAC9D,OAAOH,EAAU,GAAGE,KAAgBF,IAAYE,GAiEzBN,CAAapC,EAAOsB,EAAUC,GAG/CqB,EACJlB,EAAgB,EACZ,OAAO,GAAKA,OAAmBrB,UAAc,GAAKqB,OAAmBrB,YAAgB,GAAKqB,OAAmBrB,MAC7G,OAEN,OACEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAkBvB,IAAKA,EAAKK,MAAO2C,EAAcvB,UAC/DJ,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAeE,SAAA,CAC5Bc,EACCN,EAAAA,IAAA,OAAA,CACEX,UAAW3B,EAAG4B,EAAe0B,GAAa1B,GAC1ClB,MAAO,CACLmB,SAAwB,GAAXA,EAAH,KACVJ,SACAK,SAEDc,IAED,KACJN,EAAAA,IAAA,OAAA,CACEX,UAAW3B,EAAG4B,EAAc0B,GAAa1B,GACzClB,MAAO,CACLmB,SAAU,GAAGA,MACbJ,QACAwC,WAAYD,GACZlC,SAEDyB,IAEFlC,EACCiB,EAAAA,IAAA,OAAA,CACEX,UAAW3B,EAAG4B,EAAe0B,GAAa1B,GAC1ClB,MAAO,CACLmB,SAAwB,GAAXA,EAAH,KACVJ,SACAK,SAEDT,IAED,QAEL0B,EACCT,EAAAA,IAACnB,EAAc,CACbI,UAAW6B,EACX5B,KAAMK,EACNR,OAAQ6B,EACRtC,KAAMqC,EACN3B,QAAS6B,EACT/B,MAAO4B,IAEP","x_google_ignoreList":[0,2]}
|
package/dist/index.cjs
CHANGED
package/dist/index.esm.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-
|
|
1
|
+
/* @easy-editor/materials-dashboard-number-flip v0.0.2 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsNumberFlip = {}, global.jsxRuntime));
|
|
6
6
|
})(this, (function (exports, jsxRuntime) { 'use strict';
|
|
7
7
|
|
|
8
8
|
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}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}
|
|
@@ -552,7 +552,7 @@
|
|
|
552
552
|
}
|
|
553
553
|
}];
|
|
554
554
|
|
|
555
|
-
var version = "0.0.
|
|
555
|
+
var version = "0.0.2";
|
|
556
556
|
var pkg = {
|
|
557
557
|
version: version};
|
|
558
558
|
|
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).
|
|
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).EasyEditorMaterialsNumberFlip={},e.jsxRuntime)}(this,function(e,t){"use strict";function o(e){var t,a,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]&&(a=o(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function a(...e){return function(){for(var e,t,a=0,r="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}(e)}var r="component-module__container___VbZSk",l="component-module__content___344U8",n="component-module__prefix___RIPOo",i="component-module__prefixDigital___Q-IGu",s="component-module__value___Fg70k",p="component-module__valueDigital___saOYz",m="component-module__suffix___9U3yv",u="component-module__suffixDigital___WiYn4",d="component-module__trend___fgbi4";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center;width:100%}.component-module__content___344U8{align-items:baseline;display:flex;gap:4px}.component-module__prefix___RIPOo{font-weight:600;opacity:.8}.component-module__prefixDigital___Q-IGu{font-family:Courier New,Courier,monospace}.component-module__value___Fg70k{font-weight:700}.component-module__valueDigital___saOYz{font-family:Courier New,Courier,monospace;letter-spacing:.05em}.component-module__suffix___9U3yv{font-weight:500;margin-left:4px;opacity:.7}.component-module__suffixDigital___WiYn4{font-family:Courier New,Courier,monospace}.component-module__trend___fgbi4{align-items:center;display:flex;font-weight:500;gap:4px}");const c=({type:e,value:o,suffix:a,upColor:r,downColor:l,size:n})=>{let i="#8899aa";return"up"===e?i=r:"down"===e&&(i=l),t.jsxs("div",{className:d,style:{fontSize:.35*n},children:["flat"!==e&&t.jsxs("svg",{"aria-label":`Trend ${e}`,fill:"none",height:.3*n,role:"img",style:{transform:"down"===e?"rotate(180deg)":void 0},viewBox:"0 0 24 24",width:.3*n,children:[t.jsxs("title",{children:["Trend arrow ",e]}),t.jsx("path",{d:"M12 4L20 14H4L12 4Z",fill:i})]}),"flat"===e&&t.jsx("span",{style:{color:i,marginRight:4},children:"—"}),t.jsxs("span",{style:{color:i},children:[o,a]})]})},f="EasyEditorMaterialsNumberFlip";const _={componentName:f,title:"数字翻牌",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-number-flip",version:"0.0.2",globalName:f,componentName:f},snippets:[{title:"数字翻牌",screenshot:"",schema:{componentName:f,props:{value:1234567,decimals:0,separator:!0,fontSize:48,fontFamily:"digital",color:"#00d4ff",glowIntensity:.5},$dashboard:{rect:{width:280,height:80}}}},{title:"货币数字",screenshot:"",schema:{componentName:f,props:{value:99999.99,decimals:2,separator:!0,prefix:"$",fontSize:42,fontFamily:"digital",color:"#00ff88",glowIntensity:.6},$dashboard:{rect:{width:260,height:70}}}},{title:"百分比",screenshot:"",schema:{componentName:f,props:{value:87.5,decimals:1,separator:!1,suffix:"%",fontSize:56,fontFamily:"digital",color:"#ff6b6b",glowIntensity:.8},$dashboard:{rect:{width:200,height:90}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"数值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"decimals",title:"小数位数",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"separator",title:"千分位分隔",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"prefix",title:"前缀",setter:"StringSetter"},{name:"suffix",title:"后缀",setter:"StringSetter"}]},{type:"group",title:"趋势",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"trendEnable",title:"显示趋势",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"trendValue",title:"趋势值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"trendType",title:"趋势类型",setter:{componentName:"SegmentedSetter",props:{options:[{label:"上升",value:"up"},{label:"下降",value:"down"},{label:"持平",value:"flat"}]}},extraProps:{defaultValue:"up"}},{name:"trendSuffix",title:"趋势后缀",setter:"StringSetter",extraProps:{defaultValue:"%"}}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"fontSize",title:"字体大小",setter:"NumberSetter",extraProps:{defaultValue:48}},{name:"fontFamily",title:"字体类型",setter:{componentName:"SelectSetter",props:{options:[{label:"数码字体",value:"digital"},{label:"默认字体",value:"default"}]}},extraProps:{defaultValue:"digital"}},{name:"color",title:"颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00d4ff"}},{name:"glowIntensity",title:"发光强度",setter:{componentName:"NumberSetter",props:{min:0,max:2,step:.1}},extraProps:{defaultValue:.5}}]}]},{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}},{type:"group",title:"动画",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"animationEnable",title:"启用动画",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"animationType",title:"动画类型",setter:{componentName:"SegmentedSetter",props:{options:[{label:"滚动",value:"scroll"},{label:"翻转",value:"flip"},{label:"渐变",value:"fade"}]}},extraProps:{defaultValue:"scroll"}},{name:"animationDuration",title:"动画时长",setter:{componentName:"SliderSetter",props:{min:0,max:3e3,step:100,suffix:"ms"}},extraProps:{defaultValue:1e3}},{name:"animationEasing",title:"缓动函数",setter:{componentName:"SelectSetter",props:{options:[{label:"线性",value:"linear"},{label:"缓入",value:"ease-in"},{label:"缓出",value:"ease-out"},{label:"缓入缓出",value:"ease-in-out"}]}},extraProps:{defaultValue:"ease-out"}}]}]}]}],component:{},supports:{},advanced:{}}};e.component=({ref:e,value:o=0,decimals:d=0,separator:f=!0,prefix:_="",suffix:x="",fontSize:g=48,fontFamily:y="digital",color:h="#00d4ff",glowIntensity:S=.5,trendEnable:b=!1,trendValue:v=0,trendType:N="up",trendSuffix:w="%",trendUpColor:V="#52c41a",trendDownColor:P="#ff4d4f",style:C})=>{const j="digital"===y,$=((e,t,o)=>{const a=e.toFixed(t);if(!o)return a;const[r,l]=a.split("."),n=r.replace(/\B(?=(\d{3})+(?!\d))/g,",");return l?`${n}.${l}`:n})(o,d,f),z=S>0?`0 0 ${10*S}px ${h}, 0 0 ${20*S}px ${h}40, 0 0 ${30*S}px ${h}20`:"none";return t.jsxs("div",{className:r,ref:e,style:C,children:[t.jsxs("div",{className:l,children:[_?t.jsx("span",{className:a(n,j&&i),style:{fontSize:.5*g+"px",color:h},children:_}):null,t.jsx("span",{className:a(s,j&&p),style:{fontSize:`${g}px`,color:h,textShadow:z},children:$}),x?t.jsx("span",{className:a(m,j&&u),style:{fontSize:.4*g+"px",color:h},children:x}):null]}),b?t.jsx(c,{downColor:P,size:g,suffix:w,type:N,upColor:V,value:v}):null]})},e.meta=_});
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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/snippets.ts","../src/configure.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 * Number Flip Component\n * 数字翻牌组件 - 用于展示 KPI、统计数字等\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TrendType = 'up' | 'down' | 'flat'\n\nexport interface NumberFlipProps {\n ref?: Ref<HTMLDivElement>\n /** 数值 */\n value?: number\n /** 小数位数 */\n decimals?: number\n /** 是否显示千分位分隔符 */\n separator?: boolean\n /** 前缀 */\n prefix?: string\n /** 后缀 */\n suffix?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体类型 */\n fontFamily?: 'digital' | 'default'\n /** 颜色 */\n color?: string\n /** 发光强度 (0-2) */\n glowIntensity?: number\n /** 是否显示趋势 */\n trendEnable?: boolean\n /** 趋势值 */\n trendValue?: number\n /** 趋势类型 */\n trendType?: TrendType\n /** 趋势后缀 */\n trendSuffix?: string\n /** 趋势上升颜色 */\n trendUpColor?: string\n /** 趋势下降颜色 */\n trendDownColor?: string\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst formatNumber = (value: number, decimals: number, separator: boolean): string => {\n const fixed = value.toFixed(decimals)\n if (!separator) {\n return fixed\n }\n\n const [intPart, decPart] = fixed.split('.')\n const formattedInt = intPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n return decPart ? `${formattedInt}.${decPart}` : formattedInt\n}\n\nconst TrendIndicator: React.FC<{\n type: TrendType\n value: number\n suffix: string\n upColor: string\n downColor: string\n size: number\n}> = ({ type, value, suffix, upColor, downColor, size }) => {\n let color = '#8899aa'\n if (type === 'up') {\n color = upColor\n } else if (type === 'down') {\n color = downColor\n }\n\n return (\n <div className={styles.trend} style={{ fontSize: size * 0.35 }}>\n {type !== 'flat' && (\n <svg\n aria-label={`Trend ${type}`}\n fill='none'\n height={size * 0.3}\n role='img'\n style={{\n transform: type === 'down' ? 'rotate(180deg)' : undefined,\n }}\n viewBox='0 0 24 24'\n width={size * 0.3}\n >\n <title>Trend arrow {type}</title>\n <path d='M12 4L20 14H4L12 4Z' fill={color} />\n </svg>\n )}\n {type === 'flat' && <span style={{ color, marginRight: 4 }}>—</span>}\n <span style={{ color }}>\n {value}\n {suffix}\n </span>\n </div>\n )\n}\n\nexport const NumberFlip: React.FC<NumberFlipProps> = ({\n ref,\n value = 0,\n decimals = 0,\n separator = true,\n prefix = '',\n suffix = '',\n fontSize = 48,\n fontFamily = 'digital',\n color = '#00d4ff',\n glowIntensity = 0.5,\n trendEnable = false,\n trendValue = 0,\n trendType = 'up',\n trendSuffix = '%',\n trendUpColor = '#52c41a',\n trendDownColor = '#ff4d4f',\n style: externalStyle,\n}) => {\n const isDigital = fontFamily === 'digital'\n const formattedValue = formatNumber(value, decimals, separator)\n\n // 计算发光效果的 text-shadow\n const glowShadow =\n glowIntensity > 0\n ? `0 0 ${10 * glowIntensity}px ${color}, 0 0 ${20 * glowIntensity}px ${color}40, 0 0 ${30 * glowIntensity}px ${color}20`\n : 'none'\n\n return (\n <div className={styles.container} ref={ref} style={externalStyle}>\n <div className={styles.content}>\n {prefix ? (\n <span\n className={cn(styles.prefix, isDigital && styles.prefixDigital)}\n style={{\n fontSize: `${fontSize * 0.5}px`,\n color,\n }}\n >\n {prefix}\n </span>\n ) : null}\n <span\n className={cn(styles.value, isDigital && styles.valueDigital)}\n style={{\n fontSize: `${fontSize}px`,\n color,\n textShadow: glowShadow,\n }}\n >\n {formattedValue}\n </span>\n {suffix ? (\n <span\n className={cn(styles.suffix, isDigital && styles.suffixDigital)}\n style={{\n fontSize: `${fontSize * 0.4}px`,\n color,\n }}\n >\n {suffix}\n </span>\n ) : null}\n </div>\n {trendEnable ? (\n <TrendIndicator\n downColor={trendDownColor}\n size={fontSize}\n suffix={trendSuffix}\n type={trendType}\n upColor={trendUpColor}\n value={trendValue}\n />\n ) : null}\n </div>\n )\n}\n\nexport default NumberFlip\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsStatisticNumberMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsStatisticNumberComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsStatisticNumber)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsNumberFlip'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-number-flip'\n","/**\n * Number Flip Meta\n * 数字翻牌组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '数字翻牌',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * 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 * Number Flip Snippets\n * 数字翻牌组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '数字翻牌',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 1_234_567,\n decimals: 0,\n separator: true,\n fontSize: 48,\n fontFamily: 'digital',\n color: '#00d4ff',\n glowIntensity: 0.5,\n },\n $dashboard: {\n rect: {\n width: 280,\n height: 80,\n },\n },\n },\n },\n {\n title: '货币数字',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 99_999.99,\n decimals: 2,\n separator: true,\n prefix: '$',\n fontSize: 42,\n fontFamily: 'digital',\n color: '#00ff88',\n glowIntensity: 0.6,\n },\n $dashboard: {\n rect: {\n width: 260,\n height: 70,\n },\n },\n },\n },\n {\n title: '百分比',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 87.5,\n decimals: 1,\n separator: false,\n suffix: '%',\n fontSize: 56,\n fontFamily: 'digital',\n color: '#ff6b6b',\n glowIntensity: 0.8,\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 90,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Number Flip Configure\n * 数字翻牌组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '数值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'decimals',\n title: '小数位数',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'separator',\n title: '千分位分隔',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'prefix',\n title: '前缀',\n setter: 'StringSetter',\n },\n {\n name: 'suffix',\n title: '后缀',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '趋势',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'trendEnable',\n title: '显示趋势',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'trendValue',\n title: '趋势值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'trendType',\n title: '趋势类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上升', value: 'up' },\n { label: '下降', value: 'down' },\n { label: '持平', value: 'flat' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'up',\n },\n },\n {\n name: 'trendSuffix',\n title: '趋势后缀',\n setter: 'StringSetter',\n extraProps: {\n defaultValue: '%',\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: 48,\n },\n },\n {\n name: 'fontFamily',\n title: '字体类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '数码字体', value: 'digital' },\n { label: '默认字体', value: 'default' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'digital',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\n },\n },\n {\n name: 'glowIntensity',\n title: '发光强度',\n setter: {\n componentName: 'NumberSetter',\n props: {\n min: 0,\n max: 2,\n step: 0.1,\n },\n },\n extraProps: {\n defaultValue: 0.5,\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 type: 'group',\n title: '动画',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'animationEnable',\n title: '启用动画',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'animationType',\n title: '动画类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '滚动', value: 'scroll' },\n { label: '翻转', value: 'flip' },\n { label: '渐变', value: 'fade' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'scroll',\n },\n },\n {\n name: 'animationDuration',\n title: '动画时长',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0,\n max: 3000,\n step: 100,\n suffix: 'ms',\n },\n },\n extraProps: {\n defaultValue: 1000,\n },\n },\n {\n name: 'animationEasing',\n title: '缓动函数',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '线性', value: 'linear' },\n { label: '缓入', value: 'ease-in' },\n { label: '缓出', value: 'ease-out' },\n { label: '缓入缓出', value: 'ease-in-out' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ease-out',\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\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","TrendIndicator","value","suffix","upColor","downColor","size","color","_jsxs","className","styles","fontSize","children","fill","height","role","transform","undefined","viewBox","width","_jsx","d","marginRight","COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","decimals","separator","fontFamily","glowIntensity","$dashboard","rect","prefix","configure","setter","items","key","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced","NumberFlip","trendEnable","trendValue","trendType","trendSuffix","trendUpColor","trendDownColor","externalStyle","isDigital","formattedValue","formatNumber","fixed","toFixed","intPart","decPart","split","formattedInt","replace","glowShadow","textShadow"],"mappings":"yUAAA,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,UAAUH,OAAOL,EAAEI,EAAEJ,KAAKF,EAAEU,UAAUR,MAAMD,EAAEF,EAAEC,MAAMG,IAAIA,GAAG,KAAKA,GAAGF,GAAG,OAAOE,CAAC,CCGtWQ,CAAKF,EACd,yWCJA,SAAqBG,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,2xBCsBA,MAWMe,EAOD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../../../../../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/snippets.ts","../src/configure.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 * Number Flip Component\n * 数字翻牌组件 - 用于展示 KPI、统计数字等\n */\n\nimport type { CSSProperties, Ref } from 'react'\nimport { cn } from '@easy-editor/materials-shared'\nimport styles from './component.module.css'\n\nexport type TrendType = 'up' | 'down' | 'flat'\n\nexport interface NumberFlipProps {\n ref?: Ref<HTMLDivElement>\n /** 数值 */\n value?: number\n /** 小数位数 */\n decimals?: number\n /** 是否显示千分位分隔符 */\n separator?: boolean\n /** 前缀 */\n prefix?: string\n /** 后缀 */\n suffix?: string\n /** 字体大小 */\n fontSize?: number\n /** 字体类型 */\n fontFamily?: 'digital' | 'default'\n /** 颜色 */\n color?: string\n /** 发光强度 (0-2) */\n glowIntensity?: number\n /** 是否显示趋势 */\n trendEnable?: boolean\n /** 趋势值 */\n trendValue?: number\n /** 趋势类型 */\n trendType?: TrendType\n /** 趋势后缀 */\n trendSuffix?: string\n /** 趋势上升颜色 */\n trendUpColor?: string\n /** 趋势下降颜色 */\n trendDownColor?: string\n /** 外部样式 */\n style?: CSSProperties\n}\n\nconst formatNumber = (value: number, decimals: number, separator: boolean): string => {\n const fixed = value.toFixed(decimals)\n if (!separator) {\n return fixed\n }\n\n const [intPart, decPart] = fixed.split('.')\n const formattedInt = intPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n return decPart ? `${formattedInt}.${decPart}` : formattedInt\n}\n\nconst TrendIndicator: React.FC<{\n type: TrendType\n value: number\n suffix: string\n upColor: string\n downColor: string\n size: number\n}> = ({ type, value, suffix, upColor, downColor, size }) => {\n let color = '#8899aa'\n if (type === 'up') {\n color = upColor\n } else if (type === 'down') {\n color = downColor\n }\n\n return (\n <div className={styles.trend} style={{ fontSize: size * 0.35 }}>\n {type !== 'flat' && (\n <svg\n aria-label={`Trend ${type}`}\n fill='none'\n height={size * 0.3}\n role='img'\n style={{\n transform: type === 'down' ? 'rotate(180deg)' : undefined,\n }}\n viewBox='0 0 24 24'\n width={size * 0.3}\n >\n <title>Trend arrow {type}</title>\n <path d='M12 4L20 14H4L12 4Z' fill={color} />\n </svg>\n )}\n {type === 'flat' && <span style={{ color, marginRight: 4 }}>—</span>}\n <span style={{ color }}>\n {value}\n {suffix}\n </span>\n </div>\n )\n}\n\nexport const NumberFlip: React.FC<NumberFlipProps> = ({\n ref,\n value = 0,\n decimals = 0,\n separator = true,\n prefix = '',\n suffix = '',\n fontSize = 48,\n fontFamily = 'digital',\n color = '#00d4ff',\n glowIntensity = 0.5,\n trendEnable = false,\n trendValue = 0,\n trendType = 'up',\n trendSuffix = '%',\n trendUpColor = '#52c41a',\n trendDownColor = '#ff4d4f',\n style: externalStyle,\n}) => {\n const isDigital = fontFamily === 'digital'\n const formattedValue = formatNumber(value, decimals, separator)\n\n // 计算发光效果的 text-shadow\n const glowShadow =\n glowIntensity > 0\n ? `0 0 ${10 * glowIntensity}px ${color}, 0 0 ${20 * glowIntensity}px ${color}40, 0 0 ${30 * glowIntensity}px ${color}20`\n : 'none'\n\n return (\n <div className={styles.container} ref={ref} style={externalStyle}>\n <div className={styles.content}>\n {prefix ? (\n <span\n className={cn(styles.prefix, isDigital && styles.prefixDigital)}\n style={{\n fontSize: `${fontSize * 0.5}px`,\n color,\n }}\n >\n {prefix}\n </span>\n ) : null}\n <span\n className={cn(styles.value, isDigital && styles.valueDigital)}\n style={{\n fontSize: `${fontSize}px`,\n color,\n textShadow: glowShadow,\n }}\n >\n {formattedValue}\n </span>\n {suffix ? (\n <span\n className={cn(styles.suffix, isDigital && styles.suffixDigital)}\n style={{\n fontSize: `${fontSize * 0.4}px`,\n color,\n }}\n >\n {suffix}\n </span>\n ) : null}\n </div>\n {trendEnable ? (\n <TrendIndicator\n downColor={trendDownColor}\n size={fontSize}\n suffix={trendSuffix}\n type={trendType}\n upColor={trendUpColor}\n value={trendValue}\n />\n ) : null}\n </div>\n )\n}\n\nexport default NumberFlip\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsStatisticNumberMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsStatisticNumberComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsStatisticNumber)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsNumberFlip'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-number-flip'\n","/**\n * Number Flip Meta\n * 数字翻牌组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '数字翻牌',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * 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 * Number Flip Snippets\n * 数字翻牌组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '数字翻牌',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 1_234_567,\n decimals: 0,\n separator: true,\n fontSize: 48,\n fontFamily: 'digital',\n color: '#00d4ff',\n glowIntensity: 0.5,\n },\n $dashboard: {\n rect: {\n width: 280,\n height: 80,\n },\n },\n },\n },\n {\n title: '货币数字',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 99_999.99,\n decimals: 2,\n separator: true,\n prefix: '$',\n fontSize: 42,\n fontFamily: 'digital',\n color: '#00ff88',\n glowIntensity: 0.6,\n },\n $dashboard: {\n rect: {\n width: 260,\n height: 70,\n },\n },\n },\n },\n {\n title: '百分比',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 87.5,\n decimals: 1,\n separator: false,\n suffix: '%',\n fontSize: 56,\n fontFamily: 'digital',\n color: '#ff6b6b',\n glowIntensity: 0.8,\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 90,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Number Flip Configure\n * 数字翻牌组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '数值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'decimals',\n title: '小数位数',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'separator',\n title: '千分位分隔',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'prefix',\n title: '前缀',\n setter: 'StringSetter',\n },\n {\n name: 'suffix',\n title: '后缀',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '趋势',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'trendEnable',\n title: '显示趋势',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'trendValue',\n title: '趋势值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'trendType',\n title: '趋势类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上升', value: 'up' },\n { label: '下降', value: 'down' },\n { label: '持平', value: 'flat' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'up',\n },\n },\n {\n name: 'trendSuffix',\n title: '趋势后缀',\n setter: 'StringSetter',\n extraProps: {\n defaultValue: '%',\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: 48,\n },\n },\n {\n name: 'fontFamily',\n title: '字体类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '数码字体', value: 'digital' },\n { label: '默认字体', value: 'default' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'digital',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\n },\n },\n {\n name: 'glowIntensity',\n title: '发光强度',\n setter: {\n componentName: 'NumberSetter',\n props: {\n min: 0,\n max: 2,\n step: 0.1,\n },\n },\n extraProps: {\n defaultValue: 0.5,\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 type: 'group',\n title: '动画',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'animationEnable',\n title: '启用动画',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'animationType',\n title: '动画类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '滚动', value: 'scroll' },\n { label: '翻转', value: 'flip' },\n { label: '渐变', value: 'fade' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'scroll',\n },\n },\n {\n name: 'animationDuration',\n title: '动画时长',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0,\n max: 3000,\n step: 100,\n suffix: 'ms',\n },\n },\n extraProps: {\n defaultValue: 1000,\n },\n },\n {\n name: 'animationEasing',\n title: '缓动函数',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '线性', value: 'linear' },\n { label: '缓入', value: 'ease-in' },\n { label: '缓出', value: 'ease-out' },\n { label: '缓入缓出', value: 'ease-in-out' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ease-out',\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\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","TrendIndicator","value","suffix","upColor","downColor","size","color","_jsxs","className","styles","fontSize","children","fill","height","role","transform","undefined","viewBox","width","_jsx","d","marginRight","COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","decimals","separator","fontFamily","glowIntensity","$dashboard","rect","prefix","configure","setter","items","key","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced","NumberFlip","trendEnable","trendValue","trendType","trendSuffix","trendUpColor","trendDownColor","externalStyle","isDigital","formattedValue","formatNumber","fixed","toFixed","intPart","decPart","split","formattedInt","replace","glowShadow","textShadow"],"mappings":"oUAAA,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,UAAUH,OAAOL,EAAEI,EAAEJ,KAAKF,EAAEU,UAAUR,MAAMD,EAAEF,EAAEC,MAAMG,IAAIA,GAAG,KAAKA,GAAGF,GAAG,OAAOE,CAAC,CCGtWQ,CAAKF,EACd,yWCJA,SAAqBG,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAM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KAAM2E,EACNjE,QAASmE,EACTrE,MAAOkE,IAEP","x_google_ignoreList":[0,2]}
|
package/dist/meta.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-
|
|
1
|
+
/* @easy-editor/materials-dashboard-number-flip v0.0.2 (meta, esm) */
|
|
2
2
|
const MaterialGroup = {
|
|
3
3
|
DISPLAY: 'display'};
|
|
4
4
|
|
|
@@ -384,7 +384,7 @@ const snippets = [{
|
|
|
384
384
|
}
|
|
385
385
|
}];
|
|
386
386
|
|
|
387
|
-
var version = "0.0.
|
|
387
|
+
var version = "0.0.2";
|
|
388
388
|
var pkg = {
|
|
389
389
|
version: version};
|
|
390
390
|
|
package/dist/meta.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-
|
|
1
|
+
/* @easy-editor/materials-dashboard-number-flip v0.0.2 (meta) */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsNumberFlipMeta = {}));
|
|
6
6
|
})(this, (function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
const MaterialGroup = {
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
}
|
|
391
391
|
}];
|
|
392
392
|
|
|
393
|
-
var version = "0.0.
|
|
393
|
+
var version = "0.0.2";
|
|
394
394
|
var pkg = {
|
|
395
395
|
version: version};
|
|
396
396
|
|
package/dist/meta.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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).
|
|
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).EasyEditorMaterialsNumberFlipMeta={})}(this,function(e){"use strict";const t="EasyEditorMaterialsNumberFlip";const a={componentName:t,title:"数字翻牌",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-number-flip",version:"0.0.2",globalName:t,componentName:t},snippets:[{title:"数字翻牌",screenshot:"",schema:{componentName:t,props:{value:1234567,decimals:0,separator:!0,fontSize:48,fontFamily:"digital",color:"#00d4ff",glowIntensity:.5},$dashboard:{rect:{width:280,height:80}}}},{title:"货币数字",screenshot:"",schema:{componentName:t,props:{value:99999.99,decimals:2,separator:!0,prefix:"$",fontSize:42,fontFamily:"digital",color:"#00ff88",glowIntensity:.6},$dashboard:{rect:{width:260,height:70}}}},{title:"百分比",screenshot:"",schema:{componentName:t,props:{value:87.5,decimals:1,separator:!1,suffix:"%",fontSize:56,fontFamily:"digital",color:"#ff6b6b",glowIntensity:.8},$dashboard:{rect:{width:200,height:90}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"数值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"decimals",title:"小数位数",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"separator",title:"千分位分隔",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"prefix",title:"前缀",setter:"StringSetter"},{name:"suffix",title:"后缀",setter:"StringSetter"}]},{type:"group",title:"趋势",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"trendEnable",title:"显示趋势",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"trendValue",title:"趋势值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"trendType",title:"趋势类型",setter:{componentName:"SegmentedSetter",props:{options:[{label:"上升",value:"up"},{label:"下降",value:"down"},{label:"持平",value:"flat"}]}},extraProps:{defaultValue:"up"}},{name:"trendSuffix",title:"趋势后缀",setter:"StringSetter",extraProps:{defaultValue:"%"}}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"fontSize",title:"字体大小",setter:"NumberSetter",extraProps:{defaultValue:48}},{name:"fontFamily",title:"字体类型",setter:{componentName:"SelectSetter",props:{options:[{label:"数码字体",value:"digital"},{label:"默认字体",value:"default"}]}},extraProps:{defaultValue:"digital"}},{name:"color",title:"颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00d4ff"}},{name:"glowIntensity",title:"发光强度",setter:{componentName:"NumberSetter",props:{min:0,max:2,step:.1}},extraProps:{defaultValue:.5}}]}]},{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}},{type:"group",title:"动画",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"animationEnable",title:"启用动画",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"animationType",title:"动画类型",setter:{componentName:"SegmentedSetter",props:{options:[{label:"滚动",value:"scroll"},{label:"翻转",value:"flip"},{label:"渐变",value:"fade"}]}},extraProps:{defaultValue:"scroll"}},{name:"animationDuration",title:"动画时长",setter:{componentName:"SliderSetter",props:{min:0,max:3e3,step:100,suffix:"ms"}},extraProps:{defaultValue:1e3}},{name:"animationEasing",title:"缓动函数",setter:{componentName:"SelectSetter",props:{options:[{label:"线性",value:"linear"},{label:"缓入",value:"ease-in"},{label:"缓出",value:"ease-out"},{label:"缓入缓出",value:"ease-in-out"}]}},extraProps:{defaultValue:"ease-out"}}]}]}]}],component:{},supports:{},advanced:{}}};e.default=a,e.meta=a,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=meta.min.js.map
|
package/dist/meta.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.min.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/meta.ts","../src/snippets.ts","../src/configure.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsStatisticNumberMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsStatisticNumberComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsStatisticNumber)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsNumberFlip'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-number-flip'\n","/**\n * Number Flip Meta\n * 数字翻牌组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '数字翻牌',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * Number Flip Snippets\n * 数字翻牌组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '数字翻牌',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 1_234_567,\n decimals: 0,\n separator: true,\n fontSize: 48,\n fontFamily: 'digital',\n color: '#00d4ff',\n glowIntensity: 0.5,\n },\n $dashboard: {\n rect: {\n width: 280,\n height: 80,\n },\n },\n },\n },\n {\n title: '货币数字',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 99_999.99,\n decimals: 2,\n separator: true,\n prefix: '$',\n fontSize: 42,\n fontFamily: 'digital',\n color: '#00ff88',\n glowIntensity: 0.6,\n },\n $dashboard: {\n rect: {\n width: 260,\n height: 70,\n },\n },\n },\n },\n {\n title: '百分比',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 87.5,\n decimals: 1,\n separator: false,\n suffix: '%',\n fontSize: 56,\n fontFamily: 'digital',\n color: '#ff6b6b',\n glowIntensity: 0.8,\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 90,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Number Flip Configure\n * 数字翻牌组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '数值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'decimals',\n title: '小数位数',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'separator',\n title: '千分位分隔',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'prefix',\n title: '前缀',\n setter: 'StringSetter',\n },\n {\n name: 'suffix',\n title: '后缀',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '趋势',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'trendEnable',\n title: '显示趋势',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'trendValue',\n title: '趋势值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'trendType',\n title: '趋势类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上升', value: 'up' },\n { label: '下降', value: 'down' },\n { label: '持平', value: 'flat' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'up',\n },\n },\n {\n name: 'trendSuffix',\n title: '趋势后缀',\n setter: 'StringSetter',\n extraProps: {\n defaultValue: '%',\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: 48,\n },\n },\n {\n name: 'fontFamily',\n title: '字体类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '数码字体', value: 'digital' },\n { label: '默认字体', value: 'default' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'digital',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\n },\n },\n {\n name: 'glowIntensity',\n title: '发光强度',\n setter: {\n componentName: 'NumberSetter',\n props: {\n min: 0,\n max: 2,\n step: 0.1,\n },\n },\n extraProps: {\n defaultValue: 0.5,\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 type: 'group',\n title: '动画',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'animationEnable',\n title: '启用动画',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'animationType',\n title: '动画类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '滚动', value: 'scroll' },\n { label: '翻转', value: 'flip' },\n { label: '渐变', value: 'fade' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'scroll',\n },\n },\n {\n name: 'animationDuration',\n title: '动画时长',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0,\n max: 3000,\n step: 100,\n suffix: 'ms',\n },\n },\n extraProps: {\n defaultValue: 1000,\n },\n },\n {\n name: 'animationEasing',\n title: '缓动函数',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '线性', value: 'linear' },\n { label: '缓入', value: 'ease-in' },\n { label: '缓出', value: 'ease-out' },\n { label: '缓入缓出', value: 'ease-in-out' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ease-out',\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","value","decimals","separator","fontSize","fontFamily","color","glowIntensity","$dashboard","rect","width","height","prefix","suffix","configure","type","setter","items","key","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced"],"mappings":"6QAMO,MCMMA,EAAiB,gCCAvB,MAAMC,EAA0B,CACrCC,cAAeF,EACfG,MAAO,OACPC,MFDS,UEETC,QAAS,UACTC,IAAK,CACHC,QDDwB,+CCExBC,gBACAC,WAAYT,EACZE,cAAeF,GAEjBU,SCfiC,CACjC,CACEP,MAAO,OACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,QACPC,SAAU,EACVC,WAAW,EACXC,SAAU,GACVC,WAAY,UACZC,MAAO,UACPC,cAAe,IAEjBC,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,OAKhB,C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":3,"file":"meta.min.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/meta.ts","../src/snippets.ts","../src/configure.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsStatisticNumberMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsStatisticNumberComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsStatisticNumber)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsNumberFlip'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-number-flip'\n","/**\n * Number Flip Meta\n * 数字翻牌组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '数字翻牌',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * Number Flip Snippets\n * 数字翻牌组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '数字翻牌',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 1_234_567,\n decimals: 0,\n separator: true,\n fontSize: 48,\n fontFamily: 'digital',\n color: '#00d4ff',\n glowIntensity: 0.5,\n },\n $dashboard: {\n rect: {\n width: 280,\n height: 80,\n },\n },\n },\n },\n {\n title: '货币数字',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 99_999.99,\n decimals: 2,\n separator: true,\n prefix: '$',\n fontSize: 42,\n fontFamily: 'digital',\n color: '#00ff88',\n glowIntensity: 0.6,\n },\n $dashboard: {\n rect: {\n width: 260,\n height: 70,\n },\n },\n },\n },\n {\n title: '百分比',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 87.5,\n decimals: 1,\n separator: false,\n suffix: '%',\n fontSize: 56,\n fontFamily: 'digital',\n color: '#ff6b6b',\n glowIntensity: 0.8,\n },\n $dashboard: {\n rect: {\n width: 200,\n height: 90,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Number Flip Configure\n * 数字翻牌组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '数值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'decimals',\n title: '小数位数',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'separator',\n title: '千分位分隔',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'prefix',\n title: '前缀',\n setter: 'StringSetter',\n },\n {\n name: 'suffix',\n title: '后缀',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '趋势',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'trendEnable',\n title: '显示趋势',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'trendValue',\n title: '趋势值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'trendType',\n title: '趋势类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '上升', value: 'up' },\n { label: '下降', value: 'down' },\n { label: '持平', value: 'flat' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'up',\n },\n },\n {\n name: 'trendSuffix',\n title: '趋势后缀',\n setter: 'StringSetter',\n extraProps: {\n defaultValue: '%',\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: 48,\n },\n },\n {\n name: 'fontFamily',\n title: '字体类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '数码字体', value: 'digital' },\n { label: '默认字体', value: 'default' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'digital',\n },\n },\n {\n name: 'color',\n title: '颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00d4ff',\n },\n },\n {\n name: 'glowIntensity',\n title: '发光强度',\n setter: {\n componentName: 'NumberSetter',\n props: {\n min: 0,\n max: 2,\n step: 0.1,\n },\n },\n extraProps: {\n defaultValue: 0.5,\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 type: 'group',\n title: '动画',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'animationEnable',\n title: '启用动画',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'animationType',\n title: '动画类型',\n setter: {\n componentName: 'SegmentedSetter',\n props: {\n options: [\n { label: '滚动', value: 'scroll' },\n { label: '翻转', value: 'flip' },\n { label: '渐变', value: 'fade' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'scroll',\n },\n },\n {\n name: 'animationDuration',\n title: '动画时长',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0,\n max: 3000,\n step: 100,\n suffix: 'ms',\n },\n },\n extraProps: {\n defaultValue: 1000,\n },\n },\n {\n name: 'animationEasing',\n title: '缓动函数',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '线性', value: 'linear' },\n { label: '缓入', value: 'ease-in' },\n { label: '缓出', value: 'ease-out' },\n { label: '缓入缓出', value: 'ease-in-out' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ease-out',\n },\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","value","decimals","separator","fontSize","fontFamily","color","glowIntensity","$dashboard","rect","width","height","prefix","suffix","configure","type","setter","items","key","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced"],"mappings":"wQAMO,MCMMA,EAAiB,gCCAvB,MAAMC,EAA0B,CACrCC,cAAeF,EACfG,MAAO,OACPC,MFDS,UEETC,QAAS,UACTC,IAAK,CACHC,QDDwB,+CCExBC,gBACAC,WAAYT,EACZE,cAAeF,GAEjBU,SCfiC,CACjC,CACEP,MAAO,OACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,QACPC,SAAU,EACVC,WAAW,EACXC,SAAU,GACVC,WAAY,UACZC,MAAO,UACPC,cAAe,IAEjBC,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,OAKhB,CACErB,MAAO,OACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,SACPC,SAAU,EACVC,WAAW,EACXS,OAAQ,IACRR,SAAU,GACVC,WAAY,UACZC,MAAO,UACPC,cAAe,IAEjBC,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,OAKhB,CACErB,MAAO,MACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,KACPC,SAAU,EACVC,WAAW,EACXU,OAAQ,IACRT,SAAU,GACVC,WAAY,UACZC,MAAO,UACPC,cAAe,IAEjBC,WAAY,CACVC,KAAM,CACJC,M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,CACN3B,cAAe,iBACfW,MAAO,CACLmB,MAAM,IAGVF,MAAO,CACL,CACEG,KAAM,kBACN9B,MAAO,OACP0B,OAAQ,eACRK,WAAY,CACVO,cAAc,IAGlB,CACER,KAAM,gBACN9B,MAAO,OACP0B,OAAQ,CACN3B,cAAe,kBACfW,MAAO,CACL6B,QAAS,CACP,CAAEP,MAAO,KAAMrB,MAAO,UACtB,CAAEqB,MAAO,KAAMrB,MAAO,QACtB,CAAEqB,MAAO,KAAMrB,MAAO,WAI5BoB,WAAY,CACVO,aAAc,WAGlB,CACER,KAAM,oBACN9B,MAAO,OACP0B,OAAQ,CACN3B,cAAe,eACfW,MAAO,CACL8B,IAAK,EACLC,IAAK,IACLC,KAAM,IACNnB,OAAQ,OAGZQ,WAAY,CACVO,aAAc,MAGlB,CACER,KAAM,kBACN9B,MAAO,OACP0B,OAAQ,CACN3B,cAAe,eACfW,MAAO,CACL6B,QAAS,CACP,CAAEP,MAAO,KAAMrB,MAAO,UACtB,CAAEqB,MAAO,KAAMrB,MAAO,WACtB,CAAEqB,MAAO,KAAMrB,MAAO,YACtB,CAAEqB,MAAO,OAAQrB,MAAO,kBAI9BoB,WAAY,CACVO,aAAc,oBAUhCM,UAAW,CAAA,EACXC,SAAU,CAAA,EACVC,SAAU,CAAA"}
|
package/package.json
CHANGED
package/rollup.config.js
CHANGED
|
@@ -7,7 +7,7 @@ import cleanup from 'rollup-plugin-cleanup'
|
|
|
7
7
|
import postcss from 'rollup-plugin-postcss'
|
|
8
8
|
import pkg from './package.json' with { type: 'json' }
|
|
9
9
|
|
|
10
|
-
const GLOBAL_NAME = '
|
|
10
|
+
const GLOBAL_NAME = 'EasyEditorMaterialsNumberFlip'
|
|
11
11
|
|
|
12
12
|
// 外部依赖(不打包进组件)
|
|
13
13
|
const external = ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core']
|
|
@@ -64,7 +64,7 @@ export default [
|
|
|
64
64
|
file: 'dist/meta.esm.js',
|
|
65
65
|
format: 'esm',
|
|
66
66
|
sourcemap: true,
|
|
67
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
67
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (meta, esm) */`,
|
|
68
68
|
exports: 'named',
|
|
69
69
|
},
|
|
70
70
|
],
|
|
@@ -81,7 +81,7 @@ export default [
|
|
|
81
81
|
name: `${GLOBAL_NAME}Meta`,
|
|
82
82
|
globals,
|
|
83
83
|
sourcemap: true,
|
|
84
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
84
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (meta) */`,
|
|
85
85
|
exports: 'named',
|
|
86
86
|
},
|
|
87
87
|
],
|
|
@@ -98,7 +98,7 @@ export default [
|
|
|
98
98
|
name: `${GLOBAL_NAME}Meta`,
|
|
99
99
|
globals,
|
|
100
100
|
sourcemap: true,
|
|
101
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
101
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (meta, minified) */`,
|
|
102
102
|
exports: 'named',
|
|
103
103
|
},
|
|
104
104
|
],
|
|
@@ -115,7 +115,7 @@ export default [
|
|
|
115
115
|
file: 'dist/component.esm.js',
|
|
116
116
|
format: 'esm',
|
|
117
117
|
sourcemap: true,
|
|
118
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
118
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (component, esm) */`,
|
|
119
119
|
exports: 'named',
|
|
120
120
|
},
|
|
121
121
|
],
|
|
@@ -132,7 +132,7 @@ export default [
|
|
|
132
132
|
name: `${GLOBAL_NAME}Component`,
|
|
133
133
|
globals,
|
|
134
134
|
sourcemap: true,
|
|
135
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
135
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (component) */`,
|
|
136
136
|
exports: 'named',
|
|
137
137
|
},
|
|
138
138
|
],
|
|
@@ -149,7 +149,7 @@ export default [
|
|
|
149
149
|
name: `${GLOBAL_NAME}Component`,
|
|
150
150
|
globals,
|
|
151
151
|
sourcemap: true,
|
|
152
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
152
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (component, minified) */`,
|
|
153
153
|
exports: 'named',
|
|
154
154
|
},
|
|
155
155
|
],
|
|
@@ -168,7 +168,7 @@ export default [
|
|
|
168
168
|
name: GLOBAL_NAME,
|
|
169
169
|
globals,
|
|
170
170
|
sourcemap: true,
|
|
171
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
171
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} */`,
|
|
172
172
|
exports: 'named',
|
|
173
173
|
},
|
|
174
174
|
],
|
|
@@ -212,7 +212,7 @@ export default [
|
|
|
212
212
|
name: GLOBAL_NAME,
|
|
213
213
|
globals,
|
|
214
214
|
sourcemap: true,
|
|
215
|
-
banner: `/* @easy-editor/materials-dashboard-
|
|
215
|
+
banner: `/* @easy-editor/materials-dashboard-number-flip v${pkg.version} (minified) */`,
|
|
216
216
|
exports: 'named',
|
|
217
217
|
},
|
|
218
218
|
],
|