@easy-editor/materials-dashboard-progress 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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @easy-editor/materials-dashboard-progress
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: build error
8
+
3
9
  ## 0.0.2
4
10
 
5
11
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* @easy-editor/materials-dashboard-progress-ring v0.0.1 (component, esm) */
1
+ /* @easy-editor/materials-dashboard-progress v0.0.2 (component, esm) */
2
2
  import { useId, useRef, useState, useEffect } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
package/dist/component.js CHANGED
@@ -1,8 +1,8 @@
1
- /* @easy-editor/materials-dashboard-progress-ring v0.0.1 (component) */
1
+ /* @easy-editor/materials-dashboard-progress v0.0.2 (component) */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react/jsx-runtime')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react', 'react/jsx-runtime'], factory) :
5
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgressRingComponent = {}, global.React, global.jsxRuntime));
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgressComponent = {}, global.React, global.jsxRuntime));
6
6
  })(this, (function (exports, react, jsxRuntime) { 'use strict';
7
7
 
8
8
  function styleInject(css, ref) {
@@ -1,2 +1,2 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react","react/jsx-runtime"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgressRingComponent={},e.React,e.jsxRuntime)}(this,function(e,o,t){"use strict";var n="component-module__wrapper___IYMoW",r="component-module__container___VbZSk",l="component-module__ring___QkEHa",a="component-module__centerContent___Ri3R3",s="component-module__value___Fg70k",i="component-module__label___6IHVo",d="component-module__barContainer___AOTls",c="component-module__barWrapper___cni-a",_="component-module__barFill___KZkJe",m="component-module__barLabels___BvaEi",u="component-module__barLabel___wVaWe",p="component-module__barValue___H2muu";!function(e,o){void 0===o&&(o={});var t=o.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&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,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}");const h=(e,o,t)=>"percent"===t?`${Math.round(o)}%`:`${e}`,f=({percentage:e,strokeWidthRatio:n,trackColor:d,progressColor:c,gradientEnable:_,gradientColors:m,showValue:u,showLabel:p,label:f,valueFormat:g,displayColor:x,gradientId:b})=>{const y=o.useRef(null),[j,C]=o.useState(100);o.useEffect(()=>{const e=y.current;if(!e)return;const o=()=>{const{width:o,height:t}=e.getBoundingClientRect(),n=Math.min(o,t);n>0&&C(n)};o();const t=new ResizeObserver(o);return t.observe(e),()=>t.disconnect()},[]);const v=Math.max(2,j*n),k=(j-v)/2,w=2*Math.PI*k,N=w-e/100*w,V=j/2;return t.jsxs("div",{className:r,ref:y,children:[t.jsxs("svg",{"aria-label":"Progress ring",className:l,height:j,role:"img",width:j,children:[t.jsx("title",{children:"Progress indicator"}),_?t.jsx("defs",{children:t.jsxs("linearGradient",{id:b,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[t.jsx("stop",{offset:"0%",stopColor:m[0]}),t.jsx("stop",{offset:"100%",stopColor:m[1]})]})}):null,t.jsx("circle",{cx:V,cy:V,fill:"none",r:k,stroke:d,strokeWidth:v}),t.jsx("circle",{cx:V,cy:V,fill:"none",r:k,stroke:_?`url(#${b})`:c,strokeDasharray:w,strokeDashoffset:N,strokeLinecap:"round",strokeWidth:v,style:{transition:"stroke-dashoffset 0.5s ease"}})]}),t.jsxs("div",{className:a,children:[u?t.jsx("span",{className:s,style:{fontSize:.2*j,color:x},children:h(Math.round(e),e,g)}):null,p&&f?t.jsx("span",{className:i,style:{fontSize:.1*j},children:f}):null]})]})},g=({percentage:e,trackColor:o,progressColor:n,gradientEnable:r,gradientColors:l,showValue:a,showLabel:s,label:i,valueFormat:f,displayColor:g})=>t.jsxs("div",{className:d,children:[s||a?t.jsxs("div",{className:m,children:[s?t.jsx("span",{className:u,children:i}):null,a?t.jsx("span",{className:p,style:{color:g},children:h(Math.round(e),e,f)}):null]}):null,t.jsx("div",{className:c,style:{background:o},children:t.jsx("div",{className:_,style:{width:`${e}%`,background:r?`linear-gradient(90deg, ${l[0]}, ${l[1]})`:n}})})]}),x=({ref:e,value:r=0,maxValue:l=100,type:a="ring",showValue:s=!0,showLabel:i=!1,label:d="",valueFormat:c="percent",strokeWidthRatio:_=.07,trackColor:m="rgba(26, 26, 62, 0.8)",progressColor:u="#00d4ff",gradientEnable:p=!1,gradientColors:h=["#00d4ff","#9b59b6"],style:x})=>{const b=o.useId(),y=Math.min(Math.max(r,0),l)/l*100,j=p?h[0]:u;return"ring"===a?t.jsx("div",{className:n,ref:e,style:x,children:t.jsx(f,{displayColor:j,gradientColors:h,gradientEnable:p,gradientId:b,label:d,percentage:y,progressColor:u,showLabel:i,showValue:s,strokeWidthRatio:_,trackColor:m,valueFormat:c})}):t.jsx("div",{className:n,ref:e,style:x,children:t.jsx(g,{displayColor:j,gradientColors:h,gradientEnable:p,label:d,percentage:y,progressColor:u,showLabel:i,showValue:s,trackColor:m,valueFormat:c})})};e.Progress=x,e.default=x,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react","react/jsx-runtime"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgressComponent={},e.React,e.jsxRuntime)}(this,function(e,o,t){"use strict";var n="component-module__wrapper___IYMoW",r="component-module__container___VbZSk",l="component-module__ring___QkEHa",a="component-module__centerContent___Ri3R3",s="component-module__value___Fg70k",i="component-module__label___6IHVo",d="component-module__barContainer___AOTls",c="component-module__barWrapper___cni-a",_="component-module__barFill___KZkJe",m="component-module__barLabels___BvaEi",u="component-module__barLabel___wVaWe",p="component-module__barValue___H2muu";!function(e,o){void 0===o&&(o={});var t=o.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&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,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}");const h=(e,o,t)=>"percent"===t?`${Math.round(o)}%`:`${e}`,f=({percentage:e,strokeWidthRatio:n,trackColor:d,progressColor:c,gradientEnable:_,gradientColors:m,showValue:u,showLabel:p,label:f,valueFormat:g,displayColor:x,gradientId:b})=>{const y=o.useRef(null),[j,C]=o.useState(100);o.useEffect(()=>{const e=y.current;if(!e)return;const o=()=>{const{width:o,height:t}=e.getBoundingClientRect(),n=Math.min(o,t);n>0&&C(n)};o();const t=new ResizeObserver(o);return t.observe(e),()=>t.disconnect()},[]);const v=Math.max(2,j*n),k=(j-v)/2,w=2*Math.PI*k,N=w-e/100*w,V=j/2;return t.jsxs("div",{className:r,ref:y,children:[t.jsxs("svg",{"aria-label":"Progress ring",className:l,height:j,role:"img",width:j,children:[t.jsx("title",{children:"Progress indicator"}),_?t.jsx("defs",{children:t.jsxs("linearGradient",{id:b,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[t.jsx("stop",{offset:"0%",stopColor:m[0]}),t.jsx("stop",{offset:"100%",stopColor:m[1]})]})}):null,t.jsx("circle",{cx:V,cy:V,fill:"none",r:k,stroke:d,strokeWidth:v}),t.jsx("circle",{cx:V,cy:V,fill:"none",r:k,stroke:_?`url(#${b})`:c,strokeDasharray:w,strokeDashoffset:N,strokeLinecap:"round",strokeWidth:v,style:{transition:"stroke-dashoffset 0.5s ease"}})]}),t.jsxs("div",{className:a,children:[u?t.jsx("span",{className:s,style:{fontSize:.2*j,color:x},children:h(Math.round(e),e,g)}):null,p&&f?t.jsx("span",{className:i,style:{fontSize:.1*j},children:f}):null]})]})},g=({percentage:e,trackColor:o,progressColor:n,gradientEnable:r,gradientColors:l,showValue:a,showLabel:s,label:i,valueFormat:f,displayColor:g})=>t.jsxs("div",{className:d,children:[s||a?t.jsxs("div",{className:m,children:[s?t.jsx("span",{className:u,children:i}):null,a?t.jsx("span",{className:p,style:{color:g},children:h(Math.round(e),e,f)}):null]}):null,t.jsx("div",{className:c,style:{background:o},children:t.jsx("div",{className:_,style:{width:`${e}%`,background:r?`linear-gradient(90deg, ${l[0]}, ${l[1]})`:n}})})]}),x=({ref:e,value:r=0,maxValue:l=100,type:a="ring",showValue:s=!0,showLabel:i=!1,label:d="",valueFormat:c="percent",strokeWidthRatio:_=.07,trackColor:m="rgba(26, 26, 62, 0.8)",progressColor:u="#00d4ff",gradientEnable:p=!1,gradientColors:h=["#00d4ff","#9b59b6"],style:x})=>{const b=o.useId(),y=Math.min(Math.max(r,0),l)/l*100,j=p?h[0]:u;return"ring"===a?t.jsx("div",{className:n,ref:e,style:x,children:t.jsx(f,{displayColor:j,gradientColors:h,gradientEnable:p,gradientId:b,label:d,percentage:y,progressColor:u,showLabel:i,showValue:s,strokeWidthRatio:_,trackColor:m,valueFormat:c})}):t.jsx("div",{className:n,ref:e,style:x,children:t.jsx(g,{displayColor:j,gradientColors:h,gradientEnable:p,label:d,percentage:y,progressColor:u,showLabel:i,showValue:s,trackColor:m,valueFormat:c})})};e.Progress=x,e.default=x,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/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/component.tsx"],"sourcesContent":["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 * Progress Component\n * 进度组件 - 支持环形和线性进度条\n */\n\nimport { useId, useRef, useEffect, useState, type CSSProperties, type Ref } from 'react'\nimport styles from './component.module.css'\n\nexport interface ProgressProps {\n ref?: Ref<HTMLDivElement>\n /** 当前值 */\n value?: number\n /** 最大值 */\n maxValue?: number\n /** 进度条类型 */\n type?: 'ring' | 'bar'\n /** 是否显示数值 */\n showValue?: boolean\n /** 是否显示标签 */\n showLabel?: boolean\n /** 标签文本 */\n label?: string\n /** 数值格式 */\n valueFormat?: 'percent' | 'number'\n /** 线条宽度比例(相对于尺寸的百分比) */\n strokeWidthRatio?: number\n /** 轨道颜色 */\n trackColor?: string\n /** 进度颜色 */\n progressColor?: string\n /** 是否启用渐变 */\n gradientEnable?: boolean\n /** 渐变颜色 [起始色, 结束色] */\n gradientColors?: [string, string]\n /** 外部样式 */\n style?: CSSProperties\n}\n\n// 格式化数值\nconst formatValue = (value: number, percentage: number, valueFormat: string): string => {\n if (valueFormat === 'percent') {\n return `${Math.round(percentage)}%`\n }\n return `${value}`\n}\n\n// 环形进度条组件\nconst RingProgress = ({\n percentage,\n strokeWidthRatio,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n gradientId,\n}: {\n percentage: number\n strokeWidthRatio: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n gradientId: string\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [size, setSize] = useState(100)\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) {\n return\n }\n\n const updateSize = () => {\n const { width, height } = container.getBoundingClientRect()\n const minSize = Math.min(width, height)\n if (minSize > 0) {\n setSize(minSize)\n }\n }\n\n updateSize()\n\n const resizeObserver = new ResizeObserver(updateSize)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n const strokeWidth = Math.max(2, size * strokeWidthRatio)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const strokeDashoffset = circumference - (percentage / 100) * circumference\n const center = size / 2\n\n return (\n <div className={styles.container} ref={containerRef}>\n <svg aria-label='Progress ring' className={styles.ring} height={size} role='img' width={size}>\n <title>Progress indicator</title>\n {gradientEnable ? (\n <defs>\n <linearGradient id={gradientId} x1='0%' x2='100%' y1='0%' y2='0%'>\n <stop offset='0%' stopColor={gradientColors[0]} />\n <stop offset='100%' stopColor={gradientColors[1]} />\n </linearGradient>\n </defs>\n ) : null}\n {/* 轨道 */}\n <circle cx={center} cy={center} fill='none' r={radius} stroke={trackColor} strokeWidth={strokeWidth} />\n {/* 进度 */}\n <circle\n cx={center}\n cy={center}\n fill='none'\n r={radius}\n stroke={gradientEnable ? `url(#${gradientId})` : progressColor}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n strokeWidth={strokeWidth}\n style={{\n transition: 'stroke-dashoffset 0.5s ease',\n }}\n />\n </svg>\n <div className={styles.centerContent}>\n {showValue ? (\n <span className={styles.value} style={{ fontSize: size * 0.2, color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n {showLabel && label ? (\n <span className={styles.label} style={{ fontSize: size * 0.1 }}>\n {label}\n </span>\n ) : null}\n </div>\n </div>\n )\n}\n\n// 线性进度条组件\nconst BarProgress = ({\n percentage,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n}: {\n percentage: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n}) => (\n <div className={styles.barContainer}>\n {showLabel || showValue ? (\n <div className={styles.barLabels}>\n {showLabel ? <span className={styles.barLabel}>{label}</span> : null}\n {showValue ? (\n <span className={styles.barValue} style={{ color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n </div>\n ) : null}\n <div className={styles.barWrapper} style={{ background: trackColor }}>\n <div\n className={styles.barFill}\n style={{\n width: `${percentage}%`,\n background: gradientEnable\n ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})`\n : progressColor,\n }}\n />\n </div>\n </div>\n)\n\nexport const Progress: React.FC<ProgressProps> = ({\n ref,\n value = 0,\n maxValue = 100,\n type = 'ring',\n showValue = true,\n showLabel = false,\n label = '',\n valueFormat = 'percent',\n strokeWidthRatio = 0.07,\n trackColor = 'rgba(26, 26, 62, 0.8)',\n progressColor = '#00d4ff',\n gradientEnable = false,\n gradientColors = ['#00d4ff', '#9b59b6'],\n style: externalStyle,\n}) => {\n const gradientId = useId()\n\n const normalizedValue = Math.min(Math.max(value, 0), maxValue)\n const percentage = (normalizedValue / maxValue) * 100\n const displayColor = gradientEnable ? gradientColors[0] : progressColor\n\n if (type === 'ring') {\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <RingProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n gradientId={gradientId}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n strokeWidthRatio={strokeWidthRatio}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n }\n\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <BarProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n}\n\nexport default Progress\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","formatValue","value","percentage","valueFormat","Math","round","RingProgress","strokeWidthRatio","trackColor","progressColor","gradientEnable","gradientColors","showValue","showLabel","label","displayColor","gradientId","containerRef","useRef","size","setSize","useState","useEffect","container","current","updateSize","width","height","getBoundingClientRect","minSize","min","resizeObserver","ResizeObserver","observe","disconnect","strokeWidth","max","radius","circumference","PI","strokeDashoffset","center","_jsxs","className","styles","children","role","_jsx","id","x1","x2","y1","y2","offset","stopColor","cx","cy","fill","r","stroke","strokeDasharray","strokeLinecap","transition","fontSize","color","BarProgress","background","Progress","maxValue","externalStyle","useId"],"mappings":"40BAAA,SAAqBA,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,mqCCcA,MAAMe,EAAcA,CAACC,EAAeC,EAAoBC,IAClC,YAAhBA,EACK,GAAGC,KAAKC,MAAMH,MAEhB,GAAGD,IAINK,EAAeA,EACnBJ,aACAK,mBACAC,aACAC,gBACAC,iBACAC,iBACAC,YACAC,YACAC,QACAX,cACAY,eACAC,iBAeA,MAAMC,EAAeC,EAAAA,OAAuB,OACrCC,EAAMC,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dI,mBAAmB,IACnBC,aAAa,wBACbC,gBAAgB,UAChBC,kBAAiB,EACjBC,iBAAiB,CAAC,UAAW,WAC7BpB,MAAO8E,MAEP,MAAMrD,EAAasD,EAAAA,QAGbpE,EADkBE,KAAK0B,IAAI1B,KAAKgC,IAAInC,EAAO,GAAImE,GACfA,EAAY,IAC5CrD,EAAeL,EAAiBC,EAAe,GAAKF,EAE1D,MAAa,SAAThB,EAEAsD,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAO8E,EAAcxB,SAC7DE,EAAAA,IAACzC,EAAY,CACXS,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBM,WAAYA,EACZF,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXL,iBAAkBA,EAClBC,WAAYA,EACZL,YAAaA,MAOnB4C,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAO8E,EAAcxB,SAC7DE,EAAAA,IAACkB,EAAW,CACVlD,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBI,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXJ,WAAYA,EACZL,YAAaA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"component.min.js","sources":["../../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/component.tsx"],"sourcesContent":["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 * Progress Component\n * 进度组件 - 支持环形和线性进度条\n */\n\nimport { useId, useRef, useEffect, useState, type CSSProperties, type Ref } from 'react'\nimport styles from './component.module.css'\n\nexport interface ProgressProps {\n ref?: Ref<HTMLDivElement>\n /** 当前值 */\n value?: number\n /** 最大值 */\n maxValue?: number\n /** 进度条类型 */\n type?: 'ring' | 'bar'\n /** 是否显示数值 */\n showValue?: boolean\n /** 是否显示标签 */\n showLabel?: boolean\n /** 标签文本 */\n label?: string\n /** 数值格式 */\n valueFormat?: 'percent' | 'number'\n /** 线条宽度比例(相对于尺寸的百分比) */\n strokeWidthRatio?: number\n /** 轨道颜色 */\n trackColor?: string\n /** 进度颜色 */\n progressColor?: string\n /** 是否启用渐变 */\n gradientEnable?: boolean\n /** 渐变颜色 [起始色, 结束色] */\n gradientColors?: [string, string]\n /** 外部样式 */\n style?: CSSProperties\n}\n\n// 格式化数值\nconst formatValue = (value: number, percentage: number, valueFormat: string): string => {\n if (valueFormat === 'percent') {\n return `${Math.round(percentage)}%`\n }\n return `${value}`\n}\n\n// 环形进度条组件\nconst RingProgress = ({\n percentage,\n strokeWidthRatio,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n gradientId,\n}: {\n percentage: number\n strokeWidthRatio: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n gradientId: string\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [size, setSize] = useState(100)\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) {\n return\n }\n\n const updateSize = () => {\n const { width, height } = container.getBoundingClientRect()\n const minSize = Math.min(width, height)\n if (minSize > 0) {\n setSize(minSize)\n }\n }\n\n updateSize()\n\n const resizeObserver = new ResizeObserver(updateSize)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n const strokeWidth = Math.max(2, size * strokeWidthRatio)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const strokeDashoffset = circumference - (percentage / 100) * circumference\n const center = size / 2\n\n return (\n <div className={styles.container} ref={containerRef}>\n <svg aria-label='Progress ring' className={styles.ring} height={size} role='img' width={size}>\n <title>Progress indicator</title>\n {gradientEnable ? (\n <defs>\n <linearGradient id={gradientId} x1='0%' x2='100%' y1='0%' y2='0%'>\n <stop offset='0%' stopColor={gradientColors[0]} />\n <stop offset='100%' stopColor={gradientColors[1]} />\n </linearGradient>\n </defs>\n ) : null}\n {/* 轨道 */}\n <circle cx={center} cy={center} fill='none' r={radius} stroke={trackColor} strokeWidth={strokeWidth} />\n {/* 进度 */}\n <circle\n cx={center}\n cy={center}\n fill='none'\n r={radius}\n stroke={gradientEnable ? `url(#${gradientId})` : progressColor}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n strokeWidth={strokeWidth}\n style={{\n transition: 'stroke-dashoffset 0.5s ease',\n }}\n />\n </svg>\n <div className={styles.centerContent}>\n {showValue ? (\n <span className={styles.value} style={{ fontSize: size * 0.2, color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n {showLabel && label ? (\n <span className={styles.label} style={{ fontSize: size * 0.1 }}>\n {label}\n </span>\n ) : null}\n </div>\n </div>\n )\n}\n\n// 线性进度条组件\nconst BarProgress = ({\n percentage,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n}: {\n percentage: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n}) => (\n <div className={styles.barContainer}>\n {showLabel || showValue ? (\n <div className={styles.barLabels}>\n {showLabel ? <span className={styles.barLabel}>{label}</span> : null}\n {showValue ? (\n <span className={styles.barValue} style={{ color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n </div>\n ) : null}\n <div className={styles.barWrapper} style={{ background: trackColor }}>\n <div\n className={styles.barFill}\n style={{\n width: `${percentage}%`,\n background: gradientEnable\n ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})`\n : progressColor,\n }}\n />\n </div>\n </div>\n)\n\nexport const Progress: React.FC<ProgressProps> = ({\n ref,\n value = 0,\n maxValue = 100,\n type = 'ring',\n showValue = true,\n showLabel = false,\n label = '',\n valueFormat = 'percent',\n strokeWidthRatio = 0.07,\n trackColor = 'rgba(26, 26, 62, 0.8)',\n progressColor = '#00d4ff',\n gradientEnable = false,\n gradientColors = ['#00d4ff', '#9b59b6'],\n style: externalStyle,\n}) => {\n const gradientId = useId()\n\n const normalizedValue = Math.min(Math.max(value, 0), maxValue)\n const percentage = (normalizedValue / maxValue) * 100\n const displayColor = gradientEnable ? gradientColors[0] : progressColor\n\n if (type === 'ring') {\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <RingProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n gradientId={gradientId}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n strokeWidthRatio={strokeWidthRatio}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n }\n\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <BarProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n}\n\nexport default Progress\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","formatValue","value","percentage","valueFormat","Math","round","RingProgress","strokeWidthRatio","trackColor","progressColor","gradientEnable","gradientColors","showValue","showLabel","label","displayColor","gradientId","containerRef","useRef","size","setSize","useState","useEffect","container","current","updateSize","width","height","getBoundingClientRect","minSize","min","resizeObserver","ResizeObserver","observe","disconnect","strokeWidth","max","radius","circumference","PI","strokeDashoffset","center","_jsxs","className","styles","children","role","_jsx","id","x1","x2","y1","y2","offset","stopColor","cx","cy","fill","r","stroke","strokeDasharray","strokeLinecap","transition","fontSize","color","BarProgress","background","Progress","maxValue","externalStyle","useId"],"mappings":"w0BAAA,SAAqBA,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,mqCCcA,MAAMe,EAAcA,CAACC,EAAeC,EAAoBC,IAClC,YAAhBA,EACK,GAAGC,KAAKC,MAAMH,MAEhB,GAAGD,IAINK,EAAeA,EACnBJ,aACAK,mBACAC,aACAC,gBACAC,iBACAC,iBACAC,YACAC,YACAC,QACAX,cACAY,eACAC,iBAeA,MAAMC,EAAeC,EAAAA,OAAuB,OACrCC,EAAMC,GAAWC,EAAAA,SAAS,KAEjCC,EAAAA,UAAU,KACR,MAAMC,EAAYN,EAAaO,QAC/B,IAAKD,EACH,OAGF,MAAME,EAAaA,KACjB,MAAMC,MAAEA,EAAKC,OAAEA,GAAWJ,EAAUK,wBAC9BC,EAAUzB,KAAK0B,IAAIJ,EAAOC,GAC5BE,EAAU,GACZT,EAAQS,IAIZJ,IAEA,MAAMM,EAAiB,IAAIC,eAAeP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D,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAO8E,EAAcxB,SAC7DE,EAAAA,IAACzC,EAAY,CACXS,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBM,WAAYA,EACZF,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXL,iBAAkBA,EAClBC,WAAYA,EACZL,YAAaA,MAOnB4C,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAO8E,EAAcxB,SAC7DE,EAAAA,IAACkB,EAAW,CACVlD,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBI,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXJ,WAAYA,EACZL,YAAaA","x_google_ignoreList":[0]}
package/dist/index.cjs CHANGED
@@ -536,7 +536,7 @@ const snippets = [{
536
536
  }
537
537
  }];
538
538
 
539
- var version = "0.0.1";
539
+ var version = "0.0.2";
540
540
  var pkg = {
541
541
  version: version};
542
542
 
package/dist/index.esm.js CHANGED
@@ -534,7 +534,7 @@ const snippets = [{
534
534
  }
535
535
  }];
