@soei/flyweight 0.2.1 → 0.2.5

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/Flyweight.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@soei/util"),s=require("vue");let H=/(\d+|[+\-\*/]|%)/g,b={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,l)=>parseFloat(e)/100*l},v=(e,t)=>{let l;if(l=c.runer("match",e,H)){let h=l.length,i,r=0,o,n=[];for(;h--;)r=l.shift(),r in b?(i&&n.push(i),r==="%"&&(n.length=2),o=r):+r&&n.push(+r),n.length==2&&(n.push(t),console.log(n,o,"W"),i=b[o].apply(null,n),n.length=0);+i||(i=+n.pop()),e=i>>0}return e},B=e=>e.replace(/\w+\((.*)\)/g,"$1").replace(/(?=\D)0(?!\w)/,"0px");const z=(e,t)=>{const l=e.__vccOpts||e;for(const[h,i]of t)l[h]=i;return l};let T=e=>e==null||e==null,C=(...e)=>{console.info("::::FLYWEIGHT",...e)};const O={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:Number,default:0},height:{type:Number,default:100},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:Number,default:!1},left:{type:Number,default:!1},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null}},computed:{flyweight(){return this.$refs.flyweight}},data(){return{flyweights:[],actice:!1,Height:null,column:1,row:1,fwheight:10,count:0,task:[],realW:0,realH:0}},watch:{flys(e){this.count=e.length,this.re();let t=this.task.shift();t&&this.$nextTick(()=>{this.setview(t)})},view:{handler(e){this.setview(e)},immediate:!0,deep:!0},index(e){this.setindex(e)},top(e){this.flyweight.scrollTop=e},left(e){this.flyweight.scrollLeft=e}},mounted(){this.flyweights=[],this.$set||(this.$set=(e,t,l)=>{e[t]=l}),this.setindex(this.index);try{new ResizeObserver(()=>{this.re(),this.$emit("resize")}).observe(this.flyweight)}catch(e){C(e)}},methods:{trigger(e,t){this.lazyrun(()=>{c.isArray(e)||(e=[[e,t]]),c.each(e,(l,h)=>{this.$emit(h[0],T(h[1])?!0:h[1])})})},cheackflys(e){if(!this.flys.length)return e&&this.task.push(e),!0},setview(e){c.runer([this.cheackflys,t=>{t=t||{};let l=t.index||c.each(this.flys,(h,i,r,o)=>{if(i[r]==o)return h},t.picker,t.id);T(l)||this.setindex(l)}],this,e)},setindex(e){c.runer([this.cheackflys,({index:t})=>{this.$nextTick(()=>{let l=t/this.column>>0,h=this.fwheight;(this.flyweight.scrollTop/h>>0)+this.row-l-1>0||(this.flyweight.scrollTop=l*h,this.scroll())})}],this,{index:e})},lazyrun(e,t){clearTimeout(this.time),this.time=setTimeout(()=>{c.runer(e)},t||this.lazy)},run(e){let t=[],l=c.picker(e.target,"scrollTop=>top");c.merge(l,{height:this.realH,width:this.realW,index:l.top/this.fwheight>>0},this.space,"mix"),e.from||t.push(["onscroll",l]);let h=!1;c.each(this.flyweights,(i,r,o,n,d,u,a,f)=>{if(o=i/d>>0,a=o+n*(+(o<u%n)+(u/n>>0)),f=a*d+i%d,f>=this.count){h||(t.push(["onend"]),h=!0);return}r.index=a,r.top=a*this.fwheight,r.data=this.flys[f]},null,this.row,this.column,l.index),this.trigger(t),t=null},scroll(e){this.run(e||{target:this.flyweight,from:"space"})},re(){let e=this.count||this.flys.length,t=this.flyweights;if(!e)return t.length=e;this.count=e;let l=this.flyweight,h=c.picker(l,"clientHeight=>height,clientWidth=>width");this.$nextTick(()=>{let i=/true/.test(this.auto),[r,o]=this.offset,n=h.width,d=h.height,u=(v(this.width,n)||n)+r,a=v(this.height,d)+o;this.realH=a-o;let f=n/u>>0||1,p=d/a>>0;this.row=p+2,this.column=f,this.fwheight=a;let m,x=0;i?(u=(n/f>>0)-r/f*(f-1),m=r):(m=0,x=r/(f+1)*f+n%u/(f+1)>>0,u-=r),this.realW=u,this.Height=Math.ceil(e/f)*a;let w=Math.min(e,f*this.row),y=w-1,g,_,k;for(;w-- >0;)g=y-w,k=this.flys[g],l=t[g],p=g/f>>0,_=g%f,this.$set(t,g,{data:k,top:p*a,left:_*(u+m)+(_+1)*x,index:p});t.length=y+1;let S=[];d/a>y/f&&S.push(["onend"]),this.scroll(),S.push(["update:space",{row:(y/f>>0)+1,column:f,showrow:this.row,showcolumn:this.column}]),this.trigger(S)})}}};function F(e,t,l,h,i,r){return s.openBlock(),s.createElementBlock("div",{ref:"flyweight",class:s.normalizeClass(["flyweight",{"flyweight-active":i.actice}]),style:s.normalizeStyle({"--width":i.realW+"px","--height":i.realH+"px"}),onScroll:t[0]||(t[0]=(...o)=>r.scroll&&r.scroll(...o))},[s.createElementVNode("div",{class:"flyweight-all",style:s.normalizeStyle({"--flyweight-height":i.Height+"px"})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.flyweights,(o,n)=>(s.openBlock(),s.createElementBlock("div",{key:n,style:s.normalizeStyle({top:o.top+"px",left:o.left+"px"})},[s.renderSlot(e.$slots,"default",{data:o.data,index:o.index},void 0,!0)],4))),128))],4),i.flyweights.length?s.renderSlot(e.$slots,"end",{key:0},void 0,!0):s.createCommentVNode("",!0)],38)}const N=z(O,[["render",F],["__scopeId","data-v-292d1069"]]);const V={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},$$attrs:{},top:"0",right:"0",bottom:"0",left:"0"}},watch:{close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.offser(e)},deep:!0}},methods:{exec:B,isEmpty:c.isEmpty,isSimplyType:c.isSimplyType,change(e){c.isSimplyType(e)||(this.closecss=c.picker(e,"color=>--s-card-close-color,*"))},offser(e){e=c.isString(e)?e.split(/\s*(?:,|\s+)\s*/):e;let t=c.picker(e,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0);c.each(t,(l,h,i)=>{i[l]=h+"px"},t),c.merge(this,t,!0)}},mounted(){this.change(this.close),this.offser(this.offset)}},W={class:"card-title"},$={class:"card-content"};function j(e,t,l,h,i,r){return s.openBlock(),s.createElementBlock("div",{class:"card",style:s.normalizeStyle({"--card-background-color":l.background,"--card-bw":l.border,"--card-height":r.exec(l.height),"--card-width":r.exec(l.width),"--top":i.top,"--right":i.right,"--bottom":i.bottom,"--left":i.left})},[s.renderSlot(e.$slots,"default",{},()=>[s.renderSlot(e.$slots,"title",{},()=>[s.createElementVNode("div",W,[s.createTextVNode(s.toDisplayString(l.show||l.title)+" ",1),s.createElementVNode("div",{class:s.normalizeClass(["card-close",{hide:r.isSimplyType(l.close)?!l.close:!1}]),style:s.normalizeStyle(i.closecss),onClick:t[0]||(t[0]=o=>e.$emit("close"))},null,6)])],!0),s.renderSlot(e.$slots,"content",{},()=>[s.createElementVNode("div",$,[s.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const E=z(V,[["render",j],["__scopeId","data-v-84f183dc"]]),I=[N,E],L={install(e){I.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=E;exports.Flyweight=N;exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@soei/util"),i=require("vue");let F=/(\d+|[+\-\*/]|%)/g,E={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,s)=>parseFloat(e)/100*s},x=(e,t)=>{let s;if(s=c.runer("match",e,F)){let n=s.length,r,l=0,h,o=[];for(;n--;)l=s.shift(),l in E?(r&&o.push(r),l==="%"&&(o.length=2),h=l):+l&&o.push(+l),o.length==2&&(o.push(t),r=E[h].apply(null,o),o.length=0);+r||(r=+o.pop()),e=r>>0}return e},N=e=>(e+"").replace(/\w+\((.*)\)/g,"$1").replace(/(?=\s+|^)(\d+(\.\d+)*)(?!(?:\.)*\d|%|\w)/g,"$1px");const H=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s};let C=e=>e==null||e==null,W=(...e)=>{console.info("::::FLYWEIGHT",...e)};const I={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:Number,default:0},height:{type:Number,default:100},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:Number,default:!1},left:{type:Number,default:!1},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null},padding:{type:Boolean,default:!1}},computed:{flyweight(){return this.$refs.flyweight}},data(){return{flyweights:[],actice:!1,Size:null,column:1,row:1,spacex:10,count:0,task:[],realW:0,realH:0}},watch:{flys(e){this.count=e.length,this.rebuild();let t=this.task.shift();t&&this.$nextTick(()=>{this.setview(t)})},view:{handler(e){this.setview(e)},immediate:!0,deep:!0},index(e){this.setindex(e)},top(e){this.flyweight.scrollTop=e},left(e){this.flyweight.scrollLeft=e}},mounted(){this.flyweights=[],this.$set||(this.$set=(e,t,s)=>{e[t]=s}),this.setindex(this.index);try{new ResizeObserver(()=>{this.rebuild(),this.$emit("resize")}).observe(this.flyweight)}catch(e){W(e)}this.scrollx=c.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule=this.scrollx?"clientHeight=>width,clientWidth=>height":"clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:N,trigger(e,t){this.lazyrun(()=>{c.isArray(e)||(e=[[e,t]]),c.each(e,(s,n)=>{this.$emit(n[0],C(n[1])?!0:n[1])})})},cheackflys(e){if(!this.flys.length)return e&&this.task.push(e),!0},setview(e){c.runer([this.cheackflys,t=>{t=t||{};let s=t.index||c.each(this.flys,(n,r,l,h)=>{if(r[l]==h)return n},t.picker,t.id);C(s)||this.setindex(s)}],this,e)},setindex(e){c.runer([this.cheackflys,({index:t})=>{this.selectIndex=t,this.$nextTick(()=>{let s=t/this.column>>0,n=this.spacex;(this.flyweight[this.direction]/n>>0)+this.row-s-1>0||(this.flyweight[this.direction]=s*n,this.scroll())})}],this,{index:e})},lazyrun(e,t){clearTimeout(this.time),this.time=setTimeout(()=>{c.runer(e)},t||this.lazy)},run(e){let t=[],s=c.picker(e.target,this.scrollx?"scrollLeft=>top":"scrollTop=>top");c.merge(s,{height:this.realH,width:this.realW,index:s.top/this.spacex>>0},this.space,"mix"),e.from||t.push(["onscroll",s]);let n=!1;c.each(this.flyweights,(r,l,h,o,f,p,u,d,a)=>{if(h=r/f>>0,d=h+o*(+(h<p%o)+(p/o>>0)),a=d*f+r%f,a>=this.count){n||(t.push(["onend"]),n=!0);return}l.index=d,l.i=a,l.data=this.flys[a];let g=[d*this.spacex+l.x,l.space];u&&g.reverse(),l.top=g[0],l.left=g[1]},null,this.row,this.column,s.index,this.scrollx),this.trigger(t),t=null},scroll(e){this.run(e||{target:this.flyweight,from:"space"})},rebuild(){let e=this.count||this.flys.length,t=this.flyweights;if(!e)return t.length=e;this.count=e;let s=this.scrollx,n=this.flyweight,r=c.picker(n,this.BoxRule);this.$nextTick(()=>{let l=/true/.test(this.auto),[h,o]=this.offset,f=r.width,p=r.height,u=(x(this.width,f)||f)+h,d=x(this.height,p)+o,a=f/(s?d:u)>>0||1,g=p/(s?u:d)>>0,_=this.padding;this.row=g+2,this.column=a;let m,S=0,k,b,z;s?(m=0,u=x(this.width,p)||p,b=u,k=u-h,z=y=>y*d+(y+1)*o,d=x(this.height,f)||f,d+=o):(l?(u=(f-h*(a+2*_-1))/a,m=!_*h,S=_*h):(m=0,S=(f%u+h*a)/(a+1)>>0,u-=h),z=y=>y*(u+m)+(y+1)*S,k=u,b=d),this.realH=d-o,this.realW=k,this.spacex=b,this.Size=Math.ceil(e/a)*this.spacex;let T=Math.min(e,a*this.row),w=T-1,v,$=0;for(;T-- >0;)v=w-T,$=v%a,this.$set(t,v,{x:h,y:o,width:u,height:d-o,space:z($),data:{}});t.length=w+1;let B=[];p/this.spacex>w/a&&B.push(["onend"]),this.flyweight[this.direction]=0,this.$nextTick(()=>{this.setindex(this.selectIndex||0)}),this.scroll(),B.push(["update:space",{row:(w/a>>0)+1,column:a,showrow:this.row,showcolumn:this.column}]),this.trigger(B)})}}},R={class:"flyweight-all"};function V(e,t,s,n,r,l){return i.openBlock(),i.createElementBlock("div",{ref:"flyweight",class:i.normalizeClass(["flyweight",{"flyweight-active":r.actice}]),style:i.normalizeStyle({"--width":l.exec(r.realW),"--height":l.exec(r.realH),"--flyweight-content":l.exec(r.Size)}),onScroll:t[0]||(t[0]=(...h)=>l.scroll&&l.scroll(...h))},[i.createElementVNode("div",R,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.flyweights,(h,o)=>(i.openBlock(),i.createElementBlock("div",{key:o,style:i.normalizeStyle({top:h.top+"px",left:h.left+"px"})},[i.renderSlot(e.$slots,"default",i.mergeProps({ref_for:!0},h),void 0,!0)],4))),128))]),r.flyweights.length?i.renderSlot(e.$slots,"end",{key:0},void 0,!0):i.createCommentVNode("",!0)],38)}const L=H(I,[["render",V],["__scopeId","data-v-00424b62"]]);const j={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},style:{},default:{top:"0px",right:"0px",bottom:"0px",left:"0px",height:"100%",width:"100%",background:"",border:"1px"}}},computed:{style(){let e={};return this.margin(this.offset),c.each(["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],(t,s)=>{this.css(e,s)}),e}},watch:{close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.margin(e)},deep:!0}},methods:{exec:N,isEmpty:c.isEmpty,isSimplyType:c.isSimplyType,tolower(e,t){return t&&(e=e.replace(/[a-z]/g,"")),e.toLowerCase()},css(e,t){let s=this.tolower(t),n=this[s]||this.default[s];!n||this.default[s]==n||(e["--"+this.tolower(t,!0)]=N(n))},change(e){c.isSimplyType(e)||(this.closecss=c.picker(e,"color=>--s-card-close-color,*"))},margin(e){c.merge(this,c.picker(c.isString(e)?e.split(/\s*(?:,|\s+)\s*/):e,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0),!0)}},mounted(){this.change(this.close)}},A={class:"card-title"},M={class:"card-content"};function q(e,t,s,n,r,l){return i.openBlock(),i.createElementBlock("div",{class:"card",style:i.normalizeStyle(l.style)},[i.renderSlot(e.$slots,"default",{},()=>[i.renderSlot(e.$slots,"title",{},()=>[i.createElementVNode("div",A,[i.createTextVNode(i.toDisplayString(s.show||s.title)+" ",1),i.createElementVNode("div",{class:i.normalizeClass(["card-close",{hide:l.isSimplyType(s.close)?!s.close:!1}]),style:i.normalizeStyle(r.closecss),onClick:t[0]||(t[0]=h=>e.$emit("close"))},null,6)])],!0),i.renderSlot(e.$slots,"content",{},()=>[i.createElementVNode("div",M,[i.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const O=H(j,[["render",q],["__scopeId","data-v-def66c95"]]),G=[L,O],P={install(e){G.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=O;exports.Flyweight=L;exports.default=P;
package/Flyweight.js CHANGED
@@ -1,31 +1,31 @@
1
- import { runer as w, isArray as L, each as m, picker as k, merge as $, isEmpty as j, isSimplyType as O, isString as A } from "@soei/util";
2
- import { openBlock as _, createElementBlock as x, normalizeClass as E, normalizeStyle as g, createElementVNode as b, Fragment as B, renderList as V, renderSlot as d, createCommentVNode as D, createTextVNode as M, toDisplayString as R } from "vue";
3
- let G = /(\d+|[+\-\*/]|%)/g, C = {
4
- "+": (t, e) => t + e,
5
- "-": (t, e) => t - e,
6
- "*": (t, e) => t * e,
7
- "/": (t, e) => t / e,
8
- "%": (t, e, s) => parseFloat(t) / 100 * s
9
- }, F = (t, e) => {
1
+ import { runer as y, isArray as G, each as _, picker as z, merge as A, isEmpty as M, isSimplyType as I, isString as D } from "@soei/util";
2
+ import { openBlock as b, createElementBlock as k, normalizeClass as j, normalizeStyle as T, createElementVNode as S, Fragment as P, renderList as U, renderSlot as f, mergeProps as X, createCommentVNode as Y, createTextVNode as q, toDisplayString as J } from "vue";
3
+ let K = /(\d+|[+\-\*/]|%)/g, R = {
4
+ "+": (e, t) => e + t,
5
+ "-": (e, t) => e - t,
6
+ "*": (e, t) => e * t,
7
+ "/": (e, t) => e / t,
8
+ "%": (e, t, s) => parseFloat(e) / 100 * s
9
+ }, x = (e, t) => {
10
10
  let s;
11
- if (s = w("match", t, G)) {
12
- let h = s.length, i, l = 0, n, r = [];
11
+ if (s = y("match", e, K)) {
12
+ let h = s.length, l, i = 0, r, n = [];
13
13
  for (; h--; )
14
- l = s.shift(), l in C ? (i && r.push(i), l === "%" && (r.length = 2), n = l) : +l && r.push(+l), r.length == 2 && (r.push(e), console.log(r, n, "W"), i = C[n].apply(null, r), r.length = 0);
15
- +i || (i = +r.pop()), t = i >> 0;
14
+ i = s.shift(), i in R ? (l && n.push(l), i === "%" && (n.length = 2), r = i) : +i && n.push(+i), n.length == 2 && (n.push(t), l = R[r].apply(null, n), n.length = 0);
15
+ +l || (l = +n.pop()), e = l >> 0;
16
16
  }
17
- return t;
18
- }, U = (t) => t.replace(/\w+\((.*)\)/g, "$1").replace(/(?=\D)0(?!\w)/, "0px");
19
- const I = (t, e) => {
20
- const s = t.__vccOpts || t;
21
- for (const [h, i] of e)
22
- s[h] = i;
17
+ return e;
18
+ }, W = (e) => (e + "").replace(/\w+\((.*)\)/g, "$1").replace(/(?=\s+|^)(\d+(\.\d+)*)(?!(?:\.)*\d|%|\w)/g, "$1px");
19
+ const V = (e, t) => {
20
+ const s = e.__vccOpts || e;
21
+ for (const [h, l] of t)
22
+ s[h] = l;
23
23
  return s;
24
24
  };
25
- let W = (t) => t == null || t == null, Y = (...t) => {
26
- console.info("::::FLYWEIGHT", ...t);
25
+ let E = (e) => e == null || e == null, Q = (...e) => {
26
+ console.info("::::FLYWEIGHT", ...e);
27
27
  };
28
- const q = {
28
+ const Z = {
29
29
  name: "Flyweight",
30
30
  props: {
31
31
  flys: {
@@ -71,6 +71,10 @@ const q = {
71
71
  space: {
72
72
  type: Object,
73
73
  default: () => null
74
+ },
75
+ padding: {
76
+ type: Boolean,
77
+ default: !1
74
78
  }
75
79
  },
76
80
  computed: {
@@ -82,10 +86,10 @@ const q = {
82
86
  return {
83
87
  flyweights: [],
84
88
  actice: !1,
85
- Height: null,
89
+ Size: null,
86
90
  column: 1,
87
91
  row: 1,
88
- fwheight: 10,
92
+ spacex: 10,
89
93
  count: 0,
90
94
  task: [],
91
95
  realW: 0,
@@ -93,176 +97,184 @@ const q = {
93
97
  };
94
98
  },
95
99
  watch: {
96
- flys(t) {
97
- this.count = t.length, this.re();
98
- let e = this.task.shift();
99
- e && this.$nextTick(() => {
100
- this.setview(e);
100
+ flys(e) {
101
+ this.count = e.length, this.rebuild();
102
+ let t = this.task.shift();
103
+ t && this.$nextTick(() => {
104
+ this.setview(t);
101
105
  });
102
106
  },
103
107
  view: {
104
- handler(t) {
105
- this.setview(t);
108
+ handler(e) {
109
+ this.setview(e);
106
110
  },
107
111
  immediate: !0,
108
112
  deep: !0
109
113
  },
110
- index(t) {
111
- this.setindex(t);
114
+ index(e) {
115
+ this.setindex(e);
112
116
  },
113
- top(t) {
114
- this.flyweight.scrollTop = t;
117
+ top(e) {
118
+ this.flyweight.scrollTop = e;
115
119
  },
116
- left(t) {
117
- this.flyweight.scrollLeft = t;
120
+ left(e) {
121
+ this.flyweight.scrollLeft = e;
118
122
  }
119
123
  },
120
124
  mounted() {
121
- this.flyweights = [], this.$set || (this.$set = (t, e, s) => {
122
- t[e] = s;
125
+ this.flyweights = [], this.$set || (this.$set = (e, t, s) => {
126
+ e[t] = s;
123
127
  }), this.setindex(this.index);
124
128
  try {
125
129
  new ResizeObserver(() => {
126
- this.re(), this.$emit("resize");
130
+ this.rebuild(), this.$emit("resize");
127
131
  }).observe(this.flyweight);
128
- } catch (t) {
129
- Y(t);
132
+ } catch (e) {
133
+ Q(e);
130
134
  }
135
+ this.scrollx = y("hasAttribute", this.flyweight, "scroll-x"), this.BoxRule = this.scrollx ? "clientHeight=>width,clientWidth=>height" : "clientHeight=>height,clientWidth=>width", this.direction = this.scrollx ? "scrollLeft" : "scrollTop";
131
136
  },
132
137
  methods: {
133
- trigger(t, e) {
138
+ exec: W,
139
+ trigger(e, t) {
134
140
  this.lazyrun(() => {
135
- L(t) || (t = [[t, e]]), m(t, (s, h) => {
136
- this.$emit(h[0], W(h[1]) ? !0 : h[1]);
141
+ G(e) || (e = [[e, t]]), _(e, (s, h) => {
142
+ this.$emit(h[0], E(h[1]) ? !0 : h[1]);
137
143
  });
138
144
  });
139
145
  },
140
- cheackflys(t) {
146
+ cheackflys(e) {
141
147
  if (!this.flys.length)
142
- return t && this.task.push(t), !0;
148
+ return e && this.task.push(e), !0;
143
149
  },
144
- setview(t) {
145
- w([this.cheackflys, (e) => {
146
- e = e || {};
147
- let s = e.index || m(this.flys, (h, i, l, n) => {
148
- if (i[l] == n)
150
+ setview(e) {
151
+ y([this.cheackflys, (t) => {
152
+ t = t || {};
153
+ let s = t.index || _(this.flys, (h, l, i, r) => {
154
+ if (l[i] == r)
149
155
  return h;
150
- }, e.picker, e.id);
151
- W(s) || this.setindex(s);
152
- }], this, t);
153
- },
154
- setindex(t) {
155
- w([this.cheackflys, ({ index: e }) => {
156
- this.$nextTick(() => {
157
- let s = e / this.column >> 0, h = this.fwheight;
158
- (this.flyweight.scrollTop / h >> 0) + this.row - s - 1 > 0 || (this.flyweight.scrollTop = s * h, this.scroll());
156
+ }, t.picker, t.id);
157
+ E(s) || this.setindex(s);
158
+ }], this, e);
159
+ },
160
+ setindex(e) {
161
+ y([this.cheackflys, ({ index: t }) => {
162
+ this.selectIndex = t, this.$nextTick(() => {
163
+ let s = t / this.column >> 0, h = this.spacex;
164
+ (this.flyweight[this.direction] / h >> 0) + this.row - s - 1 > 0 || (this.flyweight[this.direction] = s * h, this.scroll());
159
165
  });
160
- }], this, { index: t });
166
+ }], this, { index: e });
161
167
  },
162
- lazyrun(t, e) {
168
+ lazyrun(e, t) {
163
169
  clearTimeout(this.time), this.time = setTimeout(() => {
164
- w(t);
165
- }, e || this.lazy);
170
+ y(e);
171
+ }, t || this.lazy);
166
172
  },
167
- run(t) {
168
- let e = [], s = k(t.target, "scrollTop=>top");
169
- $(s, {
173
+ run(e) {
174
+ let t = [], s = z(e.target, this.scrollx ? "scrollLeft=>top" : "scrollTop=>top");
175
+ A(s, {
170
176
  height: this.realH,
171
177
  width: this.realW,
172
178
  /* 显示区域第一行的索引 */
173
- index: s.top / this.fwheight >> 0
179
+ index: s.top / this.spacex >> 0
174
180
  // ...this
175
- }, this.space, "mix"), t.from || e.push(["onscroll", s]);
181
+ }, this.space, "mix"), e.from || t.push(["onscroll", s]);
176
182
  let h = !1;
177
- m(
183
+ _(
178
184
  this.flyweights,
179
- (i, l, n, r, u, f, c, o) => {
180
- if (n = i / u >> 0, c = n + r * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
181
- (+(n < f % r) + (f / r >> 0)), o = c * u + i % u, o >= this.count) {
182
- h || (e.push(["onend"]), h = !0);
185
+ (l, i, r, n, u, d, c, a, o) => {
186
+ if (r = l / u >> 0, a = r + n * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
187
+ (+(r < d % n) + (d / n >> 0)), o = a * u + l % u, o >= this.count) {
188
+ h || (t.push(["onend"]), h = !0);
183
189
  return;
184
190
  }
185
- l.index = c, l.top = c * this.fwheight, l.data = this.flys[o];
191
+ i.index = a, i.i = o, i.data = this.flys[o];
192
+ let p = [
193
+ /* top */
194
+ a * this.spacex + i.x,
195
+ /* left */
196
+ i.space
197
+ ];
198
+ c && p.reverse(), i.top = p[0], i.left = p[1];
186
199
  },
187
200
  null,
188
201
  this.row,
189
202
  this.column,
190
203
  /* 显示区域第一行的索引 */
191
- s.index
192
- ), this.trigger(e), e = null;
193
- },
194
- scroll(t) {
195
- this.run(t || { target: this.flyweight, from: "space" });
196
- },
197
- re() {
198
- let t = this.count || this.flys.length, e = this.flyweights;
199
- if (!t)
200
- return e.length = t;
201
- this.count = t;
202
- let s = this.flyweight, h = k(s, "clientHeight=>height,clientWidth=>width");
204
+ s.index,
205
+ this.scrollx
206
+ ), this.trigger(t), t = null;
207
+ },
208
+ scroll(e) {
209
+ this.run(e || { target: this.flyweight, from: "space" });
210
+ },
211
+ rebuild() {
212
+ let e = this.count || this.flys.length, t = this.flyweights;
213
+ if (!e)
214
+ return t.length = e;
215
+ this.count = e;
216
+ let s = this.scrollx, h = this.flyweight, l = z(h, this.BoxRule);
203
217
  this.$nextTick(() => {
204
- let i = /true/.test(this.auto), [l, n] = this.offset, r = h.width, u = h.height, f = (F(this.width, r) || r) + l, c = F(this.height, u) + n;
205
- this.realH = c - n;
206
- let o = r / f >> 0 || 1, p = u / c >> 0;
207
- this.row = p + 2, this.column = o, this.fwheight = c;
208
- let v, H = 0;
209
- i ? (f = (r / o >> 0) - l / o * (o - 1), v = l) : (v = 0, H = l / (o + 1) * o + r % f / (o + 1) >> 0, f -= l), this.realW = f, this.Height = Math.ceil(t / o) * c;
210
- let S = Math.min(t, o * this.row), y = S - 1, a, T, N;
211
- for (; S-- > 0; )
212
- a = y - S, N = this.flys[a], s = e[a], p = a / o >> 0, T = a % o, this.$set(e, a, {
213
- data: N,
214
- top: p * c,
215
- left: T * (f + v) + (T + 1) * H,
216
- index: p
218
+ let i = /true/.test(this.auto), [r, n] = this.offset, u = l.width, d = l.height, c = (x(this.width, u) || u) + r, a = x(this.height, d) + n, o = u / (s ? a : c) >> 0 || 1, p = d / (s ? c : a) >> 0, v = this.padding;
219
+ this.row = p + 2, this.column = o;
220
+ let w, $ = 0, N, B, H;
221
+ s ? (w = 0, c = x(this.width, d) || d, B = c, N = c - r, H = (g) => (
222
+ /* 计算左偏移量 */
223
+ g * a + (g + 1) * n
224
+ ), a = x(this.height, u) || u, a += n) : (i ? (c = (u - r * (o + 2 * v - 1)) / o, w = !v * r, $ = v * r) : (w = 0, $ = (u % c + r * o) / (o + 1) >> 0, c -= r), H = (g) => g * (c + w) + (g + 1) * $, N = c, B = a), this.realH = a - n, this.realW = N, this.spacex = B, this.Size = Math.ceil(e / o) * this.spacex;
225
+ let L = Math.min(e, o * this.row), m = L - 1, C, F = 0;
226
+ for (; L-- > 0; )
227
+ C = m - L, F = C % o, this.$set(t, C, {
228
+ x: r,
229
+ y: n,
230
+ width: c,
231
+ height: a - n,
232
+ space: H(F),
233
+ data: {}
217
234
  });
218
- e.length = y + 1;
219
- let z = [];
220
- u / c > y / o && z.push(["onend"]), this.scroll(), z.push(["update:space", {
221
- row: (y / o >> 0) + 1,
235
+ t.length = m + 1;
236
+ let O = [];
237
+ d / this.spacex > m / o && O.push(["onend"]), this.flyweight[this.direction] = 0, this.$nextTick(() => {
238
+ this.setindex(this.selectIndex || 0);
239
+ }), this.scroll(), O.push(["update:space", {
240
+ row: (m / o >> 0) + 1,
222
241
  column: o,
223
242
  showrow: this.row,
224
243
  showcolumn: this.column
225
- }]), this.trigger(z);
244
+ }]), this.trigger(O);
226
245
  });
227
246
  }
228
247
  }
229
- };
230
- function J(t, e, s, h, i, l) {
231
- return _(), x("div", {
248
+ }, ee = { class: "flyweight-all" };
249
+ function te(e, t, s, h, l, i) {
250
+ return b(), k("div", {
232
251
  ref: "flyweight",
233
- class: E(["flyweight", {
234
- "flyweight-active": i.actice
252
+ class: j(["flyweight", {
253
+ "flyweight-active": l.actice
235
254
  }]),
236
- style: g({
237
- "--width": i.realW + "px",
238
- "--height": i.realH + "px"
255
+ style: T({
256
+ "--width": i.exec(l.realW),
257
+ "--height": i.exec(l.realH),
258
+ "--flyweight-content": i.exec(l.Size)
239
259
  }),
240
- onScroll: e[0] || (e[0] = (...n) => l.scroll && l.scroll(...n))
260
+ onScroll: t[0] || (t[0] = (...r) => i.scroll && i.scroll(...r))
241
261
  }, [
242
- b("div", {
243
- class: "flyweight-all",
244
- style: g({
245
- "--flyweight-height": i.Height + "px"
246
- })
247
- }, [
248
- (_(!0), x(B, null, V(i.flyweights, (n, r) => (_(), x("div", {
249
- key: r,
250
- style: g({
251
- top: n.top + "px",
252
- left: n.left + "px"
262
+ S("div", ee, [
263
+ (b(!0), k(P, null, U(l.flyweights, (r, n) => (b(), k("div", {
264
+ key: n,
265
+ style: T({
266
+ top: r.top + "px",
267
+ left: r.left + "px"
253
268
  })
254
269
  }, [
255
- d(t.$slots, "default", {
256
- data: n.data,
257
- index: n.index
258
- }, void 0, !0)
270
+ f(e.$slots, "default", X({ ref_for: !0 }, r), void 0, !0)
259
271
  ], 4))), 128))
260
- ], 4),
261
- i.flyweights.length ? d(t.$slots, "end", { key: 0 }, void 0, !0) : D("", !0)
272
+ ]),
273
+ l.flyweights.length ? f(e.$slots, "end", { key: 0 }, void 0, !0) : Y("", !0)
262
274
  ], 38);
263
275
  }
264
- const K = /* @__PURE__ */ I(q, [["render", J], ["__scopeId", "data-v-292d1069"]]);
265
- const P = {
276
+ const se = /* @__PURE__ */ V(Z, [["render", te], ["__scopeId", "data-v-00424b62"]]);
277
+ const ie = {
266
278
  name: "Card",
267
279
  // inheritAttrs: false,
268
280
  props: {
@@ -302,88 +314,100 @@ const P = {
302
314
  data() {
303
315
  return {
304
316
  closecss: {},
305
- $$attrs: {},
306
- top: "0",
307
- right: "0",
308
- bottom: "0",
309
- left: "0"
317
+ style: {},
318
+ default: {
319
+ top: "0px",
320
+ right: "0px",
321
+ bottom: "0px",
322
+ left: "0px",
323
+ height: "100%",
324
+ width: "100%",
325
+ background: "",
326
+ border: "1px"
327
+ }
310
328
  };
311
329
  },
330
+ computed: {
331
+ style() {
332
+ let e = {};
333
+ return this.margin(this.offset), _(["BackGround", "BordeR", "Height", "Width", "Top", "Right", "Bottom", "Left"], (t, s) => {
334
+ this.css(e, s);
335
+ }), e;
336
+ }
337
+ },
312
338
  watch: {
313
339
  close: {
314
- handler(t) {
315
- this.change(t);
340
+ handler(e) {
341
+ this.change(e);
316
342
  },
317
343
  deep: !0
318
344
  },
319
345
  offset: {
320
- handler(t) {
321
- this.offser(t);
346
+ handler(e) {
347
+ this.margin(e);
322
348
  },
323
349
  deep: !0
324
350
  }
325
351
  },
326
352
  methods: {
327
- exec: U,
328
- isEmpty: j,
329
- isSimplyType: O,
330
- change(t) {
331
- O(t) || (this.closecss = k(t, "color=>--s-card-close-color,*"));
332
- },
333
- offser(t) {
334
- t = A(t) ? t.split(/\s*(?:,|\s+)\s*/) : t;
335
- let e = k(t, "0=>top,1|0=>right,2|0=>bottom,3|1|0=>left", !0);
336
- m(e, (s, h, i) => {
337
- i[s] = h + "px";
338
- }, e), $(this, e, !0);
353
+ exec: W,
354
+ isEmpty: M,
355
+ isSimplyType: I,
356
+ tolower(e, t) {
357
+ return t && (e = e.replace(/[a-z]/g, "")), e.toLowerCase();
358
+ },
359
+ css(e, t) {
360
+ let s = this.tolower(t), h = this[s] || this.default[s];
361
+ !h || this.default[s] == h || (e["--" + this.tolower(t, !0)] = W(h));
362
+ },
363
+ change(e) {
364
+ I(e) || (this.closecss = z(e, "color=>--s-card-close-color,*"));
365
+ },
366
+ margin(e) {
367
+ A(this, z(
368
+ D(e) ? e.split(/\s*(?:,|\s+)\s*/) : e,
369
+ "0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",
370
+ !0
371
+ ), !0);
339
372
  }
340
373
  },
341
374
  mounted() {
342
- this.change(this.close), this.offser(this.offset);
375
+ this.change(this.close);
343
376
  }
344
- }, Q = { class: "card-title" }, X = { class: "card-content" };
345
- function Z(t, e, s, h, i, l) {
346
- return _(), x("div", {
377
+ }, le = { class: "card-title" }, re = { class: "card-content" };
378
+ function he(e, t, s, h, l, i) {
379
+ return b(), k("div", {
347
380
  class: "card",
348
- style: g({
349
- "--card-background-color": s.background,
350
- "--card-bw": s.border,
351
- "--card-height": l.exec(s.height),
352
- "--card-width": l.exec(s.width),
353
- "--top": i.top,
354
- "--right": i.right,
355
- "--bottom": i.bottom,
356
- "--left": i.left
357
- })
381
+ style: T(i.style)
358
382
  }, [
359
- d(t.$slots, "default", {}, () => [
360
- d(t.$slots, "title", {}, () => [
361
- b("div", Q, [
362
- M(R(s.show || s.title) + " ", 1),
363
- b("div", {
364
- class: E(["card-close", { hide: l.isSimplyType(s.close) ? !s.close : !1 }]),
365
- style: g(i.closecss),
366
- onClick: e[0] || (e[0] = (n) => t.$emit("close"))
383
+ f(e.$slots, "default", {}, () => [
384
+ f(e.$slots, "title", {}, () => [
385
+ S("div", le, [
386
+ q(J(s.show || s.title) + " ", 1),
387
+ S("div", {
388
+ class: j(["card-close", { hide: i.isSimplyType(s.close) ? !s.close : !1 }]),
389
+ style: T(l.closecss),
390
+ onClick: t[0] || (t[0] = (r) => e.$emit("close"))
367
391
  }, null, 6)
368
392
  ])
369
393
  ], !0),
370
- d(t.$slots, "content", {}, () => [
371
- b("div", X, [
372
- d(t.$slots, "inner", {}, void 0, !0)
394
+ f(e.$slots, "content", {}, () => [
395
+ S("div", re, [
396
+ f(e.$slots, "inner", {}, void 0, !0)
373
397
  ])
374
398
  ], !0)
375
399
  ], !0)
376
400
  ], 4);
377
401
  }
378
- const tt = /* @__PURE__ */ I(P, [["render", Z], ["__scopeId", "data-v-84f183dc"]]), et = [K, tt], lt = {
379
- install(t) {
380
- et.forEach((e) => {
381
- t.component("S" + e.name, e), t.component(e.name + "S", e);
402
+ const ne = /* @__PURE__ */ V(ie, [["render", he], ["__scopeId", "data-v-def66c95"]]), oe = [se, ne], ue = {
403
+ install(e) {
404
+ oe.forEach((t) => {
405
+ e.component("S" + t.name, t), e.component(t.name + "S", t);
382
406
  });
383
407
  }
384
408
  };
385
409
  export {
386
- tt as Card,
387
- K as Flyweight,
388
- lt as default
410
+ ne as Card,
411
+ se as Flyweight,
412
+ ue as default
389
413
  };
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # 享元模式 [![Latest Version on NPM](https://img.shields.io/npm/v/@soei/flyweight?label=npm&style=flat-square)](https://npmjs.com/package/@soei/flyweight) [![Software License](https://img.shields.io/badge/license-ISC-brightgreen?label=&style=flat-square)](LICENSE.md) [![npm](https://img.shields.io/npm/dw/@soei/flyweight?label=Downloads&style=flat-square)](https://www.npmjs.com/package/@soei/flyweight) [![npm bundle size](https://img.shields.io/bundlephobia/min/%40soei%2Futil?label=Size&color=&style=flat-square)](https://npmjs.com/package/@soei/flyweight)
4
4
 
5
- [![安装](https://img.shields.io/badge/-@soei-ae8aff?style=flat-square)![NPM Downloads by package author](https://img.shields.io/npm-stat/dw/soeiz?style=flat-square)](https://npmjs.com/package/@soei/flyweight)
5
+ [![安装](https://img.shields.io/badge/-@soei-ae8aff?style=flat-square)![NPM Downloads by package author](https://img.shields.io/npm-stat/dw/soeiz?style=flat-square)](https://npmjs.com/package/@soei/flyweight)
6
6
 
7
7
  ```html
8
8
  <div style="height:100px;width:300px;">
@@ -20,6 +20,98 @@ npm i @soei/flyweight
20
20
 
21
21
  ```
22
22
 
23
+ ## `使用 <s-flyweight ...> `
24
+
25
+ ```html
26
+ <!-- scroll-x 横向滚动, 无[scroll-x]属性这是上下滚动 -->
27
+ <s-flyweight scroll-x></s-flyweight>
28
+
29
+ <!-- hover-scroll 鼠标移入显示滚动条样式 -->
30
+ <s-flyweight hover-scroll class="your-class"></s-flyweight>
31
+ <s-card hover-scroll class="your-class"></s-card>
32
+ <style lang="scss">
33
+ .your-class {
34
+ /* 设置滚动条颜色 */
35
+ --scrollbar-color: red;
36
+ /* 设置滚动条宽度 */
37
+ --scrollbar-width: 10px;
38
+ }
39
+ </style>
40
+
41
+ <!-- 设置高度 -->
42
+ <s-flyweight height="100% - 10px"></s-flyweight>
43
+
44
+ <!-- 设置宽度 -->
45
+ <s-flyweight width="100% - 10px"></s-flyweight>
46
+ <s-flyweight :width="`100% - 10px`"></s-flyweight>
47
+ ```
48
+
49
+ ## `使用 <s-card ...> `
50
+
51
+ ```html
52
+ <!-- auto-scroll 默认显示滚动条样式 -->
53
+ <s-card auto-scroll class="your-class"></s-card>
54
+ <!-- hover-scroll 鼠标移入显示滚动条样式 -->
55
+ <s-card hover-scroll class="your-class"></s-card>
56
+ <style lang="scss">
57
+ .your-class {
58
+ /* 设置滚动条颜色 */
59
+ --scrollbar-color: red;
60
+ /* 设置滚动条宽度 */
61
+ --scrollbar-width: 10px;
62
+ }
63
+ </style>
64
+
65
+ <!-- 设置高度 -->
66
+ <s-card height="100% - 10px"></s-card>
67
+
68
+ <!-- 设置边距 -->
69
+ <s-card offset="10px"></s-card>
70
+ <s-card :offset="[10]"></s-card>
71
+
72
+ <!-- 带删除的卡片 -->
73
+ <s-card :close="true" #content @close="close"></s-card>
74
+ <!-- 设置删除按钮颜色 -->
75
+ <s-card
76
+ :close="{
77
+ color: 'red'
78
+ }"
79
+ #content
80
+ @close="close"
81
+ ></s-card>
82
+
83
+ <s-card :close="true" @close="close">
84
+ <template #content>呈现内容</template>
85
+ </s-card>
86
+ <script setup>
87
+ let close = () => {
88
+ console.log("close");
89
+ };
90
+ </script>
91
+
92
+ <!-- 设置标题 -->
93
+ <s-card
94
+ title="标题"
95
+ class="flyweight"
96
+
97
+ // ** 布局 **
98
+ flex row center column
99
+
100
+ // ** 边距 **
101
+ offset="20, 0, 10, 0"
102
+
103
+ // ** 是否显示关闭按钮 **
104
+ :close="true"
105
+ @close="close"
106
+
107
+ // ** 插槽 **
108
+ [#content, #inner, #default]
109
+ >
110
+ </s-card>
111
+ ```
112
+
113
+ ````
114
+
23
115
  `Vue3` 引入方式
24
116
 
25
117
  ```html
@@ -30,7 +122,7 @@ npm i @soei/flyweight
30
122
  <style>
31
123
  @import "@soei/flyweight/dist/style.css";
32
124
  </style>
33
- ```
125
+ ````
34
126
 
35
127
  ```javascript
36
128
  // main.js
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@soei/flyweight",
3
3
  "private": false,
4
4
  "description": "Vue组件, 列表de享元模式~减少DOM节点 flyweight, Card组件",
5
- "version": "0.2.1",
5
+ "version": "0.2.5",
6
6
  "type": "module",
7
7
  "main": "Flyweight.cjs",
8
8
  "module": "Flyweight.js",
@@ -24,7 +24,9 @@
24
24
  "Flyweight",
25
25
  "享元模式",
26
26
  "List",
27
- "列表展示"
27
+ "列表展示",
28
+ "Card",
29
+ "卡片展示"
28
30
  ],
29
31
  "author": "soei | alwbg@163.com",
30
32
  "license": "ISC"
package/style.css CHANGED
@@ -1 +1 @@
1
- .flyweight[data-v-292d1069]{height:100%;width:100%;overflow:auto;position:relative}.flyweight .flyweight-all[data-v-292d1069]{height:var(--flyweight-height)}.flyweight .flyweight-all[data-v-292d1069]>*{width:calc(var(--width));height:var(--height);position:absolute}.card[data-v-84f183dc]{position:relative;background-color:var(--card-bgc, var(--card-background-color, #fff));padding:10px;border-radius:10px;box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);justify-content:flex-start;margin:var(--top, 0) var(--right, 0) var(--bottom, 0) var(--left, 0);height:calc(var(--card-height, 100%) - var(--top, 0) - var(--bottom, 0));width:var(--card-width, 100%);overflow:auto}.card[simply][data-v-84f183dc],.card [simply][data-v-84f183dc]{background-color:inherit;border:0!important}.card[flex][data-v-84f183dc],.card [flex][data-v-84f183dc]{display:flex}.card[column][data-v-84f183dc],.card [column][data-v-84f183dc]{flex-direction:column}.card[row][data-v-84f183dc],.card [row][data-v-84f183dc]{flex-direction:row}.card[center][data-v-84f183dc],.card [center][data-v-84f183dc]{justify-content:center}.card[vcenter][data-v-84f183dc],.card [vcenter][data-v-84f183dc]{align-items:center}.card .card-title[data-v-84f183dc]{max-height:40px}.card .card-close[data-v-84f183dc]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent);transition:all .3s ease}.card .card-close.hide[data-v-84f183dc]{display:none}.card .card-close[data-v-84f183dc]:before,.card .card-close[data-v-84f183dc]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-84f183dc]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-84f183dc]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-84f183dc]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-84f183dc]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-84f183dc]{overflow:auto}
1
+ @charset "UTF-8";.flyweight[data-v-00424b62]{height:100%;width:100%;overflow:auto;position:relative}.flyweight[hover-scroll][data-v-00424b62]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-00424b62]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-00424b62]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-00424b62]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-00424b62]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-00424b62]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 5px);height:var(--scrollbar-width, 5px)}.flyweight[hover-scroll][data-v-00424b62]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-00424b62]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-00424b62]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all[data-v-00424b62]+*{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-00424b62]{height:var(--flyweight-content)}.flyweight .flyweight-all[data-v-00424b62]>*{width:calc(var(--width));height:var(--height);position:absolute}.card[data-v-def66c95]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px;position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:10px;border-radius:10px;box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[hover-scroll][data-v-def66c95]::-webkit-scrollbar-track,.card[auto-scroll][data-v-def66c95]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-def66c95]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-def66c95]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-def66c95]::-webkit-scrollbar,.card[auto-scroll][data-v-def66c95]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 5px);height:var(--scrollbar-width, 5px)}.card[hover-scroll][data-v-def66c95]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-def66c95]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card[simply][data-v-def66c95],.card [simply][data-v-def66c95]{background-color:inherit;border:0!important}.card[flex][data-v-def66c95],.card [flex][data-v-def66c95]{display:flex}.card[column][data-v-def66c95],.card [column][data-v-def66c95]{flex-direction:column}.card[row][data-v-def66c95],.card [row][data-v-def66c95]{flex-direction:row}.card[center][data-v-def66c95],.card [center][data-v-def66c95]{justify-content:center}.card[vcenter][data-v-def66c95],.card [vcenter][data-v-def66c95]{align-items:center}.card .card-title[data-v-def66c95]{max-height:40px}.card .card-close[data-v-def66c95]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent);transition:all .3s ease}.card .card-close.hide[data-v-def66c95]{display:none}.card .card-close[data-v-def66c95]:before,.card .card-close[data-v-def66c95]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-def66c95]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-def66c95]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-def66c95]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-def66c95]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-def66c95]{overflow:auto;height:100%}