@techui/scifi 0.0.2-alpha.2 → 0.0.4-alpha.1
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/UPDATE.md +25 -9
- package/core/core.d.ts +2 -0
- package/core/core.js +50 -2
- package/core/core_bg.wasm +0 -0
- package/core/core_bg.wasm.d.ts +1 -0
- package/core/package.json +25 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/echartsTheme.js +1 -1
- package/dist/modules/tuiEcharts.js +1 -1
- package/dist/modules/tuiEchartsMap.js +1 -1
- package/index-bak.js +156 -0
- package/index.js +3 -6
- package/package.json +6 -6
- package/build.js +0 -141
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as J from"echarts";import{$c as b}from"@techui/colors";const q=o=>{const{chart:e,common:l,font:r,scifi:t}=o,{bg:i,bd:s}=l,{line:{weak:a,base:c,strong:h},bubble:{fc:d,bg:n,hlite:y},map:{fc:S,fc_hov:m,fc_act:w,bg:p,bd:x,bg_hov:C,bd_hov:g,bg_act:W,bd_act:f,glow:L,shadow:u},palette_pri:k,palette_sec:A,visual:B}=e,{hlite:T,focus:_}=t,{weaker:v,weak:z,base:J,strong:N,stronger:O}=r;let q=b.scale(k,6,"lch"),D=b.scale(A,6,"lch"),F=b.scale(B,4,"lch");return JSON.stringify({color:q,textStyle:{},title:{textStyle:{color:J},subtextStyle:{color:z}},line:{label:{color:"inherit",textBorderColor:i,textBorderWidth:5},itemStyle:{borderWidth:"2"},lineStyle:{width:"3"},symbolSize:"7",symbol:"emptyCircle",smooth:!0},radar:{splitLine:{lineStyle:{show:!0,color:c,type:"dashed"}},axisLine:{show:!0,lineStyle:{color:c,type:"dashed"}},axisName:{show:!0,color:J},splitArea:{areaStyle:{color:[a,i]}},symbolSize:"7",symbol:"emptyCircle",markLine:{label:{color:"inherit",textBorderColor:i,textBorderWidth:5}},smooth:!0},bar:{itemStyle:{barBorderWidth:0,barBorderColor:a},markLine:{label:{color:"inherit",textBorderColor:i,textBorderWidth:5}}},pie:{itemStyle:{borderWidth:0,borderColor:i}},scatter:{label:{show:!0,color:d},emphasis:{labele:{fontWeight:"bold"}},itemStyle:{color:{type:"radial",x:.3,y:.3,r:.5,colorStops:[{offset:0,color:y},{offset:1,color:n}],global:!1},borderWidth:0,borderColor:a}},boxplot:{itemStyle:{borderWidth:0,borderColor:a}},parallel:{itemStyle:{borderWidth:0,borderColor:a}},sankey:{itemStyle:{borderWidth:0,borderColor:a}},funnel:{itemStyle:{borderWidth:0,borderColor:a}},gauge:{itemStyle:{borderWidth:0,borderColor:h},axisLine:{show:!0,lineStyle:{color:[[1,a]]}},axisTick:{show:!0,lineStyle:{color:h}},axisLabel:{show:!0,color:J},splitLine:{show:!0,lineStyle:{color:h}},detail:{color:"inherit"}},graph:{itemStyle:{borderWidth:0,borderColor:a},lineStyle:{width:1,color:c},symbolSize:"7",symbol:"circle",smooth:!0,color:D,label:{color:J}},map:{itemStyle:{areaColor:p,borderColor:x,borderWidth:.5},label:{color:J},emphasis:{itemStyle:{areaColor:C,borderColor:x,borderWidth:1},label:{color:J}}},geo:{scaleLimit:{min:.5,max:7},itemStyle:{areaColor:p,borderColor:x,shadowColor:u,shadowOffsetY:0,shadowBlur:5,borderWidth:.5},label:{show:!0,fontSize:12,color:S},emphasis:{itemStyle:{areaColor:C,borderColor:g,borderWidth:1},label:{fontSize:14,color:m}},select:{itemStyle:{areaColor:W,borderColor:f,borderWidth:1},label:{fontSize:14,color:w}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:c}},splitLine:{show:!1,lineStyle:{color:a}},axisTick:{show:!1,lineStyle:{color:a}},axisLabel:{show:!0,color:J},splitArea:{show:!1}},valueAxis:{axisLine:{show:!0,lineStyle:{color:c}},axisTick:{show:!1,lineStyle:{color:a}},axisLabel:{show:!0,color:J},splitLine:{show:!0,lineStyle:{color:a}},splitArea:{show:!1}},logAxis:{axisLine:{show:!0,lineStyle:{color:c}},axisTick:{show:!1,lineStyle:{color:a}},axisLabel:{show:!0,color:J},splitLine:{show:!1,lineStyle:{color:a}},splitArea:{show:!1}},timeAxis:{axisLine:{show:!0,lineStyle:{color:c}},axisTick:{show:!1,lineStyle:{color:a}},axisLabel:{show:!0,color:J},splitLine:{show:!1,lineStyle:{color:a}},splitArea:{show:!1}},toolbox:{iconStyle:{borderColor:J},emphasis:{iconStyle:{borderColor:N}}},legend:{y:"bottom",x:"center",textStyle:{color:J},itemStyle:{borderColor:"transparent",borderWidth:1,opacity:1}},tooltip:{backgroundColor:i,textStyle:{color:J},axisPointer:{lineStyle:{color:J,width:1},crossStyle:{color:J,width:1}}},timeline:{symbol:"circle",progress:{itemStyle:{color:T,borderColor:"white",borderWidth:0},lineStyle:{color:T,shadowColor:"rgba(0, 0, 0, 0)"}},lineStyle:{color:_,width:1,shadowColor:"rgba(0, 0, 0, 0)"},itemStyle:{color:_,borderColor:"white",borderWidth:0},controlStyle:{color:v,borderColor:"white",borderWidth:0},checkpointStyle:{symbol:"circle",color:T,borderColor:"white",borderWidth:0,shadowColor:"rgba(0, 0, 0, 0)"},label:{color:J},emphasis:{itemStyle:{color:_},controlStyle:{color:J,borderWidth:0},label:{color:N}}},visualMap:{color:F,textStyle:{color:J},zlevel:10}})};let F=null;function D(o){if(o)try{const e=JSON.parse(q(o));J.registerTheme("eTheme",e),F=o}catch(o){}}export{D as registerEchartsTheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as
|
|
1
|
+
import{inject as D,ref as I,shallowRef as U,reactive as q,watch as h,nextTick as f,computed as H,onMounted as L,onBeforeUnmount as W,resolveComponent as F,resolveDirective as V,createBlock as Q,openBlock as J,withCtx as K,withDirectives as X,createElementVNode as Y,normalizeStyle as Z,normalizeClass as ee,unref as B}from"vue";import{cidGen as te,cssVarGen as ie}from"@techui/scifi";import{tQuery as T,tClass as E,tStr as ae,tType as _}from"@techui/utils";import*as re from"echarts";import{$c as ne}from"@techui/colors";const oe=(e,t,a="358")=>{const i=T.get1stParent(e,".tui-3d-panel");if(!i)return;if(E.has(i,"is-3doff"))return;if(!(e&&e instanceof HTMLElement&&"string"==typeof t&&""!==t.trim()))return;const r=e.querySelector("svg");if(!r)return;const l="pathG"+t,n=r.querySelector(`g#${CSS.escape(l)}`);n&&r.removeChild(n);const s=r.querySelectorAll("path"),o=[];if(s.forEach((e=>{const t=e.getAttribute("stroke-width");null!=t&&""!==t.trim()&&String(t).includes(a)&&o.push(e)})),o.length>0){const e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("id",l),o.forEach((t=>{const a=t.getAttribute("fill"),i=t.getAttribute("stroke");t.setAttribute("class","ori-svg-item");const r=t.cloneNode(!0);r.setAttribute("class","t3d-shadow-item"),r.setAttribute("style",`--tui-t3d-thickcolor:${ne.darken("none"!=a?a:i,2.5)}`),e.appendChild(r)})),r.insertBefore(e,r.firstChild)}},le=e=>{const t="pathG"+e,a=T.el(`#${t}`);a&&a.remove()},P="TuiEcharts",he=Object.assign({name:P},{__name:"tuiEcharts",props:{width:[Number,String],height:[Number,String],chartOption:{type:Object,required:!0},initOptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},initT3DShadow:{type:Boolean,default:!1},t3DShadowUpdate:{type:String,default:"finished",validator:e=>["rendered","finished"].includes(e)},initHold:{type:Boolean,default:!1},dataOpacity:Number,dataBlur:Number,initDelay:{type:Number,default:0},resizeObserver:{type:String,default:"global",validator:e=>["self","global","none"].includes(e)}},emits:["chartClick","chartDblClick","chartMouseDown","chartMouseUp","chartMouseOver","chartGlobalOut","chartInit","chartReady","chartRendered","chartFinished","update:loading"],setup(e,{expose:t,emit:a}){const{$gT3D:i,$gTheme:r,$optResizeCounter:l,initResizeBy:n}=D("$global"),s=n(),o=te(P),u="echart_"+ae.rdm(),c=e,d=a,p=I(null),v=U(null);let g=null;const m=q({loading:!0,inited:!1,resizing:!0}),b=async()=>{if(p.value)try{if(S(),v.value)return;await f(),v.value=re.init(p.value,"eTheme",{...c.initOptions,renderer:"svg"}),d("chartInit",v.value),v.value.setOption(c.chartOption),y(),await f(),v.value&&d("chartReady",v.value)}catch(e){}},y=()=>{if(!v.value)return;const e=(e,t)=>{v.value&&v.value.on(e,t)};e("click",(e=>d("chartClick",e))),e("dblclick",(e=>d("chartDblClick",e))),e("mousedown",(e=>d("chartMouseDown",e))),e("mouseup",(e=>d("chartMouseUp",e))),e("mouseover",(e=>d("chartMouseOver",e))),e("globalout",(e=>d("chartGlobalOut",e))),e("rendered",(()=>{v.value&&"rendered"==c.t3DShadowUpdate&&w(),d("chartRendered")})),e("finished",(function(){v.value&&("finished"==c.t3DShadowUpdate&&w(),d("chartFinished"),d("update:loading",!1),m.loading=!1,m.inited=!1)}))},w=()=>{if(!p.value)return;let e=!0;const t=T.get1stParent(p.value,".tui-3d-panel");(!t||t&&E.has(t,"is-3doff"))&&(e=!1),c.initT3DShadow&&e?oe(p.value,u):le(u)},O=D("TuiT3DPanel");h((()=>[i.value,c.initT3DShadow,O?.view3d?.value]),(([e,t,a])=>{w()})),h((()=>r.value),(async e=>{v.value&&(await f(),v.value.setTheme("eTheme"))}));const S=()=>{v.value&&(v.value.dispose(),v.value=null)},z=()=>{v.value&&v.value.resize()};h((()=>c.initHold),(e=>{e||b()})),h((()=>c.chartOption),(()=>{v.value&&f((()=>{v.value&&(v.value.setOption(c.chartOption),m.loading=!1,d("update:loading",!1))}))}),{deep:!0}),h((()=>c.loading),(e=>{null!=e&&(m.loading=e)}),{immediate:!0});const k=H((()=>ie("cpt-echart",{...c.width&&{width:_.join("number",c.width,"px")},...c.height&&{height:_.join("number",c.height,"px")},...c.dataOpacity&&{opa:c.dataOpacity},...c.dataBlur&&{blur:c.dataBlur+"px"}})));h((()=>l.value),((e,t)=>{"root"==s.value(c.resizeObserver)&&e>t&&C()}));const C=async()=>{m.resizing=!0,z(),await f(),setTimeout((()=>{m?.resizing&&(m.resizing=!1)}),500)};return L((()=>{c.initHold||(c.initDelay>0?g=setTimeout((()=>{g=null,p.value&&b()}),c.initDelay):f((()=>{b()})))})),W((()=>{g&&(clearTimeout(g),g=null),S()})),t({resize:z,getChart:()=>v.value,setOption:(e,t)=>{v.value&&v.value.setOption(e,t)},clear:()=>{v.value&&v.value.clear()},dispose:S}),(t,a)=>{const i=F("TuiLoaderPanel"),r=V("tui-resize");return J(),Q(i,{loading:m.loading,inited:m.inited},{default:K((()=>[X(Y("div",{ref_key:"chartRef",ref:p,class:ee(["tui-echarts",{"is-resizing":m.resizing}]),style:Z(k.value)},null,6),[[r,{callback:C,uid:u,cid:B(o),disabled:"self"!=B(s)(e.resizeObserver)}]])])),_:1},8,["loading","inited"])}}});export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{nextTick as y,markRaw as Q,inject as W,ref as Z,shallowRef as I,reactive as ee,computed as T,watch as b,onMounted as te,onBeforeUnmount as ae,resolveComponent as ie,resolveDirective as re,createBlock as oe,openBlock as C,withCtx as ne,withDirectives as le,createElementBlock as D,createCommentVNode as ue,createElementVNode as B,normalizeStyle as x,normalizeClass as ce,unref as N,Fragment as se,renderList as de,toDisplayString as fe}from"vue";import{cidGen as pe,cssVarGen as ve}from"@techui/scifi";import{tEvent as me,tStr as ge,tType as j}from"@techui/utils";import*as U from"echarts";const he=(e,a,t,i,l)=>{if(!e.value)return;const r=(a,t)=>{e.value&&e.value.on(a,t)};r("click",me.debounce((t=>{let l,r=t;if(t.value&&!a.chartOption.geo3D)l=e.value.convertToPixel("geo",[t.value[0],t.value[1]]),r.domPosition=l;else if("geo"==t.componentType&&t.event?.offsetX){const{offsetX:a,offsetY:i}=t.event;l=e.value.convertFromPixel("geo",[a,i]),r.coordPosition=l}i("chartClick",r,t)}),500,!0)),r("dblclick",(e=>i("chartDblClick",e))),r("mousedown",(e=>i("chartMouseDown",e))),r("mouseup",(e=>i("chartMouseUp",e))),r("mouseover",(e=>i("chartMouseOver",e))),r("globalout",(e=>i("chartGlobalOut",e))),r("geoRoam",(e=>i("chartGeoRoam",e))),r("timelinechanged",(t=>{const{allAreaCodes:l,chartOption:{timeline:r}}=a;let o=t;if("geoTitle"==r.titleType){let a=r.data[t.currentIndex],i=l.find((e=>e.name.includes(a))),n=e.value.convertToPixel("geo",[i.lng,i.lat]);o.domPosition=n,o.current=i}i("chartTimelinechanged",o)})),r("rendered",(()=>{e.value&&"rendered"===a.t3DShadowUpdate&&P(l),i("chartRendered")})),r("finished",(()=>{e.value&&("finished"===a.t3DShadowUpdate&&P(l),i("chartFinished"),i("update:loading",!1),t.loading=!1,t.inited=!0)}))},P=e=>{e.value},be=e=>{e.value&&e.value.resize()},ye=e=>e.value,Oe=(e,a,t)=>{e.value&&e.value.setOption(a,t)},Ce=e=>{e.value&&e.value.clear()},ke=e=>{if(e.value)try{const a=e.value.getOption();a.geo&&a.geo[0]&&(a.geo[0].roam=!0,a.geo[0].zoom=1,a.geo[0].center=null,e.value.setOption(a,!1))}catch(e){}},G=(e,a)=>{try{return!!a&&(U.registerMap(e,a),!0)}catch(e){return!1}},we=async(e,a,t,i,l,r)=>{if(e.value)try{if(F(a),a.value)return;if(!G(t.mapName,t.geoJsonData))return;await y(),a.value=Q(U.init(e.value,"eTheme",{...t.initOptions,notMerge:!1})),l("chartInit",a.value),a.value.setOption(t.chartOption),r(),await y(),a.value&&l("chartReady",a.value)}catch(e){}},ze=(e,a,t,i,l=!1)=>{e.value&&(e.value.setOption(a,l),t.loading=!1,i("update:loading",!1),i("chartUpdate"))},F=e=>{e.value&&(e.value.dispose(),e.value=null)},Te=["onClick"],De={class:"breadcrumb-text"},E="TuiEchartsMap",Se=Object.assign({name:E},{__name:"tuiEchartsMap",props:{width:[Number,String],height:[Number,String],chartOption:{type:Object,required:!0},geoJsonData:{type:Object,required:!0},allAreaCodes:Object,mapName:{type:String,required:!0},initOptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},initT3DShadow:{type:Boolean,default:!1},t3DShadowUpdate:{type:String,default:"finished",validator:e=>["rendered","finished"].includes(e)},initHold:{type:Boolean,default:!1},dataOpacity:Number,dataBlur:Number,initDelay:{type:Number,default:0},resizeObserver:{type:String,default:"global",validator:e=>["self","global","none"].includes(e)},updateReplace:{type:Boolean,default:!0},enableBreadcrumb:{type:Boolean,default:!1},breadcrumbConfig:{type:Object,default:()=>({data:[{code:1e5,name:"全国"}],position:{top:"5%",left:"5%"}})}},emits:["chartClick","chartDblClick","chartMouseDown","chartMouseUp","chartMouseOver","chartGlobalOut","chartInit","chartReady","chartRendered","chartFinished","chartGeoRoam","chartUpdate","chartTimelinechanged","breadcrumbClick","update:loading"],setup(e,{expose:a,emit:t}){const{$gT3D:i,$gTheme:l,$optResizeCounter:r,initResizeBy:o}=W("$global"),n=o(),u=pe(E),s="echart_map_"+ge.rdm(),c=Z(null),d=I(null);let p=null;const m=e,h=t,v=ee({loading:!0,inited:!1,resizing:!0}),g=T((()=>m.breadcrumbConfig?.data||[])),f=T((()=>{let e=m.breadcrumbConfig?.position||{},a={};for(let t in e)"number"==typeof e[t]?a[t]=e[t]+"px":a[t]=e[t];return a})),O=async()=>{await we(c,d,m,0,h,k,m.updateReplace)},w=()=>{ze(d,m.chartOption,v,h,m.updateReplace)},k=()=>{he(d,m,v,h,c)},z=()=>{F(d)},R=()=>{be(d)},S=T((()=>ve("cpt-echart-map",{...m.width&&{width:j.join("number",m.width,"px")},...m.height&&{height:j.join("number",m.height,"px")},...m.dataOpacity&&{opa:m.dataOpacity},...m.dataBlur&&{blur:m.dataBlur+"px"}})));b((()=>m.geoJsonData),(()=>{d.value&&(G(m.mapName,m.geoJsonData),y((()=>{w()})))}),{deep:!0}),b((()=>m.initHold),(e=>{e||O()})),b((()=>m.chartOption),(()=>{d.value&&y((()=>{w()}))}),{deep:!0}),b((()=>m.loading),(e=>{void 0!==e&&(v.loading=e)}),{immediate:!0}),b((()=>l.value),(e=>{d.value&&d.value.setTheme("eTheme")})),b((()=>r.value),((e,a)=>{"root"==n.value(m.resizeObserver)&&e>a&&M()}));const M=async()=>{v.resizing=!0,R(),await y(),setTimeout((()=>{v?.resizing&&(v.resizing=!1)}),500)};return te((()=>{m.initHold||(m.initDelay>0?p=setTimeout((()=>{p=null,c.value&&O()}),m.initDelay):y((()=>{O()})))})),ae((()=>{p&&(clearTimeout(p),p=null),z()})),a({resize:R,getChart:()=>ye(d),setOption:(e,a)=>{Oe(d,e,a)},clear:()=>{Ce(d)},resetMapView:()=>{ke(d)},dispose:z}),(a,t)=>{const i=ie("TuiLoaderPanel"),l=re("tui-resize");return C(),oe(i,{loading:v.loading,inited:v.inited},{default:ne((()=>[le(B("div",{ref_key:"mapRef",ref:c,class:ce(["tui-echarts-map",{"is-resizing":v.resizing}]),style:x(S.value)},null,6),[[l,{callback:M,uid:s,cid:N(u),disabled:"self"!=N(n)(e.resizeObserver)}]]),e.enableBreadcrumb&&g.value.length>0?(C(),D("div",{key:0,class:"tui-map-breadcrumb",style:x(f.value)},[(C(!0),D(se,null,de(g.value,((e,a)=>(C(),D("div",{key:`${e.code}-${a}`,class:"breadcrumb-item",onClick:t=>((e,a)=>{const t=g.value.slice(0,a+1);h("breadcrumbClick",{item:e,index:a,breadcrumb:t,chart:d.value})})(e,a)},[B("span",De,fe(e.name),1)],8,Te)))),128)),t[0]||(t[0]=B("i",{class:"tui-icon ti-map breadcrumb-icon"},null,-1))],4)):ue("",!0)])),_:1},8,["loading","inited"])}}});export{Se as default};
|
package/index-bak.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import "@techui/icons";
|
|
2
|
+
import tuiLocales from "@techui/locales";
|
|
3
|
+
import "./dist/index.css";
|
|
4
|
+
import { dynamicEcharts, toComps, toDirective, toGlobal, toRoot } from "./dist/index.js";
|
|
5
|
+
|
|
6
|
+
const initComps=(app,license,features,debug=false)=>{
|
|
7
|
+
const {echarts=false,advanced=false,}=features
|
|
8
|
+
app.use(toGlobal.$gMask)
|
|
9
|
+
app.use(toGlobal.$gLoading)
|
|
10
|
+
app.directive('tuiResize', toDirective.$dResize)
|
|
11
|
+
app.directive('tuiDrag', toDirective.$dDrag)
|
|
12
|
+
app.directive('tuiVcid', toDirective.$dVcid)
|
|
13
|
+
const tService=toRoot.tuiService(advanced,debug)
|
|
14
|
+
app.config.globalProperties.$tStoreLocales = tuiLocales
|
|
15
|
+
app.config.globalProperties.$tBus = toRoot.tuiBus
|
|
16
|
+
app.config.globalProperties.$tService = tService
|
|
17
|
+
app.config.globalProperties.$tState = tService.state
|
|
18
|
+
app.config.globalProperties.isActAdvFeatures = advanced||license!=null
|
|
19
|
+
app.config.globalProperties.isActEchartsFeatures = echarts
|
|
20
|
+
app.config.globalProperties.isActAdminFeatures=false
|
|
21
|
+
const advanceComps=[
|
|
22
|
+
"Tui3DPanel",
|
|
23
|
+
"TuiBar3D",
|
|
24
|
+
"TuiBar3DGroup",
|
|
25
|
+
"TuiPie",
|
|
26
|
+
]
|
|
27
|
+
dynamicEcharts(app,echarts);
|
|
28
|
+
toComps.forEach((com) => {
|
|
29
|
+
if(com.name){
|
|
30
|
+
const isAdvanced = advanceComps.includes(com.name);
|
|
31
|
+
const isEcharts = com.name.includes("Echarts");
|
|
32
|
+
const skipAdvanced = isAdvanced && !advanced && !license;
|
|
33
|
+
const skipEcharts = isEcharts && !echarts;
|
|
34
|
+
const shouldSkip = skipAdvanced || skipEcharts;
|
|
35
|
+
if (!shouldSkip) {
|
|
36
|
+
app.component(com.name, com);
|
|
37
|
+
}
|
|
38
|
+
}else{
|
|
39
|
+
console.warn("TechUI Warning: Missing component name",com);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
import { sysLang } from "@techui/utils";
|
|
45
|
+
|
|
46
|
+
import init, {
|
|
47
|
+
coreInfo,
|
|
48
|
+
techuiCoreInit
|
|
49
|
+
} from './core/core.js';
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
adptCalc, bar3DPathGen, cidGen, cidVaild, coreConsoleError, coreConsoleInfo, coreConsoleWarn, cssVarGen, floatInfo, getEnv, getVer,
|
|
53
|
+
md5Enc, openDec, openEnc, pieArcPathGen,
|
|
54
|
+
|
|
55
|
+
//button
|
|
56
|
+
scifiButtonA1, scifiButtonA2, scifiButtonA3, scifiButtonA4, scifiButtonA5,
|
|
57
|
+
|
|
58
|
+
//deco
|
|
59
|
+
scifiDecoA1, scifiDecoB1, scifiDecoB2, scifiDecoB3, scifiDecoD1,
|
|
60
|
+
|
|
61
|
+
//geometry
|
|
62
|
+
scifiGeomeParallelogram, scifiGeomeRectangle, scifiGeomeTrapezoid, scifiGeomeTriangle, scifiGeomHexagon,
|
|
63
|
+
|
|
64
|
+
//header
|
|
65
|
+
scifiHeaderA1, scifiHeaderA2, scifiHeaderA3, scifiHeaderA4,
|
|
66
|
+
|
|
67
|
+
//panel
|
|
68
|
+
scifiPanelA1, scifiPanelA2, scifiPanelA3,
|
|
69
|
+
scifiPanelB1, scifiPanelB2, scifiPanelB3, scifiPanelB4,
|
|
70
|
+
scifiPanelDV1, scifiPanelDV2, scifiPanelDV3, scifiPanelDV4, scifiPanelDV5,
|
|
71
|
+
scifiPanelDV6, scifiPanelDV7, scifiPanelDV8, scifiPanelDV9,
|
|
72
|
+
|
|
73
|
+
//panel title
|
|
74
|
+
scifiPanelTitleA1, scifiPanelTitleA2, scifiPanelTitleA3,
|
|
75
|
+
|
|
76
|
+
svgPatBlocks,
|
|
77
|
+
svgPatCircuitDiagram,
|
|
78
|
+
svgPatCircularOverlayA,
|
|
79
|
+
svgPatCircularOverlayB,
|
|
80
|
+
svgPatContourLine,
|
|
81
|
+
svgPatCrosshairA,
|
|
82
|
+
svgPatCrosshairB,
|
|
83
|
+
svgPatCubeA,
|
|
84
|
+
svgPatCubeB,
|
|
85
|
+
svgPatCubeC,
|
|
86
|
+
svgPatDiamondFlipped,
|
|
87
|
+
svgPatDiamondLattice,
|
|
88
|
+
svgPatDiamondPixel,
|
|
89
|
+
svgPatDiamondWeaving,
|
|
90
|
+
svgPatDots,
|
|
91
|
+
svgPatHexagonA,
|
|
92
|
+
svgPatHexagonB,
|
|
93
|
+
svgPatHexagonC,
|
|
94
|
+
svgPatHexagonCurved,
|
|
95
|
+
svgPatHexagonD,
|
|
96
|
+
svgPatLineGrid,
|
|
97
|
+
svgPatLineWeaving,
|
|
98
|
+
svgPatMazeA,
|
|
99
|
+
svgPatMazeB,
|
|
100
|
+
svgPatMazeC,
|
|
101
|
+
svgPatMountains,
|
|
102
|
+
svgPatRain,
|
|
103
|
+
svgPatRectWeavingA,
|
|
104
|
+
svgPatRectWeavingB,
|
|
105
|
+
svgPatRectWeavingC,
|
|
106
|
+
svgPatShellA,
|
|
107
|
+
svgPatShellB,
|
|
108
|
+
svgPatSlashParallel,
|
|
109
|
+
svgPatTest,
|
|
110
|
+
svgPatTotem,
|
|
111
|
+
svgPatTriangleA,
|
|
112
|
+
svgPatTriangleB,
|
|
113
|
+
svgPatWaveA,
|
|
114
|
+
svgPatWaveB,
|
|
115
|
+
svgPatZigzagA,
|
|
116
|
+
svgPatZigzagB,
|
|
117
|
+
|
|
118
|
+
svgSpinBarsA,
|
|
119
|
+
svgSpinBarsB,
|
|
120
|
+
svgSpinBarsC,
|
|
121
|
+
svgSpinBlocksA,
|
|
122
|
+
svgSpinBlocksB,
|
|
123
|
+
svgSpinBlocksC,
|
|
124
|
+
svgSpinClock,
|
|
125
|
+
svgSpinPointA,
|
|
126
|
+
svgSpinPointB,
|
|
127
|
+
svgSpinPointC,
|
|
128
|
+
svgSpinPulseDotA,
|
|
129
|
+
svgSpinPulseDotB,
|
|
130
|
+
svgSpinPulseDotC,
|
|
131
|
+
svgSpinPulseRingA,
|
|
132
|
+
svgSpinPulseRingB,
|
|
133
|
+
svgSpinPulseRingC,
|
|
134
|
+
svgSpinRingA,
|
|
135
|
+
svgSpinRingB,
|
|
136
|
+
svgSpinRingC,
|
|
137
|
+
|
|
138
|
+
t3dCoeffCalc,
|
|
139
|
+
t3dUpdateOrient,
|
|
140
|
+
t3dUpdateRotate
|
|
141
|
+
} from './core/core.js';
|
|
142
|
+
|
|
143
|
+
const coreEnt=async ({
|
|
144
|
+
app,
|
|
145
|
+
license=null,
|
|
146
|
+
subLicense=null,
|
|
147
|
+
features={},
|
|
148
|
+
debug=false
|
|
149
|
+
})=>{
|
|
150
|
+
sysLang();
|
|
151
|
+
await init();
|
|
152
|
+
window.tuiCoreInfo=coreInfo
|
|
153
|
+
techuiCoreInit(license,subLicense,coreEnt.toString());
|
|
154
|
+
app.use(initComps,license,features,debug)
|
|
155
|
+
};
|
|
156
|
+
export default coreEnt
|
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "@techui/icons";
|
|
2
|
-
import tuiLocales from "@techui/locales";
|
|
3
2
|
import "./dist/index.css";
|
|
4
3
|
import { dynamicEcharts, toComps, toDirective, toGlobal, toRoot } from "./dist/index.js";
|
|
5
4
|
|
|
@@ -11,7 +10,6 @@ const initComps=(app,license,features,debug=false)=>{
|
|
|
11
10
|
app.directive('tuiDrag', toDirective.$dDrag)
|
|
12
11
|
app.directive('tuiVcid', toDirective.$dVcid)
|
|
13
12
|
const tService=toRoot.tuiService(advanced,debug)
|
|
14
|
-
app.config.globalProperties.$tStoreLocales = tuiLocales
|
|
15
13
|
app.config.globalProperties.$tBus = toRoot.tuiBus
|
|
16
14
|
app.config.globalProperties.$tService = tService
|
|
17
15
|
app.config.globalProperties.$tState = tService.state
|
|
@@ -41,7 +39,7 @@ const initComps=(app,license,features,debug=false)=>{
|
|
|
41
39
|
});
|
|
42
40
|
};
|
|
43
41
|
|
|
44
|
-
import {
|
|
42
|
+
import { initLang } from "@techui/utils";
|
|
45
43
|
|
|
46
44
|
import init, {
|
|
47
45
|
coreInfo,
|
|
@@ -49,8 +47,7 @@ import init, {
|
|
|
49
47
|
} from './core/core.js';
|
|
50
48
|
|
|
51
49
|
export {
|
|
52
|
-
adptCalc, bar3DPathGen, cidGen, cidVaild, coreConsoleError, coreConsoleInfo, coreConsoleWarn,
|
|
53
|
-
floatInfo, getEnv, getVer,
|
|
50
|
+
adptCalc, bar3DPathGen, cidGen, cidVaild, coreConsoleError, coreConsoleInfo, coreConsoleWarn, cssVarGen, floatInfo, getEnv, getVer,
|
|
54
51
|
md5Enc, openDec, openEnc, pieArcPathGen,
|
|
55
52
|
|
|
56
53
|
//button
|
|
@@ -148,7 +145,7 @@ const coreEnt=async ({
|
|
|
148
145
|
features={},
|
|
149
146
|
debug=false
|
|
150
147
|
})=>{
|
|
151
|
-
|
|
148
|
+
initLang();
|
|
152
149
|
await init();
|
|
153
150
|
window.tuiCoreInfo=coreInfo
|
|
154
151
|
techuiCoreInit(license,subLicense,coreEnt.toString());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techui/scifi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-alpha.1",
|
|
4
4
|
"description": "TechUI Scifi is a sci-fi SVG component library developed based on Vue3. It uses dynamically calculated SVG elements to generate a variety of cool, futuristic, and technological components.",
|
|
5
5
|
"author": "aYin <ayin86cn@gmail.com> <wechat:jay1986cn>",
|
|
6
6
|
"homepage": "https://techui.net",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@techui/icons": "*",
|
|
45
|
-
"@techui/colors": "*",
|
|
46
|
-
"@techui/lessmixins": "*",
|
|
47
|
-
"@techui/locales": "*",
|
|
48
|
-
"@techui/themes": "*",
|
|
49
45
|
"@techui/libs": "*",
|
|
50
|
-
"@techui/
|
|
46
|
+
"@techui/colors": "^1.0.1",
|
|
47
|
+
"@techui/lessmixins": "^1.0.0",
|
|
48
|
+
"@techui/locales": "0.0.4",
|
|
49
|
+
"@techui/themes": "0.0.4",
|
|
50
|
+
"@techui/utils": "0.0.4",
|
|
51
51
|
"vue": "^3.4.27",
|
|
52
52
|
"vue-router": "^4.3.2"
|
|
53
53
|
},
|
package/build.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import "@source/components/assets/css/font.less"
|
|
2
|
-
import "@source/components/assets/css/icon.less"
|
|
3
|
-
import "@source/components/assets/css/main.less"
|
|
4
|
-
import "@source/components/assets/css/scifi.less"
|
|
5
|
-
import "@source/components/assets/css/viewTrans.less"
|
|
6
|
-
|
|
7
|
-
//root
|
|
8
|
-
import tuiBus from "@source/components/kernel/bus/index.js"
|
|
9
|
-
import tuiService from "@source/components/kernel/service/index-scifi.js"
|
|
10
|
-
|
|
11
|
-
//directive
|
|
12
|
-
import $dDrag from "@source/components/kernel/directive/drag.js"
|
|
13
|
-
import $dResize from "@source/components/kernel/directive/resize.js"
|
|
14
|
-
import $dVcid from "@source/components/kernel/directive/vcid.js"
|
|
15
|
-
|
|
16
|
-
//global
|
|
17
|
-
import $gLoading from "@source/components/base/loading/index.js"
|
|
18
|
-
import $gMask from "@source/components/base/mask/index.js"
|
|
19
|
-
|
|
20
|
-
//advance
|
|
21
|
-
import AdptDragTip from "@source/components/advance/adaptive/adptScifi_dragTip.vue"
|
|
22
|
-
import AdptLowResTip from "@source/components/advance/adaptive/adptScifi_lowResTip.vue"
|
|
23
|
-
import Adaptive from "@source/components/advance/adaptive/index.vue"
|
|
24
|
-
import Bar3DGroup from "@source/components/advance/bar3D/group.vue"
|
|
25
|
-
import Bar3D from "@source/components/advance/bar3D/index.vue"
|
|
26
|
-
import Echarts from "@source/components/advance/echarts/index.vue"
|
|
27
|
-
import EchartsMap from "@source/components/advance/echarts/map.vue"
|
|
28
|
-
import PanicAlert from "@source/components/advance/panicAlert/index.vue"
|
|
29
|
-
import Pie from "@source/components/advance/pie/index.vue"
|
|
30
|
-
import T3DPanel from "@source/components/advance/t3DPanel/index.vue"
|
|
31
|
-
|
|
32
|
-
//base
|
|
33
|
-
import LoaderPanel from "@source/components/base/loaderPanel/index.vue"
|
|
34
|
-
import LoadingArea from "@source/components/base/loading/LoadingArea.vue"
|
|
35
|
-
import LoadingFull from "@source/components/base/loading/LoadingFull.vue"
|
|
36
|
-
import Mask from "@source/components/base/mask/index.vue"
|
|
37
|
-
import Provider from "@source/components/kernel/provider/index-scifi.vue"
|
|
38
|
-
|
|
39
|
-
//Scifi Button
|
|
40
|
-
import ScifiButtonA1 from "@source/components/scifi/button/A1.vue"
|
|
41
|
-
import ScifiButtonA2 from "@source/components/scifi/button/A2.vue"
|
|
42
|
-
import ScifiButtonA3 from "@source/components/scifi/button/A3.vue"
|
|
43
|
-
import ScifiButtonA4 from "@source/components/scifi/button/A4.vue"
|
|
44
|
-
import ScifiButtonA5 from "@source/components/scifi/button/A5.vue"
|
|
45
|
-
|
|
46
|
-
//Scifi Geometry
|
|
47
|
-
import ScifiGHexagon from "@source/components/scifi/geometry/Hexagon.vue"
|
|
48
|
-
import ScifiGParallelogram from "@source/components/scifi/geometry/Parallelogram.vue"
|
|
49
|
-
import ScifiGRectangle from "@source/components/scifi/geometry/Rectangle.vue"
|
|
50
|
-
import ScifiGTrapezoid from "@source/components/scifi/geometry/Trapezoid.vue"
|
|
51
|
-
import ScifiGTriangle from "@source/components/scifi/geometry/Triangle.vue"
|
|
52
|
-
|
|
53
|
-
//Scifi Deco
|
|
54
|
-
import ScifiDecoA1 from "@source/components/scifi/deco/A1.vue"
|
|
55
|
-
import ScifiDecoB1 from "@source/components/scifi/deco/B1.vue"
|
|
56
|
-
import ScifiDecoB2 from "@source/components/scifi/deco/B2.vue"
|
|
57
|
-
import ScifiDecoB3 from "@source/components/scifi/deco/B3.vue"
|
|
58
|
-
import ScifiDecoC1 from "@source/components/scifi/deco/C1.vue"
|
|
59
|
-
|
|
60
|
-
//Scifi Header
|
|
61
|
-
import ScifiHeaderA1 from "@source/components/scifi/header/A1.vue"
|
|
62
|
-
import ScifiHeaderA2 from "@source/components/scifi/header/A2.vue"
|
|
63
|
-
import ScifiHeaderA3 from "@source/components/scifi/header/A3.vue"
|
|
64
|
-
import ScifiHeaderA4 from "@source/components/scifi/header/A4.vue"
|
|
65
|
-
|
|
66
|
-
//Scifi Panel
|
|
67
|
-
import ScifiPanelA1 from "@source/components/scifi/panel/A1.vue"
|
|
68
|
-
import ScifiPanelA2 from "@source/components/scifi/panel/A2.vue"
|
|
69
|
-
import ScifiPanelA3 from "@source/components/scifi/panel/A3.vue"
|
|
70
|
-
import ScifiPanelB1 from "@source/components/scifi/panel/B1.vue"
|
|
71
|
-
import ScifiPanelB2 from "@source/components/scifi/panel/B2.vue"
|
|
72
|
-
import ScifiPanelB3 from "@source/components/scifi/panel/B3.vue"
|
|
73
|
-
import ScifiPanelB4 from "@source/components/scifi/panel/B4.vue"
|
|
74
|
-
import ScifiPanelDV1 from "@source/components/scifi/panel/DV1.vue"
|
|
75
|
-
import ScifiPanelDV2 from "@source/components/scifi/panel/DV2.vue"
|
|
76
|
-
import ScifiPanelDV3 from "@source/components/scifi/panel/DV3.vue"
|
|
77
|
-
import ScifiPanelDV4 from "@source/components/scifi/panel/DV4.vue"
|
|
78
|
-
import ScifiPanelDV5 from "@source/components/scifi/panel/DV5.vue"
|
|
79
|
-
import ScifiPanelDV6 from "@source/components/scifi/panel/DV6.vue"
|
|
80
|
-
import ScifiPanelDV7 from "@source/components/scifi/panel/DV7.vue"
|
|
81
|
-
import ScifiPanelDV8 from "@source/components/scifi/panel/DV8.vue"
|
|
82
|
-
import ScifiPanelDV9 from "@source/components/scifi/panel/DV9.vue"
|
|
83
|
-
import TuiPanelA1 from "@source/components/scifi/tui/panel/A1.vue"
|
|
84
|
-
|
|
85
|
-
//Scifi Panel Title
|
|
86
|
-
import ScifiPanelTitleA1 from "@source/components/scifi/panelTitle/A1.vue"
|
|
87
|
-
import ScifiPanelTitleA2 from "@source/components/scifi/panelTitle/A2.vue"
|
|
88
|
-
import ScifiPanelTitleA3 from "@source/components/scifi/panelTitle/A3.vue"
|
|
89
|
-
|
|
90
|
-
//Tui
|
|
91
|
-
import TuiThemeToggle from "@source/components/base/themeToggle/index.vue"
|
|
92
|
-
import TuiPanelTitleA1 from "@source/components/scifi/tui/panelTitle/A1.vue"
|
|
93
|
-
import TuiPanelTitleA2 from "@source/components/scifi/tui/panelTitle/A2.vue"
|
|
94
|
-
|
|
95
|
-
export const toDirective={
|
|
96
|
-
$dDrag,
|
|
97
|
-
$dResize,
|
|
98
|
-
$dVcid
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const toRoot={
|
|
102
|
-
tuiService,
|
|
103
|
-
tuiBus,
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export const toGlobal={
|
|
107
|
-
$gMask,
|
|
108
|
-
$gLoading,
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export const toComps=[
|
|
112
|
-
Adaptive,AdptDragTip,AdptLowResTip, Bar3DGroup, Bar3D, Echarts, EchartsMap, Pie, T3DPanel,
|
|
113
|
-
Provider,Mask, LoadingFull, LoadingArea, LoaderPanel, TuiThemeToggle,PanicAlert,
|
|
114
|
-
|
|
115
|
-
//button
|
|
116
|
-
ScifiButtonA1,ScifiButtonA2,ScifiButtonA3,ScifiButtonA4,ScifiButtonA5,
|
|
117
|
-
|
|
118
|
-
//Geometry
|
|
119
|
-
ScifiGHexagon,ScifiGParallelogram,ScifiGRectangle,ScifiGTrapezoid,ScifiGTriangle,
|
|
120
|
-
|
|
121
|
-
//deco
|
|
122
|
-
ScifiDecoA1,ScifiDecoB1,ScifiDecoB2,ScifiDecoB3,ScifiDecoC1,
|
|
123
|
-
|
|
124
|
-
//header
|
|
125
|
-
ScifiHeaderA1,ScifiHeaderA2,ScifiHeaderA3,ScifiHeaderA4,
|
|
126
|
-
|
|
127
|
-
//panel
|
|
128
|
-
ScifiPanelA1, ScifiPanelA2, ScifiPanelA3,
|
|
129
|
-
ScifiPanelB1, ScifiPanelB2, ScifiPanelB3, ScifiPanelB4,
|
|
130
|
-
ScifiPanelDV1, ScifiPanelDV2, ScifiPanelDV3, ScifiPanelDV4, ScifiPanelDV5,
|
|
131
|
-
ScifiPanelDV6, ScifiPanelDV7, ScifiPanelDV8, ScifiPanelDV9,
|
|
132
|
-
TuiPanelA1,
|
|
133
|
-
|
|
134
|
-
//panelTitle
|
|
135
|
-
ScifiPanelTitleA1, ScifiPanelTitleA2, ScifiPanelTitleA3, TuiPanelTitleA1, TuiPanelTitleA2,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
];
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|