mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-20 18:34:13 +08:00
1 line
6.9 KiB
JavaScript
1 line
6.9 KiB
JavaScript
import{A as e}from"./isSymbol-DERoyzaf.js";var t=`https://xiaodaigua-ray.github.io/ray-template/docs/`,n={darkClassName:`r-template--dark`,lightClassName:`r-template--light`,preLoadingAnimation:`pre-loading-animation`,htmlHeight:`--html-height`,htmlWidth:`--html-width`},r={max:5,closable:!1},i=`loading`,a={signing:`signing`,localeLanguage:`localeLanguage`,token:`token`,appMenuKey:`menuKey`,appPiniaSettingStore:`piniaSettingStore`,appPiniaKeepAliveStore:`piniaKeepAliveStore`,appPiniaMenuStore:`piniaMenuStore`,appPiniaSigningStore:`piniaSigningStore`,appVersionProvider:`appVersionProvider`,isAppLockScreen:`isAppLockScreen`,appGlobalSearchOptions:`appGlobalSearchOptions`,appMenuTagOptions:`appMenuTagOptions`,appLockScreenPasswordKey:`appLockScreenPasswordKey`},o=[{label:`无`,value:`none`},{label:`缩放出现`,value:`scale`},{label:`缩放消退`,value:`fade-scale`},{label:`滑入出现`,value:`fade-slide`},{label:`淡入消退`,value:`opacity`},{label:`底部消退`,value:`fade-bottom`},{label:`向上浮入`,value:`slide-up`},{label:`向左滑入`,value:`slide-left`}],s={primaryColor:`#3b63d9`,primaryFadeColor:`rgba(59, 99, 217, 0.85)`},c={Card:{borderRadius:`12px`,titleFontSizeMedium:`16px`,paddingMedium:`20px 24px`},Menu:{itemHeight:`40px`,borderRadius:`8px`},Button:{fontWeight:`500`},Tag:{borderRadius:`5px`}},l={dark:{...c,common:{borderRadius:`8px`,fontWeightStrong:`600`,lineHeight:`1.6`,heightMedium:`36px`,heightSmall:`30px`,bodyColor:`#101722`,cardColor:`#172131`,modalColor:`#192638`,popoverColor:`#192638`,actionColor:`#1c293b`,textColor1:`#e9eef7`,textColor2:`#b3c0d3`,textColor3:`#a0b0c6`,placeholderColor:`#a0b0c6`,borderColor:`#687b96`,dividerColor:`#2c394d`,hoverColor:`rgba(179, 192, 211, 0.08)`,primaryColor:`#aabaff`,primaryColorHover:`#c4ceff`,primaryColorPressed:`#96a9fa`,primaryColorSuppl:`#aabaff`,boxShadow1:`0 1px 2px rgb(0 0 0 / 10%), 0 8px 24px rgb(0 0 0 / 10%)`},Layout:{siderColor:`#172131`,headerColor:`#172131`}},light:{...c,common:{borderRadius:`8px`,fontWeightStrong:`600`,lineHeight:`1.6`,heightMedium:`36px`,heightSmall:`30px`,bodyColor:`#f5f7fb`,cardColor:`#ffffff`,modalColor:`#ffffff`,popoverColor:`#ffffff`,actionColor:`#f7f9fc`,textColor1:`#1d2a3e`,textColor2:`#52647c`,textColor3:`#617187`,placeholderColor:`#617187`,borderColor:`#8492a8`,dividerColor:`#e4e9f1`,hoverColor:`rgba(82, 100, 124, 0.06)`,primaryColor:s.primaryColor,primaryColorHover:`#4b70df`,primaryColorPressed:`#2b50be`,primaryColorSuppl:s.primaryColor,boxShadow1:`0 1px 2px rgb(25 43 74 / 3%), 0 6px 20px rgb(25 43 74 / 3%)`},Layout:{siderColor:`#ffffff`,headerColor:`#ffffff`}}},u={Card:{borderRadius:`20px`},Button:{fontWeight:`500`,borderRadiusSmall:`999px`,borderRadiusMedium:`999px`,borderRadiusLarge:`999px`},Menu:{itemHeight:`44px`,borderRadius:`24px`},Tag:{borderRadius:`8px`},DataTable:{borderRadius:`16px`}},d={Card:{borderRadius:`2px`},Menu:{itemHeight:`36px`,borderRadius:`2px`},Tag:{borderRadius:`2px`}},f=[`modern`,`naive`,`material`,`plain`],p=`modern`,m=e=>f.find(t=>t===e)??`modern`,h={naive:{light:{},dark:{}},modern:l,material:{light:{...u,common:{primaryColor:`#655292`,primaryColorHover:`#755fa4`,primaryColorPressed:`#514178`,primaryColorSuppl:`#655292`,borderRadius:`12px`,heightMedium:`40px`,bodyColor:`#f5f1fa`,cardColor:`#fffaff`,actionColor:`#efe8f7`,popoverColor:`#fffaff`,modalColor:`#fffaff`,textColor1:`#201a29`,textColor2:`#433a50`,textColor3:`#61566c`,borderColor:`#8c8199`,dividerColor:`#e1d8ea`,boxShadow1:`0 2px 6px rgb(46 31 65 / 14%)`},Layout:{siderColor:`#fffaff`,headerColor:`#fffaff`}},dark:{...u,common:{primaryColor:`#d6bbff`,primaryColorHover:`#e4d1ff`,primaryColorPressed:`#bf9ff1`,primaryColorSuppl:`#d6bbff`,borderRadius:`12px`,heightMedium:`40px`,bodyColor:`#16121c`,cardColor:`#241e2c`,actionColor:`#302838`,popoverColor:`#2b2433`,modalColor:`#2b2433`,textColor1:`#f1e7fa`,textColor2:`#ded0e8`,textColor3:`#b9a9c4`,borderColor:`#867791`,dividerColor:`#473c52`,boxShadow1:`0 2px 8px rgb(0 0 0 / 16%)`},Layout:{siderColor:`#241e2c`,headerColor:`#241e2c`}}},plain:{light:{...d,common:{primaryColor:`#454545`,primaryColorHover:`#555555`,primaryColorPressed:`#292929`,primaryColorSuppl:`#454545`,borderRadius:`2px`,bodyColor:`#f5f5f5`,actionColor:`#eeeeee`,boxShadow1:`none`,boxShadow2:`none`,boxShadow3:`none`}},dark:{...d,common:{primaryColor:`#d5d5d5`,primaryColorHover:`#ededed`,primaryColorPressed:`#bdbdbd`,primaryColorSuppl:`#d5d5d5`,borderRadius:`2px`,bodyColor:`#161616`,cardColor:`#202020`,popoverColor:`#252525`,modalColor:`#252525`,actionColor:`#2b2b2b`,boxShadow1:`none`,boxShadow2:`none`,boxShadow3:`none`},Layout:{siderColor:`#202020`,headerColor:`#202020`}}}},g=(e,t)=>({"--r-token-primary":e.primaryColor,"--r-token-primary-hover":e.primaryColorHover,"--r-token-canvas":e.bodyColor,"--r-token-surface":e.cardColor,"--r-token-surface-muted":e.actionColor,"--r-token-surface-hover":`color-mix(in srgb, ${e.textColor1} 9%, ${e.cardColor})`,"--r-token-divider":e.dividerColor,"--r-token-border":e.borderColor,"--r-token-text":e.textColor1,"--r-token-text-secondary":e.textColor2,"--r-token-text-muted":t.common?.textColor3??e.textColor2,"--r-token-shadow":t.common?.boxShadow1??`none`,"--r-token-radius":typeof t.Card?.borderRadius==`string`?t.Card.borderRadius:e.borderRadius,"--r-token-control-radius":e.borderRadius}),_={appThemeColors:[`#3b63d9`,`#3f9eff`,`#ff42bc`,`#ee4f12`,`#dbcb02`,`#18a058`],appPrimaryColor:s,appNaiveUIThemeOverrides:l,echartTheme:null},v=e(null),y=e(null),b={setupRouterLoadingBar:!0,setupRouterGuard:!0},x=[`RLogin`,`ErrorPage`,`RayTemplateDoc`],S=[],C=(e,t)=>{let{customPrefix:n}=t??{};return n?`${n}${e}`:`${e}`},w=()=>{let e=new Map;return{get length(){return e.size},key:t=>Array.from(e.keys())[t]??null,getItem:t=>e.get(t)??null,setItem:(t,n)=>{e.set(t,n)},removeItem:t=>{e.delete(t)},clear:()=>e.clear()}},T;function E(){T={localStorage:w(),sessionStorage:w()}}var D=(e=`sessionStorage`)=>e===`localStorage`?T?.localStorage??window.localStorage:T?.sessionStorage??window.sessionStorage,O=(e,t)=>t?.prefix?C(e,{customPrefix:t.prefixKey}):e;function k(e,t=`sessionStorage`,n){try{return D(t).getItem(O(e,n))!==null}catch{return!1}}function A(e,t,n=`sessionStorage`,r){if(e)try{let i=JSON.stringify(t);if(i===void 0)throw TypeError(`Value is not JSON serializable.`);D(n).setItem(O(e,r),i)}catch{}}function j(e,t=`sessionStorage`,n){let r=n?.defaultValue??null;try{let i=D(t).getItem(O(e,n));return i===null?r:JSON.parse(i)}catch{return r}}var M=(e,t,n)=>{if(!e)return;let r=(t,r=!1)=>{try{let i=D(t);if(!r){i.removeItem(O(e,n));return}let a=O(``,n);if(!a){i.clear();return}for(let e=i.length-1;e>=0;e--){let t=i.key(e);t?.startsWith(a)&&i.removeItem(t)}}catch{}};switch(e){case`__all__`:r(`localStorage`,!0),r(`sessionStorage`,!0);break;case`__all_sessionStorage__`:r(`sessionStorage`,!0);break;case`__all_localStorage__`:r(`localStorage`,!0);break;default:r(t===`localStorage`?`localStorage`:`sessionStorage`)}};export{r as C,n as S,h as _,D as a,i as b,v as c,S as d,x as f,m as g,g as h,A as i,y as l,p as m,k as n,E as o,_ as p,M as r,C as s,j as t,b as u,f as v,t as w,o as x,a as y}; |