@buoy-gg/env 7.0.56 → 7.0.58

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 CHANGED
@@ -1 +1 @@
1
- "use client";var se=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ie=(e,n)=>{for(var r in n)se(e,r,{get:n[r],enumerable:true})},ie=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Ve(n))!ke.call(e,t)&&t!==r&&se(e,t,{get:()=>n[t],enumerable:!(a=Te(n,t))||a.enumerable});return e},Ee=(e,n,r)=>(ie(e,n,"default"),r&&ie(r,n,"default"));typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import{EnvIcon as Le}from"@buoy-gg/floating-tools-core/web";import{JsModal as qe,devToolsStorageKeys as le,ModalHeader as M,HeaderSearchButton as Ae,displayValue as De,buoyColors as j,night as K,windowDragProps as _e,ToolEmptyState as Re,resolveListEmptyState as Be,monoFont as ce}from"@buoy-gg/shared-ui/web";import{useCallback as Me,useState as Y,useRef as je,useEffect as de,useMemo as P}from"react";var ue={};Ie(ue,{AccessibilityInfo:()=>Fe,ActivityIndicator:()=>Mt,Alert:()=>Wt,Animated:()=>Oe,AppRegistry:()=>He,AppState:()=>$e,Appearance:()=>ze,BackHandler:()=>Ke,Button:()=>jt,CheckBox:()=>lt,Clipboard:()=>Ge,DeviceEventEmitter:()=>Tt,Dimensions:()=>Ue,Easing:()=>Je,FlatList:()=>ct,I18nManager:()=>Ye,Image:()=>dt,ImageBackground:()=>ut,InteractionManager:()=>Qe,Keyboard:()=>Xe,KeyboardAvoidingView:()=>pt,LayoutAnimation:()=>Ze,Linking:()=>et,LogBox:()=>St,Modal:()=>Rt,NativeEventEmitter:()=>tt,NativeModules:()=>Ne,PanResponder:()=>rt,Picker:()=>yt,PixelRatio:()=>at,Platform:()=>nt,Pressable:()=>_t,ProgressBar:()=>ht,RefreshControl:()=>bt,SafeAreaView:()=>gt,ScrollView:()=>pe,SectionList:()=>ft,Share:()=>ot,StatusBar:()=>mt,StyleSheet:()=>W,Switch:()=>Bt,Text:()=>y,TextInput:()=>qt,Touchable:()=>vt,TouchableHighlight:()=>At,TouchableNativeFeedback:()=>xt,TouchableOpacity:()=>G,TouchableWithoutFeedback:()=>Dt,UIManager:()=>st,Vibration:()=>it,View:()=>p,VirtualizedList:()=>Ct,YellowBox:()=>wt,findNodeHandle:()=>Pt,unstable_createElement:()=>We,useColorScheme:()=>Vt,useLocaleContext:()=>kt,useWindowDimensions:()=>It});Ee(ue,Pe);import*as Pe from"react-native-web";import{unstable_createElement as We,NativeModules as Ne,AccessibilityInfo as Fe,Animated as Oe,Appearance as ze,AppRegistry as He,AppState as $e,BackHandler as Ke,Clipboard as Ge,Dimensions as Ue,Easing as Je,I18nManager as Ye,Keyboard as Xe,InteractionManager as Qe,LayoutAnimation as Ze,Linking as et,NativeEventEmitter as tt,PanResponder as rt,PixelRatio as at,Platform as nt,Share as ot,StyleSheet as W,UIManager as st,Vibration as it,CheckBox as lt,FlatList as ct,Image as dt,ImageBackground as ut,KeyboardAvoidingView as pt,Picker as yt,ProgressBar as ht,RefreshControl as bt,SafeAreaView as gt,SectionList as ft,StatusBar as mt,Touchable as vt,TouchableNativeFeedback as xt,VirtualizedList as Ct,YellowBox as wt,LogBox as St,DeviceEventEmitter as Tt,useColorScheme as Vt,useLocaleContext as kt,useWindowDimensions as It}from"react-native-web";import*as g from"react-native-web";import{createElement as Et,forwardRef as Lt}from"react";function x(e){let n=Lt((a,t)=>{let{accessibilityState:o,accessibilityValue:i,...s}=a;for(let d of["busy","checked","disabled","expanded","selected"])o?.[d]!==void 0&&s[`aria-${d}`]===void 0&&(s[`aria-${d}`]=o[d]);for(let[d,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))i?.[d]!==void 0&&s[`aria-${c}`]===void 0&&(s[`aria-${c}`]=i[d]);return Et(e,{...s,ref:t})}),r=e.State;return r&&Object.assign(n,{State:r}),n.displayName=e.displayName??e.name??"NativeWebView",n}var p=x(g.View),y=x(g.Text),qt=x(g.TextInput),G=x(g.TouchableOpacity),At=x(g.TouchableHighlight),Dt=x(g.TouchableWithoutFeedback),_t=x(g.Pressable),pe=x(g.ScrollView),Rt=x(g.Modal),Bt=x(g.Switch),Mt=x(g.ActivityIndicator),jt=x(g.Button),Pt=g.findNodeHandle,Wt={alert(e,n,r,a){if(typeof document>"u")return;let t=document.createElement("dialog");t.dataset.buoyRoot="",t.setAttribute("aria-label",e),t.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",t.appendChild(o),n){let c=document.createElement("p");c.textContent=n,c.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",t.appendChild(c)}let i=document.createElement("div");i.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let s=r?.length?r:[{text:"OK"}],d=()=>{t.close?.(),t.remove()};for(let c of s){let l=document.createElement("button");l.type="button",l.textContent=c.text??"OK",l.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${c.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,l.onclick=()=>{d(),c.onPress?.()},i.appendChild(l)}t.addEventListener("cancel",c=>{c.preventDefault(),a?.cancelable!==false&&(d(),a?.onDismiss?.())}),t.appendChild(i),document.body.appendChild(t),t.showModal?t.showModal():t.setAttribute("open","")}};import{CompactRow as Nt,night as T,monoFont as ye}from"@buoy-gg/shared-ui/web";import{jsx as V,jsxs as A}from"react/jsx-runtime";function Ft({stats:e,healthPercentage:n,healthStatus:r,healthColor:a,activeFilter:t="all",onFilterChange:o}){let i=e.wrongValueCount+e.wrongTypeCount;return A(p,{style:u.container,children:[V(Nt,{statusDotColor:a,statusLabel:"System",statusSublabel:r.toLowerCase(),primaryText:"Environment Configuration",secondaryText:`${n}% healthy`,testID:"buoy-env-health",statusSublabelTestID:"buoy-env-health-status",accessibilityLabel:`Environment configuration ${r.toLowerCase()}, ${n}% healthy`,customBadge:V(p,{style:[u.percentBadge,{borderColor:a+"40",backgroundColor:a+"10"}],children:A(y,{style:[u.percentText,{color:a}],testID:"buoy-env-health-percent",children:[n,"%"]})})}),A(p,{style:u.statsGrid,children:[A(G,{style:[u.statCard,t==="all"&&u.statCardActive],onPress:()=>o?.("all"),activeOpacity:.8,testID:"buoy-env-filter-all",accessibilityRole:"button",accessibilityLabel:"Show all variables",accessibilityState:{selected:t==="all"},children:[V(y,{style:[u.statValue,t==="all"&&u.statValueActive],testID:"buoy-env-filter-all-count",children:e.requiredCount+e.optionalCount}),V(y,{style:[u.statLabel,t==="all"&&u.statLabelActive],children:"ALL"})]}),A(G,{style:[u.statCard,t==="missing"&&u.statCardActive],onPress:()=>o?.("missing"),activeOpacity:.8,testID:"buoy-env-filter-missing",accessibilityRole:"button",accessibilityLabel:"Show missing variables",accessibilityState:{selected:t==="missing"},children:[V(y,{style:[u.statValue,t==="missing"&&u.statValueActive],testID:"buoy-env-filter-missing-count",children:e.missingCount}),V(y,{style:[u.statLabel,t==="missing"&&u.statLabelActive],children:"MISSING"})]}),A(G,{style:[u.statCard,t==="issues"&&u.statCardActive],onPress:()=>o?.("issues"),activeOpacity:.8,testID:"buoy-env-filter-issues",accessibilityRole:"button",accessibilityLabel:"Show variables with issues",accessibilityState:{selected:t==="issues"},children:[V(y,{style:[u.statValue,t==="issues"&&u.statValueActive],testID:"buoy-env-filter-issues-count",children:i}),V(y,{style:[u.statLabel,t==="issues"&&u.statLabelActive],children:"ISSUES"})]})]})]})}var u=W.create({container:{gap:8},statsGrid:{flexDirection:"row",gap:8,paddingHorizontal:4},statCard:{flex:1,backgroundColor:T.color.surface,borderRadius:10,borderWidth:1,borderColor:T.color.border,padding:12,alignItems:"center",justifyContent:"center",minHeight:64},statCardActive:{borderColor:T.color.accentBorderStrong,backgroundColor:T.color.accentSoft},statValue:{fontSize:22,fontWeight:"700",fontFamily:ye,lineHeight:26,color:T.color.text},statValueActive:{color:T.color.accent},statLabel:{fontSize:9,color:T.color.textTertiary,marginTop:4,textTransform:"uppercase",letterSpacing:.5,fontWeight:"600"},statLabelActive:{color:T.color.accent},percentBadge:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1},percentText:{fontSize:14,fontWeight:"700",fontFamily:ye}});import{useMemo as he}from"react";var be=null;function Ot(e){be=e}function ge(){return be}function zt({envFilter:e=()=>true}={}){let n=ge()??(typeof process>"u"?{}:process.env),r=he(()=>a=>{let t=n[a];if(t===void 0)return null;try{if(t.startsWith("{")||t.startsWith("["))return JSON.parse(t);if(t.toLowerCase()==="true")return true;if(t.toLowerCase()==="false")return false;if(/^\d+$/.test(t)){let o=parseInt(t,10);return isNaN(o)?t:o}if(/^\d*\.\d+$/.test(t)){let o=parseFloat(t);return isNaN(o)?t:o}return t}catch{return t}},[n]);return he(()=>Object.keys(n).filter(a=>{let t=n[a];return e(a,t)}).map(a=>({key:a,data:r(a)})),[e,r,n])}function X(e){let n=typeof e;if(n==="boolean")return"boolean";if(n==="number")return"number";if(Array.isArray(e))return"array";if(n==="object"&&e!==null)return"object";if(n==="string"){let r=e;if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{let t=JSON.parse(r);return Array.isArray(t)?"array":"object"}catch{return"string"}let a=r.toLowerCase();return a==="true"||a==="false"||a==="enabled"||a==="disabled"||a==="yes"||a==="no"||a==="on"||a==="off"?"boolean":!isNaN(Number(r))&&r.trim()!==""?"number":r.startsWith("http://")||r.startsWith("https://")?"url":r.includes(",")?"array":"string"}return"unknown"}var Ht=class{constructor(e){this.key=e}exists(){return this.key}withValue(e){return this.expectedValue=e,delete this.expectedType,this}withType(e){return this.expectedType=e,delete this.expectedValue,this}withDescription(e){return this.description=e,this}build(){return this.expectedValue!==void 0?this.description?{key:this.key,expectedValue:this.expectedValue,description:this.description}:{key:this.key,expectedValue:this.expectedValue}:this.expectedType!==void 0?this.description?{key:this.key,expectedType:this.expectedType,description:this.description}:{key:this.key,expectedType:this.expectedType}:this.key}};function $t(e){return new Ht(e)}function Kt(e){return e}var Q=(e,n)=>{let r=[],a=[],t=new Set;return n?.forEach(o=>{let i=typeof o=="string"?o:o.key,s=typeof o=="object"&&"expectedValue"in o?o.expectedValue:void 0,d=typeof o=="object"&&"expectedType"in o?o.expectedType:void 0,c=typeof o=="object"&&"description"in o?o.description:void 0;t.add(i);let l=e[i],I=l!==void 0,w;if(!I)w="required_missing";else if(s){let E=false;s==="sk_*"?E=l.startsWith("sk_"):s==="production or development"?E=l==="production"||l==="development":E=l===s,w=E?"required_present":"required_wrong_value"}else d&&X(l).toLowerCase()!==d.toLowerCase()?w="required_wrong_type":w="required_present";r.push({key:i,value:l,expectedValue:s,expectedType:d,description:c,status:w,category:"required"})}),Object.entries(e).forEach(([o,i])=>{t.has(o)||a.push({key:o,value:i,status:"optional_present",category:"optional"})}),r.sort((o,i)=>{let s={required_missing:0,required_wrong_value:1,required_wrong_type:2,required_present:3,optional_present:4};return s[o.status]!==s[i.status]?s[o.status]-s[i.status]:o.key.localeCompare(i.key)}),a.sort((o,i)=>o.key.localeCompare(i.key)),{requiredVars:r,optionalVars:a}},fe=(e,n,r)=>{let a=Object.keys(r).length,t=e.length,o=e.filter(l=>l.status==="required_missing").length,i=e.filter(l=>l.status==="required_wrong_value").length,s=e.filter(l=>l.status==="required_wrong_type").length,d=e.filter(l=>l.status==="required_present").length,c=n.length;return{totalCount:a,requiredCount:t,missingCount:o,wrongValueCount:i,wrongTypeCount:s,presentRequiredCount:d,optionalCount:c}};import{useCallback as Gt,useState as Ut}from"react";import{CompactRow as Jt,TypeBadge as Z,buoyColors as D,night as ee,monoFont as te}from"@buoy-gg/shared-ui/web";import{Fragment as Yt,jsx as C,jsxs as q}from"react/jsx-runtime";var Xt=(e,n)=>{switch(e){case"required_present":return{label:"Valid",color:D.success,sublabel:"Required"};case"required_missing":return{label:"Missing",color:D.error,sublabel:"Required"};case"required_wrong_value":return{label:"Wrong",color:D.warning,sublabel:"Invalid value"};case"required_wrong_type":return{label:"Type Error",color:D.info,sublabel:"Wrong type"};case"optional_present":return{label:"Set",color:D.textSecondary,sublabel:"Optional"}}};var Qt=e=>e==null?"undefined":typeof e=="string"?e:String(e);function Zt({envVar:e,isExpanded:n,onPress:r}){let a=Xt(e.status,e.expectedType),t=e.value!==void 0&&e.value!==null,o=e.key.split("_").map(d=>d.toLowerCase()).join(" \u203A "),i=`buoy-env-row-${e.key}`,s=q(p,{style:h.expandedContainer,children:[q(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Value:"}),C(y,{style:h.expandedValue,numberOfLines:3,testID:`${i}-value`,children:Qt(e.value)||"undefined"})]}),e.status==="required_wrong_type"&&e.expectedType&&q(Yt,{children:[q(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Type:"}),C(Z,{type:X(e.value),testID:`${i}-actual-type`})]}),q(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Expected:"}),C(Z,{type:e.expectedType,testID:`${i}-expected-type`})]})]}),e.status==="required_wrong_value"&&e.expectedValue&&q(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Expected:"}),C(y,{style:h.expandedExpected,testID:`${i}-expected-value`,children:String(e.expectedValue)})]}),e.description&&q(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Info:"}),C(y,{style:h.expandedDescription,testID:`${i}-description`,children:e.description})]})]});return C(Jt,{statusDotColor:a.color,statusLabel:a.label,statusSublabel:a.sublabel,primaryText:o,secondaryText:void 0,expandedContent:s,isExpanded:n,expandedGlowColor:a.color,customBadge:e.expectedType?C(Z,{type:e.expectedType,testID:`${i}-type-badge`}):void 0,showChevron:true,onPress:r?()=>r(e):void 0,testID:i,statusTestID:`${i}-status`,statusSublabelTestID:`${i}-category`,accessibilityLabel:`${e.key}, ${a.label}, ${a.sublabel}`})}var h=W.create({expandedContainer:{gap:6},expandedRow:{flexDirection:"row",alignItems:"center",gap:8},expandedLabel:{fontSize:10,color:ee.color.textTertiary,fontWeight:"600",minWidth:60,fontFamily:te},expandedValue:{fontSize:11,color:ee.color.textSecondary,fontFamily:te,flex:1},expandedExpected:{fontSize:11,color:D.warning,fontFamily:te,flex:1},expandedDescription:{fontSize:11,color:ee.color.textSecondary,flex:1}});import{SectionHeader as _,night as N,monoFont as er}from"@buoy-gg/shared-ui/web";import{jsx as k,jsxs as U}from"react/jsx-runtime";function tr({title:e,count:n,vars:r,emptyMessage:a}){let[t,o]=Ut(null),i=Gt(s=>{o(d=>d===s.key?null:s.key)},[]);return r.length===0&&e==="Required Variables"?U(p,{style:F.sectionContainer,children:[U(_,{children:[k(_.Title,{children:e}),k(_.Badge,{count:0,color:N.color.accent})]}),k(p,{style:F.emptySection,children:k(y,{style:F.emptySectionText,children:a})})]}):r.length===0?null:U(p,{style:F.sectionContainer,children:[e!==""&&U(_,{children:[k(_.Title,{children:e}),k(_.Badge,{count:n,color:N.color.accent})]}),k(p,{style:F.sectionContent,children:r.map(s=>k(Zt,{envVar:s,isExpanded:t===s.key,onPress:i},s.key))})]})}var F=W.create({sectionContainer:{gap:8},sectionContent:{},emptySection:{padding:20,backgroundColor:N.color.accent+"08",borderRadius:8,borderWidth:1,borderColor:N.color.accent+"20",alignItems:"center"},emptySectionText:{color:N.color.accent,fontSize:11,textAlign:"center",fontFamily:er,opacity:.8,letterSpacing:.5}});import{jsx as b,jsxs as O}from"react/jsx-runtime";function re({visible:e,onClose:n,requiredEnvVars:r,onBack:a,onMinimize:t,enableSharedModalDimensions:o=false,inline:i=false}){let[s,d]=Y("all"),[c,l]=Y(false),[I,w]=Y(""),E=je(null),xe=Me(f=>{},[]);de(()=>{c&&E.current&&E.current.focus()},[c]),de(()=>{w(""),l(false)},[s]);let ae=zt(),z=P(()=>{let f={};return ae.forEach(({key:m,data:v})=>{v!=null&&(f[m]=typeof v=="string"?v:De(v))}),f},[ae]),{requiredVars:H,optionalVars:R}=P(()=>Q(z,r),[z,r]),$=P(()=>r===void 0?{totalCount:0,requiredCount:0,optionalCount:0,presentRequiredCount:0,missingCount:0,wrongValueCount:0,wrongTypeCount:0}:fe(H,R,z),[r,H,R,z]),B=P(()=>[...H,...R].sort((f,m)=>{let v={required_missing:1,required_wrong_type:2,required_wrong_value:3,required_present:4,optional_present:5};return(v[f.status]||999)-(v[m.status]||999)}),[H,R]),J=P(()=>{let f=[];switch(s){case"all":f=B;break;case"missing":f=B.filter(m=>m.status==="required_missing");break;case"issues":f=B.filter(m=>m.status==="required_wrong_type"||m.status==="required_wrong_value");break}if(I){let m=I.toLowerCase();f=f.filter(v=>v.key.toLowerCase().includes(m)||v.description?.toLowerCase().includes(m)||typeof v.value=="string"&&v.value.toLowerCase().includes(m))}return f},[B,R,s,I]),L=$.requiredCount>0?Math.round($.presentRequiredCount/$.requiredCount*100):100,Ce=L===100?"HEALTHY":L>=75?"WARNING":L>=50?"ERROR":"CRITICAL",we=L===100?j.success:L>=75?j.warning:L>=50?j.error:j.error;if(!e)return null;let Se=o?le.modal.root():le.env.modal(),ne=O(M,{children:[a&&b(M.Navigation,{onBack:a}),b(M.Content,{title:c?"":"Environment Variables",noMargin:c,children:c&&b(M.Search,{value:I,onChangeText:w,onCancel:()=>{l(false),w("")},placeholder:"Search env keys...",accessibilityLabel:"Search env keys",testID:"buoy-env-search",containerTestID:"buoy-env-search-field",clearTestID:"buoy-env-search-clear"})}),b(M.Actions,{children:!c&&b(Ae,{onPress:()=>l(true),testID:"buoy-env-search-open",accessibilityLabel:"Search env keys"})})]}),oe=O(pe,{style:S.scrollContainer,contentContainerStyle:S.contentContainer,showsVerticalScrollIndicator:false,testID:"buoy-env-scroll",children:[b(Ft,{stats:$,healthPercentage:L,healthStatus:Ce,healthColor:we,activeFilter:s,onFilterChange:d}),J.length>0?O(p,{style:S.varsSection,children:[O(p,{style:S.sectionHeader,children:[b(y,{style:S.sectionTitle,testID:"buoy-env-section-title",children:s==="all"?"ALL VARIABLES":s==="missing"?"MISSING VARIABLES":"ISSUES TO FIX"}),b(p,{style:S.countBadge,children:b(y,{style:S.countText,testID:"buoy-env-section-count",children:J.length})})]}),b(tr,{title:"",count:0,vars:J,emptyMessage:""})]}):b(Re,{testID:"buoy-env-empty",...Be({subject:"variables",verb:"declared",search:I,total:B.length,waiting:{otto:"keys",title:"No variables",message:`No ${s==="all"?"":s} variables found`}})})]});return i?O(p,{style:S.inlineRoot,children:[b(p,{style:S.inlineHeader,..._e,children:ne}),oe]}):b(qe,{visible:e,onClose:n,onMinimize:t,persistenceKey:Se,header:{customContent:ne,showToggleButton:true},onModeChange:xe,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},children:oe})}function rr({requiredEnvVars:e}){return b(re,{inline:true,visible:true,requiredEnvVars:e,onClose:()=>{}})}var S=W.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:j.border,backgroundColor:"transparent"},scrollContainer:{flex:1,backgroundColor:"transparent"},contentContainer:{padding:8,paddingBottom:24},varsSection:{marginTop:16},sectionHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingHorizontal:8},sectionTitle:{fontSize:10,fontWeight:"700",color:K.color.textTertiary,letterSpacing:1.2,fontFamily:ce},countBadge:{backgroundColor:K.color.accent+"15",paddingHorizontal:8,paddingVertical:2,borderRadius:9999,borderWidth:1,borderColor:K.color.accent+"40"},countText:{fontSize:10,fontWeight:"500",color:K.color.accent,fontFamily:ce}});function ar(){let e={};for(let[n,r]of Object.entries(ge()??(typeof process>"u"?{}:process.env)))typeof r=="string"&&(e[n]=r);return e}var me=[];function nr(e){me=e}function or(e=[]){return{version:1,getSnapshot:()=>{let n=ar(),r=e.length>0?e:me,a=[];try{a=Q(n,r).requiredVars.map(t=>({key:t.key,status:t.status}))}catch{a=[]}return{env:n,requiredEnvVars:r,checks:a}},subscribe:()=>()=>{}}}import{createToolFactory as sr,defineToolPreset as ir}from"@buoy-gg/shared-ui/web";import{jsx as lr}from"react/jsx-runtime";var ve=ir({id:"env",name:"ENV",description:"Environment variables debugger",slot:"both",icon:({size:e})=>lr(Le,{size:e}),component:re,props:{requiredEnvVars:[],enableSharedModalDimensions:true}}),cr=sr(ve,e=>(nr(e.requiredEnvVars||[]),{requiredEnvVars:e.requiredEnvVars||[],enableSharedModalDimensions:e.enableSharedModalDimensions??true}));export{rr as EnvToolView,re as EnvVarsModal,fe as calculateStats,or as createEnvSyncAdapter,cr as createEnvTool,Kt as createEnvVarConfig,ve as envToolPreset,$t as envVar,X as getEnvVarType,Q as processEnvVars,Ot as setRemoteEnv};
1
+ "use client";var ie=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ee=(e,n)=>{for(var r in n)ie(e,r,{get:n[r],enumerable:true})},se=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Ve(n))!ke.call(e,t)&&t!==r&&ie(e,t,{get:()=>n[t],enumerable:!(a=Te(n,t))||a.enumerable});return e},Ie=(e,n,r)=>(se(e,n,"default"),r&&se(r,n,"default"));var dr=(()=>{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);import{EnvIcon as Le}from"@buoy-gg/floating-tools-core/web";import{JsModal as De,devToolsStorageKeys as le,ModalHeader as N,HeaderSearchButton as qe,displayValue as Ae,buoyColors as M,night as G,windowDragProps as _e,ToolEmptyState as Re,resolveListEmptyState as Be,monoFont as ce}from"@buoy-gg/shared-ui/web";import{useCallback as Ne,useState as Y,useRef as Me,useEffect as de,useMemo as P}from"react";var ue={};Ee(ue,{AccessibilityInfo:()=>Fe,ActivityIndicator:()=>Nt,Alert:()=>jt,Animated:()=>Oe,AppRegistry:()=>He,AppState:()=>$e,Appearance:()=>ze,BackHandler:()=>Ge,Button:()=>Mt,CheckBox:()=>lt,Clipboard:()=>Ke,DeviceEventEmitter:()=>Tt,Dimensions:()=>Ue,Easing:()=>Je,FlatList:()=>ct,I18nManager:()=>Ye,Image:()=>dt,ImageBackground:()=>ut,InteractionManager:()=>Qe,Keyboard:()=>Xe,KeyboardAvoidingView:()=>pt,LayoutAnimation:()=>Ze,Linking:()=>et,LogBox:()=>wt,Modal:()=>Rt,NativeEventEmitter:()=>tt,NativeModules:()=>We,PanResponder:()=>rt,Picker:()=>yt,PixelRatio:()=>at,Platform:()=>nt,Pressable:()=>_t,ProgressBar:()=>ht,RefreshControl:()=>bt,SafeAreaView:()=>gt,ScrollView:()=>pe,SectionList:()=>ft,Share:()=>ot,StatusBar:()=>mt,StyleSheet:()=>j,Switch:()=>Bt,Text:()=>y,TextInput:()=>Dt,Touchable:()=>vt,TouchableHighlight:()=>qt,TouchableNativeFeedback:()=>xt,TouchableOpacity:()=>K,TouchableWithoutFeedback:()=>At,UIManager:()=>it,Vibration:()=>st,View:()=>p,VirtualizedList:()=>Ct,YellowBox:()=>St,findNodeHandle:()=>Pt,unstable_createElement:()=>je,useColorScheme:()=>Vt,useLocaleContext:()=>kt,useWindowDimensions:()=>Et});Ie(ue,Pe);import*as Pe from"react-native-web";import{unstable_createElement as je,NativeModules as We,AccessibilityInfo as Fe,Animated as Oe,Appearance as ze,AppRegistry as He,AppState as $e,BackHandler as Ge,Clipboard as Ke,Dimensions as Ue,Easing as Je,I18nManager as Ye,Keyboard as Xe,InteractionManager as Qe,LayoutAnimation as Ze,Linking as et,NativeEventEmitter as tt,PanResponder as rt,PixelRatio as at,Platform as nt,Share as ot,StyleSheet as j,UIManager as it,Vibration as st,CheckBox as lt,FlatList as ct,Image as dt,ImageBackground as ut,KeyboardAvoidingView as pt,Picker as yt,ProgressBar as ht,RefreshControl as bt,SafeAreaView as gt,SectionList as ft,StatusBar as mt,Touchable as vt,TouchableNativeFeedback as xt,VirtualizedList as Ct,YellowBox as St,LogBox as wt,DeviceEventEmitter as Tt,useColorScheme as Vt,useLocaleContext as kt,useWindowDimensions as Et}from"react-native-web";import*as g from"react-native-web";import{createElement as It,forwardRef as Lt}from"react";function x(e){let n=Lt((a,t)=>{let{accessibilityState:o,accessibilityValue:s,...i}=a;for(let d of["busy","checked","disabled","expanded","selected"])o?.[d]!==void 0&&i[`aria-${d}`]===void 0&&(i[`aria-${d}`]=o[d]);for(let[d,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))s?.[d]!==void 0&&i[`aria-${c}`]===void 0&&(i[`aria-${c}`]=s[d]);return It(e,{...i,ref:t})}),r=e.State;return r&&Object.assign(n,{State:r}),n.displayName=e.displayName??e.name??"NativeWebView",n}var p=x(g.View),y=x(g.Text),Dt=x(g.TextInput),K=x(g.TouchableOpacity),qt=x(g.TouchableHighlight),At=x(g.TouchableWithoutFeedback),_t=x(g.Pressable),pe=x(g.ScrollView),Rt=x(g.Modal),Bt=x(g.Switch),Nt=x(g.ActivityIndicator),Mt=x(g.Button),Pt=g.findNodeHandle,jt={alert(e,n,r,a){if(typeof document>"u")return;let t=document.createElement("dialog");t.dataset.buoyRoot="",t.setAttribute("aria-label",e),t.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",t.appendChild(o),n){let c=document.createElement("p");c.textContent=n,c.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",t.appendChild(c)}let s=document.createElement("div");s.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let i=r?.length?r:[{text:"OK"}],d=()=>{t.close?.(),t.remove()};for(let c of i){let l=document.createElement("button");l.type="button",l.textContent=c.text??"OK",l.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${c.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,l.onclick=()=>{d(),c.onPress?.()},s.appendChild(l)}t.addEventListener("cancel",c=>{c.preventDefault(),a?.cancelable!==false&&(d(),a?.onDismiss?.())}),t.appendChild(s),document.body.appendChild(t),t.showModal?t.showModal():t.setAttribute("open","")}};import{CompactRow as Wt,night as T,monoFont as ye}from"@buoy-gg/shared-ui/web";import{jsx as V,jsxs as q}from"react/jsx-runtime";function Ft({stats:e,healthPercentage:n,healthStatus:r,healthColor:a,activeFilter:t="all",onFilterChange:o}){let s=e.wrongValueCount+e.wrongTypeCount;return q(p,{style:u.container,children:[V(Wt,{statusDotColor:a,statusLabel:"System",statusSublabel:r.toLowerCase(),primaryText:"Environment Configuration",secondaryText:`${n}% healthy`,testID:"buoy-env-health",statusSublabelTestID:"buoy-env-health-status",accessibilityLabel:`Environment configuration ${r.toLowerCase()}, ${n}% healthy`,customBadge:V(p,{style:[u.percentBadge,{borderColor:a+"40",backgroundColor:a+"10"}],children:q(y,{style:[u.percentText,{color:a}],testID:"buoy-env-health-percent",children:[n,"%"]})})}),q(p,{style:u.statsGrid,children:[q(K,{style:[u.statCard,t==="all"&&u.statCardActive],onPress:()=>o?.("all"),activeOpacity:.8,testID:"buoy-env-filter-all",accessibilityRole:"button",accessibilityLabel:"Show all variables",accessibilityState:{selected:t==="all"},children:[V(y,{style:[u.statValue,t==="all"&&u.statValueActive],testID:"buoy-env-filter-all-count",children:e.requiredCount+e.optionalCount}),V(y,{style:[u.statLabel,t==="all"&&u.statLabelActive],children:"ALL"})]}),q(K,{style:[u.statCard,t==="missing"&&u.statCardActive],onPress:()=>o?.("missing"),activeOpacity:.8,testID:"buoy-env-filter-missing",accessibilityRole:"button",accessibilityLabel:"Show missing variables",accessibilityState:{selected:t==="missing"},children:[V(y,{style:[u.statValue,t==="missing"&&u.statValueActive],testID:"buoy-env-filter-missing-count",children:e.missingCount}),V(y,{style:[u.statLabel,t==="missing"&&u.statLabelActive],children:"MISSING"})]}),q(K,{style:[u.statCard,t==="issues"&&u.statCardActive],onPress:()=>o?.("issues"),activeOpacity:.8,testID:"buoy-env-filter-issues",accessibilityRole:"button",accessibilityLabel:"Show variables with issues",accessibilityState:{selected:t==="issues"},children:[V(y,{style:[u.statValue,t==="issues"&&u.statValueActive],testID:"buoy-env-filter-issues-count",children:s}),V(y,{style:[u.statLabel,t==="issues"&&u.statLabelActive],children:"ISSUES"})]})]})]})}var u=j.create({container:{gap:8},statsGrid:{flexDirection:"row",gap:8,paddingHorizontal:4},statCard:{flex:1,backgroundColor:T.color.surface,borderRadius:10,borderWidth:1,borderColor:T.color.border,padding:12,alignItems:"center",justifyContent:"center",minHeight:64},statCardActive:{borderColor:T.color.accentBorderStrong,backgroundColor:T.color.accentSoft},statValue:{fontSize:22,fontWeight:"700",fontFamily:ye,lineHeight:26,color:T.color.text},statValueActive:{color:T.color.accent},statLabel:{fontSize:9,color:T.color.textTertiary,marginTop:4,textTransform:"uppercase",letterSpacing:.5,fontWeight:"600"},statLabelActive:{color:T.color.accent},percentBadge:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1},percentText:{fontSize:14,fontWeight:"700",fontFamily:ye}});import{useMemo as he}from"react";var be=null;function Ot(e){be=e}function ge(){return be}function zt({envFilter:e=()=>true}={}){let n=ge()??(typeof process>"u"?{}:process.env),r=he(()=>a=>{let t=n[a];if(t===void 0)return null;try{if(t.startsWith("{")||t.startsWith("["))return JSON.parse(t);if(t.toLowerCase()==="true")return true;if(t.toLowerCase()==="false")return false;if(/^\d+$/.test(t)){let o=parseInt(t,10);return isNaN(o)?t:o}if(/^\d*\.\d+$/.test(t)){let o=parseFloat(t);return isNaN(o)?t:o}return t}catch{return t}},[n]);return he(()=>Object.keys(n).filter(a=>{let t=n[a];return e(a,t)}).map(a=>({key:a,data:r(a)})),[e,r,n])}function X(e){let n=typeof e;if(n==="boolean")return"boolean";if(n==="number")return"number";if(Array.isArray(e))return"array";if(n==="object"&&e!==null)return"object";if(n==="string"){let r=e;if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{let t=JSON.parse(r);return Array.isArray(t)?"array":"object"}catch{return"string"}let a=r.toLowerCase();return a==="true"||a==="false"||a==="enabled"||a==="disabled"||a==="yes"||a==="no"||a==="on"||a==="off"?"boolean":!isNaN(Number(r))&&r.trim()!==""?"number":r.startsWith("http://")||r.startsWith("https://")?"url":r.includes(",")?"array":"string"}return"unknown"}var Ht=class{constructor(e){this.key=e}exists(){return this.key}withValue(e){return this.expectedValue=e,delete this.expectedType,this}withType(e){return this.expectedType=e,delete this.expectedValue,this}withDescription(e){return this.description=e,this}build(){return this.expectedValue!==void 0?this.description?{key:this.key,expectedValue:this.expectedValue,description:this.description}:{key:this.key,expectedValue:this.expectedValue}:this.expectedType!==void 0?this.description?{key:this.key,expectedType:this.expectedType,description:this.description}:{key:this.key,expectedType:this.expectedType}:this.key}};function $t(e){return new Ht(e)}function Gt(e){return e}var Q=(e,n)=>{let r=[],a=[],t=new Set;return n?.forEach(o=>{let s=typeof o=="string"?o:o.key,i=typeof o=="object"&&"expectedValue"in o?o.expectedValue:void 0,d=typeof o=="object"&&"expectedType"in o?o.expectedType:void 0,c=typeof o=="object"&&"description"in o?o.description:void 0;t.add(s);let l=e[s],E=l!==void 0,S;if(!E)S="required_missing";else if(i){let I=false;i==="sk_*"?I=l.startsWith("sk_"):i==="production or development"?I=l==="production"||l==="development":I=l===i,S=I?"required_present":"required_wrong_value"}else d&&X(l).toLowerCase()!==d.toLowerCase()?S="required_wrong_type":S="required_present";r.push({key:s,value:l,expectedValue:i,expectedType:d,description:c,status:S,category:"required"})}),Object.entries(e).forEach(([o,s])=>{t.has(o)||a.push({key:o,value:s,status:"optional_present",category:"optional"})}),r.sort((o,s)=>{let i={required_missing:0,required_wrong_value:1,required_wrong_type:2,required_present:3,optional_present:4};return i[o.status]!==i[s.status]?i[o.status]-i[s.status]:o.key.localeCompare(s.key)}),a.sort((o,s)=>o.key.localeCompare(s.key)),{requiredVars:r,optionalVars:a}},fe=(e,n,r)=>{let a=Object.keys(r).length,t=e.length,o=e.filter(l=>l.status==="required_missing").length,s=e.filter(l=>l.status==="required_wrong_value").length,i=e.filter(l=>l.status==="required_wrong_type").length,d=e.filter(l=>l.status==="required_present").length,c=n.length;return{totalCount:a,requiredCount:t,missingCount:o,wrongValueCount:s,wrongTypeCount:i,presentRequiredCount:d,optionalCount:c}};import{useCallback as Kt,useState as Ut}from"react";import{CompactRow as Jt,TypeBadge as Z,buoyColors as A,night as ee,monoFont as te}from"@buoy-gg/shared-ui/web";import{Fragment as Yt,jsx as C,jsxs as D}from"react/jsx-runtime";var Xt=(e,n)=>{switch(e){case"required_present":return{label:"Valid",color:A.success,sublabel:"Required"};case"required_missing":return{label:"Missing",color:A.error,sublabel:"Required"};case"required_wrong_value":return{label:"Wrong",color:A.warning,sublabel:"Invalid value"};case"required_wrong_type":return{label:"Type Error",color:A.info,sublabel:"Wrong type"};case"optional_present":return{label:"Set",color:A.textSecondary,sublabel:"Optional"}}};var Qt=e=>e==null?"undefined":typeof e=="string"?e:String(e);function Zt({envVar:e,isExpanded:n,onPress:r}){let a=Xt(e.status,e.expectedType),t=e.value!==void 0&&e.value!==null,o=e.key.split("_").map(d=>d.toLowerCase()).join(" \u203A "),s=`buoy-env-row-${e.key}`,i=D(p,{style:h.expandedContainer,children:[D(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Value:"}),C(y,{style:h.expandedValue,numberOfLines:3,testID:`${s}-value`,children:Qt(e.value)||"undefined"})]}),e.status==="required_wrong_type"&&e.expectedType&&D(Yt,{children:[D(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Type:"}),C(Z,{type:X(e.value),testID:`${s}-actual-type`})]}),D(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Expected:"}),C(Z,{type:e.expectedType,testID:`${s}-expected-type`})]})]}),e.status==="required_wrong_value"&&e.expectedValue&&D(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Expected:"}),C(y,{style:h.expandedExpected,testID:`${s}-expected-value`,children:String(e.expectedValue)})]}),e.description&&D(p,{style:h.expandedRow,children:[C(y,{style:h.expandedLabel,children:"Info:"}),C(y,{style:h.expandedDescription,testID:`${s}-description`,children:e.description})]})]});return C(Jt,{statusDotColor:a.color,statusLabel:a.label,statusSublabel:a.sublabel,primaryText:o,secondaryText:void 0,expandedContent:i,isExpanded:n,expandedGlowColor:a.color,customBadge:e.expectedType?C(Z,{type:e.expectedType,testID:`${s}-type-badge`}):void 0,showChevron:true,onPress:r?()=>r(e):void 0,testID:s,statusTestID:`${s}-status`,statusSublabelTestID:`${s}-category`,accessibilityLabel:`${e.key}, ${a.label}, ${a.sublabel}`})}var h=j.create({expandedContainer:{gap:6},expandedRow:{flexDirection:"row",alignItems:"center",gap:8},expandedLabel:{fontSize:10,color:ee.color.textTertiary,fontWeight:"600",minWidth:60,fontFamily:te},expandedValue:{fontSize:11,color:ee.color.textSecondary,fontFamily:te,flex:1},expandedExpected:{fontSize:11,color:A.warning,fontFamily:te,flex:1},expandedDescription:{fontSize:11,color:ee.color.textSecondary,flex:1}});import{SectionHeader as _,night as W,monoFont as er}from"@buoy-gg/shared-ui/web";import{jsx as k,jsxs as U}from"react/jsx-runtime";function tr({title:e,count:n,vars:r,emptyMessage:a}){let[t,o]=Ut(null),s=Kt(i=>{o(d=>d===i.key?null:i.key)},[]);return r.length===0&&e==="Required Variables"?U(p,{style:F.sectionContainer,children:[U(_,{children:[k(_.Title,{children:e}),k(_.Badge,{count:0,color:W.color.accent})]}),k(p,{style:F.emptySection,children:k(y,{style:F.emptySectionText,children:a})})]}):r.length===0?null:U(p,{style:F.sectionContainer,children:[e!==""&&U(_,{children:[k(_.Title,{children:e}),k(_.Badge,{count:n,color:W.color.accent})]}),k(p,{style:F.sectionContent,children:r.map(i=>k(Zt,{envVar:i,isExpanded:t===i.key,onPress:s},i.key))})]})}var F=j.create({sectionContainer:{gap:8},sectionContent:{},emptySection:{padding:20,backgroundColor:W.color.accent+"08",borderRadius:8,borderWidth:1,borderColor:W.color.accent+"20",alignItems:"center"},emptySectionText:{color:W.color.accent,fontSize:11,textAlign:"center",fontFamily:er,opacity:.8,letterSpacing:.5}});import{jsx as b,jsxs as O}from"react/jsx-runtime";function re({visible:e,onClose:n,requiredEnvVars:r,onBack:a,onMinimize:t,enableSharedModalDimensions:o=false,inline:s=false}){let[i,d]=Y("all"),[c,l]=Y(false),[E,S]=Y(""),I=Me(null),xe=Ne(f=>{},[]);de(()=>{c&&I.current&&I.current.focus()},[c]),de(()=>{S(""),l(false)},[i]);let ae=zt(),z=P(()=>{let f={};return ae.forEach(({key:m,data:v})=>{v!=null&&(f[m]=typeof v=="string"?v:Ae(v))}),f},[ae]),{requiredVars:H,optionalVars:R}=P(()=>Q(z,r),[z,r]),$=P(()=>r===void 0?{totalCount:0,requiredCount:0,optionalCount:0,presentRequiredCount:0,missingCount:0,wrongValueCount:0,wrongTypeCount:0}:fe(H,R,z),[r,H,R,z]),B=P(()=>[...H,...R].sort((f,m)=>{let v={required_missing:1,required_wrong_type:2,required_wrong_value:3,required_present:4,optional_present:5};return(v[f.status]||999)-(v[m.status]||999)}),[H,R]),J=P(()=>{let f=[];switch(i){case"all":f=B;break;case"missing":f=B.filter(m=>m.status==="required_missing");break;case"issues":f=B.filter(m=>m.status==="required_wrong_type"||m.status==="required_wrong_value");break}if(E){let m=E.toLowerCase();f=f.filter(v=>v.key.toLowerCase().includes(m)||v.description?.toLowerCase().includes(m)||typeof v.value=="string"&&v.value.toLowerCase().includes(m))}return f},[B,R,i,E]),L=$.requiredCount>0?Math.round($.presentRequiredCount/$.requiredCount*100):100,Ce=L===100?"HEALTHY":L>=75?"WARNING":L>=50?"ERROR":"CRITICAL",Se=L===100?M.success:L>=75?M.warning:L>=50?M.error:M.error;if(!e)return null;let we=o?le.modal.root():le.env.modal(),ne=O(N,{children:[a&&b(N.Navigation,{onBack:a}),b(N.Content,{title:c?"":"Environment Variables",noMargin:c,children:c&&b(N.Search,{value:E,onChangeText:S,onCancel:()=>{l(false),S("")},placeholder:"Search env keys...",accessibilityLabel:"Search env keys",testID:"buoy-env-search",containerTestID:"buoy-env-search-field",clearTestID:"buoy-env-search-clear"})}),b(N.Actions,{children:!c&&b(qe,{onPress:()=>l(true),testID:"buoy-env-search-open",accessibilityLabel:"Search env keys"})})]}),oe=O(pe,{style:w.scrollContainer,contentContainerStyle:w.contentContainer,showsVerticalScrollIndicator:false,testID:"buoy-env-scroll",children:[b(Ft,{stats:$,healthPercentage:L,healthStatus:Ce,healthColor:Se,activeFilter:i,onFilterChange:d}),J.length>0?O(p,{style:w.varsSection,children:[O(p,{style:w.sectionHeader,children:[b(y,{style:w.sectionTitle,testID:"buoy-env-section-title",children:i==="all"?"ALL VARIABLES":i==="missing"?"MISSING VARIABLES":"ISSUES TO FIX"}),b(p,{style:w.countBadge,children:b(y,{style:w.countText,testID:"buoy-env-section-count",children:J.length})})]}),b(tr,{title:"",count:0,vars:J,emptyMessage:""})]}):b(Re,{testID:"buoy-env-empty",...Be({subject:"variables",verb:"declared",search:E,total:B.length,waiting:{otto:"keys",title:"No variables",message:`No ${i==="all"?"":i} variables found`}})})]});return s?O(p,{style:w.inlineRoot,children:[b(p,{style:w.inlineHeader,..._e,children:ne}),oe]}):b(De,{visible:e,onClose:n,onMinimize:t,persistenceKey:we,header:{customContent:ne,showToggleButton:true},onModeChange:xe,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},children:oe})}function rr({requiredEnvVars:e}){return b(re,{inline:true,visible:true,requiredEnvVars:e,onClose:()=>{}})}var w=j.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:M.border,backgroundColor:"transparent"},scrollContainer:{flex:1,backgroundColor:"transparent"},contentContainer:{padding:8,paddingBottom:24},varsSection:{marginTop:16},sectionHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingHorizontal:8},sectionTitle:{fontSize:10,fontWeight:"700",color:G.color.textTertiary,letterSpacing:1.2,fontFamily:ce},countBadge:{backgroundColor:G.color.accent+"15",paddingHorizontal:8,paddingVertical:2,borderRadius:9999,borderWidth:1,borderColor:G.color.accent+"40"},countText:{fontSize:10,fontWeight:"500",color:G.color.accent,fontFamily:ce}});function ar(){let e={};for(let[n,r]of Object.entries(ge()??(typeof process>"u"?{}:process.env)))typeof r=="string"&&(e[n]=r);return e}var me=[];function nr(e){me=e}function or(e=[]){return{version:1,getSnapshot:()=>{let n=ar(),r=e.length>0?e:me,a=[];try{a=Q(n,r).requiredVars.map(t=>({key:t.key,status:t.status}))}catch{a=[]}return{env:n,requiredEnvVars:r,checks:a}},subscribe:()=>()=>{}}}import{createToolFactory as ir,defineToolPreset as sr}from"@buoy-gg/shared-ui/web";import{jsx as lr}from"react/jsx-runtime";var ve=sr({id:"env",name:"ENV",description:"Environment variables debugger",slot:"both",icon:({size:e})=>lr(Le,{size:e}),component:re,props:{requiredEnvVars:[],enableSharedModalDimensions:true}}),cr=ir(ve,e=>(nr(e.requiredEnvVars||[]),{requiredEnvVars:e.requiredEnvVars||[],enableSharedModalDimensions:e.enableSharedModalDimensions??true}));export{rr as EnvToolView,re as EnvVarsModal,fe as calculateStats,or as createEnvSyncAdapter,cr as createEnvTool,Gt as createEnvVarConfig,ve as envToolPreset,$t as envVar,X as getEnvVarType,Q as processEnvVars,Ot as setRemoteEnv};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/env",
3
- "version": "7.0.56",
3
+ "version": "7.0.58",
4
4
  "description": "Environment variable inspector for React Native with runtime-visible values, required-variable checks, and type validation.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
- "@buoy-gg/floating-tools-core": "^7.0.56",
38
- "@buoy-gg/shared-ui": "^7.0.56"
37
+ "@buoy-gg/floating-tools-core": "^7.0.58",
38
+ "@buoy-gg/shared-ui": "^7.0.58"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "*"