@buoy-gg/assets 7.0.74 → 7.0.76
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/lib/web/index.mjs +3 -3
- package/package.json +2 -2
package/lib/web/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use client";var ze=Object.defineProperty;var us=Object.getOwnPropertyDescriptor;var hs=Object.getOwnPropertyNames;var ps=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(e&&(t=e(e=0)),t);var fs=(e,t)=>{for(var s in t)ze(e,s,{get:t[s],enumerable:true})},Be=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hs(t))!ps.call(e,n)&&n!==s&&ze(e,n,{get:()=>t[n],enumerable:!(a=us(t,n))||a.enumerable});return e},ys=(e,t,s)=>(Be(e,t,"default"),s&&Be(s,t,"default"));var rt=e=>Be(ze({},"__esModule",{value:true}),e);var ms,u=le(()=>{"use strict";ms=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});var ot,gs=le(()=>{"use strict";u();ot='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'});import{useEffect as bs,useState as vs}from"react";import{createPortal as Ss}from"react-dom";import{jsx as ws}from"react/jsx-runtime";function it(){let e=document;if(e[J])return e[J].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:ot});let s=()=>{let i=document.fullscreenElement,y=i&&i.tagName!=="CANVAS"?i:document.body;t.parentElement!==y&&y.appendChild(t)},a=new Map,n=i=>{(!t.contains(i.target)||!Ie(i.target))&&a.set(i.code||i.key,{key:i.key,code:i.code,location:i.location,keyCode:i.keyCode,which:i.which,altKey:i.altKey,ctrlKey:i.ctrlKey,metaKey:i.metaKey,shiftKey:i.shiftKey})},r=i=>{a.delete(i.code||i.key)},o=()=>a.clear(),l=()=>{let i=[...a.values()];a.clear();for(let y of i)document.dispatchEvent(new KeyboardEvent("keyup",{...y,bubbles:true}))},d=i=>{Ie(i.target)&&i.stopPropagation()},c=i=>i.stopPropagation();return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("keydown",n,true),document.addEventListener("keyup",r,true),window.addEventListener("blur",o),t.addEventListener("focusin",l),t.addEventListener("keydown",d),t.addEventListener("keyup",d),t.addEventListener("keypress",d),t.addEventListener("wheel",c,{passive:true}),e[J]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("keydown",n,true),document.removeEventListener("keyup",r,true),window.removeEventListener("blur",o),t.remove(),delete e[J]}},t}function xs({children:e}){let[t,s]=vs(null);return bs(()=>{let a=it(),n=document[J];return n.users++,s(a),()=>{--n.users===0&&n.dispose()}},[]),t?Ss(ws("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}var J,Ie,Cs=le(()=>{"use strict";u();gs();J=Symbol.for("@buoy-gg/portal-host"),Ie=e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"}});var de={};fs(de,{AccessibilityInfo:()=>Is,ActivityIndicator:()=>Le,Alert:()=>bt,Animated:()=>Ds,AppRegistry:()=>As,AppState:()=>Fs,Appearance:()=>$s,BackHandler:()=>Ls,Button:()=>mt,CheckBox:()=>_s,Clipboard:()=>Es,DeviceEventEmitter:()=>ia,Dimensions:()=>Ts,Easing:()=>Rs,FlatList:()=>lt,I18nManager:()=>Ms,Image:()=>dt,ImageBackground:()=>qs,InteractionManager:()=>Os,Keyboard:()=>Ps,KeyboardAvoidingView:()=>Js,LayoutAnimation:()=>js,Linking:()=>Hs,LogBox:()=>oa,Modal:()=>ft,NativeEventEmitter:()=>Ns,NativeModules:()=>Bs,PanResponder:()=>Vs,Picker:()=>Ys,PixelRatio:()=>Ws,Platform:()=>ce,Pressable:()=>pt,ProgressBar:()=>Qs,RefreshControl:()=>Zs,SafeAreaView:()=>Xs,ScrollView:()=>Ae,SectionList:()=>ea,Share:()=>Us,StatusBar:()=>ta,StyleSheet:()=>P,Switch:()=>yt,Text:()=>b,TextInput:()=>$e,Touchable:()=>sa,TouchableHighlight:()=>ut,TouchableNativeFeedback:()=>aa,TouchableOpacity:()=>N,TouchableWithoutFeedback:()=>ht,UIManager:()=>Ks,Vibration:()=>Gs,View:()=>m,VirtualizedList:()=>na,YellowBox:()=>ra,findNodeHandle:()=>gt,unstable_createElement:()=>zs,useColorScheme:()=>la,useLocaleContext:()=>da,useWindowDimensions:()=>ca});import*as ks from"react-native-web";import{unstable_createElement as zs,NativeModules as Bs,AccessibilityInfo as Is,Animated as Ds,Appearance as $s,AppRegistry as As,AppState as Fs,BackHandler as Ls,Clipboard as Es,Dimensions as Ts,Easing as Rs,I18nManager as Ms,Keyboard as Ps,InteractionManager as Os,LayoutAnimation as js,Linking as Hs,NativeEventEmitter as Ns,PanResponder as Vs,PixelRatio as Ws,Platform as ce,Share as Us,StyleSheet as P,UIManager as Ks,Vibration as Gs,CheckBox as _s,FlatList as lt,Image as dt,ImageBackground as qs,KeyboardAvoidingView as Js,Picker as Ys,ProgressBar as Qs,RefreshControl as Zs,SafeAreaView as Xs,SectionList as ea,StatusBar as ta,Touchable as sa,TouchableNativeFeedback as aa,VirtualizedList as na,YellowBox as ra,LogBox as oa,DeviceEventEmitter as ia,useColorScheme as la,useLocaleContext as da,useWindowDimensions as ca}from"react-native-web";import*as B from"react-native-web";import{createElement as De,forwardRef as ct,useCallback as ua,useRef as ha}from"react";function $(e){let t=ct((a,n)=>{let{accessibilityState:r,accessibilityValue:o,...l}=a;for(let d of["busy","checked","disabled","expanded","selected"])r?.[d]!==void 0&&l[`aria-${d}`]===void 0&&(l[`aria-${d}`]=r[d]);for(let[d,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))o?.[d]!==void 0&&l[`aria-${c}`]===void 0&&(l[`aria-${c}`]=o[d]);return De(e,{...l,ref:n})}),s=e.State;return s&&Object.assign(t,{State:s}),t.displayName=e.displayName??e.name??"NativeWebView",t}var m,b,$e,N,ut,ht,pt,Ae,Fe,ft,yt,Le,mt,gt,bt,T=le(()=>{u();ys(de,ks);Cs();m=$(B.View),b=$(B.Text),$e=$(B.TextInput),N=$(B.TouchableOpacity),ut=$(B.TouchableHighlight),ht=$(B.TouchableWithoutFeedback),pt=$(B.Pressable),Ae=$(B.ScrollView),Fe=ct((e,t)=>{let s=ha(null),a=ua(n=>{if(n){let r=n;for(;r.parentElement&&r.parentElement!==document.body;)r=r.parentElement;r.parentElement===document.body&&(s.current=r,Object.assign(r.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),it().appendChild(r))}else s.current&&(document.body.appendChild(s.current),s.current=null);typeof t=="function"?t(n):t&&(t.current=n)},[t]);return De(xs,null,De(B.Modal,{...e,ref:a}))});Fe.displayName="Modal";ft=$(Fe),yt=$(B.Switch),Le=$(B.ActivityIndicator),mt=$(B.Button),gt=B.findNodeHandle,bt={alert(e,t,s,a){if(typeof document>"u")return;let n=document.createElement("dialog");n.dataset.buoyRoot="",n.setAttribute("aria-label",e),n.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let r=document.createElement("h2");if(r.textContent=e,r.style.cssText="font-size:18px;margin:0 0 12px",n.appendChild(r),t){let c=document.createElement("p");c.textContent=t,c.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",n.appendChild(c)}let o=document.createElement("div");o.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=s?.length?s:[{text:"OK"}],d=()=>{n.close?.(),n.remove()};for(let c of l){let i=document.createElement("button");i.type="button",i.textContent=c.text??"OK",i.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${c.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,i.onclick=()=>{d(),c.onPress?.()},o.appendChild(i)}n.addEventListener("cancel",c=>{c.preventDefault(),a?.cancelable!==false&&(d(),a?.onDismiss?.())}),n.appendChild(o),document.body.appendChild(n),n.showModal?n.showModal():n.setAttribute("open","")}}});u();u();u();import{AssetsIcon as vt,ASSETS_ICON_COLOR as St}from"@buoy-gg/shared-ui/web";u();T();import{useEffect as wt,useState as ae}from"react";import{EventStepperFooter as pa,JsModal as fa,macOSColors as ya,night as R,windowDragProps as ma,ToolEmptyState as ga}from"@buoy-gg/shared-ui/web";u();u();var Ee=Symbol.for("buoy.assets.globalState.v1");function f(){let e=globalThis;return e[Ee]||(e[Ee]={records:[],byKey:new Map,byId:new Map,nextId:1,listeners:new Set,snapshot:[],emitScheduled:false,installed:false,patched:false,registryAvailable:false,graphSupported:false,graphCount:null,graphError:null,graphFetchInFlight:false,lastScanAt:null,measuring:false,measuredCount:0,fontFamilies:[],localAssetCount:null,baseline:null,baselineLoaded:false,captureDisabled:false,remoteDispatch:null,mirrorScanStatus:null,mirrorPixelRatio:null,mirrorDiff:null}),e[Ee]}u();u();import{isBuoyAssetPath as xt}from"@buoy-gg/shared-ui/web";function Ct(e){return[e.key,e.resolvedUri,e.httpServerLocation,e.fileSystemLocation,...e.files??[]].some(xt)}u();function kt(){let e=f().mirrorPixelRatio;if(e!=null)return e;try{return(T(),rt(de)).PixelRatio.get()}catch{return 2}}function ba(e,t){if(!e.length)return 1;let s=[...e].sort((a,n)=>a-n);for(let a of s)if(a>=t)return a;return s[s.length-1]}function va(){let e=f();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function A(){let e=f();e.snapshot=[...e.records],va()}var Sa={png:"image",jpg:"image",jpeg:"image",gif:"image",webp:"image",bmp:"image",psd:"image",svg:"image",tiff:"image",ktx:"image",heic:"image",heif:"image",avif:"image",ttf:"font",otf:"font",woff:"font",woff2:"font",ttc:"font",mp4:"video",m4v:"video",mov:"video",mpeg:"video",mpg:"video",webm:"video",avi:"video",mp3:"audio",wav:"audio",aac:"audio",aiff:"audio",caf:"audio",m4a:"audio",ogg:"audio",json:"data",db:"data",yaml:"data",yml:"data",xml:"data",html:"data",pdf:"data",zip:"data"};function wa(e){return Sa[e.toLowerCase()]??"other"}function xa(e){if(Ct(e))return;let t=f(),s=t.byKey.get(e.key);return s||(s={id:t.nextId++,key:e.key,name:e.name,type:e.type,kind:wa(e.type),scales:e.scales??[],loaded:e.loaded??false,origin:e.origin,firstSeenAt:Date.now()},t.records.push(s),t.byKey.set(s.key,s),t.byId.set(s.id,s)),e.registryId!=null&&(s.registryId=e.registryId),e.hash!=null&&(s.hash=e.hash),e.httpServerLocation!=null&&(s.httpServerLocation=e.httpServerLocation),e.width!=null&&(s.width=e.width),e.height!=null&&(s.height=e.height),e.scales&&e.scales.length&&(s.scales=[...new Set(e.scales)].sort((a,n)=>a-n)),e.resolvedUri!=null&&(s.resolvedUri=e.resolvedUri),e.resolvedScale!=null&&(s.resolvedScale=e.resolvedScale),e.loaded&&(s.loaded=true),e.fileSystemLocation!=null&&(s.fileSystemLocation=e.fileSystemLocation),e.files&&(s.files=e.files),e.fileHashes&&(s.fileHashes=e.fileHashes),A(),s}function ne(e,t){let s=f().byId.get(e);if(s)return Object.assign(s,t),A(),s}function Te(e){return f().byId.get(e)}function F(){return f().snapshot}function ue(e){return f().listeners.add(e),()=>f().listeners.delete(e)}function Re(){let e=f();e.records=[],e.byKey=new Map,e.byId=new Map,e.measuredCount=0,e.graphCount=null,A()}function C(e){if(e.kind!=="image"||!e.width||!e.height)return 0;let t=e.resolvedScale??ba(e.scales,kt());return Math.round(e.width*t*e.height*t*4)}function Me(e){let t=f(),s={image:{count:0,bytes:0},font:{count:0,bytes:0},video:{count:0,bytes:0},audio:{count:0,bytes:0},data:{count:0,bytes:0},other:{count:0,bytes:0}},a={total:e.length,loaded:0,neverLoaded:0,byKind:s,totalBytes:0,measuredCount:0,fontFamilies:t.fontFamilies.length};for(let n of e)n.loaded?a.loaded++:a.neverLoaded++,s[n.kind].count++,n.sizeBytes!=null&&n.sizeSource==="measured"&&(s[n.kind].bytes+=n.sizeBytes,a.totalBytes+=n.sizeBytes,a.measuredCount++);return a}u();import{buoyFetch as Ca,isBuoyElement as zt,isBuoyAssetPath as ka}from"@buoy-gg/shared-ui/web";var Y=[],Q=new Set;function za(e){if(!(typeof document>"u"))try{Q.add(new URL(e,document.baseURI).href)}catch{}}function Pe(e=document){let t=Array.from(e.querySelectorAll("img"));for(let s of Array.from(e.querySelectorAll("*")))s.shadowRoot&&t.push(...Pe(s.shadowRoot));return t}function Bt(e){Y=e.filter(t=>!ka(t.url)),typeof document<"u"&&pe()}function It(){return Y}async function Ba(e){let t=await Ca(e);if(!t.ok)throw new Error(`Asset manifest returned HTTP ${t.status}.`);let s=await t.json();if(!Array.isArray(s)||s.some(a=>!a||typeof a.url!="string"))throw new Error("An asset manifest must contain an array of assets with URL strings.");Bt(s)}function he(e,t){let s;try{s=new URL(e.url,document.baseURI)}catch{return}let a=s.pathname.split("/").pop()??"",n=a.includes(".")?a.split(".").pop().toLowerCase():"other",r=xa({key:s.href,name:a.slice(0,-(n.length+1))||a,type:n,origin:t?"browser":"graph",resolvedUri:s.href,resolvedScale:1,scales:[1],hash:e.hash,loaded:t,width:e.width,height:e.height});return r&&e.bytes!==void 0&&e.bytes>=0&&ne(r.id,{sizeBytes:e.bytes,sizesByScale:{1:e.bytes},sizeSource:"measured"}),r}function Dt(e){if(!(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")){if(e.initiatorType==="img"){let t=Pe().filter(s=>(s.currentSrc||s.src)===e.name);t.length&&(t.every(zt)?Q.add(e.name):Q.delete(e.name))}Q.has(e.name)||he({url:e.name,bytes:e.encodedBodySize>0?e.encodedBodySize:void 0},true)}}function $t(e){if(f().captureDisabled)return;let t=e.currentSrc||e.src;if(zt(e)){t&&Q.add(t);return}Q.delete(t),!(!t||!e.complete||e.naturalWidth<=0)&&he({url:t,width:e.naturalWidth,height:e.naturalHeight},true)}function pe(){if(typeof document>"u"||f().captureDisabled)return;Y.forEach(t=>he(t,false)),performance.getEntriesByType("resource").forEach(t=>Dt(t)),Pe().forEach($t);let e=f();e.graphSupported=Y.length>0,e.graphCount=Y.length>0?Y.length:null,e.measuredCount=e.records.filter(t=>t.sizeBytes!==void 0).length,e.lastScanAt=Date.now()}function Ia(e){if(typeof document>"u"||f().captureDisabled)return;let t=he({url:e.url,bytes:e.bytes??void 0},e.status==="success");t&&ne(t.id,{loadStatus:e.status,durationMs:e.durationMs,cacheHit:e.cacheHit})}u();function Oe(){if(typeof document>"u"||!document.fonts)return[];let e=new Set;return document.fonts.forEach(t=>{t.status==="loaded"&&e.add(t.family.replace(/^['"]|['"]$/g,""))}),[...e].sort()}function Da(){return null}var Z,At=e=>{let t=e.target;t?.tagName==="IMG"&&$t(t)};function fe(){let e=f();if(!(typeof document>"u"||e.captureDisabled||e.installed)){if(e.installed=true,e.registryAvailable=true,document.addEventListener("load",At,true),typeof PerformanceObserver<"u"){Z=new PerformanceObserver(t=>{if(f().captureDisabled){Ft();return}t.getEntries().forEach(s=>Dt(s))});try{Z.observe({type:"resource",buffered:true}),e.patched=true}catch{Z.disconnect(),Z=void 0}}pe(),e.fontFamilies=Oe(),A()}}function Ft(){Z?.disconnect(),Z=void 0,typeof document<"u"&&document.removeEventListener("load",At,true),f().installed=false,f().patched=false}async function ye(){return fe(),pe(),f().fontFamilies=Oe(),A(),X()}function X(){let e=f();return e.mirrorScanStatus??{registryAvailable:e.registryAvailable,patched:e.patched,registryCount:e.records.filter(t=>t.loaded).length,graphSupported:e.graphSupported,graphCount:e.graphCount,graphError:null,graphFetchInFlight:false,graphFetchStartedAt:null,lastScanAt:e.lastScanAt,measuring:false,measuredCount:e.measuredCount,fontFamilies:e.fontFamilies,localAssetCount:null,browser:true}}u();u();function I(e){return e==null||e<=0?"\u2014":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function me(e){let t=[...new Set(e)].sort((s,a)=>s-a);return t.length?t.length===1?`@${t[0]}x`:t.length<=3?t.map(s=>`@${s}x`).join(" "):`@${t[0]}x\u2013@${t[t.length-1]}x`:"\u2014"}function ge(e){return e.width==null||e.height==null?"\u2014":`${Math.round(e.width)}\xD7${Math.round(e.height)}`}function $a(e,t){return e.sizeBytes!=null&&e.sizeSource==="measured"?I(e.sizeBytes):t>0?`~${I(t)}`:"\u2014"}var Lt={image:"IMG",font:"FONT",video:"VID",audio:"AUD",data:"DATA",other:"MISC"},Et={image:"#2DD4BF",font:"#C084FC",video:"#FF9F1C",audio:"#FF3366",data:"#00D4FF",other:"#8E8E93"};function Tt(e){let t=[`# Asset: ${e.name}.${e.type}`,"",`- Kind: ${e.kind}`,`- Status: ${e.loaded?"loaded at runtime":"not observed in the runtime registry"}`];e.kind==="image"&&t.push(`- Dimensions: ${ge(e)} (logical)`),e.scales.length&&t.push(`- Scales: ${me(e.scales)}`),e.sizeBytes!=null&&e.sizeSource==="measured"&&t.push(`- Size (all variants): ${I(e.sizeBytes)}`);let s=C(e);return s>0&&t.push(`- Decoded memory: ~${I(s)}`),e.hash&&t.push(`- Hash: ${e.hash}`),e.httpServerLocation&&t.push(`- Location: ${e.httpServerLocation}`),e.fileSystemLocation&&t.push(`- Source dir: ${e.fileSystemLocation}`),e.resolvedUri&&t.push(`- Resolved URI: ${e.resolvedUri}`),t.join(`
|
|
2
|
-
`)}function
|
|
3
|
-
`)}u();import{useMemo as Aa,useSyncExternalStore as Fa}from"react";u();var La=50*1024,Ea=100*1024,Ta=150*1024,Ra=2,Ma=.9,Pa=4*1024;function Oa(){try{let{Dimensions:e,PixelRatio:t}=(T(),rt(de)),s=e.get("screen"),a=t.get();return s.width*a*s.height*a}catch{return 1170*2532}}function ja(e){let t=e.sizesByScale;if(!t)return false;let s=Object.entries(t).map(([a,n])=>({scale:Number(a),bytes:n})).filter(a=>Number.isFinite(a.scale)&&a.bytes>0).sort((a,n)=>a.scale-n.scale);for(let a=1;a<s.length;a++)if(s[a-1].bytes>=Pa&&s[a].bytes<s[a-1].bytes*Ma)return true;return false}function je(e){let t=kt(),s=new Map;for(let p of e){if(!p.hash)continue;let D=s.get(p.hash);D?D.push(p):s.set(p.hash,[p])}let a=[];for(let[p,D]of s){if(D.length<2)continue;let G=D.find(k=>k.sizeBytes!=null);a.push({hash:p,ids:D.map(k=>k.id),wastedBytes:G?.sizeBytes!=null?G.sizeBytes*(D.length-1):null})}let n=Oa(),r=[],o=[],l=[],d=[],c=[],i=[],y=[];for(let p of e)p.loaded||l.push(p.id),p.kind==="image"&&p.scales.length>1&&!p.scales.some(D=>D>=t)&&r.push(p.id),(p.type==="png"||p.type==="jpg"||p.type==="jpeg")&&p.sizeBytes!=null&&p.sizeBytes>=La&&o.push(p.id),p.kind==="image"&&C(p)/4>n*Ra&&d.push(p.id),p.type==="gif"&&(p.sizeBytes??0)>=Ea&&c.push(p.id),p.kind==="font"&&(p.sizeBytes??0)>=Ta&&i.push(p.id),ja(p)&&y.push(p.id);return{duplicates:a,scaleGaps:r,webpCandidates:o,neverLoaded:l,overDecode:d,heavyGifs:c,heavyFonts:i,scaleAnomalies:y}}function Mt(){let e=Fa(ue,F,F);return Aa(()=>({records:e,stats:Me(e),insights:je(e)}),[e])}u();import{useSyncExternalStore as Ha}from"react";var Pt,Ot;function jt(){let e=F();return e!==Pt&&(Pt=e,Ot=X()),Ot}function Na(){return Ha(ue,jt,jt)}u();function Va(e){f().remoteDispatch=e}function be(){return f().remoteDispatch}function Wa(){f().captureDisabled=true}function Ua(e){let t=f(),s=e.records??[];t.records=s.map(a=>({id:a.id,key:a.key,loadStatus:a.loadStatus,durationMs:a.durationMs,cacheHit:a.cacheHit,registryId:a.registryId??void 0,name:a.name,type:a.type,kind:a.kind,hash:a.hash??void 0,httpServerLocation:a.location??void 0,width:a.width??void 0,height:a.height??void 0,scales:a.scales,resolvedUri:a.uri??void 0,loaded:a.loaded,origin:a.registryId!=null?"registry":"graph",sizeBytes:a.sizeBytes??void 0,sizeSource:a.sizeSource??void 0,firstSeenAt:Date.now()})).filter(a=>!Ct(a)),t.byKey=new Map(t.records.map(a=>[a.key,a])),t.byId=new Map(t.records.map(a=>[a.id,a])),e.scanStatus&&(t.fontFamilies=[...new Set(e.scanStatus.fontFamilies??[])],t.mirrorScanStatus={...e.scanStatus,fontFamilies:t.fontFamilies}),t.mirrorDiff=e.diff??null,A()}u();import{persistentStorage as He}from"@buoy-gg/shared-ui/web";var Ne="@react_buoy/assets/baseline",Ka=1024;async function Ht(){let e=f();if(e.baselineLoaded)return e.baseline;e.baselineLoaded=true;try{let t=await He.getItem(Ne);if(t){let s=JSON.parse(t);s&&typeof s.savedAt=="number"&&s.entries&&(e.baseline=s,A())}}catch{}return e.baseline}async function Nt(){let e=be();if(e)return await e("saveBaseline"),f().baseline??{savedAt:Date.now(),entries:{}};let t=f(),s={};for(let n of F())s[n.key]={hash:n.hash??null,sizeBytes:n.sizeSource==="measured"?n.sizeBytes??null:null,name:n.name,type:n.type};let a={savedAt:Date.now(),entries:s};t.baseline=a,t.baselineLoaded=true,A();try{await He.setItem(Ne,JSON.stringify(a))}catch{}return a}async function Vt(){let e=be();if(e){await e("clearBaseline");return}let t=f();t.baseline=null,t.baselineLoaded=true,A();try{await He.removeItem(Ne)}catch{}}function Wt(e,t){let s=[],a=[],n=new Set,r=0,o=0,l=false;for(let c of e){n.add(c.key);let i=t.entries[c.key];if(!i){s.push(c.id);continue}let y=c.sizeSource==="measured"?c.sizeBytes??null:null;y!=null&&i.sizeBytes!=null&&(l=true,r+=y,o+=i.sizeBytes,y-i.sizeBytes>=Ka&&a.push({id:c.id,deltaBytes:y-i.sizeBytes}))}let d=[];for(let[c,i]of Object.entries(t.entries))xt(c)||n.has(c)||(d.push({key:c,name:i.name,type:i.type}),i.sizeBytes!=null&&(l=true,o+=i.sizeBytes));for(let c of s){let i=e.find(y=>y.id===c);i?.sizeSource==="measured"&&i.sizeBytes!=null&&(l=true,r+=i.sizeBytes)}return{baselineSavedAt:t.savedAt,added:s,removed:d,grown:a.sort((c,i)=>i.deltaBytes-c.deltaBytes),netBytes:l?r-o:null}}function ve(){let e=f();return e.mirrorDiff?e.mirrorDiff:e.baseline?Wt(F(),e.baseline):null}u();T();import{night as V}from"@buoy-gg/shared-ui/web";u();T();import{useState as Ga}from"react";import{night as _a}from"@buoy-gg/shared-ui/web";u();T();import{buoyFetch as Ut}from"@buoy-gg/shared-ui/web";u();function Kt(){return null}async function qa(){pe();let e=It().length;return e?{ok:true,count:e}:{ok:false,message:"Register a browser asset manifest to inspect files that have not loaded yet."}}var Ja=4;function Ya(e){if(e.resolvedUri)return e.resolvedUri;let t=Gt(e);return t.length?t[0].url:null}function Qa(e){let t=f().captureDisabled;if(!t&&e.registryId!=null)return e.registryId;let s=Ya(e);return!s||t&&!/^https?:\/\//.test(s)?null:{uri:s}}function Gt(e){let t=e.scales.length?e.scales:[1],s=e.resolvedUri;if(s&&/^https?:\/\//.test(s)&&e.resolvedScale!=null){let n=e.resolvedScale===1?"":`@${e.resolvedScale}x`,r=`${n}.${e.type}`;if(s.includes(r)||n==="")return t.map(o=>{let l=o===1?"":`@${o}x`,d=(n===""?s.replace(`.${e.type}`,`${l}.${e.type}`):s.replace(r,`${l}.${e.type}`)).replace(/ /g,"%20");return{scale:o,url:d}})}let a=Kt();return!a||!e.httpServerLocation?[]:t.map(n=>{let r=n===1?"":`@${n}x`,o=`${e.httpServerLocation}/${e.name}${r}.${e.type}`,l=o.includes("?")?"&":"?",d=`${a}${o}${l}platform=${Za()}${e.hash?`&hash=${e.hash}`:""}`.replace(/ /g,"%20");return{scale:n,url:d}})}function Za(){try{return ce.OS}catch{return"ios"}}async function Xa(e){try{let t=await Ut(e,{method:"HEAD"});if(t.ok){let s=Number(t.headers.get("content-length"));if(Number.isFinite(s)&&s>0)return s}}catch{}try{let t=await Ut(e);if(!t.ok)return null;let s=await t.blob();return s.size>0?s.size:null}catch{return null}}async function en(e){let t=Gt(e);if(!t.length){ne(e.id,{sizeSource:"estimate"});return}let s={},a=0;for(let{scale:n,url:r}of t){let o=await Xa(r);o!=null&&(s[String(n)]=o,a+=o)}a>0?ne(e.id,{sizesByScale:s,sizeBytes:a,sizeSource:"measured"}):ne(e.id,{sizeSource:"estimate"})}async function _t(){let e=f();if(e.measuring)return{measured:e.measuredCount,total:F().length};let t=F().filter(s=>s.sizeSource!=="measured");e.measuring=true,A();try{let s=0,a=async()=>{for(;;){let n=t[s++];if(!n)return;await en(n),e.measuredCount=F().filter(r=>r.sizeSource==="measured").length}};await Promise.all(Array.from({length:Math.min(Ja,t.length)},a))}finally{e.measuring=false,A()}return{measured:e.measuredCount,total:F().length}}u();function tn(e){e&&typeof e=="object"&&za(e.uri)}u();function sn(){return null}import{jsx as Se}from"react/jsx-runtime";function qt({record:e,style:t,testID:s,compact:a=false}){let n=Qa(e);tn(n);let r=e.type.toLowerCase()==="svg",o=r&&ce.OS!=="web"?sn():null,l=`${e.key}:${e.hash??""}:${typeof n=="number"?n:n?.uri??""}`,[d,c]=Ga(null);if(n==null||d===l||r&&ce.OS!=="web"&&!o){let y=r?"SVG preview unavailable":"Image preview unavailable";return Se(m,{style:[t,Jt.fallback],accessibilityLabel:y,testID:`${s}-unavailable`,children:Se(b,{style:Jt.text,children:a?r?"SVG":"IMG":y})})}let i=()=>c(l);return o?Se(o,{source:n,style:t,contentFit:"contain",onError:i,testID:s}):Se(dt,{source:n,style:t,resizeMode:"contain",onError:i,testID:s})}var Jt=P.create({fallback:{alignItems:"center",justifyContent:"center"},text:{color:_a.color.textSecondary,fontSize:10,textAlign:"center"}});u();function ee(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function re(e,t){return`buoy-assets-row-${ee(`${e}.${t}`)}`}function Yt(e,t,s){return`${re(e,t)}-badge-${ee(s)}`}function Ve(e){return`buoy-assets-filter-${ee(e)}`}function Qt(e){return`buoy-assets-detail-row-${ee(e)}`}function Zt(e){return`buoy-assets-font-${ee(e)}`}var v={title:"buoy-assets-title",copy:"buoy-assets-copy",clear:"buoy-assets-clear",list:"buoy-assets-list",search:"buoy-assets-search",sort:"buoy-assets-sort",filterBar:"buoy-assets-filter-bar",notice:"buoy-assets-notice",noticeText:"buoy-assets-notice-text",discoverySpinner:"buoy-assets-discovery-spinner",retry:"buoy-assets-retry",fonts:"buoy-assets-fonts",fontsTitle:"buoy-assets-fonts-title",empty:"buoy-assets-empty",emptyTitle:"buoy-assets-empty-title",emptyText:"buoy-assets-empty-text",detail:"buoy-assets-detail",detailScroll:"buoy-assets-detail-scroll",detailPreview:"buoy-assets-detail-preview",detailFontPreview:"buoy-assets-detail-font-preview",detailFindings:"buoy-assets-detail-findings"};function Xt(e){return`buoy-assets-detail-finding-${e}`}import{Fragment as an,jsx as g,jsxs as We}from"react/jsx-runtime";function w({label:e,value:t}){let s=Qt(e);return We(m,{style:L.kvRow,testID:s,children:[g(b,{style:L.kvLabel,children:e}),g(b,{style:L.kvValue,selectable:true,testID:`${s}-value`,children:t})]})}function nn({record:e}){return e.kind==="image"?g(m,{style:L.previewBox,testID:v.detailPreview,children:g(qt,{testID:"buoy-internal-assets-preview",record:e,style:L.previewImage})}):e.kind==="font"?g(m,{style:L.previewBox,testID:v.detailFontPreview,children:g(b,{style:[L.fontPreview,{fontFamily:e.name}],children:"The quick brown fox jumps over the lazy dog 0123456789"})}):null}function rn({record:e,insights:t}){let s=[];t.neverLoaded.includes(e.id)&&s.push("Not observed in the runtime registry this app run. This does not prove the asset is unused."),t.scaleGaps.includes(e.id)&&s.push("Scale gap \u2014 no variant covers this device's pixel ratio"),t.webpCandidates.includes(e.id)&&s.push("WebP candidate \u2014 large png/jpeg, converting typically saves 20\u201340%");let a=t.duplicates.find(r=>r.ids.includes(e.id));a&&s.push(`Duplicate content \u2014 identical bytes shipped ${a.ids.length} times`),t.overDecode.includes(e.id)&&s.push("Decodes larger than 2\xD7 this entire screen \u2014 resize the source, no view can need this many pixels"),t.heavyGifs.includes(e.id)&&s.push("Heavy GIF \u2014 every frame decodes into memory; a video or Lottie is typically ~90% smaller"),t.heavyFonts.includes(e.id)&&s.push("Heavy font \u2014 likely an unsubset icon font; subsetting to used glyphs usually saves most of it"),t.scaleAnomalies.includes(e.id)&&s.push("Scale anomaly \u2014 a higher-resolution variant is smaller in bytes than a lower one; check the exports");let n=C(e);return We(Ae,{style:L.scroll,contentContainerStyle:L.content,testID:v.detailScroll,children:[g(nn,{record:e}),s.length>0?g(m,{style:L.findings,testID:v.detailFindings,children:s.map((r,o)=>g(b,{style:L.findingText,testID:Xt(o),children:r},r))}):null,g(w,{label:"Name",value:`${e.name}.${e.type}`}),e.loadStatus&&We(an,{children:[g(w,{label:"Load",value:e.loadStatus==="error"?"Failed":"Loaded"}),g(w,{label:"Load time",value:e.durationMs==null?"Unknown":`${e.durationMs.toFixed(1)} ms`}),g(w,{label:"Load size",value:e.sizeBytes==null?"Unknown":I(e.sizeBytes)}),g(w,{label:"Cache",value:e.cacheHit==null?"Unknown":e.cacheHit?"Cache hit":"Web load"})]}),g(w,{label:"Kind",value:e.kind}),g(w,{label:"Status",value:e.loaded?"Loaded (registered at runtime)":"Not observed in the runtime registry"}),e.kind==="image"?g(w,{label:"Dimensions",value:`${ge(e)} (logical)`}):null,e.kind==="image"&&e.scales.length?g(w,{label:"Scales",value:me(e.scales)}):null,e.sizesByScale?Object.entries(e.sizesByScale).map(([r,o])=>g(w,{label:`Size @${r}x`,value:I(o)},r)):null,e.sizeBytes!=null&&e.sizeSource==="measured"?g(w,{label:"Total size",value:I(e.sizeBytes)}):null,n>0?g(w,{label:"Decoded memory",value:`~${I(n)} (RGBA)`}):null,e.registryId!=null?g(w,{label:"Registry id",value:String(e.registryId)}):null,e.hash?g(w,{label:"Hash",value:e.hash}):null,e.httpServerLocation?g(w,{label:"Location",value:e.httpServerLocation}):null,e.fileSystemLocation?g(w,{label:"Source dir",value:e.fileSystemLocation}):null,e.resolvedUri?g(w,{label:"Resolved URI",value:e.resolvedUri}):null]})}var L=P.create({scroll:{flex:1},content:{padding:12,gap:8},previewBox:{borderRadius:8,backgroundColor:V.color.bg,padding:12,alignItems:"center",justifyContent:"center",minHeight:96},previewImage:{width:"100%",height:140},fontPreview:{color:V.color.text,fontSize:16,textAlign:"center"},findings:{borderRadius:8,borderWidth:1,borderColor:V.color.border,backgroundColor:V.color.surface,padding:10,gap:6},findingText:{color:V.color.textSecondary,fontSize:11,lineHeight:15},kvRow:{gap:2},kvLabel:{color:V.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.5,textTransform:"uppercase"},kvValue:{color:V.color.text,fontSize:12}});u();T();import{macOSColors as Ue,night as W,Pill as on}from"@buoy-gg/shared-ui/web";import{jsx as E,jsxs as U}from"react/jsx-runtime";function ln({label:e,color:t,testID:s}){return E(on,{label:e,color:t,variant:"quiet",dot:!!t,style:{paddingVertical:2.5},testID:s})}function dn({record:e,flags:t,sizeFraction:s,onPress:a}){let n=Et[e.kind],r=[];return e.loaded||r.push({label:"NOT OBSERVED"}),t.oversize&&r.push({label:"OVERSIZE",color:Ue.semantic.error}),t.duplicate&&r.push({label:"DUP"}),t.heavy&&r.push({label:"HEAVY"}),t.scaleAnomaly?r.push({label:"BAD SCALE",color:Ue.semantic.error}):t.scaleGap&&r.push({label:"LOW-RES"}),t.webp&&r.push({label:"WEBP",color:Ue.semantic.info}),U(N,{style:x.card,testID:re(e.name,e.type),onPress:()=>a(e.id),activeOpacity:.7,children:[U(m,{style:x.body,children:[E(m,{style:x.thumbBox,children:e.kind==="image"?E(qt,{testID:"buoy-internal-assets-thumb",record:e,style:x.thumb,compact:true}):E(b,{style:[x.thumbFallback,{color:n}],children:Lt[e.kind]})}),U(m,{style:x.main,children:[U(b,{style:x.name,numberOfLines:1,testID:`${re(e.name,e.type)}-name`,children:[e.name,U(b,{style:x.ext,children:[".",e.type]})]}),U(m,{style:x.metaRow,children:[e.kind==="image"&&e.width!=null?E(b,{style:x.meta,children:ge(e)}):null,e.kind==="image"&&e.scales.length?E(b,{style:x.meta,children:me(e.scales)}):null]})]}),U(m,{style:x.right,children:[E(b,{style:x.size,testID:`${re(e.name,e.type)}-size`,children:$a(e,C(e))}),r.length?E(m,{style:x.badgeRow,children:r.slice(0,3).map(o=>E(ln,{label:o.label,color:o.color,testID:Yt(e.name,e.type,o.label)},o.label))}):null]})]}),s>0?E(m,{style:x.sizeTrack,children:E(m,{style:[x.sizeFill,{backgroundColor:n,width:`${Math.max(2,Math.round(s*100))}%`}]})}):null]})}var x=P.create({card:{marginHorizontal:10,marginTop:6,borderRadius:10,backgroundColor:W.color.surface,borderWidth:1,borderColor:W.color.border,overflow:"hidden"},body:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:12,gap:10},thumbBox:{width:40,height:40,borderRadius:8,backgroundColor:"rgba(255,255,255,0.10)",borderWidth:1,borderColor:W.color.border,alignItems:"center",justifyContent:"center",overflow:"hidden"},thumb:{width:34,height:34},thumbFallback:{fontSize:9,fontWeight:"700",letterSpacing:.5},main:{flex:1,gap:3},name:{color:W.color.text,fontSize:12,fontWeight:"600"},ext:{color:W.color.textTertiary,fontWeight:"400"},metaRow:{flexDirection:"row",alignItems:"center",gap:8},meta:{color:W.color.textSecondary,fontSize:10,fontVariant:["tabular-nums"]},right:{alignItems:"flex-end",gap:4},size:{color:W.color.text,fontSize:12,fontWeight:"700",fontVariant:["tabular-nums"]},badgeRow:{flexDirection:"row",gap:4},sizeTrack:{height:2,backgroundColor:"transparent"},sizeFill:{height:2,opacity:.45,borderTopRightRadius:2}});u();T();import{night as we}from"@buoy-gg/shared-ui/web";import{jsx as Ke}from"react/jsx-runtime";function cn({stats:e,duplicateCount:t,filter:s,onChange:a}){let n=[{key:"all",label:`ALL ${e.total}`,accent:we.color.textSecondary},{key:"duplicates",label:`DUPLICATES ${t}`,accent:"#FF9F1C"}];for(let r of Object.keys(e.byKind)){let o=e.byKind[r];o.count>0&&n.push({key:r,label:`${Lt[r]} ${o.count}`,accent:Et[r]})}return e.neverLoaded>0&&n.push({key:"unused",label:`NOT OBSERVED ${e.neverLoaded}`,accent:"#FF9F1C"}),n.length<=1?null:Ke(m,{style:Ge.bar,testID:v.filterBar,children:n.map(r=>{let o=r.key===s;return Ke(N,{accessibilityRole:"button",accessibilityState:{selected:o},testID:Ve(r.key),style:[Ge.chip,o&&{borderColor:r.accent,backgroundColor:`${r.accent}1A`}],onPress:()=>a(o?"all":r.key),children:Ke(b,{testID:`${Ve(r.key)}-label`,style:[Ge.chipText,{color:o?r.accent:we.color.textSecondary}],children:r.label})},r.key)})})}var Ge=P.create({bar:{flexDirection:"row",flexWrap:"wrap",gap:6,paddingHorizontal:10,paddingVertical:8},chip:{borderWidth:1,borderColor:we.color.border,backgroundColor:we.color.surface,borderRadius:999,paddingHorizontal:10,paddingVertical:5},chipText:{fontSize:10,fontWeight:"700",letterSpacing:.4,lineHeight:13}});u();import{ModalHeader as O,ToolbarClearButton as un,ToolbarCopyButton as es}from"@buoy-gg/shared-ui/web";import{jsx as j,jsxs as _e}from"react/jsx-runtime";function hn({stats:e,measuring:t,discovering:s=false,detailOpen:a,detailIndex:n=-1,detailTotal:r=0,onCloseDetail:o,onClear:l,getReport:d,onBack:c}){if(a){let y=n>=0&&r>0?`${n+1} of ${r}`:void 0;return _e(O,{children:[j(O.Navigation,{onBack:o}),j(O.Content,{title:"Asset detail",subtitle:y,testID:v.title}),j(O.Actions,{children:j(es,{value:d,testID:v.copy})})]})}let i=[`${e.total} assets${s?" so far":""}`];if(e.totalBytes>0&&!t&&!s){let y=e.measuredCount<e.total?"+":"";i.push(`${I(e.totalBytes)}${y}`)}return e.neverLoaded>0&&i.push(`${e.neverLoaded} not observed`),e.fontFamilies>0&&i.push(`${e.fontFamilies} fonts`),_e(O,{children:[c?j(O.Navigation,{onBack:c}):null,j(O.Content,{title:"Assets",subtitle:i.join(" \xB7 "),testID:v.title}),_e(O.Actions,{children:[j(es,{value:d,testID:v.copy}),j(un,{onPress:l,testID:v.clear})]})]})}u();T();import{night as K}from"@buoy-gg/shared-ui/web";import{jsx as ts,jsxs as ss}from"react/jsx-runtime";var pn={size:"name",name:"type",type:"size"};function fn({query:e,onQueryChange:t,sort:s,onSortChange:a}){return ss(m,{style:xe.row,children:[ts($e,{style:xe.input,value:e,onChangeText:t,placeholder:"Search assets\u2026",placeholderTextColor:K.color.placeholder,autoCapitalize:"none",autoCorrect:false,testID:v.search}),ts(N,{style:xe.button,onPress:()=>a(pn[s]),testID:v.sort,children:ss(b,{style:xe.buttonText,testID:`${v.sort}-label`,children:["\u2193 ",s.toUpperCase()]})})]})}var xe=P.create({row:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:10,paddingBottom:8},input:{flex:1,backgroundColor:K.color.surfaceElevated,borderWidth:1,borderColor:K.color.border,borderRadius:8,paddingHorizontal:10,paddingVertical:6,color:K.color.text,fontSize:12},button:{backgroundColor:K.color.surface,borderWidth:1,borderColor:K.color.border,borderRadius:8,paddingHorizontal:10,paddingVertical:7},buttonText:{color:K.color.textSecondary,fontSize:10,fontWeight:"700",letterSpacing:.5}});u();T();import{useEffect as yn,useState as mn}from"react";import{night as oe}from"@buoy-gg/shared-ui/web";import{jsx as Ce,jsxs as gn}from"react/jsx-runtime";function bn({status:e,total:t,onRetry:s}){let[a,n]=mn(false);yn(()=>{if(n(false),!e.graphFetchInFlight)return;let l=e.graphFetchStartedAt==null?0:Math.max(0,Date.now()-e.graphFetchStartedAt),d=setTimeout(()=>n(true),Math.max(0,8e3-l));return()=>clearTimeout(d)},[e.graphFetchInFlight,e.graphFetchStartedAt]);let r=[];e.browser&&!e.graphSupported&&r.push("Showing resources this page has loaded. Add an asset manifest to include files the page has not requested."),e.graphFetchInFlight&&(r.push(`Finding assets\u2026 ${t} found so far.`),a&&r.push("Still finding assets. This is taking longer than usual.")),e.registryAvailable||r.push("The asset registry is unavailable in this environment."),!e.graphFetchInFlight&&!e.graphSupported&&e.graphError&&r.push("Showing runtime-registered assets only. A development server is needed to find more assets and measure their sizes.");let o=!e.graphFetchInFlight&&e.graphSupported&&!!e.graphError;return o&&r.push(`Couldn't finish finding assets. Showing ${t} assets found so far.`),e.measuring&&!e.graphFetchInFlight&&r.push("Checking asset sizes\u2026"),r.length===0?null:gn(m,{style:qe.notice,testID:v.notice,children:[e.graphFetchInFlight?Ce(Le,{size:"small",color:oe.color.textSecondary,accessibilityLabel:"Finding assets",testID:v.discoverySpinner}):null,r.map(l=>Ce(b,{style:qe.noticeText,testID:v.noticeText,children:l},l)),o?Ce(N,{accessibilityRole:"button",onPress:s,testID:v.retry,children:Ce(b,{style:qe.retryText,children:"Retry"})}):null]})}var qe=P.create({notice:{marginHorizontal:10,marginBottom:8,padding:10,borderRadius:8,borderWidth:1,borderColor:oe.color.border,backgroundColor:oe.color.surface,gap:4},noticeText:{color:oe.color.textSecondary,fontSize:11},retryText:{color:oe.color.text,fontSize:12,paddingVertical:6}});import{jsx as S,jsxs as te}from"react/jsx-runtime";function vn({names:e}){let t=[...new Set(e)];return t.length?te(m,{style:z.fontsBox,testID:v.fonts,children:[te(b,{style:z.fontsTitle,testID:v.fontsTitle,children:["LOADED FONT FAMILIES (",t.length,")"]}),S(m,{style:z.fontsWrap,children:t.map(s=>S(b,{style:z.fontChip,testID:Zt(s),children:s},s))})]}):null}function Sn({duplicates:e=false}){return S(ga,{testID:v.empty,otto:"scanning",title:e?"No duplicates found":"No assets found yet",message:e?"No assets in this view share a content hash.":"Every bundled asset \u2014 images, fonts, video, audio \u2014 appears here with sizes, scale coverage, and runtime registration status. Try Rescan after navigating around the app."})}function as(e,t){return(t.sizeBytes??C(t))-(e.sizeBytes??C(e))}var wn={size:as,name:(e,t)=>e.name.localeCompare(t.name)||e.type.localeCompare(t.type),type:(e,t)=>e.type.localeCompare(t.type)||as(e,t)};function Je({visible:e,onClose:t,onBack:s,onMinimize:a,persistenceKey:n,inline:r=false}){fe();let{records:o,stats:l,insights:d}=Mt(),c=Na(),[i,y]=ae(false);wt(()=>{y(false)},[c.graphFetchInFlight,c.lastScanAt]);let p=()=>{y(false);let h=be();h?h("rescan").catch(()=>y(true)):ye()},[D,G]=ae(null),[k,ls]=ae("all"),[Qe,Ze]=ae(""),[Xe,ds]=ae("size"),H=D!=null?Te(D):void 0;wt(()=>{if(!e)return;Ht(),y(false);let h=be();h?h("rescan").catch(()=>y(true)):ye()},[e]);let ke=new Set(d.duplicates.flatMap(h=>h.ids)),et=[...o].sort(wn[Xe]),tt=Qe.trim().toLowerCase(),_=et.filter(h=>!(k==="unused"&&h.loaded||k==="duplicates"&&!ke.has(h.id)||k!=="all"&&k!=="unused"&&k!=="duplicates"&&h.kind!==k||tt&&!`${h.name}.${h.type}`.toLowerCase().includes(tt))),se=H?_.findIndex(h=>h.id===H.id):-1,st=h=>{let M=_[h];M&&G(M.id)},q={scaleGaps:new Set(d.scaleGaps),scaleAnomalies:new Set(d.scaleAnomalies),duplicates:ke,webpCandidates:new Set(d.webpCandidates),overDecode:new Set(d.overDecode),heavy:new Set([...d.heavyGifs,...d.heavyFonts])},ie=0;for(let h of _){let M=h.sizeBytes??C(h);M>ie&&(ie=M)}let cs=()=>H?Tt(H):Rt(et,l,d,X(),ve()),at=S(hn,{stats:l,measuring:c.measuring,discovering:c.graphFetchInFlight,detailOpen:H!=null,detailIndex:se,detailTotal:_.length,onCloseDetail:()=>G(null),onClear:Re,getReport:cs,onBack:s}),nt=H?te(m,{style:z.detailContainer,children:[S(rn,{record:H,insights:d}),se>=0?S(pa,{currentIndex:se,totalItems:_.length,itemLabel:"Asset",onPrevious:()=>st(se-1),onNext:()=>st(se+1)}):null]}):te(m,{style:z.listContainer,children:[S(cn,{stats:l,duplicateCount:ke.size,filter:k,onChange:h=>{ls(h),h==="duplicates"&&Ze("")}}),S(fn,{query:Qe,onQueryChange:Ze,sort:Xe,onSortChange:ds}),S(bn,{status:c,total:l.total,onRetry:p}),i&&!c.graphFetchInFlight?te(m,{style:z.notice,children:[S(b,{style:z.noticeText,children:"Couldn't request an asset scan from the device."}),S(N,{accessibilityRole:"button",onPress:p,children:S(b,{style:z.retryText,children:"Retry"})})]}):null,k==="unused"?S(m,{style:z.notice,children:S(b,{style:z.noticeText,children:"Not seen in React Native's asset registry this app run. Assets loaded through other paths may appear here; this does not prove they are unused."})}):null,k==="font"?S(vn,{names:c.fontFamilies}):null,S(lt,{testID:v.list,data:_,keyExtractor:h=>String(h.id),contentContainerStyle:z.listContent,renderItem:({item:h})=>S(dn,{record:h,flags:{scaleGap:q.scaleGaps.has(h.id),scaleAnomaly:q.scaleAnomalies.has(h.id),duplicate:q.duplicates.has(h.id),webp:q.webpCandidates.has(h.id),oversize:q.overDecode.has(h.id),heavy:q.heavy.has(h.id)},sizeFraction:ie>0?(h.sizeBytes??C(h))/ie:0,onPress:M=>G(typeof M=="number"?M:null)}),ListEmptyComponent:c.graphFetchInFlight?null:S(Sn,{duplicates:k==="duplicates"})})]});return r?te(m,{style:z.inlineRoot,children:[S(m,{style:z.inlineHeader,...ma,children:at}),nt]}):S(fa,{visible:e,onClose:t,onMinimize:a,persistenceKey:n,header:{showToggleButton:true,customContent:at},enablePersistence:true,initialMode:"bottomSheet",disableScrollWrapper:true,children:nt})}function xn(e={}){return S(Je,{...e,inline:true,visible:true,onClose:()=>{}})}var z=P.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:ya.border.default,backgroundColor:"transparent"},listContainer:{flex:1},listContent:{paddingBottom:16},detailContainer:{flex:1},notice:{marginHorizontal:10,marginBottom:8,padding:10,borderRadius:8,borderWidth:1,borderColor:R.color.border,backgroundColor:R.color.surface,gap:4},noticeText:{color:R.color.textSecondary,fontSize:11},retryText:{color:R.color.text,fontSize:12,paddingVertical:6},fontsBox:{marginHorizontal:10,marginTop:8,padding:10,borderRadius:8,backgroundColor:R.color.surface,gap:6},fontsTitle:{color:R.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.5},fontsWrap:{flexDirection:"row",flexWrap:"wrap",gap:6},fontChip:{color:R.color.textSecondary,fontSize:10,backgroundColor:R.color.bg,borderRadius:999,paddingHorizontal:8,paddingVertical:3,overflow:"hidden"},empty:{alignItems:"center",padding:32,gap:8},emptyTitle:{color:R.color.text,fontSize:13,fontWeight:"600"},emptyText:{color:R.color.textSecondary,fontSize:11,textAlign:"center",lineHeight:16}});import{createToolFactory as Cn,defineToolPreset as kn}from"@buoy-gg/shared-ui/web";import{jsx as zn}from"react/jsx-runtime";var ns=kn({id:"assets",name:"ASSETS",description:"Every bundled asset \u2014 sizes, scale coverage, unused detection",slot:"both",icon:({size:e,color:t})=>zn(vt,{size:e,color:t||St}),component:Je}),Bn=Cn(ns);u();var rs=["image","font","video","audio","data","other"];function Ye(e){return{loadStatus:e.loadStatus,durationMs:e.durationMs,cacheHit:e.cacheHit,id:e.id,key:e.key,registryId:e.registryId??null,name:e.name,type:e.type,kind:e.kind,hash:e.hash??null,location:e.httpServerLocation??null,width:e.width??null,height:e.height??null,scales:e.scales,uri:e.resolvedUri??null,loaded:e.loaded,sizeBytes:e.sizeSource==="measured"?e.sizeBytes??null:C(e)||null,sizeSource:e.sizeSource??null}}function In(e){let t=e?.id;if(typeof t!="number")throw new Error("Missing numeric `id` param");let s=Te(t);if(!s)throw new Error(`Asset record ${t} not found \u2014 re-run the list action for current ids.`);return s}function Dn(e,t){return(t.sizeBytes??C(t))-(e.sizeBytes??C(e))}function os(){let e=F();return{stats:Me(e),scanStatus:X(),insights:je(e),diff:ve(),records:[...e].sort(Dn)}}var $n={version:1,getSnapshot:()=>{let{records:e,...t}=os();return{...t,records:e.slice(0,200).map(Ye)}},subscribe:e=>ue(e),actions:{list:e=>{let t=e??{},s=Math.min(Math.max(t.limit??50,1),500),{records:a,...n}=os(),r=a;if(t.kind){if(!rs.includes(t.kind))throw new Error(`kind must be one of: ${rs.join(", ")}`);r=r.filter(o=>o.kind===t.kind)}return t.loadedOnly&&(r=r.filter(o=>o.loaded)),{...n,total:r.length,records:r.slice(0,s).map(Ye)}},getDetail:e=>{let t=In(e);return{...Ye(t),origin:t.origin,fileSystemLocation:t.fileSystemLocation??null,files:t.files??null,sizesByScale:t.sizesByScale??null,estDecodedBytes:C(t)||null}},rescan:async()=>({ok:true,scanStatus:await ye()}),measureSizes:async()=>{let e=await _t();return{ok:e.measured>0,...e}},saveBaseline:async()=>{let e=await Nt();return{ok:true,savedAt:e.savedAt,assets:Object.keys(e.entries).length}},clearBaseline:async()=>(await Vt(),{ok:true,message:"Baseline cleared"}),getDiff:()=>ve(),clearRecords:()=>(Re(),{ok:true,message:"Inventory cleared \u2014 rescan to rebuild"}),getScanStatus:()=>X()}};u();u();var is=0;function An(){if(typeof document>"u")return()=>{};++is===1&&fe();let e=true;return()=>{e&&(e=false,--is===0&&Ft())}}export{St as ASSETS_ICON_COLOR,v as ASSETS_TEST_IDS,vt as AssetsIcon,Je as AssetsModal,xn as AssetsToolView,Yt as assetBadgeTestID,Qt as assetDetailRowTestID,Ve as assetFilterTestID,Xt as assetFindingTestID,Zt as assetFontChipTestID,re as assetRowTestID,ee as assetSlug,$n as assetsSyncAdapter,ns as assetsToolPreset,Vt as clearBaseline,Re as clearRecords,Wt as computeDiff,je as computeInsights,Me as computeStats,Bn as createAssetsTool,Wa as disableAssetsCapture,C as estDecodedBytes,qa as fetchAssetGraph,Tt as formatAssetMarkdown,Rt as formatInventoryMarkdown,It as getBrowserAssetManifest,Kt as getDevServerOrigin,ve as getDiff,Oe as getLoadedFontFamilies,Da as getLocalAssets,Te as getRecord,X as getScanStatus,F as getSnapshot,fe as installAssetCapture,Ht as loadBaseline,Ba as loadBrowserAssetManifest,_t as measureSizes,Ia as recordBrowserAssetLoad,Bt as registerBrowserAssetManifest,Ua as replaceAssetsFromSnapshot,ye as rescan,Nt as saveBaseline,Va as setRemoteAssetsHandler,An as startBrowserAssetCapture,ue as subscribe,Mt as useAssetRecords};
|
|
1
|
+
"use client";var $e=Object.defineProperty;var ba=Object.getOwnPropertyDescriptor;var va=Object.getOwnPropertyNames;var Sa=Object.prototype.hasOwnProperty;var ce=(e,t)=>()=>(e&&(t=e(e=0)),t);var wa=(e,t)=>{for(var a in t)$e(e,a,{get:t[a],enumerable:true})},Ie=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of va(t))!Sa.call(e,n)&&n!==a&&$e(e,n,{get:()=>t[n],enumerable:!(s=ba(t,n))||s.enumerable});return e},xa=(e,t,a)=>(Ie(e,t,"default"),a&&Ie(a,t,"default"));var lt=e=>Ie($e({},"__esModule",{value:true}),e);var Ca,p=ce(()=>{"use strict";Ca=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});var dt,ka=ce(()=>{"use strict";p();dt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'});import{useEffect as za,useState as Ba}from"react";import{createPortal as $a}from"react-dom";import{jsx as Ia}from"react/jsx-runtime";function ct(){let e=document;if(e[Q])return e[Q].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:dt});let a=()=>{let r=document.fullscreenElement,u=r&&r.tagName!=="CANVAS"?r:document.body;t.parentElement!==u&&u.appendChild(t)},s=new Map,n=r=>{(!t.contains(r.target)||!Ae(r.target))&&s.set(r.code||r.key,{key:r.key,code:r.code,location:r.location,keyCode:r.keyCode,which:r.which,altKey:r.altKey,ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})},o=r=>{s.delete(r.code||r.key)},i=()=>s.clear(),d=()=>{let r=[...s.values()];s.clear();for(let u of r)document.dispatchEvent(new KeyboardEvent("keyup",{...u,bubbles:true}))},l=r=>{Ae(r.target)&&r.stopPropagation()},c=r=>r.stopPropagation();return a(),document.addEventListener("fullscreenchange",a),document.addEventListener("keydown",n,true),document.addEventListener("keyup",o,true),window.addEventListener("blur",i),t.addEventListener("focusin",d),t.addEventListener("keydown",l),t.addEventListener("keyup",l),t.addEventListener("keypress",l),t.addEventListener("wheel",c,{passive:true}),e[Q]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("keydown",n,true),document.removeEventListener("keyup",o,true),window.removeEventListener("blur",i),t.remove(),delete e[Q]}},t}function Aa({children:e}){let[t,a]=Ba(null);return za(()=>{let s=ct(),n=document[Q];return n.users++,a(s),()=>{--n.users===0&&n.dispose()}},[]),t?$a(Ia("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}var Q,Ae,Da=ce(()=>{"use strict";p();ka();Q=Symbol.for("@buoy-gg/portal-host"),Ae=e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"}});var ue={};wa(ue,{AccessibilityInfo:()=>Ta,ActivityIndicator:()=>Re,Alert:()=>zt,Animated:()=>gt,AppRegistry:()=>Ma,AppState:()=>Oa,Appearance:()=>Ra,BackHandler:()=>Pa,Button:()=>Ct,CheckBox:()=>Xa,Clipboard:()=>ja,DeviceEventEmitter:()=>ps,Dimensions:()=>Ha,Easing:()=>Na,FlatList:()=>ut,I18nManager:()=>Va,Image:()=>ht,ImageBackground:()=>es,InteractionManager:()=>Ua,Keyboard:()=>Wa,KeyboardAvoidingView:()=>ts,LayoutAnimation:()=>Ka,Linking:()=>Ga,LogBox:()=>hs,Modal:()=>wt,NativeEventEmitter:()=>_a,NativeModules:()=>La,PanResponder:()=>qa,Picker:()=>as,PixelRatio:()=>Ja,Platform:()=>he,Pressable:()=>St,ProgressBar:()=>ss,RefreshControl:()=>ns,SafeAreaView:()=>os,ScrollView:()=>Le,SectionList:()=>rs,Share:()=>Ya,StatusBar:()=>is,StyleSheet:()=>M,Switch:()=>xt,Text:()=>b,TextInput:()=>Ee,Touchable:()=>ls,TouchableHighlight:()=>bt,TouchableNativeFeedback:()=>ds,TouchableOpacity:()=>W,TouchableWithoutFeedback:()=>vt,UIManager:()=>Qa,Vibration:()=>Za,View:()=>m,VirtualizedList:()=>cs,YellowBox:()=>us,findNodeHandle:()=>kt,unstable_createElement:()=>Ea,useColorScheme:()=>fs,useLocaleContext:()=>ys,useWindowDimensions:()=>ms});import*as Fa from"react-native-web";import{unstable_createElement as Ea,NativeModules as La,AccessibilityInfo as Ta,Appearance as Ra,AppRegistry as Ma,AppState as Oa,BackHandler as Pa,Clipboard as ja,Dimensions as Ha,Easing as Na,I18nManager as Va,Keyboard as Wa,InteractionManager as Ua,LayoutAnimation as Ka,Linking as Ga,NativeEventEmitter as _a,PanResponder as qa,PixelRatio as Ja,Platform as he,Share as Ya,UIManager as Qa,Vibration as Za,CheckBox as Xa,FlatList as ut,Image as ht,ImageBackground as es,KeyboardAvoidingView as ts,Picker as as,ProgressBar as ss,RefreshControl as ns,SafeAreaView as os,SectionList as rs,StatusBar as is,Touchable as ls,TouchableNativeFeedback as ds,VirtualizedList as cs,YellowBox as us,LogBox as hs,DeviceEventEmitter as ps,useColorScheme as fs,useLocaleContext as ys,useWindowDimensions as ms}from"react-native-web";import*as B from"react-native-web";import{createElement as De,forwardRef as pt,useCallback as gs,useRef as bs}from"react";function Fe(e){if(Array.isArray(e)){let u=e.map(Fe);return u.some((h,w)=>h!==e[w])?u:e}if(!e||typeof e!="object"||!yt.some(u=>e[u]!=null))return e;let{shadowColor:t,shadowOffset:a,shadowOpacity:s,shadowRadius:n,textShadowColor:o,textShadowOffset:i,textShadowRadius:d,...l}=e;if(t!=null||a!=null||s!=null||n!=null){let u=t??"black",h=s==null?u:`color-mix(in srgb, ${u} ${Math.min(s,1)*100}%, transparent)`,w=`${V(a?.width??0)} ${V(a?.height??0)} ${V(n??0)} ${h}`;l.boxShadow=typeof l.boxShadow=="string"?`${l.boxShadow}, ${w}`:l.boxShadow??w}let{width:c=0,height:r=0}=i??{};if(o&&(c||r||d)){let u=`${V(c)} ${V(r)} ${V(d??0)} ${o}`;l.textShadow=l.textShadow?`${l.textShadow}, ${u}`:u}return l}function ft(e,t){if(typeof e=="function")return s=>ft(e(s),t);let a=Fe(e);return t?[a,mt[t]]:a}function A(e){let t=pt((s,n)=>{let{accessibilityState:o,accessibilityValue:i,pointerEvents:d,...l}=s;for(let r of["busy","checked","disabled","expanded","selected"])o?.[r]!==void 0&&l[`aria-${r}`]===void 0&&(l[`aria-${r}`]=o[r]);for(let[r,u]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))i?.[r]!==void 0&&l[`aria-${u}`]===void 0&&(l[`aria-${u}`]=i[r]);let c=ft(l.style,d);return c!==l.style&&(l.style=c),De(e,{...l,ref:n})}),a=e.State;return a&&Object.assign(t,{State:a}),t.displayName=e.displayName??e.name??"NativeWebView",t}var N,yt,V,mt,M,m,b,gt,Ee,W,bt,vt,St,Le,Te,wt,xt,Re,Ct,kt,zt,T=ce(()=>{p();xa(ue,Fa);Da();N=B,yt=["shadowColor","shadowOffset","shadowOpacity","shadowRadius","textShadowColor","textShadowOffset","textShadowRadius"],V=e=>typeof e=="number"?`${e}px`:e;mt=N.StyleSheet.create({auto:{pointerEvents:"auto"},none:{pointerEvents:"none"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"}});M={...N.StyleSheet,create:e=>N.StyleSheet.create(Object.fromEntries(Object.entries(e).map(([t,a])=>[t,Fe(a)])))};m=A(B.View),b=A(B.Text),gt={...N.Animated,View:N.Animated.createAnimatedComponent(m),Text:N.Animated.createAnimatedComponent(b)},Ee=A(B.TextInput),W=A(B.TouchableOpacity),bt=A(B.TouchableHighlight),vt=A(B.TouchableWithoutFeedback),St=A(B.Pressable),Le=A(B.ScrollView),Te=pt((e,t)=>{let a=bs(null),s=gs(n=>{if(n){let o=n;for(;o.parentElement&&o.parentElement!==document.body;)o=o.parentElement;o.parentElement===document.body&&(a.current=o,Object.assign(o.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),ct().appendChild(o))}else a.current&&(document.body.appendChild(a.current),a.current=null);typeof t=="function"?t(n):t&&(t.current=n)},[t]);return De(Aa,null,De(B.Modal,{...e,ref:s}))});Te.displayName="Modal";wt=A(Te),xt=A(B.Switch),Re=A(B.ActivityIndicator),Ct=A(B.Button),kt=B.findNodeHandle,zt={alert(e,t,a,s){if(typeof document>"u")return;let n=document.createElement("dialog");n.dataset.buoyRoot="",n.setAttribute("aria-label",e),n.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let o=document.createElement("h2");if(o.textContent=e,o.style.cssText="font-size:18px;margin:0 0 12px",n.appendChild(o),t){let c=document.createElement("p");c.textContent=t,c.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",n.appendChild(c)}let i=document.createElement("div");i.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let d=a?.length?a:[{text:"OK"}],l=()=>{n.close?.(),n.remove()};for(let c of d){let r=document.createElement("button");r.type="button",r.textContent=c.text??"OK",r.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${c.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,r.onclick=()=>{l(),c.onPress?.()},i.appendChild(r)}n.addEventListener("cancel",c=>{c.preventDefault(),s?.cancelable!==false&&(l(),s?.onDismiss?.())}),n.appendChild(i),document.body.appendChild(n),n.showModal?n.showModal():n.setAttribute("open","")}}});p();p();p();import{AssetsIcon as Bt,ASSETS_ICON_COLOR as $t}from"@buoy-gg/shared-ui/web";p();T();import{useEffect as It,useState as oe}from"react";import{EventStepperFooter as vs,JsModal as Ss,macOSColors as ws,night as R,windowDragProps as xs,ToolEmptyState as Cs}from"@buoy-gg/shared-ui/web";p();p();var Me=Symbol.for("buoy.assets.globalState.v1");function y(){let e=globalThis;return e[Me]||(e[Me]={records:[],byKey:new Map,byId:new Map,nextId:1,listeners:new Set,snapshot:[],emitScheduled:false,installed:false,patched:false,registryAvailable:false,graphSupported:false,graphCount:null,graphError:null,graphFetchInFlight:false,lastScanAt:null,measuring:false,measuredCount:0,fontFamilies:[],localAssetCount:null,baseline:null,baselineLoaded:false,captureDisabled:false,remoteDispatch:null,mirrorScanStatus:null,mirrorPixelRatio:null,mirrorDiff:null}),e[Me]}p();p();import{isBuoyAssetPath as At}from"@buoy-gg/shared-ui/web";function Dt(e){return[e.key,e.resolvedUri,e.httpServerLocation,e.fileSystemLocation,...e.files??[]].some(At)}p();function Ft(){let e=y().mirrorPixelRatio;if(e!=null)return e;try{return(T(),lt(ue)).PixelRatio.get()}catch{return 2}}function ks(e,t){if(!e.length)return 1;let a=[...e].sort((s,n)=>s-n);for(let s of a)if(s>=t)return s;return a[a.length-1]}function zs(){let e=y();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function D(){let e=y();e.snapshot=[...e.records],zs()}var Bs={png:"image",jpg:"image",jpeg:"image",gif:"image",webp:"image",bmp:"image",psd:"image",svg:"image",tiff:"image",ktx:"image",heic:"image",heif:"image",avif:"image",ttf:"font",otf:"font",woff:"font",woff2:"font",ttc:"font",mp4:"video",m4v:"video",mov:"video",mpeg:"video",mpg:"video",webm:"video",avi:"video",mp3:"audio",wav:"audio",aac:"audio",aiff:"audio",caf:"audio",m4a:"audio",ogg:"audio",json:"data",db:"data",yaml:"data",yml:"data",xml:"data",html:"data",pdf:"data",zip:"data"};function $s(e){return Bs[e.toLowerCase()]??"other"}function Is(e){if(Dt(e))return;let t=y(),a=t.byKey.get(e.key);return a||(a={id:t.nextId++,key:e.key,name:e.name,type:e.type,kind:$s(e.type),scales:e.scales??[],loaded:e.loaded??false,origin:e.origin,firstSeenAt:Date.now()},t.records.push(a),t.byKey.set(a.key,a),t.byId.set(a.id,a)),e.registryId!=null&&(a.registryId=e.registryId),e.hash!=null&&(a.hash=e.hash),e.httpServerLocation!=null&&(a.httpServerLocation=e.httpServerLocation),e.width!=null&&(a.width=e.width),e.height!=null&&(a.height=e.height),e.scales&&e.scales.length&&(a.scales=[...new Set(e.scales)].sort((s,n)=>s-n)),e.resolvedUri!=null&&(a.resolvedUri=e.resolvedUri),e.resolvedScale!=null&&(a.resolvedScale=e.resolvedScale),e.loaded&&(a.loaded=true),e.fileSystemLocation!=null&&(a.fileSystemLocation=e.fileSystemLocation),e.files&&(a.files=e.files),e.fileHashes&&(a.fileHashes=e.fileHashes),D(),a}function re(e,t){let a=y().byId.get(e);if(a)return Object.assign(a,t),D(),a}function Oe(e){return y().byId.get(e)}function F(){return y().snapshot}function pe(e){return y().listeners.add(e),()=>y().listeners.delete(e)}function Pe(){let e=y();e.records=[],e.byKey=new Map,e.byId=new Map,e.measuredCount=0,e.graphCount=null,D()}function k(e){if(e.kind!=="image"||!e.width||!e.height)return 0;let t=e.resolvedScale??ks(e.scales,Ft());return Math.round(e.width*t*e.height*t*4)}function je(e){let t=y(),a={image:{count:0,bytes:0},font:{count:0,bytes:0},video:{count:0,bytes:0},audio:{count:0,bytes:0},data:{count:0,bytes:0},other:{count:0,bytes:0}},s={total:e.length,loaded:0,neverLoaded:0,byKind:a,totalBytes:0,measuredCount:0,fontFamilies:t.fontFamilies.length};for(let n of e)n.loaded?s.loaded++:s.neverLoaded++,a[n.kind].count++,n.sizeBytes!=null&&n.sizeSource==="measured"&&(a[n.kind].bytes+=n.sizeBytes,s.totalBytes+=n.sizeBytes,s.measuredCount++);return s}p();import{buoyFetch as As,isBuoyElement as Et,isBuoyAssetPath as Ds}from"@buoy-gg/shared-ui/web";var Z=[],X=new Set;function Fs(e){if(!(typeof document>"u"))try{X.add(new URL(e,document.baseURI).href)}catch{}}function He(e=document){let t=Array.from(e.querySelectorAll("img"));for(let a of Array.from(e.querySelectorAll("*")))a.shadowRoot&&t.push(...He(a.shadowRoot));return t}function Lt(e){Z=e.filter(t=>!Ds(t.url)),typeof document<"u"&&ye()}function Tt(){return Z}async function Es(e){let t=await As(e);if(!t.ok)throw new Error(`Asset manifest returned HTTP ${t.status}.`);let a=await t.json();if(!Array.isArray(a)||a.some(s=>!s||typeof s.url!="string"))throw new Error("An asset manifest must contain an array of assets with URL strings.");Lt(a)}function fe(e,t){let a;try{a=new URL(e.url,document.baseURI)}catch{return}let s=a.pathname.split("/").pop()??"",n=s.includes(".")?s.split(".").pop().toLowerCase():"other",o=Is({key:a.href,name:s.slice(0,-(n.length+1))||s,type:n,origin:t?"browser":"graph",resolvedUri:a.href,resolvedScale:1,scales:[1],hash:e.hash,loaded:t,width:e.width,height:e.height});return o&&e.bytes!==void 0&&e.bytes>=0&&re(o.id,{sizeBytes:e.bytes,sizesByScale:{1:e.bytes},sizeSource:"measured"}),o}function Rt(e){if(!(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")){if(e.initiatorType==="img"){let t=He().filter(a=>(a.currentSrc||a.src)===e.name);t.length&&(t.every(Et)?X.add(e.name):X.delete(e.name))}X.has(e.name)||fe({url:e.name,bytes:e.encodedBodySize>0?e.encodedBodySize:void 0},true)}}function Mt(e){if(y().captureDisabled)return;let t=e.currentSrc||e.src;if(Et(e)){t&&X.add(t);return}X.delete(t),!(!t||!e.complete||e.naturalWidth<=0)&&fe({url:t,width:e.naturalWidth,height:e.naturalHeight},true)}function ye(){if(typeof document>"u"||y().captureDisabled)return;Z.forEach(t=>fe(t,false)),performance.getEntriesByType("resource").forEach(t=>Rt(t)),He().forEach(Mt);let e=y();e.graphSupported=Z.length>0,e.graphCount=Z.length>0?Z.length:null,e.measuredCount=e.records.filter(t=>t.sizeBytes!==void 0).length,e.lastScanAt=Date.now()}function Ls(e){if(typeof document>"u"||y().captureDisabled)return;let t=fe({url:e.url,bytes:e.bytes??void 0},e.status==="success");t&&re(t.id,{loadStatus:e.status,durationMs:e.durationMs,cacheHit:e.cacheHit})}p();function Ne(){if(typeof document>"u"||!document.fonts)return[];let e=new Set;return document.fonts.forEach(t=>{t.status==="loaded"&&e.add(t.family.replace(/^['"]|['"]$/g,""))}),[...e].sort()}function Ts(){return null}var ee,Ot=e=>{let t=e.target;t?.tagName==="IMG"&&Mt(t)};function me(){let e=y();if(!(typeof document>"u"||e.captureDisabled||e.installed)){if(e.installed=true,e.registryAvailable=true,document.addEventListener("load",Ot,true),typeof PerformanceObserver<"u"){ee=new PerformanceObserver(t=>{if(y().captureDisabled){Pt();return}t.getEntries().forEach(a=>Rt(a))});try{ee.observe({type:"resource",buffered:true}),e.patched=true}catch{ee.disconnect(),ee=void 0}}ye(),e.fontFamilies=Ne(),D()}}function Pt(){ee?.disconnect(),ee=void 0,typeof document<"u"&&document.removeEventListener("load",Ot,true),y().installed=false,y().patched=false}async function ge(){return me(),ye(),y().fontFamilies=Ne(),D(),te()}function te(){let e=y();return e.mirrorScanStatus??{registryAvailable:e.registryAvailable,patched:e.patched,registryCount:e.records.filter(t=>t.loaded).length,graphSupported:e.graphSupported,graphCount:e.graphCount,graphError:null,graphFetchInFlight:false,graphFetchStartedAt:null,lastScanAt:e.lastScanAt,measuring:false,measuredCount:e.measuredCount,fontFamilies:e.fontFamilies,localAssetCount:null,browser:true}}p();p();function I(e){return e==null||e<=0?"\u2014":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function be(e){let t=[...new Set(e)].sort((a,s)=>a-s);return t.length?t.length===1?`@${t[0]}x`:t.length<=3?t.map(a=>`@${a}x`).join(" "):`@${t[0]}x\u2013@${t[t.length-1]}x`:"\u2014"}function ve(e){return e.width==null||e.height==null?"\u2014":`${Math.round(e.width)}\xD7${Math.round(e.height)}`}function Rs(e,t){return e.sizeBytes!=null&&e.sizeSource==="measured"?I(e.sizeBytes):t>0?`~${I(t)}`:"\u2014"}var jt={image:"IMG",font:"FONT",video:"VID",audio:"AUD",data:"DATA",other:"MISC"},Ht={image:"#2DD4BF",font:"#C084FC",video:"#FF9F1C",audio:"#FF3366",data:"#00D4FF",other:"#8E8E93"};function Nt(e){let t=[`# Asset: ${e.name}.${e.type}`,"",`- Kind: ${e.kind}`,`- Status: ${e.loaded?"loaded at runtime":"not observed in the runtime registry"}`];e.kind==="image"&&t.push(`- Dimensions: ${ve(e)} (logical)`),e.scales.length&&t.push(`- Scales: ${be(e.scales)}`),e.sizeBytes!=null&&e.sizeSource==="measured"&&t.push(`- Size (all variants): ${I(e.sizeBytes)}`);let a=k(e);return a>0&&t.push(`- Decoded memory: ~${I(a)}`),e.hash&&t.push(`- Hash: ${e.hash}`),e.httpServerLocation&&t.push(`- Location: ${e.httpServerLocation}`),e.fileSystemLocation&&t.push(`- Source dir: ${e.fileSystemLocation}`),e.resolvedUri&&t.push(`- Resolved URI: ${e.resolvedUri}`),t.join(`
|
|
2
|
+
`)}function Vt(e,t,a,s,n){let o=["# Asset inventory","",`${t.total} assets \xB7 ${t.loaded} loaded \xB7 ${t.neverLoaded} not observed`+(t.totalBytes>0?` \xB7 ${I(t.totalBytes)} measured (${t.measuredCount}/${t.total})`:"")];if(s.fontFamilies.length&&o.push(`Fonts loaded: ${s.fontFamilies.join(", ")}`),s.graphSupported||o.push(s.graphError?`_Metro bundle graph unavailable (${s.graphError}) \u2014 runtime-registered assets only._`:"_No Metro bundle graph \u2014 runtime-registered assets only (release build)._"),n){let d=n.netBytes!=null?`${n.netBytes>=0?"+":"\u2212"}${I(Math.abs(n.netBytes))} net`:"net size unknown";o.push("",`## Since baseline (${new Date(n.baselineSavedAt).toISOString()})`,`- ${n.added.length} added \xB7 ${n.removed.length} removed \xB7 ${n.grown.length} grew \xB7 ${d}`);for(let l of n.removed.slice(0,20))o.push(`- removed: ${l.name}.${l.type}`)}let i=[];a.neverLoaded.length&&i.push(`- ${a.neverLoaded.length} shipped but not observed`),a.duplicates.length&&i.push(`- ${a.duplicates.length} duplicate content groups`),a.webpCandidates.length&&i.push(`- ${a.webpCandidates.length} WebP conversion candidates`),a.scaleGaps.length&&i.push(`- ${a.scaleGaps.length} scale-coverage gaps`),a.overDecode.length&&i.push(`- ${a.overDecode.length} images decoding larger than 2\xD7 the screen`),a.heavyGifs.length&&i.push(`- ${a.heavyGifs.length} heavy GIFs (convert to video/Lottie)`),a.heavyFonts.length&&i.push(`- ${a.heavyFonts.length} heavy fonts (subset candidates)`),a.scaleAnomalies.length&&i.push(`- ${a.scaleAnomalies.length} scale-variant anomalies (check exports)`),i.length&&o.push("","## Findings",...i),o.push("","## Assets (largest first)","","| Asset | Kind | Dimensions | Scales | Size | Loaded |","| --- | --- | --- | --- | --- | --- |");for(let d of e){let l=d.sizeBytes!=null&&d.sizeSource==="measured"?I(d.sizeBytes):k(d)>0?`~${I(k(d))}`:"\u2014";o.push(`| ${d.name}.${d.type} | ${d.kind} | ${d.kind==="image"?ve(d):"\u2014"} | ${be(d.scales)} | ${l} | ${d.loaded?"yes":"NO"} |`)}return o.join(`
|
|
3
|
+
`)}p();import{useMemo as Ms,useSyncExternalStore as Os}from"react";p();var Ps=50*1024,js=100*1024,Hs=150*1024,Ns=2,Vs=.9,Ws=4*1024;function Us(){try{let{Dimensions:e,PixelRatio:t}=(T(),lt(ue)),a=e.get("screen"),s=t.get();return a.width*s*a.height*s}catch{return 1170*2532}}function Ks(e){let t=e.sizesByScale;if(!t)return false;let a=Object.entries(t).map(([s,n])=>({scale:Number(s),bytes:n})).filter(s=>Number.isFinite(s.scale)&&s.bytes>0).sort((s,n)=>s.scale-n.scale);for(let s=1;s<a.length;s++)if(a[s-1].bytes>=Ws&&a[s].bytes<a[s-1].bytes*Vs)return true;return false}function Ve(e){let t=Ft(),a=new Map;for(let h of e){if(!h.hash)continue;let w=a.get(h.hash);w?w.push(h):a.set(h.hash,[h])}let s=[];for(let[h,w]of a){if(w.length<2)continue;let q=w.find(z=>z.sizeBytes!=null);s.push({hash:h,ids:w.map(z=>z.id),wastedBytes:q?.sizeBytes!=null?q.sizeBytes*(w.length-1):null})}let n=Us(),o=[],i=[],d=[],l=[],c=[],r=[],u=[];for(let h of e)h.loaded||d.push(h.id),h.kind==="image"&&h.scales.length>1&&!h.scales.some(w=>w>=t)&&o.push(h.id),(h.type==="png"||h.type==="jpg"||h.type==="jpeg")&&h.sizeBytes!=null&&h.sizeBytes>=Ps&&i.push(h.id),h.kind==="image"&&k(h)/4>n*Ns&&l.push(h.id),h.type==="gif"&&(h.sizeBytes??0)>=js&&c.push(h.id),h.kind==="font"&&(h.sizeBytes??0)>=Hs&&r.push(h.id),Ks(h)&&u.push(h.id);return{duplicates:s,scaleGaps:o,webpCandidates:i,neverLoaded:d,overDecode:l,heavyGifs:c,heavyFonts:r,scaleAnomalies:u}}function Wt(){let e=Os(pe,F,F);return Ms(()=>({records:e,stats:je(e),insights:Ve(e)}),[e])}p();import{useSyncExternalStore as Gs}from"react";var Ut,Kt;function Gt(){let e=F();return e!==Ut&&(Ut=e,Kt=te()),Kt}function _s(){return Gs(pe,Gt,Gt)}p();function qs(e){y().remoteDispatch=e}function Se(){return y().remoteDispatch}function Js(){y().captureDisabled=true}function Ys(e){let t=y(),a=e.records??[];t.records=a.map(s=>({id:s.id,key:s.key,loadStatus:s.loadStatus,durationMs:s.durationMs,cacheHit:s.cacheHit,registryId:s.registryId??void 0,name:s.name,type:s.type,kind:s.kind,hash:s.hash??void 0,httpServerLocation:s.location??void 0,width:s.width??void 0,height:s.height??void 0,scales:s.scales,resolvedUri:s.uri??void 0,loaded:s.loaded,origin:s.registryId!=null?"registry":"graph",sizeBytes:s.sizeBytes??void 0,sizeSource:s.sizeSource??void 0,firstSeenAt:Date.now()})).filter(s=>!Dt(s)),t.byKey=new Map(t.records.map(s=>[s.key,s])),t.byId=new Map(t.records.map(s=>[s.id,s])),e.scanStatus&&(t.fontFamilies=[...new Set(e.scanStatus.fontFamilies??[])],t.mirrorScanStatus={...e.scanStatus,fontFamilies:t.fontFamilies}),t.mirrorDiff=e.diff??null,D()}p();import{persistentStorage as We}from"@buoy-gg/shared-ui/web";var Ue="@react_buoy/assets/baseline",Qs=1024;async function _t(){let e=y();if(e.baselineLoaded)return e.baseline;e.baselineLoaded=true;try{let t=await We.getItem(Ue);if(t){let a=JSON.parse(t);a&&typeof a.savedAt=="number"&&a.entries&&(e.baseline=a,D())}}catch{}return e.baseline}async function qt(){let e=Se();if(e)return await e("saveBaseline"),y().baseline??{savedAt:Date.now(),entries:{}};let t=y(),a={};for(let n of F())a[n.key]={hash:n.hash??null,sizeBytes:n.sizeSource==="measured"?n.sizeBytes??null:null,name:n.name,type:n.type};let s={savedAt:Date.now(),entries:a};t.baseline=s,t.baselineLoaded=true,D();try{await We.setItem(Ue,JSON.stringify(s))}catch{}return s}async function Jt(){let e=Se();if(e){await e("clearBaseline");return}let t=y();t.baseline=null,t.baselineLoaded=true,D();try{await We.removeItem(Ue)}catch{}}function Yt(e,t){let a=[],s=[],n=new Set,o=0,i=0,d=false;for(let c of e){n.add(c.key);let r=t.entries[c.key];if(!r){a.push(c.id);continue}let u=c.sizeSource==="measured"?c.sizeBytes??null:null;u!=null&&r.sizeBytes!=null&&(d=true,o+=u,i+=r.sizeBytes,u-r.sizeBytes>=Qs&&s.push({id:c.id,deltaBytes:u-r.sizeBytes}))}let l=[];for(let[c,r]of Object.entries(t.entries))At(c)||n.has(c)||(l.push({key:c,name:r.name,type:r.type}),r.sizeBytes!=null&&(d=true,i+=r.sizeBytes));for(let c of a){let r=e.find(u=>u.id===c);r?.sizeSource==="measured"&&r.sizeBytes!=null&&(d=true,o+=r.sizeBytes)}return{baselineSavedAt:t.savedAt,added:a,removed:l,grown:s.sort((c,r)=>r.deltaBytes-c.deltaBytes),netBytes:d?o-i:null}}function we(){let e=y();return e.mirrorDiff?e.mirrorDiff:e.baseline?Yt(F(),e.baseline):null}p();T();import{night as U}from"@buoy-gg/shared-ui/web";p();T();import{useState as Zs}from"react";import{night as Xs}from"@buoy-gg/shared-ui/web";p();T();import{buoyFetch as Qt}from"@buoy-gg/shared-ui/web";p();function Zt(){return null}async function en(){ye();let e=Tt().length;return e?{ok:true,count:e}:{ok:false,message:"Register a browser asset manifest to inspect files that have not loaded yet."}}var tn=4;function an(e){if(e.resolvedUri)return e.resolvedUri;let t=Xt(e);return t.length?t[0].url:null}function sn(e){let t=y().captureDisabled;if(!t&&e.registryId!=null)return e.registryId;let a=an(e);return!a||t&&!/^https?:\/\//.test(a)?null:{uri:a}}function Xt(e){let t=e.scales.length?e.scales:[1],a=e.resolvedUri;if(a&&/^https?:\/\//.test(a)&&e.resolvedScale!=null){let n=e.resolvedScale===1?"":`@${e.resolvedScale}x`,o=`${n}.${e.type}`;if(a.includes(o)||n==="")return t.map(i=>{let d=i===1?"":`@${i}x`,l=(n===""?a.replace(`.${e.type}`,`${d}.${e.type}`):a.replace(o,`${d}.${e.type}`)).replace(/ /g,"%20");return{scale:i,url:l}})}let s=Zt();return!s||!e.httpServerLocation?[]:t.map(n=>{let o=n===1?"":`@${n}x`,i=`${e.httpServerLocation}/${e.name}${o}.${e.type}`,d=i.includes("?")?"&":"?",l=`${s}${i}${d}platform=${nn()}${e.hash?`&hash=${e.hash}`:""}`.replace(/ /g,"%20");return{scale:n,url:l}})}function nn(){try{return he.OS}catch{return"ios"}}async function on(e){try{let t=await Qt(e,{method:"HEAD"});if(t.ok){let a=Number(t.headers.get("content-length"));if(Number.isFinite(a)&&a>0)return a}}catch{}try{let t=await Qt(e);if(!t.ok)return null;let a=await t.blob();return a.size>0?a.size:null}catch{return null}}async function rn(e){let t=Xt(e);if(!t.length){re(e.id,{sizeSource:"estimate"});return}let a={},s=0;for(let{scale:n,url:o}of t){let i=await on(o);i!=null&&(a[String(n)]=i,s+=i)}s>0?re(e.id,{sizesByScale:a,sizeBytes:s,sizeSource:"measured"}):re(e.id,{sizeSource:"estimate"})}async function ea(){let e=y();if(e.measuring)return{measured:e.measuredCount,total:F().length};let t=F().filter(a=>a.sizeSource!=="measured");e.measuring=true,D();try{let a=0,s=async()=>{for(;;){let n=t[a++];if(!n)return;await rn(n),e.measuredCount=F().filter(o=>o.sizeSource==="measured").length}};await Promise.all(Array.from({length:Math.min(tn,t.length)},s))}finally{e.measuring=false,D()}return{measured:e.measuredCount,total:F().length}}p();function ln(e){e&&typeof e=="object"&&Fs(e.uri)}p();function dn(){return null}import{jsx as xe}from"react/jsx-runtime";function ta({record:e,style:t,testID:a,compact:s=false}){let n=sn(e);ln(n);let o=e.type.toLowerCase()==="svg",i=o&&he.OS!=="web"?dn():null,d=`${e.key}:${e.hash??""}:${typeof n=="number"?n:n?.uri??""}`,[l,c]=Zs(null);if(n==null||l===d||o&&he.OS!=="web"&&!i){let u=o?"SVG preview unavailable":"Image preview unavailable";return xe(m,{style:[t,aa.fallback],accessibilityLabel:u,testID:`${a}-unavailable`,children:xe(b,{style:aa.text,children:s?o?"SVG":"IMG":u})})}let r=()=>c(d);return i?xe(i,{source:n,style:t,contentFit:"contain",onError:r,testID:a}):xe(ht,{source:n,style:t,resizeMode:"contain",onError:r,testID:a})}var aa=M.create({fallback:{alignItems:"center",justifyContent:"center"},text:{color:Xs.color.textSecondary,fontSize:10,textAlign:"center"}});p();function ae(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function ie(e,t){return`buoy-assets-row-${ae(`${e}.${t}`)}`}function sa(e,t,a){return`${ie(e,t)}-badge-${ae(a)}`}function Ke(e){return`buoy-assets-filter-${ae(e)}`}function na(e){return`buoy-assets-detail-row-${ae(e)}`}function oa(e){return`buoy-assets-font-${ae(e)}`}var v={title:"buoy-assets-title",copy:"buoy-assets-copy",clear:"buoy-assets-clear",list:"buoy-assets-list",search:"buoy-assets-search",sort:"buoy-assets-sort",filterBar:"buoy-assets-filter-bar",notice:"buoy-assets-notice",noticeText:"buoy-assets-notice-text",discoverySpinner:"buoy-assets-discovery-spinner",retry:"buoy-assets-retry",fonts:"buoy-assets-fonts",fontsTitle:"buoy-assets-fonts-title",empty:"buoy-assets-empty",emptyTitle:"buoy-assets-empty-title",emptyText:"buoy-assets-empty-text",detail:"buoy-assets-detail",detailScroll:"buoy-assets-detail-scroll",detailPreview:"buoy-assets-detail-preview",detailFontPreview:"buoy-assets-detail-font-preview",detailFindings:"buoy-assets-detail-findings"};function ra(e){return`buoy-assets-detail-finding-${e}`}import{Fragment as cn,jsx as g,jsxs as Ge}from"react/jsx-runtime";function x({label:e,value:t}){let a=na(e);return Ge(m,{style:E.kvRow,testID:a,children:[g(b,{style:E.kvLabel,children:e}),g(b,{style:E.kvValue,selectable:true,testID:`${a}-value`,children:t})]})}function un({record:e}){return e.kind==="image"?g(m,{style:E.previewBox,testID:v.detailPreview,children:g(ta,{testID:"buoy-internal-assets-preview",record:e,style:E.previewImage})}):e.kind==="font"?g(m,{style:E.previewBox,testID:v.detailFontPreview,children:g(b,{style:[E.fontPreview,{fontFamily:e.name}],children:"The quick brown fox jumps over the lazy dog 0123456789"})}):null}function hn({record:e,insights:t}){let a=[];t.neverLoaded.includes(e.id)&&a.push("Not observed in the runtime registry this app run. This does not prove the asset is unused."),t.scaleGaps.includes(e.id)&&a.push("Scale gap \u2014 no variant covers this device's pixel ratio"),t.webpCandidates.includes(e.id)&&a.push("WebP candidate \u2014 large png/jpeg, converting typically saves 20\u201340%");let s=t.duplicates.find(o=>o.ids.includes(e.id));s&&a.push(`Duplicate content \u2014 identical bytes shipped ${s.ids.length} times`),t.overDecode.includes(e.id)&&a.push("Decodes larger than 2\xD7 this entire screen \u2014 resize the source, no view can need this many pixels"),t.heavyGifs.includes(e.id)&&a.push("Heavy GIF \u2014 every frame decodes into memory; a video or Lottie is typically ~90% smaller"),t.heavyFonts.includes(e.id)&&a.push("Heavy font \u2014 likely an unsubset icon font; subsetting to used glyphs usually saves most of it"),t.scaleAnomalies.includes(e.id)&&a.push("Scale anomaly \u2014 a higher-resolution variant is smaller in bytes than a lower one; check the exports");let n=k(e);return Ge(Le,{style:E.scroll,contentContainerStyle:E.content,testID:v.detailScroll,children:[g(un,{record:e}),a.length>0?g(m,{style:E.findings,testID:v.detailFindings,children:a.map((o,i)=>g(b,{style:E.findingText,testID:ra(i),children:o},o))}):null,g(x,{label:"Name",value:`${e.name}.${e.type}`}),e.loadStatus&&Ge(cn,{children:[g(x,{label:"Load",value:e.loadStatus==="error"?"Failed":"Loaded"}),g(x,{label:"Load time",value:e.durationMs==null?"Unknown":`${e.durationMs.toFixed(1)} ms`}),g(x,{label:"Load size",value:e.sizeBytes==null?"Unknown":I(e.sizeBytes)}),g(x,{label:"Cache",value:e.cacheHit==null?"Unknown":e.cacheHit?"Cache hit":"Web load"})]}),g(x,{label:"Kind",value:e.kind}),g(x,{label:"Status",value:e.loaded?"Loaded (registered at runtime)":"Not observed in the runtime registry"}),e.kind==="image"?g(x,{label:"Dimensions",value:`${ve(e)} (logical)`}):null,e.kind==="image"&&e.scales.length?g(x,{label:"Scales",value:be(e.scales)}):null,e.sizesByScale?Object.entries(e.sizesByScale).map(([o,i])=>g(x,{label:`Size @${o}x`,value:I(i)},o)):null,e.sizeBytes!=null&&e.sizeSource==="measured"?g(x,{label:"Total size",value:I(e.sizeBytes)}):null,n>0?g(x,{label:"Decoded memory",value:`~${I(n)} (RGBA)`}):null,e.registryId!=null?g(x,{label:"Registry id",value:String(e.registryId)}):null,e.hash?g(x,{label:"Hash",value:e.hash}):null,e.httpServerLocation?g(x,{label:"Location",value:e.httpServerLocation}):null,e.fileSystemLocation?g(x,{label:"Source dir",value:e.fileSystemLocation}):null,e.resolvedUri?g(x,{label:"Resolved URI",value:e.resolvedUri}):null]})}var E=M.create({scroll:{flex:1},content:{padding:12,gap:8},previewBox:{borderRadius:8,backgroundColor:U.color.bg,padding:12,alignItems:"center",justifyContent:"center",minHeight:96},previewImage:{width:"100%",height:140},fontPreview:{color:U.color.text,fontSize:16,textAlign:"center"},findings:{borderRadius:8,borderWidth:1,borderColor:U.color.border,backgroundColor:U.color.surface,padding:10,gap:6},findingText:{color:U.color.textSecondary,fontSize:11,lineHeight:15},kvRow:{gap:2},kvLabel:{color:U.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.5,textTransform:"uppercase"},kvValue:{color:U.color.text,fontSize:12}});p();T();import{macOSColors as _e,night as K,Pill as pn}from"@buoy-gg/shared-ui/web";import{jsx as L,jsxs as G}from"react/jsx-runtime";function fn({label:e,color:t,testID:a}){return L(pn,{label:e,color:t,variant:"quiet",dot:!!t,style:{paddingVertical:2.5},testID:a})}function yn({record:e,flags:t,sizeFraction:a,onPress:s}){let n=Ht[e.kind],o=[];return e.loaded||o.push({label:"NOT OBSERVED"}),t.oversize&&o.push({label:"OVERSIZE",color:_e.semantic.error}),t.duplicate&&o.push({label:"DUP"}),t.heavy&&o.push({label:"HEAVY"}),t.scaleAnomaly?o.push({label:"BAD SCALE",color:_e.semantic.error}):t.scaleGap&&o.push({label:"LOW-RES"}),t.webp&&o.push({label:"WEBP",color:_e.semantic.info}),G(W,{style:C.card,testID:ie(e.name,e.type),onPress:()=>s(e.id),activeOpacity:.7,children:[G(m,{style:C.body,children:[L(m,{style:C.thumbBox,children:e.kind==="image"?L(ta,{testID:"buoy-internal-assets-thumb",record:e,style:C.thumb,compact:true}):L(b,{style:[C.thumbFallback,{color:n}],children:jt[e.kind]})}),G(m,{style:C.main,children:[G(b,{style:C.name,numberOfLines:1,testID:`${ie(e.name,e.type)}-name`,children:[e.name,G(b,{style:C.ext,children:[".",e.type]})]}),G(m,{style:C.metaRow,children:[e.kind==="image"&&e.width!=null?L(b,{style:C.meta,children:ve(e)}):null,e.kind==="image"&&e.scales.length?L(b,{style:C.meta,children:be(e.scales)}):null]})]}),G(m,{style:C.right,children:[L(b,{style:C.size,testID:`${ie(e.name,e.type)}-size`,children:Rs(e,k(e))}),o.length?L(m,{style:C.badgeRow,children:o.slice(0,3).map(i=>L(fn,{label:i.label,color:i.color,testID:sa(e.name,e.type,i.label)},i.label))}):null]})]}),a>0?L(m,{style:C.sizeTrack,children:L(m,{style:[C.sizeFill,{backgroundColor:n,width:`${Math.max(2,Math.round(a*100))}%`}]})}):null]})}var C=M.create({card:{marginHorizontal:10,marginTop:6,borderRadius:10,backgroundColor:K.color.surface,borderWidth:1,borderColor:K.color.border,overflow:"hidden"},body:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:12,gap:10},thumbBox:{width:40,height:40,borderRadius:8,backgroundColor:"rgba(255,255,255,0.10)",borderWidth:1,borderColor:K.color.border,alignItems:"center",justifyContent:"center",overflow:"hidden"},thumb:{width:34,height:34},thumbFallback:{fontSize:9,fontWeight:"700",letterSpacing:.5},main:{flex:1,gap:3},name:{color:K.color.text,fontSize:12,fontWeight:"600"},ext:{color:K.color.textTertiary,fontWeight:"400"},metaRow:{flexDirection:"row",alignItems:"center",gap:8},meta:{color:K.color.textSecondary,fontSize:10,fontVariant:["tabular-nums"]},right:{alignItems:"flex-end",gap:4},size:{color:K.color.text,fontSize:12,fontWeight:"700",fontVariant:["tabular-nums"]},badgeRow:{flexDirection:"row",gap:4},sizeTrack:{height:2,backgroundColor:"transparent"},sizeFill:{height:2,opacity:.45,borderTopRightRadius:2}});p();T();import{night as Ce}from"@buoy-gg/shared-ui/web";import{jsx as qe}from"react/jsx-runtime";function mn({stats:e,duplicateCount:t,filter:a,onChange:s}){let n=[{key:"all",label:`ALL ${e.total}`,accent:Ce.color.textSecondary},{key:"duplicates",label:`DUPLICATES ${t}`,accent:"#FF9F1C"}];for(let o of Object.keys(e.byKind)){let i=e.byKind[o];i.count>0&&n.push({key:o,label:`${jt[o]} ${i.count}`,accent:Ht[o]})}return e.neverLoaded>0&&n.push({key:"unused",label:`NOT OBSERVED ${e.neverLoaded}`,accent:"#FF9F1C"}),n.length<=1?null:qe(m,{style:Je.bar,testID:v.filterBar,children:n.map(o=>{let i=o.key===a;return qe(W,{accessibilityRole:"button",accessibilityState:{selected:i},testID:Ke(o.key),style:[Je.chip,i&&{borderColor:o.accent,backgroundColor:`${o.accent}1A`}],onPress:()=>s(i?"all":o.key),children:qe(b,{testID:`${Ke(o.key)}-label`,style:[Je.chipText,{color:i?o.accent:Ce.color.textSecondary}],children:o.label})},o.key)})})}var Je=M.create({bar:{flexDirection:"row",flexWrap:"wrap",gap:6,paddingHorizontal:10,paddingVertical:8},chip:{borderWidth:1,borderColor:Ce.color.border,backgroundColor:Ce.color.surface,borderRadius:999,paddingHorizontal:10,paddingVertical:5},chipText:{fontSize:10,fontWeight:"700",letterSpacing:.4,lineHeight:13}});p();import{ModalHeader as P,ToolbarClearButton as gn,ToolbarCopyButton as ia}from"@buoy-gg/shared-ui/web";import{jsx as j,jsxs as Ye}from"react/jsx-runtime";function bn({stats:e,measuring:t,discovering:a=false,detailOpen:s,detailIndex:n=-1,detailTotal:o=0,onCloseDetail:i,onClear:d,getReport:l,onBack:c}){if(s){let u=n>=0&&o>0?`${n+1} of ${o}`:void 0;return Ye(P,{children:[j(P.Navigation,{onBack:i}),j(P.Content,{title:"Asset detail",subtitle:u,testID:v.title}),j(P.Actions,{children:j(ia,{value:l,testID:v.copy})})]})}let r=[`${e.total} assets${a?" so far":""}`];if(e.totalBytes>0&&!t&&!a){let u=e.measuredCount<e.total?"+":"";r.push(`${I(e.totalBytes)}${u}`)}return e.neverLoaded>0&&r.push(`${e.neverLoaded} not observed`),e.fontFamilies>0&&r.push(`${e.fontFamilies} fonts`),Ye(P,{children:[c?j(P.Navigation,{onBack:c}):null,j(P.Content,{title:"Assets",subtitle:r.join(" \xB7 "),testID:v.title}),Ye(P.Actions,{children:[j(ia,{value:l,testID:v.copy}),j(gn,{onPress:d,testID:v.clear})]})]})}p();T();import{night as _}from"@buoy-gg/shared-ui/web";import{jsx as la,jsxs as da}from"react/jsx-runtime";var vn={size:"name",name:"type",type:"size"};function Sn({query:e,onQueryChange:t,sort:a,onSortChange:s}){return da(m,{style:ke.row,children:[la(Ee,{style:ke.input,value:e,onChangeText:t,placeholder:"Search assets\u2026",placeholderTextColor:_.color.placeholder,autoCapitalize:"none",autoCorrect:false,testID:v.search}),la(W,{style:ke.button,onPress:()=>s(vn[a]),testID:v.sort,children:da(b,{style:ke.buttonText,testID:`${v.sort}-label`,children:["\u2193 ",a.toUpperCase()]})})]})}var ke=M.create({row:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:10,paddingBottom:8},input:{flex:1,backgroundColor:_.color.surfaceElevated,borderWidth:1,borderColor:_.color.border,borderRadius:8,paddingHorizontal:10,paddingVertical:6,color:_.color.text,fontSize:12},button:{backgroundColor:_.color.surface,borderWidth:1,borderColor:_.color.border,borderRadius:8,paddingHorizontal:10,paddingVertical:7},buttonText:{color:_.color.textSecondary,fontSize:10,fontWeight:"700",letterSpacing:.5}});p();T();import{useEffect as wn,useState as xn}from"react";import{night as le}from"@buoy-gg/shared-ui/web";import{jsx as ze,jsxs as Cn}from"react/jsx-runtime";function kn({status:e,total:t,onRetry:a}){let[s,n]=xn(false);wn(()=>{if(n(false),!e.graphFetchInFlight)return;let d=e.graphFetchStartedAt==null?0:Math.max(0,Date.now()-e.graphFetchStartedAt),l=setTimeout(()=>n(true),Math.max(0,8e3-d));return()=>clearTimeout(l)},[e.graphFetchInFlight,e.graphFetchStartedAt]);let o=[];e.browser&&!e.graphSupported&&o.push("Showing resources this page has loaded. Add an asset manifest to include files the page has not requested."),e.graphFetchInFlight&&(o.push(`Finding assets\u2026 ${t} found so far.`),s&&o.push("Still finding assets. This is taking longer than usual.")),e.registryAvailable||o.push("The asset registry is unavailable in this environment."),!e.graphFetchInFlight&&!e.graphSupported&&e.graphError&&o.push("Showing runtime-registered assets only. A development server is needed to find more assets and measure their sizes.");let i=!e.graphFetchInFlight&&e.graphSupported&&!!e.graphError;return i&&o.push(`Couldn't finish finding assets. Showing ${t} assets found so far.`),e.measuring&&!e.graphFetchInFlight&&o.push("Checking asset sizes\u2026"),o.length===0?null:Cn(m,{style:Qe.notice,testID:v.notice,children:[e.graphFetchInFlight?ze(Re,{size:"small",color:le.color.textSecondary,accessibilityLabel:"Finding assets",testID:v.discoverySpinner}):null,o.map(d=>ze(b,{style:Qe.noticeText,testID:v.noticeText,children:d},d)),i?ze(W,{accessibilityRole:"button",onPress:a,testID:v.retry,children:ze(b,{style:Qe.retryText,children:"Retry"})}):null]})}var Qe=M.create({notice:{marginHorizontal:10,marginBottom:8,padding:10,borderRadius:8,borderWidth:1,borderColor:le.color.border,backgroundColor:le.color.surface,gap:4},noticeText:{color:le.color.textSecondary,fontSize:11},retryText:{color:le.color.text,fontSize:12,paddingVertical:6}});import{jsx as S,jsxs as se}from"react/jsx-runtime";function zn({names:e}){let t=[...new Set(e)];return t.length?se(m,{style:$.fontsBox,testID:v.fonts,children:[se(b,{style:$.fontsTitle,testID:v.fontsTitle,children:["LOADED FONT FAMILIES (",t.length,")"]}),S(m,{style:$.fontsWrap,children:t.map(a=>S(b,{style:$.fontChip,testID:oa(a),children:a},a))})]}):null}function Bn({duplicates:e=false}){return S(Cs,{testID:v.empty,otto:"scanning",title:e?"No duplicates found":"No assets found yet",message:e?"No assets in this view share a content hash.":"Every bundled asset \u2014 images, fonts, video, audio \u2014 appears here with sizes, scale coverage, and runtime registration status. Try Rescan after navigating around the app."})}function ca(e,t){return(t.sizeBytes??k(t))-(e.sizeBytes??k(e))}var $n={size:ca,name:(e,t)=>e.name.localeCompare(t.name)||e.type.localeCompare(t.type),type:(e,t)=>e.type.localeCompare(t.type)||ca(e,t)};function Ze({visible:e,onClose:t,onBack:a,onMinimize:s,persistenceKey:n,inline:o=false}){me();let{records:i,stats:d,insights:l}=Wt(),c=_s(),[r,u]=oe(false);It(()=>{u(false)},[c.graphFetchInFlight,c.lastScanAt]);let h=()=>{u(false);let f=Se();f?f("rescan").catch(()=>u(true)):ge()},[w,q]=oe(null),[z,ya]=oe("all"),[et,tt]=oe(""),[at,ma]=oe("size"),H=w!=null?Oe(w):void 0;It(()=>{if(!e)return;_t(),u(false);let f=Se();f?f("rescan").catch(()=>u(true)):ge()},[e]);let Be=new Set(l.duplicates.flatMap(f=>f.ids)),st=[...i].sort($n[at]),nt=et.trim().toLowerCase(),J=st.filter(f=>!(z==="unused"&&f.loaded||z==="duplicates"&&!Be.has(f.id)||z!=="all"&&z!=="unused"&&z!=="duplicates"&&f.kind!==z||nt&&!`${f.name}.${f.type}`.toLowerCase().includes(nt))),ne=H?J.findIndex(f=>f.id===H.id):-1,ot=f=>{let O=J[f];O&&q(O.id)},Y={scaleGaps:new Set(l.scaleGaps),scaleAnomalies:new Set(l.scaleAnomalies),duplicates:Be,webpCandidates:new Set(l.webpCandidates),overDecode:new Set(l.overDecode),heavy:new Set([...l.heavyGifs,...l.heavyFonts])},de=0;for(let f of J){let O=f.sizeBytes??k(f);O>de&&(de=O)}let ga=()=>H?Nt(H):Vt(st,d,l,te(),we()),rt=S(bn,{stats:d,measuring:c.measuring,discovering:c.graphFetchInFlight,detailOpen:H!=null,detailIndex:ne,detailTotal:J.length,onCloseDetail:()=>q(null),onClear:Pe,getReport:ga,onBack:a}),it=H?se(m,{style:$.detailContainer,children:[S(hn,{record:H,insights:l}),ne>=0?S(vs,{currentIndex:ne,totalItems:J.length,itemLabel:"Asset",onPrevious:()=>ot(ne-1),onNext:()=>ot(ne+1)}):null]}):se(m,{style:$.listContainer,children:[S(mn,{stats:d,duplicateCount:Be.size,filter:z,onChange:f=>{ya(f),f==="duplicates"&&tt("")}}),S(Sn,{query:et,onQueryChange:tt,sort:at,onSortChange:ma}),S(kn,{status:c,total:d.total,onRetry:h}),r&&!c.graphFetchInFlight?se(m,{style:$.notice,children:[S(b,{style:$.noticeText,children:"Couldn't request an asset scan from the device."}),S(W,{accessibilityRole:"button",onPress:h,children:S(b,{style:$.retryText,children:"Retry"})})]}):null,z==="unused"?S(m,{style:$.notice,children:S(b,{style:$.noticeText,children:"Not seen in React Native's asset registry this app run. Assets loaded through other paths may appear here; this does not prove they are unused."})}):null,z==="font"?S(zn,{names:c.fontFamilies}):null,S(ut,{testID:v.list,data:J,keyExtractor:f=>String(f.id),contentContainerStyle:$.listContent,renderItem:({item:f})=>S(yn,{record:f,flags:{scaleGap:Y.scaleGaps.has(f.id),scaleAnomaly:Y.scaleAnomalies.has(f.id),duplicate:Y.duplicates.has(f.id),webp:Y.webpCandidates.has(f.id),oversize:Y.overDecode.has(f.id),heavy:Y.heavy.has(f.id)},sizeFraction:de>0?(f.sizeBytes??k(f))/de:0,onPress:O=>q(typeof O=="number"?O:null)}),ListEmptyComponent:c.graphFetchInFlight?null:S(Bn,{duplicates:z==="duplicates"})})]});return o?se(m,{style:$.inlineRoot,children:[S(m,{style:$.inlineHeader,...xs,children:rt}),it]}):S(Ss,{visible:e,onClose:t,onMinimize:s,persistenceKey:n,header:{showToggleButton:true,customContent:rt},enablePersistence:true,initialMode:"bottomSheet",disableScrollWrapper:true,children:it})}function In(e={}){return S(Ze,{...e,inline:true,visible:true,onClose:()=>{}})}var $=M.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:ws.border.default,backgroundColor:"transparent"},listContainer:{flex:1},listContent:{paddingBottom:16},detailContainer:{flex:1},notice:{marginHorizontal:10,marginBottom:8,padding:10,borderRadius:8,borderWidth:1,borderColor:R.color.border,backgroundColor:R.color.surface,gap:4},noticeText:{color:R.color.textSecondary,fontSize:11},retryText:{color:R.color.text,fontSize:12,paddingVertical:6},fontsBox:{marginHorizontal:10,marginTop:8,padding:10,borderRadius:8,backgroundColor:R.color.surface,gap:6},fontsTitle:{color:R.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.5},fontsWrap:{flexDirection:"row",flexWrap:"wrap",gap:6},fontChip:{color:R.color.textSecondary,fontSize:10,backgroundColor:R.color.bg,borderRadius:999,paddingHorizontal:8,paddingVertical:3,overflow:"hidden"},empty:{alignItems:"center",padding:32,gap:8},emptyTitle:{color:R.color.text,fontSize:13,fontWeight:"600"},emptyText:{color:R.color.textSecondary,fontSize:11,textAlign:"center",lineHeight:16}});import{createToolFactory as An,defineToolPreset as Dn}from"@buoy-gg/shared-ui/web";import{jsx as Fn}from"react/jsx-runtime";var ua=Dn({id:"assets",name:"ASSETS",description:"Every bundled asset \u2014 sizes, scale coverage, unused detection",slot:"both",icon:({size:e,color:t})=>Fn(Bt,{size:e,color:t||$t}),component:Ze}),En=An(ua);p();var ha=["image","font","video","audio","data","other"];function Xe(e){return{loadStatus:e.loadStatus,durationMs:e.durationMs,cacheHit:e.cacheHit,id:e.id,key:e.key,registryId:e.registryId??null,name:e.name,type:e.type,kind:e.kind,hash:e.hash??null,location:e.httpServerLocation??null,width:e.width??null,height:e.height??null,scales:e.scales,uri:e.resolvedUri??null,loaded:e.loaded,sizeBytes:e.sizeSource==="measured"?e.sizeBytes??null:k(e)||null,sizeSource:e.sizeSource??null}}function Ln(e){let t=e?.id;if(typeof t!="number")throw new Error("Missing numeric `id` param");let a=Oe(t);if(!a)throw new Error(`Asset record ${t} not found \u2014 re-run the list action for current ids.`);return a}function Tn(e,t){return(t.sizeBytes??k(t))-(e.sizeBytes??k(e))}function pa(){let e=F();return{stats:je(e),scanStatus:te(),insights:Ve(e),diff:we(),records:[...e].sort(Tn)}}var Rn={version:1,getSnapshot:()=>{let{records:e,...t}=pa();return{...t,records:e.slice(0,200).map(Xe)}},subscribe:e=>pe(e),actions:{list:e=>{let t=e??{},a=Math.min(Math.max(t.limit??50,1),500),{records:s,...n}=pa(),o=s;if(t.kind){if(!ha.includes(t.kind))throw new Error(`kind must be one of: ${ha.join(", ")}`);o=o.filter(i=>i.kind===t.kind)}return t.loadedOnly&&(o=o.filter(i=>i.loaded)),{...n,total:o.length,records:o.slice(0,a).map(Xe)}},getDetail:e=>{let t=Ln(e);return{...Xe(t),origin:t.origin,fileSystemLocation:t.fileSystemLocation??null,files:t.files??null,sizesByScale:t.sizesByScale??null,estDecodedBytes:k(t)||null}},rescan:async()=>({ok:true,scanStatus:await ge()}),measureSizes:async()=>{let e=await ea();return{ok:e.measured>0,...e}},saveBaseline:async()=>{let e=await qt();return{ok:true,savedAt:e.savedAt,assets:Object.keys(e.entries).length}},clearBaseline:async()=>(await Jt(),{ok:true,message:"Baseline cleared"}),getDiff:()=>we(),clearRecords:()=>(Pe(),{ok:true,message:"Inventory cleared \u2014 rescan to rebuild"}),getScanStatus:()=>te()}};p();p();var fa=0;function Mn(){if(typeof document>"u")return()=>{};++fa===1&&me();let e=true;return()=>{e&&(e=false,--fa===0&&Pt())}}export{$t as ASSETS_ICON_COLOR,v as ASSETS_TEST_IDS,Bt as AssetsIcon,Ze as AssetsModal,In as AssetsToolView,sa as assetBadgeTestID,na as assetDetailRowTestID,Ke as assetFilterTestID,ra as assetFindingTestID,oa as assetFontChipTestID,ie as assetRowTestID,ae as assetSlug,Rn as assetsSyncAdapter,ua as assetsToolPreset,Jt as clearBaseline,Pe as clearRecords,Yt as computeDiff,Ve as computeInsights,je as computeStats,En as createAssetsTool,Js as disableAssetsCapture,k as estDecodedBytes,en as fetchAssetGraph,Nt as formatAssetMarkdown,Vt as formatInventoryMarkdown,Tt as getBrowserAssetManifest,Zt as getDevServerOrigin,we as getDiff,Ne as getLoadedFontFamilies,Ts as getLocalAssets,Oe as getRecord,te as getScanStatus,F as getSnapshot,me as installAssetCapture,_t as loadBaseline,Es as loadBrowserAssetManifest,ea as measureSizes,Ls as recordBrowserAssetLoad,Lt as registerBrowserAssetManifest,Ys as replaceAssetsFromSnapshot,ge as rescan,qt as saveBaseline,qs as setRemoteAssetsHandler,Mn as startBrowserAssetCapture,pe as subscribe,Wt as useAssetRecords};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/assets",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.76",
|
|
4
4
|
"description": "Inspect assets reported by a manifest and runtime hooks, including available sizes, scale variants, duplicates and baseline changes.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"**/autoCapture.*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
20
|
+
"@buoy-gg/shared-ui": "^7.0.76"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "*"
|