536
536
 
537
- var version = "0.0.1";
537
+ var version = "0.0.2";
538
538
  var pkg = {
539
539
  version: version};
540
540
 
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- /* @easy-editor/materials-dashboard-progress-ring v0.0.1 */
1
+ /* @easy-editor/materials-dashboard-progress v0.0.2 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react/jsx-runtime')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react', 'react/jsx-runtime'], factory) :
5
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgressRing = {}, global.React, global.jsxRuntime));
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgress = {}, global.React, global.jsxRuntime));
6
6
  })(this, (function (exports, react, jsxRuntime) { 'use strict';
7
7
 
8
8
  function styleInject(css, ref) {
@@ -538,7 +538,7 @@
538
538
  }
539
539
  }];
540
540
 
541
- var version = "0.0.1";
541
+ var version = "0.0.2";
542
542
  var pkg = {
543
543
  version: version};
544
544
 
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react","react/jsx-runtime"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgressRing={},e.React,e.jsxRuntime)}(this,function(e,t,o){"use strict";var r="component-module__wrapper___IYMoW",a="component-module__container___VbZSk",l="component-module__ring___QkEHa",n="component-module__centerContent___Ri3R3",s="component-module__value___Fg70k",i="component-module__label___6IHVo",p="component-module__barContainer___AOTls",d="component-module__barWrapper___cni-a",c="component-module__barFill___KZkJe",m="component-module__barLabels___BvaEi",u="component-module__barLabel___wVaWe",_="component-module__barValue___H2muu";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}");const h=(e,t,o)=>"percent"===o?`${Math.round(t)}%`:`${e}`,g=({percentage:e,strokeWidthRatio:r,trackColor:p,progressColor:d,gradientEnable:c,gradientColors:m,showValue:u,showLabel:_,label:g,valueFormat:f,displayColor:b,gradientId:x})=>{const y=t.useRef(null),[C,V]=t.useState(100);t.useEffect(()=>{const e=y.current;if(!e)return;const t=()=>{const{width:t,height:o}=e.getBoundingClientRect(),r=Math.min(t,o);r>0&&V(r)};t();const o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[]);const v=Math.max(2,C*r),S=(C-v)/2,w=2*Math.PI*S,k=w-e/100*w,N=C/2;return o.jsxs("div",{className:a,ref:y,children:[o.jsxs("svg",{"aria-label":"Progress ring",className:l,height:C,role:"img",width:C,children:[o.jsx("title",{children:"Progress indicator"}),c?o.jsx("defs",{children:o.jsxs("linearGradient",{id:x,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:m[0]}),o.jsx("stop",{offset:"100%",stopColor:m[1]})]})}):null,o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:p,strokeWidth:v}),o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:c?`url(#${x})`:d,strokeDasharray:w,strokeDashoffset:k,strokeLinecap:"round",strokeWidth:v,style:{transition:"stroke-dashoffset 0.5s ease"}})]}),o.jsxs("div",{className:n,children:[u?o.jsx("span",{className:s,style:{fontSize:.2*C,color:b},children:h(Math.round(e),e,f)}):null,_&&g?o.jsx("span",{className:i,style:{fontSize:.1*C},children:g}):null]})]})},f=({percentage:e,trackColor:t,progressColor:r,gradientEnable:a,gradientColors:l,showValue:n,showLabel:s,label:i,valueFormat:g,displayColor:f})=>o.jsxs("div",{className:p,children:[s||n?o.jsxs("div",{className:m,children:[s?o.jsx("span",{className:u,children:i}):null,n?o.jsx("span",{className:_,style:{color:f},children:h(Math.round(e),e,g)}):null]}):null,o.jsx("div",{className:d,style:{background:t},children:o.jsx("div",{className:c,style:{width:`${e}%`,background:a?`linear-gradient(90deg, ${l[0]}, ${l[1]})`:r}})})]}),b="EasyEditorMaterialsProgress";const x={componentName:b,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.1",globalName:b,componentName:b},snippets:[{title:"进度环",screenshot:"",schema:{componentName:b,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:b,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.component=({ref:e,value:a=0,maxValue:l=100,type:n="ring",showValue:s=!0,showLabel:i=!1,label:p="",valueFormat:d="percent",strokeWidthRatio:c=.07,trackColor:m="rgba(26, 26, 62, 0.8)",progressColor:u="#00d4ff",gradientEnable:_=!1,gradientColors:h=["#00d4ff","#9b59b6"],style:b})=>{const x=t.useId(),y=Math.min(Math.max(a,0),l)/l*100,C=_?h[0]:u;return"ring"===n?o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(g,{displayColor:C,gradientColors:h,gradientEnable:_,gradientId:x,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,strokeWidthRatio:c,trackColor:m,valueFormat:d})}):o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(f,{displayColor:C,gradientColors:h,gradientEnable:_,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,trackColor:m,valueFormat:d})})},e.meta=x});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react","react/jsx-runtime"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgress={},e.React,e.jsxRuntime)}(this,function(e,t,o){"use strict";var r="component-module__wrapper___IYMoW",a="component-module__container___VbZSk",l="component-module__ring___QkEHa",n="component-module__centerContent___Ri3R3",s="component-module__value___Fg70k",i="component-module__label___6IHVo",p="component-module__barContainer___AOTls",d="component-module__barWrapper___cni-a",c="component-module__barFill___KZkJe",m="component-module__barLabels___BvaEi",u="component-module__barLabel___wVaWe",_="component-module__barValue___H2muu";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}");const h=(e,t,o)=>"percent"===o?`${Math.round(t)}%`:`${e}`,f=({percentage:e,strokeWidthRatio:r,trackColor:p,progressColor:d,gradientEnable:c,gradientColors:m,showValue:u,showLabel:_,label:f,valueFormat:g,displayColor:b,gradientId:x})=>{const y=t.useRef(null),[C,V]=t.useState(100);t.useEffect(()=>{const e=y.current;if(!e)return;const t=()=>{const{width:t,height:o}=e.getBoundingClientRect(),r=Math.min(t,o);r>0&&V(r)};t();const o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[]);const v=Math.max(2,C*r),S=(C-v)/2,w=2*Math.PI*S,k=w-e/100*w,N=C/2;return o.jsxs("div",{className:a,ref:y,children:[o.jsxs("svg",{"aria-label":"Progress ring",className:l,height:C,role:"img",width:C,children:[o.jsx("title",{children:"Progress indicator"}),c?o.jsx("defs",{children:o.jsxs("linearGradient",{id:x,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:m[0]}),o.jsx("stop",{offset:"100%",stopColor:m[1]})]})}):null,o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:p,strokeWidth:v}),o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:c?`url(#${x})`:d,strokeDasharray:w,strokeDashoffset:k,strokeLinecap:"round",strokeWidth:v,style:{transition:"stroke-dashoffset 0.5s ease"}})]}),o.jsxs("div",{className:n,children:[u?o.jsx("span",{className:s,style:{fontSize:.2*C,color:b},children:h(Math.round(e),e,g)}):null,_&&f?o.jsx("span",{className:i,style:{fontSize:.1*C},children:f}):null]})]})},g=({percentage:e,trackColor:t,progressColor:r,gradientEnable:a,gradientColors:l,showValue:n,showLabel:s,label:i,valueFormat:f,displayColor:g})=>o.jsxs("div",{className:p,children:[s||n?o.jsxs("div",{className:m,children:[s?o.jsx("span",{className:u,children:i}):null,n?o.jsx("span",{className:_,style:{color:g},children:h(Math.round(e),e,f)}):null]}):null,o.jsx("div",{className:d,style:{background:t},children:o.jsx("div",{className:c,style:{width:`${e}%`,background:a?`linear-gradient(90deg, ${l[0]}, ${l[1]})`:r}})})]}),b="EasyEditorMaterialsProgress";const x={componentName:b,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.2",globalName:b,componentName:b},snippets:[{title:"进度环",screenshot:"",schema:{componentName:b,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:b,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.component=({ref:e,value:a=0,maxValue:l=100,type:n="ring",showValue:s=!0,showLabel:i=!1,label:p="",valueFormat:d="percent",strokeWidthRatio:c=.07,trackColor:m="rgba(26, 26, 62, 0.8)",progressColor:u="#00d4ff",gradientEnable:_=!1,gradientColors:h=["#00d4ff","#9b59b6"],style:b})=>{const x=t.useId(),y=Math.min(Math.max(a,0),l)/l*100,C=_?h[0]:u;return"ring"===n?o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(f,{displayColor:C,gradientColors:h,gradientEnable:_,gradientId:x,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,strokeWidthRatio:c,trackColor:m,valueFormat:d})}):o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(g,{displayColor:C,gradientColors:h,gradientEnable:_,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,trackColor:m,valueFormat:d})})},e.meta=x});
2
2
  //# sourceMappingURL=index.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.min.js","sources":["../../../../../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 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 * Progress Component\n * 进度组件 - 支持环形和线性进度条\n */\n\nimport { useId, useRef, useEffect, useState, type CSSProperties, type Ref } from 'react'\nimport styles from './component.module.css'\n\nexport interface ProgressProps {\n ref?: Ref<HTMLDivElement>\n /** 当前值 */\n value?: number\n /** 最大值 */\n maxValue?: number\n /** 进度条类型 */\n type?: 'ring' | 'bar'\n /** 是否显示数值 */\n showValue?: boolean\n /** 是否显示标签 */\n showLabel?: boolean\n /** 标签文本 */\n label?: string\n /** 数值格式 */\n valueFormat?: 'percent' | 'number'\n /** 线条宽度比例(相对于尺寸的百分比) */\n strokeWidthRatio?: number\n /** 轨道颜色 */\n trackColor?: string\n /** 进度颜色 */\n progressColor?: string\n /** 是否启用渐变 */\n gradientEnable?: boolean\n /** 渐变颜色 [起始色, 结束色] */\n gradientColors?: [string, string]\n /** 外部样式 */\n style?: CSSProperties\n}\n\n// 格式化数值\nconst formatValue = (value: number, percentage: number, valueFormat: string): string => {\n if (valueFormat === 'percent') {\n return `${Math.round(percentage)}%`\n }\n return `${value}`\n}\n\n// 环形进度条组件\nconst RingProgress = ({\n percentage,\n strokeWidthRatio,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n gradientId,\n}: {\n percentage: number\n strokeWidthRatio: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n gradientId: string\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [size, setSize] = useState(100)\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) {\n return\n }\n\n const updateSize = () => {\n const { width, height } = container.getBoundingClientRect()\n const minSize = Math.min(width, height)\n if (minSize > 0) {\n setSize(minSize)\n }\n }\n\n updateSize()\n\n const resizeObserver = new ResizeObserver(updateSize)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n const strokeWidth = Math.max(2, size * strokeWidthRatio)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const strokeDashoffset = circumference - (percentage / 100) * circumference\n const center = size / 2\n\n return (\n <div className={styles.container} ref={containerRef}>\n <svg aria-label='Progress ring' className={styles.ring} height={size} role='img' width={size}>\n <title>Progress indicator</title>\n {gradientEnable ? (\n <defs>\n <linearGradient id={gradientId} x1='0%' x2='100%' y1='0%' y2='0%'>\n <stop offset='0%' stopColor={gradientColors[0]} />\n <stop offset='100%' stopColor={gradientColors[1]} />\n </linearGradient>\n </defs>\n ) : null}\n {/* 轨道 */}\n <circle cx={center} cy={center} fill='none' r={radius} stroke={trackColor} strokeWidth={strokeWidth} />\n {/* 进度 */}\n <circle\n cx={center}\n cy={center}\n fill='none'\n r={radius}\n stroke={gradientEnable ? `url(#${gradientId})` : progressColor}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n strokeWidth={strokeWidth}\n style={{\n transition: 'stroke-dashoffset 0.5s ease',\n }}\n />\n </svg>\n <div className={styles.centerContent}>\n {showValue ? (\n <span className={styles.value} style={{ fontSize: size * 0.2, color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n {showLabel && label ? (\n <span className={styles.label} style={{ fontSize: size * 0.1 }}>\n {label}\n </span>\n ) : null}\n </div>\n </div>\n )\n}\n\n// 线性进度条组件\nconst BarProgress = ({\n percentage,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n}: {\n percentage: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n}) => (\n <div className={styles.barContainer}>\n {showLabel || showValue ? (\n <div className={styles.barLabels}>\n {showLabel ? <span className={styles.barLabel}>{label}</span> : null}\n {showValue ? (\n <span className={styles.barValue} style={{ color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n </div>\n ) : null}\n <div className={styles.barWrapper} style={{ background: trackColor }}>\n <div\n className={styles.barFill}\n style={{\n width: `${percentage}%`,\n background: gradientEnable\n ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})`\n : progressColor,\n }}\n />\n </div>\n </div>\n)\n\nexport const Progress: React.FC<ProgressProps> = ({\n ref,\n value = 0,\n maxValue = 100,\n type = 'ring',\n showValue = true,\n showLabel = false,\n label = '',\n valueFormat = 'percent',\n strokeWidthRatio = 0.07,\n trackColor = 'rgba(26, 26, 62, 0.8)',\n progressColor = '#00d4ff',\n gradientEnable = false,\n gradientColors = ['#00d4ff', '#9b59b6'],\n style: externalStyle,\n}) => {\n const gradientId = useId()\n\n const normalizedValue = Math.min(Math.max(value, 0), maxValue)\n const percentage = (normalizedValue / maxValue) * 100\n const displayColor = gradientEnable ? gradientColors[0] : progressColor\n\n if (type === 'ring') {\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <RingProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n gradientId={gradientId}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n strokeWidthRatio={strokeWidthRatio}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n }\n\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <BarProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n}\n\nexport default Progress\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * 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 * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","formatValue","value","percentage","valueFormat","Math","round","RingProgress","strokeWidthRatio","trackColor","progressColor","gradientEnable","gradientColors","showValue","showLabel","label","displayColor","gradientId","containerRef","useRef","size","setSize","useState","useEffect","container","current","updateSize","width","height","getBoundingClientRect","minSize","min","resizeObserver","ResizeObserver","observe","disconnect","strokeWidth","max","radius","circumference","PI","strokeDashoffset","center","_jsxs","className","styles","children","role","_jsx","id","x1","x2","y1","y2","offset","stopColor","cx","cy","fill","r","stroke","strokeDasharray","strokeLinecap","transition","fontSize","color","BarProgress","background","COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","maxValue","$dashboard","rect","configure","setter","items","key","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","step","supportVariable","component","supports","advanced","Progress","externalStyle","useId"],"mappings":"m0BAAA,SAAqBA,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,E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B,EAEAsD,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAOiH,EAAc3D,SAC7DE,EAAAA,IAACzC,EAAY,CACXS,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBM,WAAYA,EACZF,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXL,iBAAkBA,EAClBC,WAAYA,EACZL,YAAaA,MAOnB4C,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAOiH,EAAc3D,SAC7DE,EAAAA,IAACkB,EAAW,CACVlD,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBI,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXJ,WAAYA,EACZL,YAAaA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.min.js","sources":["../../../../../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 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 * Progress Component\n * 进度组件 - 支持环形和线性进度条\n */\n\nimport { useId, useRef, useEffect, useState, type CSSProperties, type Ref } from 'react'\nimport styles from './component.module.css'\n\nexport interface ProgressProps {\n ref?: Ref<HTMLDivElement>\n /** 当前值 */\n value?: number\n /** 最大值 */\n maxValue?: number\n /** 进度条类型 */\n type?: 'ring' | 'bar'\n /** 是否显示数值 */\n showValue?: boolean\n /** 是否显示标签 */\n showLabel?: boolean\n /** 标签文本 */\n label?: string\n /** 数值格式 */\n valueFormat?: 'percent' | 'number'\n /** 线条宽度比例(相对于尺寸的百分比) */\n strokeWidthRatio?: number\n /** 轨道颜色 */\n trackColor?: string\n /** 进度颜色 */\n progressColor?: string\n /** 是否启用渐变 */\n gradientEnable?: boolean\n /** 渐变颜色 [起始色, 结束色] */\n gradientColors?: [string, string]\n /** 外部样式 */\n style?: CSSProperties\n}\n\n// 格式化数值\nconst formatValue = (value: number, percentage: number, valueFormat: string): string => {\n if (valueFormat === 'percent') {\n return `${Math.round(percentage)}%`\n }\n return `${value}`\n}\n\n// 环形进度条组件\nconst RingProgress = ({\n percentage,\n strokeWidthRatio,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n gradientId,\n}: {\n percentage: number\n strokeWidthRatio: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n gradientId: string\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [size, setSize] = useState(100)\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) {\n return\n }\n\n const updateSize = () => {\n const { width, height } = container.getBoundingClientRect()\n const minSize = Math.min(width, height)\n if (minSize > 0) {\n setSize(minSize)\n }\n }\n\n updateSize()\n\n const resizeObserver = new ResizeObserver(updateSize)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n const strokeWidth = Math.max(2, size * strokeWidthRatio)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const strokeDashoffset = circumference - (percentage / 100) * circumference\n const center = size / 2\n\n return (\n <div className={styles.container} ref={containerRef}>\n <svg aria-label='Progress ring' className={styles.ring} height={size} role='img' width={size}>\n <title>Progress indicator</title>\n {gradientEnable ? (\n <defs>\n <linearGradient id={gradientId} x1='0%' x2='100%' y1='0%' y2='0%'>\n <stop offset='0%' stopColor={gradientColors[0]} />\n <stop offset='100%' stopColor={gradientColors[1]} />\n </linearGradient>\n </defs>\n ) : null}\n {/* 轨道 */}\n <circle cx={center} cy={center} fill='none' r={radius} stroke={trackColor} strokeWidth={strokeWidth} />\n {/* 进度 */}\n <circle\n cx={center}\n cy={center}\n fill='none'\n r={radius}\n stroke={gradientEnable ? `url(#${gradientId})` : progressColor}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n strokeWidth={strokeWidth}\n style={{\n transition: 'stroke-dashoffset 0.5s ease',\n }}\n />\n </svg>\n <div className={styles.centerContent}>\n {showValue ? (\n <span className={styles.value} style={{ fontSize: size * 0.2, color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n {showLabel && label ? (\n <span className={styles.label} style={{ fontSize: size * 0.1 }}>\n {label}\n </span>\n ) : null}\n </div>\n </div>\n )\n}\n\n// 线性进度条组件\nconst BarProgress = ({\n percentage,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n}: {\n percentage: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n}) => (\n <div className={styles.barContainer}>\n {showLabel || showValue ? (\n <div className={styles.barLabels}>\n {showLabel ? <span className={styles.barLabel}>{label}</span> : null}\n {showValue ? (\n <span className={styles.barValue} style={{ color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n </div>\n ) : null}\n <div className={styles.barWrapper} style={{ background: trackColor }}>\n <div\n className={styles.barFill}\n style={{\n width: `${percentage}%`,\n background: gradientEnable\n ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})`\n : progressColor,\n }}\n />\n </div>\n </div>\n)\n\nexport const Progress: React.FC<ProgressProps> = ({\n ref,\n value = 0,\n maxValue = 100,\n type = 'ring',\n showValue = true,\n showLabel = false,\n label = '',\n valueFormat = 'percent',\n strokeWidthRatio = 0.07,\n trackColor = 'rgba(26, 26, 62, 0.8)',\n progressColor = '#00d4ff',\n gradientEnable = false,\n gradientColors = ['#00d4ff', '#9b59b6'],\n style: externalStyle,\n}) => {\n const gradientId = useId()\n\n const normalizedValue = Math.min(Math.max(value, 0), maxValue)\n const percentage = (normalizedValue / maxValue) * 100\n const displayColor = gradientEnable ? gradientColors[0] : progressColor\n\n if (type === 'ring') {\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <RingProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n gradientId={gradientId}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n strokeWidthRatio={strokeWidthRatio}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n }\n\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <BarProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n}\n\nexport default Progress\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * 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 * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","formatValue","value","percentage","valueFormat","Math","round","RingProgress","strokeWidthRatio","trackColor","progressColor","gradientEnable","gradientColors","showValue","showLabel","label","displayColor","gradientId","containerRef","useRef","size","setSize","useState","useEffect","container","current","updateSize","width","height","getBoundingClientRect","minSize","min","resizeObserver","ResizeObserver","observe","disconnect","strokeWidth","max","radius","circumference","PI","strokeDashoffset","center","_jsxs","className","styles","children","role","_jsx","id","x1","x2","y1","y2","offset","stopColor","cx","cy","fill","r","stroke","strokeDasharray","strokeLinecap","transition","fontSize","color","BarProgress","background","COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","maxValue","$dashboard","rect","configure","setter","items","key","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","step","supportVariable","component","supports","advanced","Progress","externalStyle","useId"],"mappings":"+zBAAA,SAAqBA,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,SAC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ClE,EAAeL,EAAiBC,EAAe,GAAKF,EAE1D,MAAa,SAAThB,EAEAsD,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAOiH,EAAc3D,SAC7DE,EAAAA,IAACzC,EAAY,CACXS,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBM,WAAYA,EACZF,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXL,iBAAkBA,EAClBC,WAAYA,EACZL,YAAaA,MAOnB4C,EAAAA,IAAA,MAAA,CAAKJ,UAAWC,EAAgB1D,IAAKA,EAAKK,MAAOiH,EAAc3D,SAC7DE,EAAAA,IAACkB,EAAW,CACVlD,aAAcA,EACdJ,eAAgBA,EAChBD,eAAgBA,EAChBI,MAAOA,EACPZ,WAAYA,EACZO,cAAeA,EACfI,UAAWA,EACXD,UAAWA,EACXJ,WAAYA,EACZL,YAAaA","x_google_ignoreList":[0]}
