ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
2 lines (1 loc) • 690 B
JavaScript
const n=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),s=require("./src-C9EhKhbk.cjs"),w=require("./chunk-WYO6CB5R-u4mJNOcO.cjs");var _=n.__name((e,t,r,o)=>{e.attr("class",r);const{width:i,height:u,x:h,y:a}=x(e,t);w.configureSvgSize(e,u,i,o);const c=V(h,a,i,u,t);e.attr("viewBox",c),s.log.debug(`viewBox configured: ${c} with padding: ${t}`)},"setupViewPortForSVG"),x=n.__name((e,t)=>{const r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),V=n.__name((e,t,r,o,i)=>`${e-i} ${t-i} ${r} ${o}`,"createViewBox");Object.defineProperty(exports,"setupViewPortForSVG",{enumerable:!0,get:function(){return _}});