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) • 918 B
JavaScript
const n=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs");var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}n.__name(i,"getCaptureGlobal");function m(){return!!i()?.mermaidCaptureSizes}n.__name(m,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n.__name(u,"capturedFromLocation");function d(o,r){const t=i();if(!t)return;const e=r.node(),c=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:c,sizes:o};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}n.__name(d,"emitCapturedSizes");function s(o,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},o)}n.__name(s,"captureNodeSizes");exports.captureNodeSizes=s;