package/dist/meta.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @easy-editor/materials-dashboard-progress-ring v0.0.1 (meta, esm) */
1
+ /* @easy-editor/materials-dashboard-progress v0.0.2 (meta, esm) */
2
2
  const MaterialGroup = {
3
3
  DISPLAY: 'display'};
4
4
 
@@ -281,7 +281,7 @@ const snippets = [{
281
281
  }
282
282
  }];
283
283
 
284
- var version = "0.0.1";
284
+ var version = "0.0.2";
285
285
  var pkg = {
286
286
  version: version};
287
287
 
package/dist/meta.js CHANGED
@@ -1,8 +1,8 @@
1
- /* @easy-editor/materials-dashboard-progress-ring v0.0.1 (meta) */
1
+ /* @easy-editor/materials-dashboard-progress 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.EasyEditorMaterialsProgressRingMeta = {}));
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgressMeta = {}));
6
6
  })(this, (function (exports) { 'use strict';
7
7
 
8
8
  const MaterialGroup = {
@@ -287,7 +287,7 @@
287
287
  }
288
288
  }];
289
289
 
290
- var version = "0.0.1";
290
+ var version = "0.0.2";
291
291
  var pkg = {
292
292
  version: version};
293
293
 
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).EasyEditorMaterialsProgressRingMeta={})}(this,function(e){"use strict";const t="EasyEditorMaterialsProgress";const r={componentName:t,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.1",globalName:t,componentName:t},snippets:[{title:"进度环",screenshot:"",schema:{componentName:t,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:t,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.default=r,e.meta=r,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgressMeta={})}(this,function(e){"use strict";const t="EasyEditorMaterialsProgress";const r={componentName:t,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.2",globalName:t,componentName:t},snippets:[{title:"进度环",screenshot:"",schema:{componentName:t,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:t,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.default=r,e.meta=r,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=meta.min.js.map
@@ -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 (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","value","maxValue","type","showValue","showLabel","valueFormat","strokeWidthRatio","progressColor","$dashboard","rect","width","height","label","gradientEnable","gradientColors","configure","setter","items","key","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced"],"mappings":"0QAMO,MCMMA,EAAiB,8BCAvB,MAAMC,EAA0B,CACrCC,cAAeF,EACfG,MAAO,MACPC,MFDS,UEETC,QAAS,UACTC,IAAK,CACHC,QDDwB,4CCExBC,gBACAC,WAAYT,EACZE,cAAeF,GAEjBU,SCfiC,CACjC,CACEP,MAAO,MACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,GACPC,SAAU,IACVC,KAAM,OACNC,WAAW,EACXC,WAAW,EACXC,YAAa,UACbC,iBAAkB,IAClBC,cAAe,WAEjBC,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,QAKhB,CACE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Id,CACEd,KAAM,QACNgB,IAAK,WACL7B,MAAO,KACP4B,MAAO,CACL,CACEG,KAAM,YACN/B,MAAO,OACP2B,OAAQ,eACRK,WAAY,CACVM,cAAc,EACdK,iBAAiB,SAQ/BC,UAAW,CAAA,EACXC,SAAU,CAAA,EACVC,SAAU,CAAA"}
1
+ {"version":3,"file":"meta.min.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/meta.ts","../src/snippets.ts","../src/configure.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n","/**\n * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n"],"names":["COMPONENT_NAME","meta","componentName","title","group","devMode","npm","package","version","globalName","snippets","screenshot","schema","props","value","maxValue","type","showValue","showLabel","valueFormat","strokeWidthRatio","progressColor","$dashboard","rect","width","height","label","gradientEnable","gradientColors","configure","setter","items","key","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","min","max","step","supportVariable","component","supports","advanced"],"mappings":"sQAMO,MCMMA,EAAiB,8BCAvB,MAAMC,EAA0B,CACrCC,cAAeF,EACfG,MAAO,MACPC,MFDS,UEETC,QAAS,UACTC,IAAK,CACHC,QDDwB,4CCExBC,gBACAC,WAAYT,EACZE,cAAeF,GAEjBU,SCfiC,CACjC,CACEP,MAAO,MACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,GACPC,SAAU,IACVC,KAAM,OACNC,WAAW,EACXC,WAAW,EACXC,YAAa,UACbC,iBAAkB,IAClBC,cAAe,WAEjBC,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,QAKhB,CACEtB,MAAO,QACPQ,WAAY,GACZC,OAAQ,CACNV,cAAeF,EACfa,MAAO,CACLC,MAAO,GACPC,SAAU,IACVC,KAAM,MACNC,WAAW,EACXC,WAAW,EACXQ,MAAO,MACPP,YAAa,UACbE,cAAe,UACfM,gBAAgB,EAChBC,eAAgB,CAAC,UAAW,YAE9BN,WAAY,CACVC,KAAM,CACJC,MAAO,IACPC,OAAQ,QD5BhBI,UEjBkC,CAClChB,MAAO,CACL,CACEG,KAAM,QACNb,MAAO,KACP2B,OAAQ,YACRC,MAAO,CACL,CACEf,KAAM,QACNgB,IAAK,SACL7B,MAAO,KACP2B,OAAQ,CACN5B,cAAe,iBACfW,MAAO,CACLoB,MAAM,IAGVF,MAAO,CAEL,CACEG,KAAM,KACN/B,MAAO,KACP2B,OAAQ,eACRK,WAAY,CAEVT,OAAO,IAGX,CACEQ,KAAM,QACN/B,MAAO,KACP2B,OAAQ,eACRK,WAAY,CACVC,SAASC,GACAA,EAAOC,kBAAkB,SAElCC,QAAAA,CAASF,EAAQvB,GACfuB,EAAOG,kBAAkB,QAAS1B,EACpC,IAGJ,CACEE,KAAM,QACNb,MAAO,OACP2B,OAAQ,CACN5B,cAAe,iBACfW,MAAO,CACLoB,MAAM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8B,IAAK,IACLC,IAAK,GACLC,KAAM,MAGVV,WAAY,CACVM,aAAc,MAGlB,CACEP,KAAM,aACN/B,MAAO,OACP2B,OAAQ,cACRK,WAAY,CACVM,aAAc,6BAGlB,CACEP,KAAM,gBACN/B,MAAO,OACP2B,OAAQ,cACRK,WAAY,CACVM,aAAc,YAGlB,CACEP,KAAM,iBACN/B,MAAO,OACP2B,OAAQ,eACRK,WAAY,CACVM,cAAc,IAGlB,CACEP,KAAM,iBACN/B,MAAO,OACP2B,OAAQ,cACRK,WAAY,CACVM,aAAc,CAAC,UAAW,iBAOtC,CACEzB,KAAM,QACNgB,IAAK,OACL7B,MAAO,KACP4B,MAAO,CACL,CACEG,KAAM,cACN/B,MAAO,OACP2B,OAAQ,uBAId,CACEd,KAAM,QACNgB,IAAK,WACL7B,MAAO,KACP4B,MAAO,CACL,CACEG,KAAM,YACN/B,MAAO,OACP2B,OAAQ,eACRK,WAAY,CACVM,cAAc,EACdK,iBAAiB,SAQ/BC,UAAW,CAAA,EACXC,SAAU,CAAA,EACVC,SAAU,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-editor/materials-dashboard-progress",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Progress component for EasyEditor dashboard",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
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 = 'EasyEditorMaterialsProgressRing'
10
+ const GLOBAL_NAME = 'EasyEditorMaterialsProgress'
11
11
 
12
12
  // 外部依赖(不打包进组件)
13
13
  const external = ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core']
@@ -63,7 +63,7 @@ export default [
63
63
  file: 'dist/meta.esm.js',
64
64
  format: 'esm',
65
65
  sourcemap: true,
66
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (meta, esm) */`,
66
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (meta, esm) */`,
67
67
  exports: 'named',
