UNPKG

@techui/scifi

Version:

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.

156 lines (142 loc) 4.18 kB
import "@techui/icons"; import tuiLocales from "@techui/locales"; import "./dist/index.css"; import { dynamicEcharts, toComps, toDirective, toGlobal, toRoot } from "./dist/index.js"; const initComps=(app,license,features,debug=false)=>{ const {echarts=false,advanced=false,}=features app.use(toGlobal.$gMask) app.use(toGlobal.$gLoading) app.directive('tuiResize', toDirective.$dResize) app.directive('tuiDrag', toDirective.$dDrag) app.directive('tuiVcid', toDirective.$dVcid) const tService=toRoot.tuiService(advanced,debug) app.config.globalProperties.$tStoreLocales = tuiLocales app.config.globalProperties.$tBus = toRoot.tuiBus app.config.globalProperties.$tService = tService app.config.globalProperties.$tState = tService.state app.config.globalProperties.isActAdvFeatures = advanced||license!=null app.config.globalProperties.isActEchartsFeatures = echarts app.config.globalProperties.isActAdminFeatures=false const advanceComps=[ "Tui3DPanel", "TuiBar3D", "TuiBar3DGroup", "TuiPie", ] dynamicEcharts(app,echarts); toComps.forEach((com) => { if(com.name){ const isAdvanced = advanceComps.includes(com.name); const isEcharts = com.name.includes("Echarts"); const skipAdvanced = isAdvanced && !advanced && !license; const skipEcharts = isEcharts && !echarts; const shouldSkip = skipAdvanced || skipEcharts; if (!shouldSkip) { app.component(com.name, com); } }else{ console.warn("TechUI Warning: Missing component name",com); } }); }; import { sysLang } from "@techui/utils"; import init, { coreInfo, techuiCoreInit } from './core/core.js'; export { adptCalc, bar3DPathGen, cidGen, cidVaild, coreConsoleError, coreConsoleInfo, coreConsoleWarn, cssVarGen, floatInfo, getEnv, getVer, md5Enc, openDec, openEnc, pieArcPathGen, //button scifiButtonA1, scifiButtonA2, scifiButtonA3, scifiButtonA4, scifiButtonA5, //deco scifiDecoA1, scifiDecoB1, scifiDecoB2, scifiDecoB3, scifiDecoD1, //geometry scifiGeomeParallelogram, scifiGeomeRectangle, scifiGeomeTrapezoid, scifiGeomeTriangle, scifiGeomHexagon, //header scifiHeaderA1, scifiHeaderA2, scifiHeaderA3, scifiHeaderA4, //panel scifiPanelA1, scifiPanelA2, scifiPanelA3, scifiPanelB1, scifiPanelB2, scifiPanelB3, scifiPanelB4, scifiPanelDV1, scifiPanelDV2, scifiPanelDV3, scifiPanelDV4, scifiPanelDV5, scifiPanelDV6, scifiPanelDV7, scifiPanelDV8, scifiPanelDV9, //panel title scifiPanelTitleA1, scifiPanelTitleA2, scifiPanelTitleA3, svgPatBlocks, svgPatCircuitDiagram, svgPatCircularOverlayA, svgPatCircularOverlayB, svgPatContourLine, svgPatCrosshairA, svgPatCrosshairB, svgPatCubeA, svgPatCubeB, svgPatCubeC, svgPatDiamondFlipped, svgPatDiamondLattice, svgPatDiamondPixel, svgPatDiamondWeaving, svgPatDots, svgPatHexagonA, svgPatHexagonB, svgPatHexagonC, svgPatHexagonCurved, svgPatHexagonD, svgPatLineGrid, svgPatLineWeaving, svgPatMazeA, svgPatMazeB, svgPatMazeC, svgPatMountains, svgPatRain, svgPatRectWeavingA, svgPatRectWeavingB, svgPatRectWeavingC, svgPatShellA, svgPatShellB, svgPatSlashParallel, svgPatTest, svgPatTotem, svgPatTriangleA, svgPatTriangleB, svgPatWaveA, svgPatWaveB, svgPatZigzagA, svgPatZigzagB, svgSpinBarsA, svgSpinBarsB, svgSpinBarsC, svgSpinBlocksA, svgSpinBlocksB, svgSpinBlocksC, svgSpinClock, svgSpinPointA, svgSpinPointB, svgSpinPointC, svgSpinPulseDotA, svgSpinPulseDotB, svgSpinPulseDotC, svgSpinPulseRingA, svgSpinPulseRingB, svgSpinPulseRingC, svgSpinRingA, svgSpinRingB, svgSpinRingC, t3dCoeffCalc, t3dUpdateOrient, t3dUpdateRotate } from './core/core.js'; const coreEnt=async ({ app, license=null, subLicense=null, features={}, debug=false })=>{ sysLang(); await init(); window.tuiCoreInfo=coreInfo techuiCoreInit(license,subLicense,coreEnt.toString()); app.use(initComps,license,features,debug) }; export default coreEnt