@graphysdk/theme-comic 0.1.1-beta.1792506850788 → 0.1.1-beta.1792511536251
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/dist/index.cjs +1 -1
- package/dist/index.mjs +286 -258
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let H=require("react"),e=require("@graphysdk/react"),g=require("react/jsx-runtime");var B=(t,r)=>{const o=(0,e.getX)(t),l=(0,e.getY)(t)??(0,e.getYMax)(t);return o===null||l===null?null:{x:(0,e.toViewBoxX)(o)*r.width,y:(0,e.toViewBoxY)(l)*r.height}},Y=(t,r)=>{const o=(0,e.getX)(t),l=(0,e.getY)(t)??(0,e.getRadiusExtent)(t).outerRadius;if(o===null||l===null)return null;const i=(0,e.polarToUnit)(o,l),n=Math.min(r.width,r.height)/2;return{x:r.width/2+i.x*n,y:r.height/2-i.y*n}},z=22,F=Math.PI*2,Se=F/(z*2),$=(t,r,o)=>({x:t.x+Math.sin(o.angle)*o.radius*r,y:t.y-Math.cos(o.angle)*o.radius*r}),R=2,G=({x:t,y:r})=>`${t.toFixed(R)},${r.toFixed(R)}`,W=8,X=.6,j=(t,r)=>{const o=r/2,l=F/(W*2);return`M${Array.from({length:W*2},(i,n)=>$(t,o,{angle:n*l,radius:n%2===0?1:X})).map(G).join(" L")} Z`},D=t=>{const r=(0,e.useGeomStyleReader)(t);return(o,l)=>{const i=r.get("shadow",o,l);return{color:(0,e.toPaintColor)(r.get("fill",o,l)),opacity:r.get("alpha",o,l),fillOpacity:r.get("fillAlpha",o,l),outline:r.get("stroke",o,l),outlineWidth:r.get("strokeWidth",o,l),shadow:i==="none"?null:{offsetX:i.offsetX,offsetY:i.offsetY,color:i.color}}}},U=1.35,K=4,V=1,_=({layer:t,observations:r,panel:o,project:l,state:i})=>{const n=(0,e.useGeomStyleReader)(t),f=D(t),u=(0,H.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),m=i==="hovered";return(0,g.jsx)("g",{"data-geom":"point",children:Array.from(r,p=>{const h=l(p,o);if(h===null)return null;const s=f(p,i),c=j(h,n.get("size",p,i)*U+(m?K:0));return(0,g.jsxs)("g",{opacity:s.opacity,children:[s.shadow!==null&&(0,g.jsx)("path",{d:c,transform:`translate(${s.shadow.offsetX} ${s.shadow.offsetY})`,fill:s.shadow.color}),(0,g.jsx)("path",{d:c,fill:s.color,fillOpacity:s.fillOpacity,stroke:s.outline,strokeWidth:s.outlineWidth+(m?V:0),strokeLinejoin:"round"})]},u(p))})})},N=(t,r)=>(0,e.defineGeomRenderer)("point",{coord:t,swatchShape:"circle",render:({layer:o,panelRect:l})=>(0,g.jsx)(_,{layer:o,observations:o.data,panel:l,project:r}),renderHover:({layer:o,primary:l,panelRect:i})=>(0,g.jsx)(_,{layer:o,observations:[l.observation],panel:i,project:r,state:"hovered"}),renderHoverCompanions:()=>null}),q=N("cartesian",B),J=N("polar",Y),Z=2,Q=2,ee=(t,r,o)=>[...t].flatMap(l=>{const{startAngle:i,endAngle:n}=(0,e.getAngleExtent)(l),{innerRadius:f,outerRadius:u}=(0,e.getRadiusExtent)(l);return i===null||n===null||f===null||u===null?[]:n<=i||u<=0?[]:[{key:`${o(l)}-${i}`,paint:r(l),startAngle:i,endAngle:n,innerRadius:f,outerRadius:u}]}),te=(t,r,o)=>(0,e.buildPolarBarArcPath)(t,{centerX:r.x,centerY:r.y,radius:o,digits:Q}),C=({layer:t,observations:r,panel:o,state:l})=>{const i=D(t),n=(0,H.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),f=Math.min(o.width,o.height)/2;if(f<=0)return null;const u={x:o.width/2,y:o.height/2},m=ee(r,h=>i(h,l),n).flatMap(h=>{const s=te(h,u,f);return s===void 0?[]:[{key:h.key,path:s,paint:h.paint}]}),p=l==="hovered";return(0,g.jsxs)("g",{"data-geom":"bar",children:[!p&&m.map(({key:h,path:s,paint:c})=>c.shadow===null?null:(0,g.jsx)("path",{d:s,transform:`translate(${c.shadow.offsetX} ${c.shadow.offsetY})`,fill:c.shadow.color,opacity:c.opacity},`${h}-shadow`)),m.map(({key:h,path:s,paint:c})=>(0,g.jsx)("path",{"data-comic-slice":"sector",d:s,fill:c.color,fillOpacity:c.fillOpacity,fillRule:"evenodd",stroke:c.outline,strokeWidth:c.outlineWidth+(p?Z:0),strokeLinejoin:"round",opacity:c.opacity},h))]})},oe=(0,e.defineGeomRenderer)("bar",{coord:"polar",guideMode:"band",swatchShape:"slice",render:({layer:t,panelRect:r})=>(0,g.jsx)(C,{layer:t,observations:t.data,panel:r}),renderHover:({layer:t,primary:r,panelRect:o})=>(0,g.jsx)(C,{layer:t,observations:[r.observation],panel:o,state:"hovered"}),renderHoverCompanions:()=>null}),re=[oe,q,J],k=10,ae=.42,P=220,le=.6,T=1,ie=()=>{const t=Math.ceil(P/k),r=[];for(let o=0;o<=t;o+=1){const l=o%2===0?0:k/2;for(let i=0;i<=23;i+=1){const n=-(i*k+l),f=o*k,u=k*ae*(1-Math.hypot(n,f)/P);u>=le&&r.push(`<circle cx="${n.toFixed(T)}" cy="${f.toFixed(T)}" r="${u.toFixed(T)}"/>`)}}return r.join("")},ne=(t,r,o)=>{const l=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="${t}"/><svg x="100%" y="0" width="1" height="1" overflow="visible"><g fill="${r}" fill-opacity="${o}">${ie()}</g></svg></svg>`;return`data:image/svg+xml,${encodeURIComponent(l)}`},a={paper:"#FBF3DF",bubble:"#FFFDF6",black:"#141414",secondary:"#4A4338",grid:"rgba(20, 20, 20, 0.2)",deepRed:"#C4161C"},w="'Bangers', 'Comic Neue', 'Comic Sans MS', cursive",se="'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive",d={vermillion:"#D9401F",cyan:"#0B85C8",yellow:"#FFD60A",magenta:"#D6247A",green:"#15964B",purple:"#7A3DC8"},de=[d.vermillion,d.cyan,d.yellow,d.magenta,d.green,d.purple],ce=["#FFE45C","#F58A1F","#C4161C"],he=[d.cyan,"#ECE5D4",d.vermillion],A={offsetX:4,offsetY:4,blur:0,color:a.black},ge={offsetX:6,offsetY:6,blur:0,color:a.black},S={offsetX:2,offsetY:2,blur:0,color:a.black},I={offsetX:4,offsetY:4,blur:0,color:a.black},fe={offsetX:6,offsetY:6,blur:0,color:a.black},ue={offsetX:2,offsetY:2,blur:0,color:d.yellow},pe={pattern:"dots",color:"rgba(20, 20, 20, 0.24)",size:7},ye={image:ne(a.paper,d.vermillion,.18),fit:"stretch",fallback:a.paper},ve={fontFamily:w,fontWeight:400,fontSize:22,lineHeight:1.05,letterSpacing:1.5,textTransform:"uppercase",textColor:a.black},M={fill:d.yellow,stroke:a.black,strokeWidth:3,cornerRadius:0,paddingInline:10,paddingBlock:5,shadow:{offsetX:5,offsetY:5,blur:0,color:d.vermillion}},x={fontFamily:w,fontWeight:400,fontSize:16,lineHeight:1.05,letterSpacing:1,textTransform:"uppercase",textColor:a.black},O={...M,strokeWidth:2.5,paddingInline:7,paddingBlock:3,shadow:{offsetX:3,offsetY:3,blur:0,color:d.vermillion}},E={fontFamily:w,fontWeight:400,letterSpacing:1,textTransform:"uppercase"},y={stroke:a.black,strokeAlpha:1},L={dashArray:[],lineCap:"round",lineJoin:"round"},v={textColor:a.black,fontWeight:700},b={textColor:a.secondary,fontWeight:700},me={tokens:{graphBackground:a.paper,graphBorder:a.black,geomBorder:a.black,textPrimary:a.black,textSecondary:a.secondary,ruleLine:a.black,gridLine:a.grid,hoverAffordance:a.black,hoverGuideFill:"rgba(20, 20, 20, 0.07)",hoverGuideLine:a.black,tooltipBackground:a.bubble,tooltipBorder:a.black,tooltipPrimaryRow:"rgba(255, 214, 10, 0.35)",annotationShape:d.yellow,annotationArrow:a.black,differenceLabelBackground:a.bubble,trendPositive:d.green,trendNegative:a.deepRed,trendNeutral:a.secondary},defaults:[e.style.graph({fill:ye,strokeWidth:4,cornerRadius:0,fontFamily:se,padding:22,shadow:fe}),e.style.geom({shadow:A,overpaint:pe}),e.style.geom({shadow:A},{state:"hovered"}),e.style.geom.bar({...y,strokeWidth:2.5,cornerRadius:0}),e.style.geom.bar({...y,strokeWidth:2.5,shadow:ge},{state:"hovered"}),e.style.geom.line({strokeWidth:3.5,...L,shadow:S,overpaint:"none"}),e.style.geom.line({shadow:S},{state:"hovered"}),e.style.geom.area({...y,fillAlpha:1,strokeWidth:2.5,...L}),e.style.geom.point({...y,size:13,strokeWidth:2,shadow:S}),e.style.geom.point({...y,strokeWidth:2,shadow:"none"},{state:"hovered"}),e.style.geom.tile({...y,cornerRadius:2,strokeWidth:1.5,shadow:"none"}),e.style.geom.tile({...y,strokeWidth:3,shadow:"none"},{state:"hovered"}),e.style.geom.rule({strokeWidth:2.5,dashArray:[3,3],lineCap:"round",shadow:"none"}),e.style.geom.rule.label({...E,textColor:d.yellow,fontSize:15}),e.style.gridLine({dashArray:[1,5]}),e.style.gridLine.x({strokeWidth:0}),e.style.gridLine.y({strokeWidth:1.5}),e.style.panelBorder({strokeWidth:0}),e.style.panelBorder.bottom({stroke:a.black,strokeWidth:3,dashArray:[]}),e.style.tickLine({strokeWidth:0}),e.style.tickLabel({...b,fontSize:14,lineHeight:1}),e.style.axisLabel({...v,...E,fontSize:18,lineHeight:1}),e.style.heading({...v}),e.style.heading.h1({fontFamily:w,fontWeight:400,fontSize:36,lineHeight:1,letterSpacing:1,textTransform:"uppercase",textShadow:ue}),e.style.heading.h2({...b,fontSize:16,lineHeight:1.2}),e.style.header({margin:{bottom:18}}),e.style.caption({...b,fontWeight:400,fontSize:13}),e.style.source({...b,fontWeight:400,fontSize:13}),e.style.dataLabel({...v,fontSize:14,fill:"transparent"}),e.style.legendItem({...v,...E,fontSize:18,fill:"transparent",stroke:"transparent"}),e.style.legendItem.swatch({size:16}),e.style.directLabel({fontWeight:700,fontSize:14}),e.style.tooltip({strokeWidth:2.5,cornerRadius:10,paddingInline:12,paddingBlock:9,shadow:I}),e.style.tooltip.heading({...v,fontSize:15,lineHeight:1.3}),e.style.tooltip.label({...b,fontSize:14,lineHeight:1.3}),e.style.tooltip.value({...v,fontSize:14,lineHeight:1.3}),e.style.legend.popover({strokeWidth:2.5,cornerRadius:10,shadow:I}),e.style.annotation.text({...ve,...M}),e.style.annotation.shape({fillAlpha:.35,stroke:a.black,strokeWidth:2}),e.style.annotation.arrow({strokeWidth:3.5,dashArray:[]}),e.style.annotation.arrow.outline({stroke:a.paper,strokeWidth:2}),e.style.annotation.pinnedNumber({stroke:a.black,shadow:S}),e.style.annotation.pinnedNumber.label({...x,...O}),e.style.annotation.comment({stroke:a.black,shadow:S}),e.style.annotation.comment.label({...x,...O}),e.style.annotation.differenceArrow({stroke:a.black,strokeWidth:2.5}),e.style.annotation.differenceArrow.label({...x,...O,fontSize:18}),e.style.panelBorder.bottom({strokeWidth:0},{coord:"polar"}),e.style.tickLabel({...v,textOutlineColor:a.paper,textOutlineWidth:3.5},{coord:"polar"}),e.style.geom.area({fillAlpha:.5,shadow:"none"},{coord:"polar"}),e.style.geom.area({shadow:"none"},{coord:"polar",state:"hovered"}),e.style.geom.bar({strokeWidth:2.5,shadow:A},{coord:"polar"}),e.style.geom.bar({strokeWidth:2.5},{coord:"polar",state:"hovered"})]},ke={name:"comic",styles:me,palettes:{categorical:de,sequential:ce,diverging:he},colorScheme:"light",plugins:re};exports.comic=ke;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let H=require("react"),e=require("@graphysdk/react"),f=require("react/jsx-runtime");var $=(t,o)=>{const r=(0,e.getX)(t),a=(0,e.getY)(t)??(0,e.getYMax)(t);return r===null||a===null?null:{x:(0,e.toViewBoxX)(r)*o.width,y:(0,e.toViewBoxY)(a)*o.height}},G=(t,o)=>{const r=(0,e.getX)(t),a=(0,e.getY)(t)??(0,e.getRadiusExtent)(t).outerRadius;if(r===null||a===null)return null;const i=(0,e.polarToUnit)(r,a),l=Math.min(o.width,o.height)/2;return{x:o.width/2+i.x*l,y:o.height/2-i.y*l}},X=22,F=Math.PI*2,be=F/(X*2),j=(t,o,r)=>({x:t.x+Math.sin(r.angle)*r.radius*o,y:t.y-Math.cos(r.angle)*r.radius*o}),W=2,U=({x:t,y:o})=>`${t.toFixed(W)},${o.toFixed(W)}`,_=8,K=.6,V=(t,o)=>{const r=o/2,a=F/(_*2);return`M${Array.from({length:_*2},(i,l)=>j(t,r,{angle:l*a,radius:l%2===0?1:K})).map(U).join(" L")} Z`},D=t=>{const o=(0,e.useGeomStyleReader)(t);return(r,a)=>{const i=o.get("shadow",r,a);return{color:(0,e.toPaintColor)(o.get("fill",r,a)),opacity:o.get("alpha",r,a),fillOpacity:o.get("fillAlpha",r,a),outline:o.get("stroke",r,a),outlineWidth:o.get("strokeWidth",r,a),shadow:i==="none"?null:{offsetX:i.offsetX,offsetY:i.offsetY,color:i.color}}}},N=1.35,q=4,J=1,C=({layer:t,observations:o,panel:r,project:a,state:i})=>{const l=(0,e.useGeomStyleReader)(t),h=D(t),g=(0,H.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),p=i==="hovered";return(0,f.jsx)("g",{"data-geom":"point",children:Array.from(o,y=>{const u=a(y,r);if(u===null)return null;const s=h(y,i),c=V(u,l.get("size",y,i)*N+(p?q:0));return(0,f.jsxs)("g",{opacity:s.opacity,children:[s.shadow!==null&&(0,f.jsx)("path",{d:c,transform:`translate(${s.shadow.offsetX} ${s.shadow.offsetY})`,fill:s.shadow.color}),(0,f.jsx)("path",{d:c,fill:s.color,fillOpacity:s.fillOpacity,stroke:s.outline,strokeWidth:s.outlineWidth+(p?J:0),strokeLinejoin:"round"})]},g(y))})})},M=(t,o)=>(0,e.defineGeomRenderer)("point",{coord:t,swatchShape:"circle",render:({layer:r,panelRect:a})=>(0,f.jsx)(C,{layer:r,observations:r.data,panel:a,project:o}),renderHover:({layer:r,primary:a,panelRect:i})=>(0,f.jsx)(C,{layer:r,observations:[a.observation],panel:i,project:o,state:"hovered"}),renderHoverCompanions:()=>null,getEditOutlineShapes:({layer:r,panelRect:a,styleReaders:i})=>(0,e.buildDotsEditOutlineShapes)(Array.from(r.data,l=>{const h=o(l,a),g=i.get("size",l);if(h===null||g===void 0)return[];const p=i.get("strokeWidth",l)??0;return[{center:h,size:g*N+p}]}).flat())}),Z=M("cartesian",$),Q=M("polar",G),ee=2,te=2,B=t=>{const{startAngle:o,endAngle:r}=(0,e.getAngleExtent)(t),{innerRadius:a,outerRadius:i}=(0,e.getRadiusExtent)(t);return o===null||r===null||a===null||i===null||r<=o||i<=0?null:{startAngle:o,endAngle:r,innerRadius:a,outerRadius:i}},oe=(t,o,r)=>[...t].flatMap(a=>{const i=B(a);return i===null?[]:[{key:`${r(a)}-${i.startAngle}`,paint:o(a),...i}]}),z=(t,o,r)=>(0,e.buildPolarBarArcPath)(t,{centerX:o.x,centerY:o.y,radius:r,digits:te}),R=({layer:t,observations:o,panel:r,state:a})=>{const i=D(t),l=(0,H.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),h=Math.min(r.width,r.height)/2;if(h<=0)return null;const g={x:r.width/2,y:r.height/2},p=oe(o,u=>i(u,a),l).flatMap(u=>{const s=z(u,g,h);return s===void 0?[]:[{key:u.key,path:s,paint:u.paint}]}),y=a==="hovered";return(0,f.jsxs)("g",{"data-geom":"bar",children:[!y&&p.map(({key:u,path:s,paint:c})=>c.shadow===null?null:(0,f.jsx)("path",{d:s,transform:`translate(${c.shadow.offsetX} ${c.shadow.offsetY})`,fill:c.shadow.color,opacity:c.opacity},`${u}-shadow`)),p.map(({key:u,path:s,paint:c})=>(0,f.jsx)("path",{"data-comic-slice":"sector",d:s,fill:c.color,fillOpacity:c.fillOpacity,fillRule:"evenodd",stroke:c.outline,strokeWidth:c.outlineWidth+(y?ee:0),strokeLinejoin:"round",opacity:c.opacity},u))]})},re=(0,e.defineGeomRenderer)("bar",{coord:"polar",guideMode:"band",swatchShape:"slice",render:({layer:t,panelRect:o})=>(0,f.jsx)(R,{layer:t,observations:t.data,panel:o}),renderHover:({layer:t,primary:o,panelRect:r})=>(0,f.jsx)(R,{layer:t,observations:[o.observation],panel:r,state:"hovered"}),renderHoverCompanions:()=>null,getEditOutlineShapes:({layer:t,panelRect:o,shouldAnimateTransitions:r})=>{const a=Math.min(o.width,o.height)/2,i={x:o.width/2,y:o.height/2},l=Array.from(t.data,h=>{const g=B(h);return g===null?"":z(g,i,a)??""}).join("");return l===""?[]:[{kind:"region",pathData:l,shouldAnimateTransitions:r}]}}),ae=[re,Z,Q],k=10,ne=.42,P=220,ie=.6,T=1,le=()=>{const t=Math.ceil(P/k),o=[];for(let r=0;r<=t;r+=1){const a=r%2===0?0:k/2;for(let i=0;i<=23;i+=1){const l=-(i*k+a),h=r*k,g=k*ne*(1-Math.hypot(l,h)/P);g>=ie&&o.push(`<circle cx="${l.toFixed(T)}" cy="${h.toFixed(T)}" r="${g.toFixed(T)}"/>`)}}return o.join("")},se=(t,o,r)=>{const a=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="${t}"/><svg x="100%" y="0" width="1" height="1" overflow="visible"><g fill="${o}" fill-opacity="${r}">${le()}</g></svg></svg>`;return`data:image/svg+xml,${encodeURIComponent(a)}`},n={paper:"#FBF3DF",bubble:"#FFFDF6",black:"#141414",secondary:"#4A4338",grid:"rgba(20, 20, 20, 0.2)",deepRed:"#C4161C"},w="'Bangers', 'Comic Neue', 'Comic Sans MS', cursive",de="'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive",d={vermillion:"#D9401F",cyan:"#0B85C8",yellow:"#FFD60A",magenta:"#D6247A",green:"#15964B",purple:"#7A3DC8"},ce=[d.vermillion,d.cyan,d.yellow,d.magenta,d.green,d.purple],he=["#FFE45C","#F58A1F","#C4161C"],ge=[d.cyan,"#ECE5D4",d.vermillion],A={offsetX:4,offsetY:4,blur:0,color:n.black},ue={offsetX:6,offsetY:6,blur:0,color:n.black},S={offsetX:2,offsetY:2,blur:0,color:n.black},I={offsetX:4,offsetY:4,blur:0,color:n.black},fe={offsetX:6,offsetY:6,blur:0,color:n.black},pe={offsetX:2,offsetY:2,blur:0,color:d.yellow},ye={pattern:"dots",color:"rgba(20, 20, 20, 0.24)",size:7},me={image:se(n.paper,d.vermillion,.18),fit:"stretch",fallback:n.paper},ve={fontFamily:w,fontWeight:400,fontSize:22,lineHeight:1.05,letterSpacing:1.5,textTransform:"uppercase",textColor:n.black},Y={fill:d.yellow,stroke:n.black,strokeWidth:3,cornerRadius:0,paddingInline:10,paddingBlock:5,shadow:{offsetX:5,offsetY:5,blur:0,color:d.vermillion}},O={fontFamily:w,fontWeight:400,fontSize:16,lineHeight:1.05,letterSpacing:1,textTransform:"uppercase",textColor:n.black},E={...Y,strokeWidth:2.5,paddingInline:7,paddingBlock:3,shadow:{offsetX:3,offsetY:3,blur:0,color:d.vermillion}},x={fontFamily:w,fontWeight:400,letterSpacing:1,textTransform:"uppercase"},m={stroke:n.black,strokeAlpha:1},L={dashArray:[],lineCap:"round",lineJoin:"round"},v={textColor:n.black,fontWeight:700},b={textColor:n.secondary,fontWeight:700},ke={tokens:{graphBackground:n.paper,graphBorder:n.black,geomBorder:n.black,textPrimary:n.black,textSecondary:n.secondary,ruleLine:n.black,gridLine:n.grid,hoverAffordance:n.black,hoverGuideFill:"rgba(20, 20, 20, 0.07)",hoverGuideLine:n.black,tooltipBackground:n.bubble,tooltipBorder:n.black,tooltipPrimaryRow:"rgba(255, 214, 10, 0.35)",annotationShape:d.yellow,annotationArrow:n.black,differenceLabelBackground:n.bubble,trendPositive:d.green,trendNegative:n.deepRed,trendNeutral:n.secondary},defaults:[e.style.graph({fill:me,strokeWidth:4,cornerRadius:0,fontFamily:de,padding:22,shadow:fe}),e.style.geom({shadow:A,overpaint:ye}),e.style.geom({shadow:A},{state:"hovered"}),e.style.geom.bar({...m,strokeWidth:2.5,cornerRadius:0}),e.style.geom.bar({...m,strokeWidth:2.5,shadow:ue},{state:"hovered"}),e.style.geom.line({strokeWidth:3.5,...L,shadow:S,overpaint:"none"}),e.style.geom.line({shadow:S},{state:"hovered"}),e.style.geom.area({...m,fillAlpha:1,strokeWidth:2.5,...L}),e.style.geom.point({...m,size:13,strokeWidth:2,shadow:S}),e.style.geom.point({...m,strokeWidth:2,shadow:"none"},{state:"hovered"}),e.style.geom.tile({...m,cornerRadius:2,strokeWidth:1.5,shadow:"none"}),e.style.geom.tile({...m,strokeWidth:3,shadow:"none"},{state:"hovered"}),e.style.geom.rule({strokeWidth:2.5,dashArray:[3,3],lineCap:"round",shadow:"none"}),e.style.geom.rule.label({...x,textColor:d.yellow,fontSize:15}),e.style.gridLine({dashArray:[1,5]}),e.style.gridLine.x({strokeWidth:0}),e.style.gridLine.y({strokeWidth:1.5}),e.style.panelBorder({strokeWidth:0}),e.style.panelBorder.bottom({stroke:n.black,strokeWidth:3,dashArray:[]}),e.style.tickLine({strokeWidth:0}),e.style.tickLabel({...b,fontSize:14,lineHeight:1}),e.style.axisLabel({...v,...x,fontSize:18,lineHeight:1}),e.style.heading({...v}),e.style.heading.h1({fontFamily:w,fontWeight:400,fontSize:36,lineHeight:1,letterSpacing:1,textTransform:"uppercase",textShadow:pe}),e.style.heading.h2({...b,fontSize:16,lineHeight:1.2}),e.style.header({margin:{bottom:18}}),e.style.caption({...b,fontWeight:400,fontSize:13}),e.style.source({...b,fontWeight:400,fontSize:13}),e.style.dataLabel({...v,fontSize:14,fill:"transparent"}),e.style.legendItem({...v,...x,fontSize:18,fill:"transparent",stroke:"transparent"}),e.style.legendItem.swatch({size:16}),e.style.directLabel({fontWeight:700,fontSize:14}),e.style.tooltip({strokeWidth:2.5,cornerRadius:10,paddingInline:12,paddingBlock:9,shadow:I}),e.style.tooltip.heading({...v,fontSize:15,lineHeight:1.3}),e.style.tooltip.label({...b,fontSize:14,lineHeight:1.3}),e.style.tooltip.value({...v,fontSize:14,lineHeight:1.3}),e.style.legend.popover({strokeWidth:2.5,cornerRadius:10,shadow:I}),e.style.annotation.text({...ve,...Y}),e.style.annotation.shape({fillAlpha:.35,stroke:n.black,strokeWidth:2}),e.style.annotation.arrow({strokeWidth:3.5,dashArray:[]}),e.style.annotation.arrow.outline({stroke:n.paper,strokeWidth:2}),e.style.annotation.pinnedNumber({stroke:n.black,shadow:S}),e.style.annotation.pinnedNumber.label({...O,...E}),e.style.annotation.comment({stroke:n.black,shadow:S}),e.style.annotation.comment.label({...O,...E}),e.style.annotation.differenceArrow({stroke:n.black,strokeWidth:2.5}),e.style.annotation.differenceArrow.label({...O,...E,fontSize:18}),e.style.panelBorder.bottom({strokeWidth:0},{coord:"polar"}),e.style.tickLabel({...v,textOutlineColor:n.paper,textOutlineWidth:3.5},{coord:"polar"}),e.style.geom.area({fillAlpha:.5,shadow:"none"},{coord:"polar"}),e.style.geom.area({shadow:"none"},{coord:"polar",state:"hovered"}),e.style.geom.bar({strokeWidth:2.5,shadow:A},{coord:"polar"}),e.style.geom.bar({strokeWidth:2.5},{coord:"polar",state:"hovered"})]},Se={name:"comic",styles:ke,palettes:{categorical:ce,sequential:he,diverging:ge},colorScheme:"light",plugins:ae};exports.comic=Se;
|
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { useMemo as H } from "react";
|
|
2
|
-
import { buildPolarBarArcPath as
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
6
|
-
return
|
|
7
|
-
x:
|
|
8
|
-
y:
|
|
2
|
+
import { buildDotsEditOutlineShapes as q, buildPolarBarArcPath as J, createStableKeyGenerator as F, defineGeomRenderer as D, getAngleExtent as Z, getRadiusExtent as N, getX as B, getY as M, getYMax as Q, polarToUnit as ee, style as t, toPaintColor as te, toViewBoxX as oe, toViewBoxY as re, useGeomStyleReader as z } from "@graphysdk/react";
|
|
3
|
+
import { jsx as u, jsxs as Y } from "react/jsx-runtime";
|
|
4
|
+
var ae = (e, o) => {
|
|
5
|
+
const r = B(e), a = M(e) ?? Q(e);
|
|
6
|
+
return r === null || a === null ? null : {
|
|
7
|
+
x: oe(r) * o.width,
|
|
8
|
+
y: re(a) * o.height
|
|
9
9
|
};
|
|
10
|
-
},
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
const n =
|
|
10
|
+
}, ie = (e, o) => {
|
|
11
|
+
const r = B(e), a = M(e) ?? N(e).outerRadius;
|
|
12
|
+
if (r === null || a === null) return null;
|
|
13
|
+
const n = ee(r, a), l = Math.min(o.width, o.height) / 2;
|
|
14
14
|
return {
|
|
15
|
-
x:
|
|
16
|
-
y:
|
|
15
|
+
x: o.width / 2 + n.x * l,
|
|
16
|
+
y: o.height / 2 - n.y * l
|
|
17
17
|
};
|
|
18
|
-
},
|
|
19
|
-
x:
|
|
20
|
-
y:
|
|
21
|
-
}), C = 2,
|
|
22
|
-
const
|
|
23
|
-
return `M${Array.from({ length:
|
|
24
|
-
angle: l *
|
|
25
|
-
radius: l % 2 === 0 ? 1 :
|
|
26
|
-
})).map(
|
|
27
|
-
}, X = (
|
|
28
|
-
const
|
|
29
|
-
return (
|
|
30
|
-
const n =
|
|
18
|
+
}, ne = 22, $ = Math.PI * 2, Ne = $ / (ne * 2), le = (e, o, r) => ({
|
|
19
|
+
x: e.x + Math.sin(r.angle) * r.radius * o,
|
|
20
|
+
y: e.y - Math.cos(r.angle) * r.radius * o
|
|
21
|
+
}), C = 2, de = ({ x: e, y: o }) => `${e.toFixed(C)},${o.toFixed(C)}`, _ = 8, se = 0.6, ce = (e, o) => {
|
|
22
|
+
const r = o / 2, a = $ / (_ * 2);
|
|
23
|
+
return `M${Array.from({ length: _ * 2 }, (n, l) => le(e, r, {
|
|
24
|
+
angle: l * a,
|
|
25
|
+
radius: l % 2 === 0 ? 1 : se
|
|
26
|
+
})).map(de).join(" L")} Z`;
|
|
27
|
+
}, X = (e) => {
|
|
28
|
+
const o = z(e);
|
|
29
|
+
return (r, a) => {
|
|
30
|
+
const n = o.get("shadow", r, a);
|
|
31
31
|
return {
|
|
32
|
-
color:
|
|
33
|
-
opacity:
|
|
34
|
-
fillOpacity:
|
|
35
|
-
outline:
|
|
36
|
-
outlineWidth:
|
|
32
|
+
color: te(o.get("fill", r, a)),
|
|
33
|
+
opacity: o.get("alpha", r, a),
|
|
34
|
+
fillOpacity: o.get("fillAlpha", r, a),
|
|
35
|
+
outline: o.get("stroke", r, a),
|
|
36
|
+
outlineWidth: o.get("strokeWidth", r, a),
|
|
37
37
|
shadow: n === "none" ? null : {
|
|
38
38
|
offsetX: n.offsetX,
|
|
39
39
|
offsetY: n.offsetY,
|
|
@@ -41,163 +41,191 @@ var ee = (o, r) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
},
|
|
45
|
-
const l = z(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]),
|
|
50
|
-
return /* @__PURE__ */
|
|
44
|
+
}, G = 1.35, he = 4, ge = 1, R = ({ layer: e, observations: o, panel: r, project: a, state: n }) => {
|
|
45
|
+
const l = z(e), h = X(e), g = H(() => F(e.data, e.mapping, e.id), [
|
|
46
|
+
e.data,
|
|
47
|
+
e.mapping,
|
|
48
|
+
e.id
|
|
49
|
+
]), p = n === "hovered";
|
|
50
|
+
return /* @__PURE__ */ u("g", {
|
|
51
51
|
"data-geom": "point",
|
|
52
|
-
children: Array.from(
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const d =
|
|
52
|
+
children: Array.from(o, (m) => {
|
|
53
|
+
const f = a(m, r);
|
|
54
|
+
if (f === null) return null;
|
|
55
|
+
const d = h(m, n), c = ce(f, l.get("size", m, n) * G + (p ? he : 0));
|
|
56
56
|
return /* @__PURE__ */ Y("g", {
|
|
57
57
|
opacity: d.opacity,
|
|
58
|
-
children: [d.shadow !== null && /* @__PURE__ */
|
|
58
|
+
children: [d.shadow !== null && /* @__PURE__ */ u("path", {
|
|
59
59
|
d: c,
|
|
60
60
|
transform: `translate(${d.shadow.offsetX} ${d.shadow.offsetY})`,
|
|
61
61
|
fill: d.shadow.color
|
|
62
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ u("path", {
|
|
63
63
|
d: c,
|
|
64
64
|
fill: d.color,
|
|
65
65
|
fillOpacity: d.fillOpacity,
|
|
66
66
|
stroke: d.outline,
|
|
67
|
-
strokeWidth: d.outlineWidth + (
|
|
67
|
+
strokeWidth: d.outlineWidth + (p ? ge : 0),
|
|
68
68
|
strokeLinejoin: "round"
|
|
69
69
|
})]
|
|
70
|
-
}, g(
|
|
70
|
+
}, g(m));
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
coord:
|
|
73
|
+
}, U = (e, o) => D("point", {
|
|
74
|
+
coord: e,
|
|
75
75
|
swatchShape: "circle",
|
|
76
|
-
render: ({ layer:
|
|
77
|
-
layer:
|
|
78
|
-
observations:
|
|
79
|
-
panel:
|
|
80
|
-
project:
|
|
76
|
+
render: ({ layer: r, panelRect: a }) => /* @__PURE__ */ u(R, {
|
|
77
|
+
layer: r,
|
|
78
|
+
observations: r.data,
|
|
79
|
+
panel: a,
|
|
80
|
+
project: o
|
|
81
81
|
}),
|
|
82
|
-
renderHover: ({ layer:
|
|
83
|
-
layer:
|
|
84
|
-
observations: [
|
|
82
|
+
renderHover: ({ layer: r, primary: a, panelRect: n }) => /* @__PURE__ */ u(R, {
|
|
83
|
+
layer: r,
|
|
84
|
+
observations: [a.observation],
|
|
85
85
|
panel: n,
|
|
86
|
-
project:
|
|
86
|
+
project: o,
|
|
87
87
|
state: "hovered"
|
|
88
88
|
}),
|
|
89
|
-
renderHoverCompanions: () => null
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
renderHoverCompanions: () => null,
|
|
90
|
+
getEditOutlineShapes: ({ layer: r, panelRect: a, styleReaders: n }) => q(Array.from(r.data, (l) => {
|
|
91
|
+
const h = o(l, a), g = n.get("size", l);
|
|
92
|
+
if (h === null || g === void 0) return [];
|
|
93
|
+
const p = n.get("strokeWidth", l) ?? 0;
|
|
94
|
+
return [{
|
|
95
|
+
center: h,
|
|
96
|
+
size: g * G + p
|
|
97
|
+
}];
|
|
98
|
+
}).flat())
|
|
99
|
+
}), fe = U("cartesian", ae), ue = U("polar", ie), pe = 2, me = 2, j = (e) => {
|
|
100
|
+
const { startAngle: o, endAngle: r } = Z(e), { innerRadius: a, outerRadius: n } = N(e);
|
|
101
|
+
return o === null || r === null || a === null || n === null || r <= o || n <= 0 ? null : {
|
|
102
|
+
startAngle: o,
|
|
103
|
+
endAngle: r,
|
|
104
|
+
innerRadius: a,
|
|
105
|
+
outerRadius: n
|
|
106
|
+
};
|
|
107
|
+
}, ve = (e, o, r) => [...e].flatMap((a) => {
|
|
108
|
+
const n = j(a);
|
|
109
|
+
return n === null ? [] : [{
|
|
110
|
+
key: `${r(a)}-${n.startAngle}`,
|
|
111
|
+
paint: o(a),
|
|
112
|
+
...n
|
|
99
113
|
}];
|
|
100
|
-
}),
|
|
101
|
-
centerX:
|
|
102
|
-
centerY:
|
|
103
|
-
radius:
|
|
104
|
-
digits:
|
|
105
|
-
}), x = ({ layer:
|
|
106
|
-
const n = X(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
]),
|
|
111
|
-
if (
|
|
114
|
+
}), K = (e, o, r) => J(e, {
|
|
115
|
+
centerX: o.x,
|
|
116
|
+
centerY: o.y,
|
|
117
|
+
radius: r,
|
|
118
|
+
digits: me
|
|
119
|
+
}), x = ({ layer: e, observations: o, panel: r, state: a }) => {
|
|
120
|
+
const n = X(e), l = H(() => F(e.data, e.mapping, e.id), [
|
|
121
|
+
e.data,
|
|
122
|
+
e.mapping,
|
|
123
|
+
e.id
|
|
124
|
+
]), h = Math.min(r.width, r.height) / 2;
|
|
125
|
+
if (h <= 0) return null;
|
|
112
126
|
const g = {
|
|
113
|
-
x:
|
|
114
|
-
y:
|
|
115
|
-
},
|
|
116
|
-
const d =
|
|
127
|
+
x: r.width / 2,
|
|
128
|
+
y: r.height / 2
|
|
129
|
+
}, p = ve(o, (f) => n(f, a), l).flatMap((f) => {
|
|
130
|
+
const d = K(f, g, h);
|
|
117
131
|
return d === void 0 ? [] : [{
|
|
118
|
-
key:
|
|
132
|
+
key: f.key,
|
|
119
133
|
path: d,
|
|
120
|
-
paint:
|
|
134
|
+
paint: f.paint
|
|
121
135
|
}];
|
|
122
|
-
}),
|
|
136
|
+
}), m = a === "hovered";
|
|
123
137
|
return /* @__PURE__ */ Y("g", {
|
|
124
138
|
"data-geom": "bar",
|
|
125
|
-
children: [!
|
|
139
|
+
children: [!m && p.map(({ key: f, path: d, paint: c }) => c.shadow === null ? null : /* @__PURE__ */ u("path", {
|
|
126
140
|
d,
|
|
127
141
|
transform: `translate(${c.shadow.offsetX} ${c.shadow.offsetY})`,
|
|
128
142
|
fill: c.shadow.color,
|
|
129
143
|
opacity: c.opacity
|
|
130
|
-
}, `${
|
|
144
|
+
}, `${f}-shadow`)), p.map(({ key: f, path: d, paint: c }) => /* @__PURE__ */ u("path", {
|
|
131
145
|
"data-comic-slice": "sector",
|
|
132
146
|
d,
|
|
133
147
|
fill: c.color,
|
|
134
148
|
fillOpacity: c.fillOpacity,
|
|
135
149
|
fillRule: "evenodd",
|
|
136
150
|
stroke: c.outline,
|
|
137
|
-
strokeWidth: c.outlineWidth + (
|
|
151
|
+
strokeWidth: c.outlineWidth + (m ? pe : 0),
|
|
138
152
|
strokeLinejoin: "round",
|
|
139
153
|
opacity: c.opacity
|
|
140
|
-
},
|
|
154
|
+
}, f))]
|
|
141
155
|
});
|
|
142
|
-
},
|
|
156
|
+
}, ke = D("bar", {
|
|
143
157
|
coord: "polar",
|
|
144
158
|
guideMode: "band",
|
|
145
159
|
swatchShape: "slice",
|
|
146
|
-
render: ({ layer:
|
|
147
|
-
layer:
|
|
148
|
-
observations:
|
|
149
|
-
panel:
|
|
160
|
+
render: ({ layer: e, panelRect: o }) => /* @__PURE__ */ u(x, {
|
|
161
|
+
layer: e,
|
|
162
|
+
observations: e.data,
|
|
163
|
+
panel: o
|
|
150
164
|
}),
|
|
151
|
-
renderHover: ({ layer:
|
|
152
|
-
layer:
|
|
153
|
-
observations: [
|
|
154
|
-
panel:
|
|
165
|
+
renderHover: ({ layer: e, primary: o, panelRect: r }) => /* @__PURE__ */ u(x, {
|
|
166
|
+
layer: e,
|
|
167
|
+
observations: [o.observation],
|
|
168
|
+
panel: r,
|
|
155
169
|
state: "hovered"
|
|
156
170
|
}),
|
|
157
|
-
renderHoverCompanions: () => null
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
renderHoverCompanions: () => null,
|
|
172
|
+
getEditOutlineShapes: ({ layer: e, panelRect: o, shouldAnimateTransitions: r }) => {
|
|
173
|
+
const a = Math.min(o.width, o.height) / 2, n = {
|
|
174
|
+
x: o.width / 2,
|
|
175
|
+
y: o.height / 2
|
|
176
|
+
}, l = Array.from(e.data, (h) => {
|
|
177
|
+
const g = j(h);
|
|
178
|
+
return g === null ? "" : K(g, n, a) ?? "";
|
|
179
|
+
}).join("");
|
|
180
|
+
return l === "" ? [] : [{
|
|
181
|
+
kind: "region",
|
|
182
|
+
pathData: l,
|
|
183
|
+
shouldAnimateTransitions: r
|
|
184
|
+
}];
|
|
185
|
+
}
|
|
186
|
+
}), Se = [
|
|
187
|
+
ke,
|
|
188
|
+
fe,
|
|
189
|
+
ue
|
|
190
|
+
], S = 10, be = 0.42, P = 220, we = 0.6, A = 1, Te = () => {
|
|
191
|
+
const e = Math.ceil(P / S), o = [];
|
|
192
|
+
for (let r = 0; r <= e; r += 1) {
|
|
193
|
+
const a = r % 2 === 0 ? 0 : S / 2;
|
|
166
194
|
for (let n = 0; n <= 23; n += 1) {
|
|
167
|
-
const l = -(n *
|
|
168
|
-
g >=
|
|
195
|
+
const l = -(n * S + a), h = r * S, g = S * be * (1 - Math.hypot(l, h) / P);
|
|
196
|
+
g >= we && o.push(`<circle cx="${l.toFixed(A)}" cy="${h.toFixed(A)}" r="${g.toFixed(A)}"/>`);
|
|
169
197
|
}
|
|
170
198
|
}
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
const
|
|
174
|
-
return `data:image/svg+xml,${encodeURIComponent(
|
|
175
|
-
},
|
|
199
|
+
return o.join("");
|
|
200
|
+
}, Ae = (e, o, r) => {
|
|
201
|
+
const a = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="${e}"/><svg x="100%" y="0" width="1" height="1" overflow="visible"><g fill="${o}" fill-opacity="${r}">${Te()}</g></svg></svg>`;
|
|
202
|
+
return `data:image/svg+xml,${encodeURIComponent(a)}`;
|
|
203
|
+
}, i = {
|
|
176
204
|
paper: "#FBF3DF",
|
|
177
205
|
bubble: "#FFFDF6",
|
|
178
206
|
black: "#141414",
|
|
179
207
|
secondary: "#4A4338",
|
|
180
208
|
grid: "rgba(20, 20, 20, 0.2)",
|
|
181
209
|
deepRed: "#C4161C"
|
|
182
|
-
}, T = "'Bangers', 'Comic Neue', 'Comic Sans MS', cursive",
|
|
210
|
+
}, T = "'Bangers', 'Comic Neue', 'Comic Sans MS', cursive", Oe = "'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive", s = {
|
|
183
211
|
vermillion: "#D9401F",
|
|
184
212
|
cyan: "#0B85C8",
|
|
185
213
|
yellow: "#FFD60A",
|
|
186
214
|
magenta: "#D6247A",
|
|
187
215
|
green: "#15964B",
|
|
188
216
|
purple: "#7A3DC8"
|
|
189
|
-
},
|
|
217
|
+
}, Ee = [
|
|
190
218
|
s.vermillion,
|
|
191
219
|
s.cyan,
|
|
192
220
|
s.yellow,
|
|
193
221
|
s.magenta,
|
|
194
222
|
s.green,
|
|
195
223
|
s.purple
|
|
196
|
-
],
|
|
224
|
+
], ye = [
|
|
197
225
|
"#FFE45C",
|
|
198
226
|
"#F58A1F",
|
|
199
227
|
"#C4161C"
|
|
200
|
-
],
|
|
228
|
+
], We = [
|
|
201
229
|
s.cyan,
|
|
202
230
|
"#ECE5D4",
|
|
203
231
|
s.vermillion
|
|
@@ -205,51 +233,51 @@ var ee = (o, r) => {
|
|
|
205
233
|
offsetX: 4,
|
|
206
234
|
offsetY: 4,
|
|
207
235
|
blur: 0,
|
|
208
|
-
color:
|
|
209
|
-
},
|
|
236
|
+
color: i.black
|
|
237
|
+
}, Ce = {
|
|
210
238
|
offsetX: 6,
|
|
211
239
|
offsetY: 6,
|
|
212
240
|
blur: 0,
|
|
213
|
-
color:
|
|
214
|
-
},
|
|
241
|
+
color: i.black
|
|
242
|
+
}, b = {
|
|
215
243
|
offsetX: 2,
|
|
216
244
|
offsetY: 2,
|
|
217
245
|
blur: 0,
|
|
218
|
-
color:
|
|
246
|
+
color: i.black
|
|
219
247
|
}, I = {
|
|
220
248
|
offsetX: 4,
|
|
221
249
|
offsetY: 4,
|
|
222
250
|
blur: 0,
|
|
223
|
-
color:
|
|
224
|
-
},
|
|
251
|
+
color: i.black
|
|
252
|
+
}, _e = {
|
|
225
253
|
offsetX: 6,
|
|
226
254
|
offsetY: 6,
|
|
227
255
|
blur: 0,
|
|
228
|
-
color:
|
|
229
|
-
},
|
|
256
|
+
color: i.black
|
|
257
|
+
}, Re = {
|
|
230
258
|
offsetX: 2,
|
|
231
259
|
offsetY: 2,
|
|
232
260
|
blur: 0,
|
|
233
261
|
color: s.yellow
|
|
234
|
-
},
|
|
262
|
+
}, xe = {
|
|
235
263
|
pattern: "dots",
|
|
236
264
|
color: "rgba(20, 20, 20, 0.24)",
|
|
237
265
|
size: 7
|
|
238
|
-
},
|
|
239
|
-
image:
|
|
266
|
+
}, Pe = {
|
|
267
|
+
image: Ae(i.paper, s.vermillion, 0.18),
|
|
240
268
|
fit: "stretch",
|
|
241
|
-
fallback:
|
|
242
|
-
},
|
|
269
|
+
fallback: i.paper
|
|
270
|
+
}, Ie = {
|
|
243
271
|
fontFamily: T,
|
|
244
272
|
fontWeight: 400,
|
|
245
273
|
fontSize: 22,
|
|
246
274
|
lineHeight: 1.05,
|
|
247
275
|
letterSpacing: 1.5,
|
|
248
276
|
textTransform: "uppercase",
|
|
249
|
-
textColor:
|
|
250
|
-
},
|
|
277
|
+
textColor: i.black
|
|
278
|
+
}, V = {
|
|
251
279
|
fill: s.yellow,
|
|
252
|
-
stroke:
|
|
280
|
+
stroke: i.black,
|
|
253
281
|
strokeWidth: 3,
|
|
254
282
|
cornerRadius: 0,
|
|
255
283
|
paddingInline: 10,
|
|
@@ -260,16 +288,16 @@ var ee = (o, r) => {
|
|
|
260
288
|
blur: 0,
|
|
261
289
|
color: s.vermillion
|
|
262
290
|
}
|
|
263
|
-
},
|
|
291
|
+
}, E = {
|
|
264
292
|
fontFamily: T,
|
|
265
293
|
fontWeight: 400,
|
|
266
294
|
fontSize: 16,
|
|
267
295
|
lineHeight: 1.05,
|
|
268
296
|
letterSpacing: 1,
|
|
269
297
|
textTransform: "uppercase",
|
|
270
|
-
textColor:
|
|
271
|
-
},
|
|
272
|
-
...
|
|
298
|
+
textColor: i.black
|
|
299
|
+
}, y = {
|
|
300
|
+
...V,
|
|
273
301
|
strokeWidth: 2.5,
|
|
274
302
|
paddingInline: 7,
|
|
275
303
|
paddingBlock: 3,
|
|
@@ -284,278 +312,278 @@ var ee = (o, r) => {
|
|
|
284
312
|
fontWeight: 400,
|
|
285
313
|
letterSpacing: 1,
|
|
286
314
|
textTransform: "uppercase"
|
|
287
|
-
},
|
|
288
|
-
stroke:
|
|
315
|
+
}, v = {
|
|
316
|
+
stroke: i.black,
|
|
289
317
|
strokeAlpha: 1
|
|
290
318
|
}, L = {
|
|
291
319
|
dashArray: [],
|
|
292
320
|
lineCap: "round",
|
|
293
321
|
lineJoin: "round"
|
|
294
|
-
},
|
|
295
|
-
textColor:
|
|
322
|
+
}, k = {
|
|
323
|
+
textColor: i.black,
|
|
296
324
|
fontWeight: 700
|
|
297
325
|
}, w = {
|
|
298
|
-
textColor:
|
|
326
|
+
textColor: i.secondary,
|
|
299
327
|
fontWeight: 700
|
|
300
|
-
},
|
|
328
|
+
}, Le = {
|
|
301
329
|
tokens: {
|
|
302
|
-
graphBackground:
|
|
303
|
-
graphBorder:
|
|
304
|
-
geomBorder:
|
|
305
|
-
textPrimary:
|
|
306
|
-
textSecondary:
|
|
307
|
-
ruleLine:
|
|
308
|
-
gridLine:
|
|
309
|
-
hoverAffordance:
|
|
330
|
+
graphBackground: i.paper,
|
|
331
|
+
graphBorder: i.black,
|
|
332
|
+
geomBorder: i.black,
|
|
333
|
+
textPrimary: i.black,
|
|
334
|
+
textSecondary: i.secondary,
|
|
335
|
+
ruleLine: i.black,
|
|
336
|
+
gridLine: i.grid,
|
|
337
|
+
hoverAffordance: i.black,
|
|
310
338
|
hoverGuideFill: "rgba(20, 20, 20, 0.07)",
|
|
311
|
-
hoverGuideLine:
|
|
312
|
-
tooltipBackground:
|
|
313
|
-
tooltipBorder:
|
|
339
|
+
hoverGuideLine: i.black,
|
|
340
|
+
tooltipBackground: i.bubble,
|
|
341
|
+
tooltipBorder: i.black,
|
|
314
342
|
tooltipPrimaryRow: "rgba(255, 214, 10, 0.35)",
|
|
315
343
|
annotationShape: s.yellow,
|
|
316
|
-
annotationArrow:
|
|
317
|
-
differenceLabelBackground:
|
|
344
|
+
annotationArrow: i.black,
|
|
345
|
+
differenceLabelBackground: i.bubble,
|
|
318
346
|
trendPositive: s.green,
|
|
319
|
-
trendNegative:
|
|
320
|
-
trendNeutral:
|
|
347
|
+
trendNegative: i.deepRed,
|
|
348
|
+
trendNeutral: i.secondary
|
|
321
349
|
},
|
|
322
350
|
defaults: [
|
|
323
|
-
|
|
324
|
-
fill:
|
|
351
|
+
t.graph({
|
|
352
|
+
fill: Pe,
|
|
325
353
|
strokeWidth: 4,
|
|
326
354
|
cornerRadius: 0,
|
|
327
|
-
fontFamily:
|
|
355
|
+
fontFamily: Oe,
|
|
328
356
|
padding: 22,
|
|
329
|
-
shadow:
|
|
357
|
+
shadow: _e
|
|
330
358
|
}),
|
|
331
|
-
|
|
359
|
+
t.geom({
|
|
332
360
|
shadow: O,
|
|
333
|
-
overpaint:
|
|
361
|
+
overpaint: xe
|
|
334
362
|
}),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
...
|
|
363
|
+
t.geom({ shadow: O }, { state: "hovered" }),
|
|
364
|
+
t.geom.bar({
|
|
365
|
+
...v,
|
|
338
366
|
strokeWidth: 2.5,
|
|
339
367
|
cornerRadius: 0
|
|
340
368
|
}),
|
|
341
|
-
|
|
342
|
-
...
|
|
369
|
+
t.geom.bar({
|
|
370
|
+
...v,
|
|
343
371
|
strokeWidth: 2.5,
|
|
344
|
-
shadow:
|
|
372
|
+
shadow: Ce
|
|
345
373
|
}, { state: "hovered" }),
|
|
346
|
-
|
|
374
|
+
t.geom.line({
|
|
347
375
|
strokeWidth: 3.5,
|
|
348
376
|
...L,
|
|
349
|
-
shadow:
|
|
377
|
+
shadow: b,
|
|
350
378
|
overpaint: "none"
|
|
351
379
|
}),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
...
|
|
380
|
+
t.geom.line({ shadow: b }, { state: "hovered" }),
|
|
381
|
+
t.geom.area({
|
|
382
|
+
...v,
|
|
355
383
|
fillAlpha: 1,
|
|
356
384
|
strokeWidth: 2.5,
|
|
357
385
|
...L
|
|
358
386
|
}),
|
|
359
|
-
|
|
360
|
-
...
|
|
387
|
+
t.geom.point({
|
|
388
|
+
...v,
|
|
361
389
|
size: 13,
|
|
362
390
|
strokeWidth: 2,
|
|
363
|
-
shadow:
|
|
391
|
+
shadow: b
|
|
364
392
|
}),
|
|
365
|
-
|
|
366
|
-
...
|
|
393
|
+
t.geom.point({
|
|
394
|
+
...v,
|
|
367
395
|
strokeWidth: 2,
|
|
368
396
|
shadow: "none"
|
|
369
397
|
}, { state: "hovered" }),
|
|
370
|
-
|
|
371
|
-
...
|
|
398
|
+
t.geom.tile({
|
|
399
|
+
...v,
|
|
372
400
|
cornerRadius: 2,
|
|
373
401
|
strokeWidth: 1.5,
|
|
374
402
|
shadow: "none"
|
|
375
403
|
}),
|
|
376
|
-
|
|
377
|
-
...
|
|
404
|
+
t.geom.tile({
|
|
405
|
+
...v,
|
|
378
406
|
strokeWidth: 3,
|
|
379
407
|
shadow: "none"
|
|
380
408
|
}, { state: "hovered" }),
|
|
381
|
-
|
|
409
|
+
t.geom.rule({
|
|
382
410
|
strokeWidth: 2.5,
|
|
383
411
|
dashArray: [3, 3],
|
|
384
412
|
lineCap: "round",
|
|
385
413
|
shadow: "none"
|
|
386
414
|
}),
|
|
387
|
-
|
|
415
|
+
t.geom.rule.label({
|
|
388
416
|
...W,
|
|
389
417
|
textColor: s.yellow,
|
|
390
418
|
fontSize: 15
|
|
391
419
|
}),
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
stroke:
|
|
420
|
+
t.gridLine({ dashArray: [1, 5] }),
|
|
421
|
+
t.gridLine.x({ strokeWidth: 0 }),
|
|
422
|
+
t.gridLine.y({ strokeWidth: 1.5 }),
|
|
423
|
+
t.panelBorder({ strokeWidth: 0 }),
|
|
424
|
+
t.panelBorder.bottom({
|
|
425
|
+
stroke: i.black,
|
|
398
426
|
strokeWidth: 3,
|
|
399
427
|
dashArray: []
|
|
400
428
|
}),
|
|
401
|
-
|
|
402
|
-
|
|
429
|
+
t.tickLine({ strokeWidth: 0 }),
|
|
430
|
+
t.tickLabel({
|
|
403
431
|
...w,
|
|
404
432
|
fontSize: 14,
|
|
405
433
|
lineHeight: 1
|
|
406
434
|
}),
|
|
407
|
-
|
|
408
|
-
...
|
|
435
|
+
t.axisLabel({
|
|
436
|
+
...k,
|
|
409
437
|
...W,
|
|
410
438
|
fontSize: 18,
|
|
411
439
|
lineHeight: 1
|
|
412
440
|
}),
|
|
413
|
-
|
|
414
|
-
|
|
441
|
+
t.heading({ ...k }),
|
|
442
|
+
t.heading.h1({
|
|
415
443
|
fontFamily: T,
|
|
416
444
|
fontWeight: 400,
|
|
417
445
|
fontSize: 36,
|
|
418
446
|
lineHeight: 1,
|
|
419
447
|
letterSpacing: 1,
|
|
420
448
|
textTransform: "uppercase",
|
|
421
|
-
textShadow:
|
|
449
|
+
textShadow: Re
|
|
422
450
|
}),
|
|
423
|
-
|
|
451
|
+
t.heading.h2({
|
|
424
452
|
...w,
|
|
425
453
|
fontSize: 16,
|
|
426
454
|
lineHeight: 1.2
|
|
427
455
|
}),
|
|
428
|
-
|
|
429
|
-
|
|
456
|
+
t.header({ margin: { bottom: 18 } }),
|
|
457
|
+
t.caption({
|
|
430
458
|
...w,
|
|
431
459
|
fontWeight: 400,
|
|
432
460
|
fontSize: 13
|
|
433
461
|
}),
|
|
434
|
-
|
|
462
|
+
t.source({
|
|
435
463
|
...w,
|
|
436
464
|
fontWeight: 400,
|
|
437
465
|
fontSize: 13
|
|
438
466
|
}),
|
|
439
|
-
|
|
440
|
-
...
|
|
467
|
+
t.dataLabel({
|
|
468
|
+
...k,
|
|
441
469
|
fontSize: 14,
|
|
442
470
|
fill: "transparent"
|
|
443
471
|
}),
|
|
444
|
-
|
|
445
|
-
...
|
|
472
|
+
t.legendItem({
|
|
473
|
+
...k,
|
|
446
474
|
...W,
|
|
447
475
|
fontSize: 18,
|
|
448
476
|
fill: "transparent",
|
|
449
477
|
stroke: "transparent"
|
|
450
478
|
}),
|
|
451
|
-
|
|
452
|
-
|
|
479
|
+
t.legendItem.swatch({ size: 16 }),
|
|
480
|
+
t.directLabel({
|
|
453
481
|
fontWeight: 700,
|
|
454
482
|
fontSize: 14
|
|
455
483
|
}),
|
|
456
|
-
|
|
484
|
+
t.tooltip({
|
|
457
485
|
strokeWidth: 2.5,
|
|
458
486
|
cornerRadius: 10,
|
|
459
487
|
paddingInline: 12,
|
|
460
488
|
paddingBlock: 9,
|
|
461
489
|
shadow: I
|
|
462
490
|
}),
|
|
463
|
-
|
|
464
|
-
...
|
|
491
|
+
t.tooltip.heading({
|
|
492
|
+
...k,
|
|
465
493
|
fontSize: 15,
|
|
466
494
|
lineHeight: 1.3
|
|
467
495
|
}),
|
|
468
|
-
|
|
496
|
+
t.tooltip.label({
|
|
469
497
|
...w,
|
|
470
498
|
fontSize: 14,
|
|
471
499
|
lineHeight: 1.3
|
|
472
500
|
}),
|
|
473
|
-
|
|
474
|
-
...
|
|
501
|
+
t.tooltip.value({
|
|
502
|
+
...k,
|
|
475
503
|
fontSize: 14,
|
|
476
504
|
lineHeight: 1.3
|
|
477
505
|
}),
|
|
478
|
-
|
|
506
|
+
t.legend.popover({
|
|
479
507
|
strokeWidth: 2.5,
|
|
480
508
|
cornerRadius: 10,
|
|
481
509
|
shadow: I
|
|
482
510
|
}),
|
|
483
|
-
|
|
484
|
-
...
|
|
485
|
-
...
|
|
511
|
+
t.annotation.text({
|
|
512
|
+
...Ie,
|
|
513
|
+
...V
|
|
486
514
|
}),
|
|
487
|
-
|
|
515
|
+
t.annotation.shape({
|
|
488
516
|
fillAlpha: 0.35,
|
|
489
|
-
stroke:
|
|
517
|
+
stroke: i.black,
|
|
490
518
|
strokeWidth: 2
|
|
491
519
|
}),
|
|
492
|
-
|
|
520
|
+
t.annotation.arrow({
|
|
493
521
|
strokeWidth: 3.5,
|
|
494
522
|
dashArray: []
|
|
495
523
|
}),
|
|
496
|
-
|
|
497
|
-
stroke:
|
|
524
|
+
t.annotation.arrow.outline({
|
|
525
|
+
stroke: i.paper,
|
|
498
526
|
strokeWidth: 2
|
|
499
527
|
}),
|
|
500
|
-
|
|
501
|
-
stroke:
|
|
502
|
-
shadow:
|
|
528
|
+
t.annotation.pinnedNumber({
|
|
529
|
+
stroke: i.black,
|
|
530
|
+
shadow: b
|
|
503
531
|
}),
|
|
504
|
-
|
|
505
|
-
...
|
|
506
|
-
...
|
|
532
|
+
t.annotation.pinnedNumber.label({
|
|
533
|
+
...E,
|
|
534
|
+
...y
|
|
507
535
|
}),
|
|
508
|
-
|
|
509
|
-
stroke:
|
|
510
|
-
shadow:
|
|
536
|
+
t.annotation.comment({
|
|
537
|
+
stroke: i.black,
|
|
538
|
+
shadow: b
|
|
511
539
|
}),
|
|
512
|
-
|
|
513
|
-
...
|
|
514
|
-
...
|
|
540
|
+
t.annotation.comment.label({
|
|
541
|
+
...E,
|
|
542
|
+
...y
|
|
515
543
|
}),
|
|
516
|
-
|
|
517
|
-
stroke:
|
|
544
|
+
t.annotation.differenceArrow({
|
|
545
|
+
stroke: i.black,
|
|
518
546
|
strokeWidth: 2.5
|
|
519
547
|
}),
|
|
520
|
-
|
|
521
|
-
...y,
|
|
548
|
+
t.annotation.differenceArrow.label({
|
|
522
549
|
...E,
|
|
550
|
+
...y,
|
|
523
551
|
fontSize: 18
|
|
524
552
|
}),
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
...
|
|
528
|
-
textOutlineColor:
|
|
553
|
+
t.panelBorder.bottom({ strokeWidth: 0 }, { coord: "polar" }),
|
|
554
|
+
t.tickLabel({
|
|
555
|
+
...k,
|
|
556
|
+
textOutlineColor: i.paper,
|
|
529
557
|
textOutlineWidth: 3.5
|
|
530
558
|
}, { coord: "polar" }),
|
|
531
|
-
|
|
559
|
+
t.geom.area({
|
|
532
560
|
fillAlpha: 0.5,
|
|
533
561
|
shadow: "none"
|
|
534
562
|
}, { coord: "polar" }),
|
|
535
|
-
|
|
563
|
+
t.geom.area({ shadow: "none" }, {
|
|
536
564
|
coord: "polar",
|
|
537
565
|
state: "hovered"
|
|
538
566
|
}),
|
|
539
|
-
|
|
567
|
+
t.geom.bar({
|
|
540
568
|
strokeWidth: 2.5,
|
|
541
569
|
shadow: O
|
|
542
570
|
}, { coord: "polar" }),
|
|
543
|
-
|
|
571
|
+
t.geom.bar({ strokeWidth: 2.5 }, {
|
|
544
572
|
coord: "polar",
|
|
545
573
|
state: "hovered"
|
|
546
574
|
})
|
|
547
575
|
]
|
|
548
|
-
},
|
|
576
|
+
}, Be = {
|
|
549
577
|
name: "comic",
|
|
550
|
-
styles:
|
|
578
|
+
styles: Le,
|
|
551
579
|
palettes: {
|
|
552
|
-
categorical:
|
|
553
|
-
sequential:
|
|
554
|
-
diverging:
|
|
580
|
+
categorical: Ee,
|
|
581
|
+
sequential: ye,
|
|
582
|
+
diverging: We
|
|
555
583
|
},
|
|
556
584
|
colorScheme: "light",
|
|
557
|
-
plugins:
|
|
585
|
+
plugins: Se
|
|
558
586
|
};
|
|
559
587
|
export {
|
|
560
|
-
|
|
588
|
+
Be as comic
|
|
561
589
|
};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"theme",
|
|
14
14
|
"comic"
|
|
15
15
|
],
|
|
16
|
-
"version": "0.1.1-beta.
|
|
16
|
+
"version": "0.1.1-beta.1792511536251",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"sideEffects": [
|
|
19
19
|
"*.css"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^19.0.0",
|
|
43
|
-
"@graphysdk/react": "^1.9.0-beta.
|
|
43
|
+
"@graphysdk/react": "^1.9.0-beta.1792511536251"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@testing-library/react": "^16.3.1",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"vite": "^8.1.5",
|
|
53
53
|
"vite-plugin-dts": "^4.5.4",
|
|
54
54
|
"vitest": "^4.1.11",
|
|
55
|
+
"@graphysdk/viz-engine": "1.9.0-beta.1792511536251",
|
|
56
|
+
"@graphysdk/react": "1.9.0-beta.1792511536251",
|
|
55
57
|
"@graphytools/eslint-config": "0.0.1",
|
|
56
58
|
"@graphytools/typescript-config": "0.0.1",
|
|
57
|
-
"@graphytools/vitest-config": "1.0.0"
|
|
58
|
-
"@graphysdk/viz-engine": "1.9.0-beta.1792506850788",
|
|
59
|
-
"@graphysdk/react": "1.9.0-beta.1792506850788"
|
|
59
|
+
"@graphytools/vitest-config": "1.0.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|