68
68
  },
69
69
  ],
@@ -79,7 +79,7 @@ export default [
79
79
  name: `${GLOBAL_NAME}Meta`,
80
80
  globals,
81
81
  sourcemap: true,
82
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (meta) */`,
82
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (meta) */`,
83
83
  exports: 'named',
84
84
  },
85
85
  ],
@@ -95,7 +95,7 @@ export default [
95
95
  name: `${GLOBAL_NAME}Meta`,
96
96
  globals,
97
97
  sourcemap: true,
98
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (meta, minified) */`,
98
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (meta, minified) */`,
99
99
  exports: 'named',
100
100
  },
101
101
  ],
@@ -111,7 +111,7 @@ export default [
111
111
  file: 'dist/component.esm.js',
112
112
  format: 'esm',
113
113
  sourcemap: true,
114
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (component, esm) */`,
114
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (component, esm) */`,
115
115
  exports: 'named',
116
116
  },
117
117
  ],
@@ -127,7 +127,7 @@ export default [
127
127
  name: `${GLOBAL_NAME}Component`,
128
128
  globals,
129
129
  sourcemap: true,
130
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (component) */`,
130
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (component) */`,
131
131
  exports: 'named',
132
132
  },
133
133
  ],
@@ -143,7 +143,7 @@ export default [
143
143
  name: `${GLOBAL_NAME}Component`,
144
144
  globals,
145
145
  sourcemap: true,
146
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (component, minified) */`,
146
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (component, minified) */`,
147
147
  exports: 'named',
148
148
  },
149
149
  ],
@@ -161,7 +161,7 @@ export default [
161
161
  name: GLOBAL_NAME,
162
162
  globals,
163
163
  sourcemap: true,
164
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} */`,
164
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} */`,
165
165
  exports: 'named',
166
166
  },
167
167
  ],
@@ -202,7 +202,7 @@ export default [
202
202
  name: GLOBAL_NAME,
203
203
  globals,
204
204
  sourcemap: true,
205
- banner: `/* @easy-editor/materials-dashboard-progress-ring v${pkg.version} (minified) */`,
205
+ banner: `/* @easy-editor/materials-dashboard-progress v${pkg.version} (minified) */`,
206
206
  exports: 'named',
207
207
  },
208
208
  ],