@buoy-gg/shared-ui 7.0.78 → 7.0.80
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/commonjs/JsModal.js +1 -1
- package/lib/commonjs/bugCase/appInfo.js +1 -0
- package/lib/commonjs/bugCase/appInfo.web.js +1 -0
- package/lib/commonjs/bugCase/capture.js +1 -1
- package/lib/commonjs/bugCase/format.js +2 -2
- package/lib/commonjs/bugCase/index.js +1 -1
- package/lib/commonjs/bugCase/lock.js +1 -1
- package/lib/commonjs/bugCase/media.js +1 -0
- package/lib/commonjs/bugCase/recorder.js +1 -1
- package/lib/commonjs/bugCase/scrub.js +1 -1
- package/lib/commonjs/bugCase/steps.js +1 -1
- package/lib/commonjs/bugCase/teamKey.js +1 -0
- package/lib/commonjs/bugCase/validate.js +1 -0
- package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -1
- package/lib/commonjs/clipboard/clipboard-impl.js +1 -1
- package/lib/commonjs/clipboard/clipboard-impl.web.js +1 -1
- package/lib/commonjs/clipboard/index.js +1 -1
- package/lib/commonjs/dataViewer/LiveExplorer.js +1 -1
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/commonjs/dataViewer/flattenTree.js +1 -0
- package/lib/commonjs/dataViewer/liveEntries.js +1 -0
- package/lib/commonjs/icons/index.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/license/BuoyUpgradeSheet.js +1 -1
- package/lib/commonjs/license/index.js +1 -1
- package/lib/commonjs/sync/keyedArrays.js +1 -1
- package/lib/commonjs/sync/valuePath.js +1 -1
- package/lib/commonjs/ui/components/DynamicFilterView.js +1 -1
- package/lib/commonjs/ui/components/EntityFilterView.js +1 -1
- package/lib/commonjs/ui/components/WindowControls.js +1 -1
- package/lib/commonjs/ui/floating/FloatingTool.js +1 -1
- package/lib/commonjs/ui/listPresets.js +1 -1
- package/lib/commonjs/utils/fiberRootAnchor.js +1 -0
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/loadOptionalModule.js +1 -1
- package/lib/commonjs/utils/loadToolModule.js +1 -1
- package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/commonjs/utils/persistentStorage.web.js +1 -1
- package/lib/commonjs/utils/reloadPlatform.js +1 -1
- package/lib/commonjs/utils/snapshotProviderKit.js +1 -1
- package/lib/module/JsModal.js +1 -1
- package/lib/module/bugCase/appInfo.js +1 -0
- package/lib/module/bugCase/appInfo.web.js +1 -0
- package/lib/module/bugCase/capture.js +1 -1
- package/lib/module/bugCase/format.js +2 -2
- package/lib/module/bugCase/index.js +1 -1
- package/lib/module/bugCase/lock.js +1 -1
- package/lib/module/bugCase/media.js +1 -0
- package/lib/module/bugCase/recorder.js +1 -1
- package/lib/module/bugCase/scrub.js +1 -1
- package/lib/module/bugCase/steps.js +1 -1
- package/lib/module/bugCase/teamKey.js +1 -0
- package/lib/module/bugCase/validate.js +1 -0
- package/lib/module/clipboard/autoDetectClipboard.js +1 -1
- package/lib/module/clipboard/clipboard-impl.js +1 -1
- package/lib/module/clipboard/clipboard-impl.web.js +1 -1
- package/lib/module/clipboard/index.js +1 -1
- package/lib/module/dataViewer/LiveExplorer.js +1 -1
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/module/dataViewer/flattenTree.js +1 -0
- package/lib/module/dataViewer/liveEntries.js +1 -0
- package/lib/module/icons/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/license/BuoyUpgradeSheet.js +1 -1
- package/lib/module/license/index.js +1 -1
- package/lib/module/sync/keyedArrays.js +1 -1
- package/lib/module/sync/valuePath.js +1 -1
- package/lib/module/ui/components/DynamicFilterView.js +1 -1
- package/lib/module/ui/components/EntityFilterView.js +1 -1
- package/lib/module/ui/components/WindowControls.js +1 -1
- package/lib/module/ui/floating/FloatingTool.js +1 -1
- package/lib/module/ui/listPresets.js +1 -1
- package/lib/module/utils/fiberRootAnchor.js +1 -0
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/loadOptionalModule.js +1 -1
- package/lib/module/utils/loadToolModule.js +1 -1
- package/lib/module/utils/minimalSuperJSON.js +1 -1
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/module/utils/persistentStorage.web.js +1 -1
- package/lib/module/utils/reloadPlatform.js +1 -1
- package/lib/module/utils/snapshotProviderKit.js +1 -1
- package/lib/typescript/commonjs/JsModal.d.ts +3 -4
- package/lib/typescript/commonjs/JsModal.web.d.ts +2 -0
- package/lib/typescript/commonjs/bugCase/appInfo.d.ts +17 -0
- package/lib/typescript/commonjs/bugCase/appInfo.web.d.ts +14 -0
- package/lib/typescript/commonjs/bugCase/format.d.ts +2 -1
- package/lib/typescript/commonjs/bugCase/index.d.ts +7 -0
- package/lib/typescript/commonjs/bugCase/lock.d.ts +13 -0
- package/lib/typescript/commonjs/bugCase/media.d.ts +90 -0
- package/lib/typescript/commonjs/bugCase/recorder.d.ts +1 -0
- package/lib/typescript/commonjs/bugCase/scrub.d.ts +2 -2
- package/lib/typescript/commonjs/bugCase/steps.d.ts +10 -0
- package/lib/typescript/commonjs/bugCase/teamKey.d.ts +185 -0
- package/lib/typescript/commonjs/bugCase/types.d.ts +10 -0
- package/lib/typescript/commonjs/bugCase/validate.d.ts +14 -0
- package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts +1 -1
- package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts +6 -0
- package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +2 -0
- package/lib/typescript/commonjs/clipboard/index.d.ts +1 -1
- package/lib/typescript/commonjs/dataViewer/flattenTree.d.ts +35 -0
- package/lib/typescript/commonjs/dataViewer/liveEntries.d.ts +19 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -2
- package/lib/typescript/commonjs/license/BuoyUpgradeSheet.d.ts +8 -0
- package/lib/typescript/commonjs/license/index.d.ts +1 -1
- package/lib/typescript/commonjs/sync/keyedArrays.d.ts +6 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +6 -1
- package/lib/typescript/commonjs/ui/listPresets.d.ts +2 -2
- package/lib/typescript/commonjs/utils/fiberRootAnchor.d.ts +19 -0
- package/lib/typescript/commonjs/utils/index.d.ts +2 -1
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts +4 -2
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts +19 -0
- package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +17 -0
- package/lib/typescript/module/JsModal.d.ts +3 -4
- package/lib/typescript/module/JsModal.web.d.ts +2 -0
- package/lib/typescript/module/bugCase/appInfo.d.ts +17 -0
- package/lib/typescript/module/bugCase/appInfo.web.d.ts +14 -0
- package/lib/typescript/module/bugCase/format.d.ts +2 -1
- package/lib/typescript/module/bugCase/index.d.ts +7 -0
- package/lib/typescript/module/bugCase/lock.d.ts +13 -0
- package/lib/typescript/module/bugCase/media.d.ts +90 -0
- package/lib/typescript/module/bugCase/recorder.d.ts +1 -0
- package/lib/typescript/module/bugCase/scrub.d.ts +2 -2
- package/lib/typescript/module/bugCase/steps.d.ts +10 -0
- package/lib/typescript/module/bugCase/teamKey.d.ts +185 -0
- package/lib/typescript/module/bugCase/types.d.ts +10 -0
- package/lib/typescript/module/bugCase/validate.d.ts +14 -0
- package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts +1 -1
- package/lib/typescript/module/clipboard/clipboard-impl.d.ts +6 -0
- package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +2 -0
- package/lib/typescript/module/clipboard/index.d.ts +1 -1
- package/lib/typescript/module/dataViewer/flattenTree.d.ts +35 -0
- package/lib/typescript/module/dataViewer/liveEntries.d.ts +19 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts +3 -2
- package/lib/typescript/module/license/BuoyUpgradeSheet.d.ts +8 -0
- package/lib/typescript/module/license/index.d.ts +1 -1
- package/lib/typescript/module/sync/keyedArrays.d.ts +6 -1
- package/lib/typescript/module/ui/floating/FloatingTool.d.ts +6 -1
- package/lib/typescript/module/ui/listPresets.d.ts +2 -2
- package/lib/typescript/module/utils/fiberRootAnchor.d.ts +19 -0
- package/lib/typescript/module/utils/index.d.ts +2 -1
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts +4 -2
- package/lib/typescript/module/utils/persistentStorage.d.ts +19 -0
- package/lib/typescript/module/utils/persistentStorage.web.d.ts +17 -0
- package/lib/web/chunks/chunk-36A4T5PL.mjs +1 -0
- package/lib/web/chunks/{chunk-XUYN4NOF.mjs → chunk-5UII72AQ.mjs} +1 -1
- package/lib/web/chunks/chunk-A3N3WVKC.mjs +1 -0
- package/lib/web/chunks/chunk-BPL65J3F.mjs +1 -0
- package/lib/web/chunks/chunk-EY7GXWGI.mjs +1 -1
- package/lib/web/chunks/chunk-IE2U5SN2.mjs +15 -0
- package/lib/web/chunks/chunk-IEAXJZCR.mjs +6 -0
- package/lib/web/chunks/chunk-OF3VWR6K.mjs +2 -2
- package/lib/web/chunks/{chunk-OVTASJUJ.mjs → chunk-SUG6TLF5.mjs} +1 -1
- package/lib/web/chunks/chunk-SXWOOYFL.mjs +1 -0
- package/lib/web/chunks/chunk-T44OT3CI.mjs +6 -0
- package/lib/web/chunks/{chunk-OQB3GW44.mjs → chunk-UVVRCZX5.mjs} +1 -1
- package/lib/web/chunks/chunk-Y7FM4WZ7.mjs +6 -0
- package/lib/web/chunks/persistentStorage.web-BFPYMY5C.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/history.mjs +1 -1
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +12 -6
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/scripts/detect-clipboard.js +18 -2
- package/lib/web/chunks/chunk-BMITMQVB.mjs +0 -6
- package/lib/web/chunks/chunk-DJD42EPL.mjs +0 -1
- package/lib/web/chunks/chunk-GN75GBYZ.mjs +0 -1
- package/lib/web/chunks/chunk-GTRVOJUH.mjs +0 -1
- package/lib/web/chunks/chunk-HE5ONCAL.mjs +0 -6
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{Nb as be,Ob as Se,Pb as J,Q as Y,R as we,Tb as xe,Vb as K,Yb as X,sd as y}from"./chunk-OVTASJUJ.mjs";import{d as a}from"./chunk-AHVO74UQ.mjs";import{a as z,b as u,c as g,d as k,f as q,z as Q}from"./chunk-QXVVA64P.mjs";import{a as n}from"./chunk-T6T3FEMU.mjs";var Ae="[Circular]",Z="[...]";function ee(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:f=Number.MAX_SAFE_INTEGER}=o,d=[];function i(l,c,m,r,x,v){if(v+=1,typeof l=="object"&&l!==null){for(let I=0;I<r.length;I++)if(r[I]===l){h(Ae,l,c,x);return}if(v>s){h(Z,l,c,x);return}if(m+1>f){h(Z,l,c,x);return}if(r.push(l),Array.isArray(l)){let I=l;for(let R=0;R<l.length;R++)i(l[R],R,R,r,I,v)}else if(l instanceof Map||l instanceof Set||l instanceof RegExp||l instanceof Date||l instanceof Error){r.pop();return}else{let I=l,R=Object.keys(I);for(let D=0;D<R.length;D++){let H=R[D];i(I[H],H,D,r,I,v)}}r.pop()}}n(i,"decirc");function h(l,c,m,r){if(!r)return;let x=Object.getOwnPropertyDescriptor(r,m);if(x?.get!==void 0)if(x.configurable)Object.defineProperty(r,m,{value:l}),d.push([r,m,c,x]);else return;else r[m]=l,d.push([r,m,c])}n(h,"setReplace");let C=n((l,c)=>{if(typeof c=="bigint")return`${c.toString()}n`;if(typeof c=="symbol")return c.toString();if(typeof c>"u")return"undefined";if(typeof c=="function")return`[Function: ${c.name||"anonymous"}]`;if(typeof c=="number"){if(c===1/0)return"Infinity";if(c===-1/0)return"-Infinity";if(Number.isNaN(c))return"NaN"}if(c instanceof Error){let m={name:c.name,message:c.message,stack:c.stack};return Object.getOwnPropertyNames(c).forEach(r=>{if(!["name","message","stack"].includes(r))try{let x=c[r];x!==void 0&&(m[r]=x)}catch{}}),m}if(c instanceof Date)return c.toISOString();if(c instanceof RegExp)return c.toString();if(c instanceof Map)try{return{__type:"Map",entries:Array.from(c.entries()).map(([m,r])=>[String(m),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(c instanceof Set)try{return{__type:"Set",values:Array.from(c)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return c},"replacer");try{return i(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;d.length!==0;){let l=d.pop();if(l&&l.length===4){let[c,m,,r]=l;c&&typeof c=="object"&&r&&Object.defineProperty(c,m,r)}else if(l){let[c,m,r]=l;c&&typeof c=="object"&&(typeof m=="string"||typeof m=="number")&&(c[m]=r)}}}}n(ee,"safeStringify");var Ce=n(e=>typeof e>"u","isUndefined"),ve=n(e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,"isPlainObject"),F=n(e=>Array.isArray(e),"isArray"),Ie=n(e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol","isPrimitive"),Re=n(e=>e instanceof Date&&!isNaN(e.valueOf()),"isDate"),te=n(e=>e instanceof Error,"isError"),Te=n(e=>e instanceof RegExp,"isRegExp"),re=n(e=>e instanceof Set,"isSet"),ne=n(e=>e instanceof Map,"isMap"),Oe=n(e=>typeof e=="bigint","isBigint"),oe=n(e=>typeof e=="number"&&isNaN(e),"isNaNValue"),ke=n(e=>e===1/0||e===-1/0,"isInfinite"),Ne=n(e=>e===0&&1/e===-1/0,"isMinusZero"),je=n(e=>e instanceof URL,"isURL"),Ve=n(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),"isTypedArray"),De={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},ae=[{isApplicable:Ce,annotation:"undefined",transform:n(()=>null,"transform"),untransform:n(()=>{},"untransform")},{isApplicable:Oe,annotation:"bigint",transform:n(e=>e.toString(),"transform"),untransform:n(e=>typeof BigInt<"u"?BigInt(e):(console.error("[Buoy]","BigInt is not supported in this environment"),e),"untransform")},{isApplicable:Re,annotation:"Date",transform:n(e=>e.toISOString(),"transform"),untransform:n(e=>new Date(e),"untransform")},{isApplicable:te,annotation:"Error",transform:n(e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),"transform"),untransform:n(e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t},"untransform")},{isApplicable:Te,annotation:"regexp",transform:n(e=>""+e,"transform"),untransform:n(e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)},"untransform")},{isApplicable:re,annotation:"set",transform:n(e=>[...e.values()],"transform"),untransform:n(e=>new Set(e),"untransform")},{isApplicable:ne,annotation:"map",transform:n(e=>[...e.entries()],"transform"),untransform:n(e=>new Map(e),"untransform")},{isApplicable:n(e=>oe(e)||ke(e),"isApplicable"),annotation:"number",transform:n(e=>oe(e)?"NaN":e>0?"Infinity":"-Infinity","transform"),untransform:n(e=>Number(e),"untransform")},{isApplicable:Ne,annotation:"number",transform:n(()=>"-0","transform"),untransform:n(()=>-0,"untransform")},{isApplicable:je,annotation:"URL",transform:n(e=>e.toString(),"transform"),untransform:n(e=>new URL(e),"untransform")},{isApplicable:Ve,annotation:n(e=>["typed-array",e.constructor.name],"annotation"),transform:n(e=>[...e],"transform"),untransform:n((e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=De[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)},"untransform")}];function L(e){for(let t of ae)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}n(L,"transformValue");function W(e,t){for(let o of ae){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}n(W,"untransformValue");var ie=n(e=>ve(e)||F(e)||ne(e)||re(e)||te(e),"isDeep");function B(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}n(B,"escapeKey");function _(e,t=[],o=[]){let s=Ie(e);if(!s&&!ie(e)){let l=L(e);return l?{transformedValue:l.value,annotations:{[t.map(String).map(B).join(".")]:l.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!ie(e)){let l=L(e);return l?{transformedValue:l.value,annotations:t.length>0?{[t.map(String).map(B).join(".")]:l.type}:{"":l.type}}:{transformedValue:e}}let f=L(e),d=f?.value??e,i=F(d)?[]:{},h={};if(f){let l=t.length>0?t.map(String).map(B).join("."):"";h[l]=f.type}let C=F(d)?d.map((l,c)=>[c,l]):Object.entries(d);for(let[l,c]of C){let m=String(l);if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);let r=_(c,[...t,l],[...o,e]);i[l]=r.transformedValue,r.annotations&&Object.assign(h,r.annotations)}return{transformedValue:i,annotations:Object.keys(h).length>0?h:void 0}}n(_,"walker");function P(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let f=e.charAt(s);if(f==="\\"){let d=e.charAt(s+1);if(d==="\\"){o+="\\",s++;continue}else if(d==="."){o+=".",s++;continue}}if(f==="."){t.push(o),o="";continue}o+=f}return o&&t.push(o),t}n(P,"parsePath");function le(e,t,o){if(t.length===0)return;let s=e;for(let f=0;f<t.length-1;f++)s=s[t[f]];s[t[t.length-1]]=o}n(le,"setDeep");function M(e,t){let o=e;for(let s of t)o=o[s];return o}n(M,"getDeep");function G(e){let t=_(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}n(G,"serialize");function U(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=F(t)?[...t]:{...t},f=Object.entries(o.values).map(([d,i])=>({pathString:d,type:i,path:P(d)})).sort((d,i)=>i.path.length-d.path.length);for(let{type:d,path:i}of f)if(i.length===0)s=W(s,d);else{let h=M(s,i),C=W(h,d);le(s,i,C)}return s}n(U,"deserialize");function se(e,t){let o=e.meta?.values;if(!o)return e;let s={};for(let[f,d]of Object.entries(o)){let i;try{i=M(e.json,P(f))}catch{continue}t(i)||(s[f]=d)}return Object.keys(s).length?{json:e.json,meta:{values:s}}:{json:e.json}}n(se,"dropAnnotations");var ze=n((e,t=false)=>{let{json:o}=G(e);return JSON.stringify(o,null,t?2:void 0)},"displayValue"),Fe=n(e=>{try{let t=JSON.parse(e);return U({json:t,meta:void 0})}catch{return JSON.parse(e)}},"parseDisplayValue");import{jsx as j,jsxs as E}from"react/jsx-runtime";function ce({icon:e,iconColor:t,title:o,count:s,subtitle:f,expanded:d,onToggle:i,children:h,style:C,titleStyle:l}){return E(u,{style:[V.container,C],children:[E(q,{onPress:i,activeOpacity:.7,style:V.headerTouchable,children:[E(u,{style:V.header,children:[E(u,{style:V.headerLeft,children:[j(e,{size:14,color:t}),j(g,{style:[V.title,l],children:o}),j(u,{style:[V.badge,{backgroundColor:t+"20"}],children:j(g,{style:[V.badgeText,{color:t}],children:s})})]}),d?j(X,{size:14,color:a.muted}):j(K,{size:14,color:a.muted})]}),j(g,{style:V.subtitle,children:f})]}),d&&j(k.View,{style:{opacity:1},children:h})]})}n(ce,"GameUICollapsibleSection");var V=z.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:a.primary,fontFamily:y,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:a.secondary,fontFamily:y,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:y,fontWeight:"700"}});var de={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as N,jsxs as $}from"react/jsx-runtime";function ue({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:f=3}){let d=e.icon;return $(k.View,{style:[T.container,{borderColor:e.color+"40"},s,o],children:[N(u,{style:[T.glow,{backgroundColor:e.color+"10"}]}),$(u,{style:T.content,children:[N(u,{style:[T.iconWrapper,{backgroundColor:e.color+"15"}],children:N(d,{size:20,color:e.color})}),$(u,{style:T.textContainer,children:[N(g,{style:[T.label,{color:e.color}],children:e.label}),N(g,{style:T.subtitle,children:e.subtitle})]}),N(u,{style:[T.badge,{backgroundColor:e.color+"20"}],children:N(g,{style:[T.badgeText,{color:e.color}],children:t})})]}),N(u,{style:T.indicators,children:[...Array(f)].map((i,h)=>N(u,{style:[T.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?h===0?1:.5-h*.2:.3-h*.1}]},h))})]})}n(ue,"GameUIStatusHeader");var T=z.create({container:{backgroundColor:a.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...de,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:y,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:a.secondary,fontFamily:y},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:y,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Le}from"react";import{jsx as S,jsxs as A}from"react/jsx-runtime";function fe({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:f,hideInactive:d=true}){return A(u,{style:[p.container,f],children:[o&&A(u,{style:p.header,children:[A(u,{style:p.headerLeft,children:[S(g,{style:p.headerTitle,children:o.title}),S(g,{style:p.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&S(u,{style:p.headerRight,children:A(u,{style:p.statusIndicator,children:[S(u,{style:[p.statusDot,{backgroundColor:o.healthColor||a.success}]}),S(g,{style:[p.statusText,{color:o.healthColor||a.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&A(u,{style:p.healthSection,children:[S(g,{style:p.healthLabel,children:"SYSTEM HEALTH"}),S(u,{style:p.healthBarWrapper,children:S(u,{style:p.healthBarBg,children:S(k.View,{style:[p.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||a.success}]})})}),A(g,{style:[p.healthPercentage,{color:o.healthColor||a.success}],children:[o.healthPercentage,"%"]})]}),S(u,{style:p.statsGrid,children:e.map(i=>{let h=i.value>0;if(d&&!h)return null;let C=i.icon,l=t?i.value/t*100:0;return A(k.View,{style:[p.statCard,{borderColor:i.color+"30"}],children:[A(u,{style:p.cardContent,children:[S(u,{style:[p.iconBadge,{backgroundColor:i.color+"1A",borderColor:i.color+"33"}],children:S(C,{size:12,color:i.color})}),A(u,{style:p.cardInfo,children:[S(g,{style:p.cardLabel,children:i.label}),S(g,{style:p.cardSubtitle,children:i.subtitle})]}),A(u,{style:p.valueBlock,children:[S(g,{style:[p.statNumber,{color:i.color}],children:i.value.toString().padStart(2,"0")}),t?A(g,{style:p.percentText,children:[Math.round(l),"%"]}):null]})]}),i.showBar!==false&&t&&S(u,{style:[p.statBar,{backgroundColor:i.color+"10"}],children:S(u,{style:[p.statBarFill,{width:`${l}%`,backgroundColor:i.color}]})})]},i.key)})}),s&&s.length>0&&S(u,{style:p.bottomBar,children:s.map((i,h)=>A(Le,{children:[A(u,{style:p.bottomStat,children:[S(g,{style:p.bottomStatLabel,children:i.label}),S(g,{style:[p.bottomStatValue,i.color&&{color:i.color}],children:i.value})]}),h<s.length-1&&S(u,{style:p.bottomDivider})]},i.label))})]})}n(fe,"GameUICompactStats");var p=z.create({container:{backgroundColor:a.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:a.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:a.primary,fontFamily:y,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:a.secondary,fontFamily:y,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:y,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:a.secondary,fontFamily:y,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:y},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:a.blackTint2,borderRadius:8,borderWidth:1,borderColor:a.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:y,letterSpacing:.5,color:a.primary},cardSubtitle:{fontSize:8,color:a.secondary,fontFamily:y,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:y,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:a.secondary,fontFamily:y},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:a.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:a.muted,fontFamily:y,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:a.primary,fontFamily:y},bottomDivider:{width:1,height:16,backgroundColor:a.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as Be,useCallback as Ee}from"react";import{jsx as w,jsxs as O}from"react/jsx-runtime";function pe({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:f=true,statusLabels:d={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[i,h]=Be(new Set),C=Ee(r=>{f&&h(x=>{let v=new Set(x);return v.has(r)?v.delete(r):v.add(r),v})},[f]),l=n(r=>r==="missing"?a.warning:a.info,"getStatusColor"),c=n(r=>r==="missing"?Y:J,"getStatusIcon"),m=n(r=>{switch(r.status){case"missing":return`\u2022 ${d.missing}`;case"wrong_type":return`\u2022 ${d.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${d.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}},"getStatusLabel");return e.length===0?null:O(u,{style:[b.container,s],children:[e.map((r,x)=>{let v=l(r.status),I=c(r.status),R=i.has(r.key),D=R?X:K;return O(u,{children:[O(q,{onPress:()=>{f&&C(r.key),t?.(r)},style:b.issueRow,activeOpacity:.7,children:[w(I,{size:14,color:v}),O(u,{style:b.issueContent,children:[w(g,{style:[b.issueKey,{color:a.primary}],children:r.key}),w(g,{style:b.issueDesc,children:m(r)})]}),f&&w(D,{size:12,color:a.muted})]}),f&&R&&O(k.View,{style:b.issueDetails,children:[O(u,{style:b.detailRow,children:[w(g,{style:b.detailLabel,children:"Status:"}),O(g,{style:[b.detailValue,{color:a.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&O(u,{style:b.detailRow,children:[w(g,{style:b.detailLabel,children:"Current:"}),w(g,{style:[b.detailValue,{color:a.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&O(u,{style:b.detailRow,children:[w(g,{style:b.detailLabel,children:"Expected:"}),w(g,{style:[b.detailValue,{color:a.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&O(u,{style:b.detailRow,children:[w(g,{style:b.detailLabel,children:"Expected:"}),w(g,{style:[b.detailValue,{color:a.success}],children:`"${r.expectedValue}"`})]}),r.description&&w(u,{style:b.descSection,children:w(g,{style:b.descText,children:r.description})}),r.fixSuggestion&&O(u,{style:b.fixSection,children:[w(g,{style:b.fixLabel,children:"HOW TO FIX"}),w(g,{style:b.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${x}`)}),o&&w(g,{style:b.hint,children:o})]})}n(pe,"GameUIIssuesList");var b=z.create({container:{backgroundColor:a.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:a.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:y},issueDesc:{fontSize:10,color:a.secondary,fontFamily:y,flex:1},hint:{fontSize:9,color:a.muted,fontFamily:y,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:a.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:a.background+"4D",borderLeftWidth:2,borderLeftColor:a.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:a.secondary,fontFamily:y,fontWeight:"600",width:70},detailValue:{fontSize:11,color:a.primary,fontFamily:y,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:a.info+"14",borderRadius:6,borderWidth:1,borderColor:a.info+"33"},fixLabel:{fontSize:10,color:a.info,fontFamily:y,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:a.primary,fontFamily:y,lineHeight:18,backgroundColor:a.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:a.primary+"0D"},descText:{fontSize:10,color:a.secondary,fontFamily:y,marginTop:4,lineHeight:14}});import{useMemo as ge,useEffect as We,useRef as me}from"react";var ye={OPTIMAL:{icon:xe,color:a.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:J,color:a.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:Se,color:a.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:Y,color:a.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:be,color:a.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:we,color:a.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function he(e,t){let o=ge(()=>({...ye,...t}),[t]),s=ge(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),f=o[s],d=me(new k.Value(1)).current,i=me(new k.Value(1)).current;return We(()=>{d.setValue(0),i.setValue(.95),k.parallel([k.timing(d,{toValue:1,duration:300,useNativeDriver:true}),k.timing(i,{toValue:1,duration:300,easing:Q.out(Q.ease),useNativeDriver:true})]).start()},[s,d,i]),{alertState:s,alertConfig:f,alertAnimatedStyle:{transform:[{scale:i}],opacity:d},alertOpacity:d,alertScale:i}}n(he,"useGameUIAlertState");export{ee as a,G as b,U as c,se as d,ze as e,Fe as f,ce as g,de as h,ue as i,fe as j,pe as k,ye as l,he as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{d}from"./chunk-AHVO74UQ.mjs";import{a as r,b as ke}from"./chunk-T6T3FEMU.mjs";var De=r(e=>{if(e===null)return"null";if(e===void 0)return"undefined";if(Array.isArray(e))return"array";let t=typeof e;return t==="object"?e instanceof Date?"date":e instanceof RegExp?"regexp":e instanceof Map?"map":e instanceof Set?"set":e instanceof Error?"error":"object":t},"getValueType"),Ae=r(e=>{let t=typeof e;return e==null||t==="string"||t==="number"||t==="boolean"||t==="bigint"||t==="symbol"},"isPrimitive"),Ne=r(e=>{try{return JSON.stringify(e),true}catch{return false}},"isJsonSerializable"),Le=r(e=>{try{return JSON.parse(e),true}catch{return false}},"isValidJson"),_e=r(e=>{if(e===null)return"null";if(e===void 0)return"undefined";try{return e.constructor?.name||typeof e}catch{return typeof e}},"getConstructorName"),Be=r(e=>e==null?true:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:false,"isEmpty"),Ve=r(e=>{if(Array.isArray(e)){let t=e.length;return t===0?"empty array":t===1?"1 item":`${t} items`}if(e&&typeof e=="object"){let t=Object.keys(e).length;return t===0?"empty object":t===1?"1 key":`${t} keys`}if(typeof e=="string"){let t=e.length;return t===0?"empty string":t===1?"1 character":`${t} characters`}return""},"getValueSize"),Fe=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.constructor===Object,"isPlainObject");var We=r(e=>{if(e==null)return e;if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},"parseValue"),Ue=r(e=>e===null?"null":e===void 0?"undefined":typeof e=="string"?`"${e}"`:typeof e=="boolean"?e?"true":"false":typeof e=="number"?String(e):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:typeof e=="object"?Array.isArray(e)?`[Array: ${e.length} items]`:`{Object: ${Object.keys(e).length} keys}`:String(e),"formatValue"),Ie=r(e=>{if(e===null)return d.dataTypes.null;if(e===void 0)return d.dataTypes.undefined;switch(typeof e){case"string":return d.dataTypes.string;case"number":return d.dataTypes.number;case"boolean":return d.dataTypes.boolean;case"function":return d.dataTypes.function;case"object":return Array.isArray(e)?d.dataTypes.array:d.dataTypes.object;default:return d.primary}},"getTypeColor"),qe=r((e,t)=>e.length<=t?e:e.slice(0,t-3)+"...","truncateText"),k=r((e,t="")=>{let n={};return e==null?n:typeof e!="object"?(n[t||"root"]=e,n):(Array.isArray(e)?e.forEach((a,o)=>{let i=t?`${t}[${o}]`:`[${o}]`;typeof a=="object"&&a!==null?Object.assign(n,k(a,i)):n[i]=a}):Object.keys(e).forEach(a=>{let o=t?`${t}.${a}`:a,i=e[a];typeof i=="object"&&i!==null?Object.assign(n,k(i,o)):n[o]=i}),n)},"flattenObject"),ze=r(e=>e.length===0?"root":e.map((t,n)=>typeof t=="number"?`[${t}]`:n===0?t:`.${t}`).join(""),"formatPath");var Je={log:r(()=>{},"log"),warn:r(()=>{},"warn"),error:r((...e)=>{console.error("[Buoy]","[optional-module]",...e)},"error")},g=new Map,T=new Map,G=new Set;async function H(e,t={}){if(g.has(e))return g.get(e);let n={...Je,...t.logger??{}};T.has(e)||T.set(e,(async()=>{try{let o=await Y(e,t),i=o?.default??o;return g.set(e,i),n.log("Loaded optional module",e),i}catch(o){return n.log("Optional module unavailable",e,o),g.set(e,null),null}})());let a=await T.get(e);return T.delete(e),!a&&t.warnOnceKey&&!G.has(t.warnOnceKey)&&(G.add(t.warnOnceKey),n.warn(t.warningMessage??`Module '${e}' not found.`)),a}r(H,"loadOptionalModule");var K=(()=>{try{return new Function("moduleName","return import(moduleName);")}catch{return null}})(),X=(()=>{try{return new Function("return typeof require === 'function' ? require : undefined;")()}catch{return}})();async function Y(e,t){if(t.loader)return await Promise.resolve(t.loader());if(K)return K(e);if(X)return X(e);throw new Error(`No dynamic loader available for optional module '${e}'.`)}r(Y,"loadModuleWithFallback");function Q(e){return g.has(e)?g.get(e):null}r(Q,"getCachedOptionalModule");var Z="__buoyRenderCaptureProvider";function D(){return globalThis}r(D,"providerHost");function ee(e){D()[Z]=e}r(ee,"setRenderCaptureProvider");function te(){return D()[Z]??null}r(te,"getRenderCaptureProvider");var m=new Map,A=new Set;function N(){A.forEach(e=>{try{e()}catch{}})}r(N,"notify");function ne(e){return m.set(e.id,e),N(),()=>{m.get(e.id)===e&&(m.delete(e.id),N())}}r(ne,"registerStateSnapshotProvider");function re(){return Array.from(m.values())}r(re,"getStateSnapshotProviders");function ae(e){return m.get(e)??null}r(ae,"getStateSnapshotProvider");function oe(e){return A.add(e),()=>{A.delete(e)}}r(oe,"subscribeToStateSnapshotProviders");function x(){return null}r(x,"loadDevSettings");function O(){return null}r(O,"loadExpoUpdates");function C(){return typeof window>"u"?null:()=>window.location.reload()}r(C,"loadBrowserReload");function R(e="auto"){return e==="browser"?C()?"browser":null:e==="auto"&&C()?"browser":e==="dev-settings"?x()?"dev-settings":null:e==="expo-updates"?O()?"expo-updates":null:ke&&x()?"dev-settings":O()?"expo-updates":null}r(R,"resolveReloadStrategy");function L(e){return e==="browser"?"[buoy] Browser reload requires a browser window.":e==="dev-settings"?"[buoy] DevSettings.reload() unavailable \u2014 strategy 'dev-settings' requires React Native dev mode.":e==="expo-updates"?"[buoy] expo-updates not installed \u2014 strategy 'expo-updates' requires the host app to add the dependency.":"[buoy] No reload mechanism available. Run in __DEV__ or install expo-updates."}r(L,"unavailableMessage");async function _(e="auto",t="buoy reload"){let n=R(e);if(!n)throw new Error(L(e));return n==="browser"?C()():n==="dev-settings"?x().reload(t):await O().reloadAsync(),await new Promise(()=>{})}r(_,"reloadApp");var ie=250;function se(e){let t=e?.strategy??"auto",n=R(t);if(!n)throw new Error(L(t));let a=Math.max(0,e?.delayMs??ie),o=e?.reason??"buoy remote reload";return setTimeout(()=>{_(n,o).catch(()=>{})},a),{strategy:n,delayMs:a}}r(se,"scheduleReloadApp");function ue(){return null}r(ue,"getDevServerOrigin");function le(){let e=globalThis.__buoyRealNow;return typeof e=="function"?e():Date.now()}r(le,"realNow");var ce=class tt{constructor(){this.listeners=new Set;this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}getListenerCount(){return this.listeners.size}notify(...t){this.listeners.forEach(n=>{n(...t)})}onSubscribe(){}onUnsubscribe(){}};r(ce,"Subscribable");var Ge=ce;var pe=class nt{constructor(){this.listeners=new Set}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(t){this.listeners.forEach(n=>{try{n(t)}catch{}})}};r(pe,"SubscriberCountNotifier");var He=pe,B=new He,Ke=r(e=>B.subscribe(e),"subscribeToSubscriberCountChanges"),Xe=r(e=>B.notify(e),"notifySubscriberCountChange");import{useSyncExternalStore as de}from"react";var c,S=new Set,V,he;function fe(e){return c=e,()=>{c===e&&(c=void 0)}}r(fe,"registerBrowserRouter");function f(){return typeof location>"u"?"/":location.href}r(f,"getBrowserHref");function F(e=f()){let t=new URL(e,"http://localhost"),n=t.hash.startsWith("#/")?new URL(t.hash.slice(1),t.origin):t;return n.pathname||(n.pathname="/"),n}r(F,"getBrowserRouteURL");var w;function W(e){if(!S.size&&typeof window<"u"){let t=window.history,n=r(o=>{for(let i of[...S])try{i({href:f(),kind:o})}catch{}},"emit");if(w)w.active=true;else{let o=t.pushState,i=t.replaceState,s={push:o,replace:i,active:true},h=r(function(...v){let b=Reflect.apply(o,this,v);return s.active&&n("push"),b},"wrappedPush"),l=r(function(...v){let b=Reflect.apply(i,this,v);return s.active&&n("replace"),b},"wrappedReplace");t.pushState=h,t.replaceState=l,w=s,he=r(()=>{t.pushState!==h||t.replaceState!==l||(t.pushState=o,t.replaceState=i,w=void 0)},"unwrap")}let a=r(()=>n("pop"),"pop");window.addEventListener("popstate",a),window.addEventListener("hashchange",a),V=r(()=>{w&&(w.active=false),he?.(),window.removeEventListener("popstate",a),window.removeEventListener("hashchange",a),V=void 0},"detach")}return S.add(e),()=>{S.delete(e),S.size||V?.()}}r(W,"subscribeBrowserNavigation");function U(e){let t=typeof e=="string"?e:e.pathname,n=new URL(t,f());if(n.origin!==window.location.origin)throw new Error("Tool navigation must stay on the current origin.");if(typeof e!="string")for(let[a,o]of Object.entries(e.params??{}))n.searchParams.set(a,String(o));return`${n.pathname}${n.search}${n.hash}`}r(U,"pathFor");var E={push(e){let t=U(e);if(c)return c.push(t);window.history.pushState(null,"",window.location.hash.startsWith("#/")?`#${t}`:t),window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state}))},replace(e){let t=U(e);if(c)return c.replace(t);window.history.replaceState(window.history.state,"",window.location.hash.startsWith("#/")?`#${t}`:t),window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state}))},back(){c?c.back():window.history.back()},canGoBack(){return c?.canGoBack?.()??(typeof window<"u"&&window.history.length>1)},navigate(e){E.push(e)},setParams(e){E.replace({pathname:f(),params:e})},dismiss(e=1){window.history.go(-e)},dismissAll(){throw new Error("Use the captured browser history to select a destination.")}};var ye=r(e=>W(e),"subscribe"),j=F;function be(){return E}r(be,"useSafeRouter");function I(){return de(ye,f,()=>"/"),j().pathname}r(I,"useSafePathname");function ge(){return I().split("/").filter(Boolean)}r(ge,"useSafeSegments");function we(){return de(ye,f,()=>"/"),Object.fromEntries(j().searchParams)}r(we,"useSafeGlobalSearchParams");function ve(){return typeof window>"u"?null:E}r(ve,"getSafeRouter");function me(){return j().pathname}r(me,"getSafeCurrentPathname");function Se(){let e=j();return{pathname:e.pathname,href:`${e.pathname}${e.search}${e.hash}`,segments:e.pathname.split("/").filter(Boolean)}}r(Se,"getSafeCurrentRoute");function Ee(){return false}r(Ee,"isExpoRouterAvailable");var Te=new WeakMap,Ye=1;function y(e){return!!e&&typeof e=="object"&&e.nodeType===1&&typeof e.getBoundingClientRect=="function"}r(y,"isDOMElement");function $(e){if(!y(e))return null;let t=Te.get(e);return t===void 0&&(t=Ye++,Te.set(e,t)),t}r($,"getDOMNodeHandle");function xe(e){if(!y(e))return null;let t=Object.keys(e).find(n=>n.startsWith("__reactFiber$"));return t?e[t]:null}r(xe,"getDOMFiber");function Oe(e,t){if(!y(e)||!t)return t;let n=e,a=e.tagName.toLowerCase(),o=a==="input"&&(n.type==="checkbox"||n.type==="radio"),i=a==="input"&&n.type==="range",s=a==="textarea"||a==="select"||a==="input"&&!o&&!i&&!["button","submit","reset","file","hidden"].includes(n.type),h=e.getAttribute("contenteditable"),l=!s&&!o&&!i&&(e.isContentEditable===true||h!==null&&h!=="false"),v=r(p=>{let u=e;u.focus();let M=u.ownerDocument.getSelection?.();if(M){let J=u.ownerDocument.createRange();J.selectNodeContents(u),M.removeAllRanges(),M.addRange(J)}let P=false;try{P=typeof u.ownerDocument.execCommand=="function"&&u.ownerDocument.execCommand("insertText",false,p)}catch{P=false}P||(u.textContent=p,u.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"insertText",data:p})))},"setEditable"),b=r(p=>{if(o){n.checked!==!!p&&n.click();return}let u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"value")?.set;u?u.call(n,String(p)):n.value=String(p),n.dispatchEvent(new Event("input",{bubbles:true})),n.dispatchEvent(new Event("change",{bubbles:true}))},"setValue");return{...t,__buoyDevToolsRoot:t.__buoyDevToolsRoot||t["data-buoy-root"]!==void 0,testID:t.testID??t["data-testid"],nativeID:t.nativeID??t.id,accessibilityLabel:t.accessibilityLabel??t["aria-label"],accessibilityRole:t.accessibilityRole??t.role??(a==="button"?"button":a==="a"?"link":o?n.type:s||l?"textbox":i?"slider":void 0),onPress:t.onPress??(typeof t.onClick=="function"||a==="button"||a==="a"?()=>n.click():void 0),...o||i?{onValueChange:b,value:o?n.checked:Number(n.value),...i?{minimumValue:Number(n.min||0),maximumValue:Number(n.max||100)}:{}}:{},...s?{onChangeText:b,value:n.value}:{},...l?{onChangeText:r(p=>v(String(p)),"onChangeText"),value:e.innerText??e.textContent??""}:{}}}r(Oe,"getDOMControlProps");function Ce(e){return y(e)?{__nativeTag:$(e),measure(t){let n=e.getBoundingClientRect();t(n.x,n.y,n.width,n.height,n.x,n.y)},measureInWindow(t){let n=e.getBoundingClientRect();t(n.x,n.y,n.width,n.height)},requestTVFocus(){e.focus()},focus(){e.focus()}}:null}r(Ce,"getDOMPublicInstance");var Qe={topFocus:"focus",topBlur:"blur",topTouchStart:"pointerdown",topTouchMove:"pointermove",topTouchEnd:"pointerup",topTouchCancel:"pointercancel",topChange:"input",topValueChange:"input",topSlidingComplete:"change"};function Re(){return typeof document>"u"?{emitter:null,reason:"DOM events are unavailable during server rendering."}:{reason:null,emitter:{addListener(e,t){let n=Qe[e];if(!n)throw new Error(`Unsupported DOM event: ${e}`);let a=r(o=>{let i=o.composedPath()[0]??o.target;if(!y(i))return;let s=i,h=o,l={target:$(i),pageX:h.clientX,pageY:h.clientY};(n==="input"||n==="change")&&(s.type==="checkbox"||s.type==="radio"?l.value=s.checked:s.type==="range"?l.value=Number(s.value):l.text=s.value??i.textContent??""),t({eventName:e,nativeEvent:l})},"callback");return document.addEventListener(n,a,true),{remove:r(()=>document.removeEventListener(n,a,true),"remove")}}}}}r(Re,"resolveDOMEventEmitter");var q=new Map,je=0;function $e(e){for(let[t,n]of Object.entries(e)){let a=t.startsWith("@buoy-gg/")?t.replace(/\/web$/,""):`@buoy-gg/${t}`;q.get(a)!==n&&(q.set(a,n),je++)}}r($e,"registerToolModules");function z(e){return q.get(e)??null}r(z,"getRegisteredToolModule");function Me(){return je}r(Me,"getToolModuleVersion");function Pe(e){let t=z(e);if(!t)throw new Error(`Register ${e} with createWebTools before opening tools that use it.`);return t}r(Pe,"loadToolModule");export{Ge as a,B as b,Ke as c,Xe as d,le as e,De as f,Ae as g,Ne as h,Le as i,_e as j,Be as k,Ve as l,Fe as m,We as n,Ue as o,Ie as p,qe as q,k as r,ze as s,H as t,Q as u,ee as v,te as w,ne as x,re as y,ae as z,oe as A,R as B,_ as C,ie as D,se as E,ue as F,fe as G,f as H,F as I,W as J,E as K,be as L,I as M,ge as N,we as O,ve as P,me as Q,Se as R,Ee as S,y as T,$ as U,xe as V,Oe as W,Ce as X,Re as Y,$e as Z,z as _,Me as $,Pe as aa};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a as Z}from"./chunk-XUYN4NOF.mjs";import{f}from"./chunk-AHVO74UQ.mjs";import{N as B,a as k,b as L,c as A}from"./chunk-QXVVA64P.mjs";import{a as c}from"./chunk-T6T3FEMU.mjs";import{createContext as _,useContext as Y,useState as M,useCallback as b,useMemo as R,useEffect as ee}from"react";import{jsx as te}from"react/jsx-runtime";var $=_(null);function z({children:e,initialAdapters:t=[]}){let[n,s]=M(()=>{let r=new Map;return t.forEach(a=>{r.set(a.adapter.id,{...a,enabled:a.enabled??true})}),r}),[u,y]=M(null),[m,S]=M(0),p=b(()=>S(r=>r+1),[]);ee(()=>{let r=[];return n.forEach(a=>{if(a.enabled){let d=a.adapter.subscribe(p);r.push(d)}}),()=>{r.forEach(a=>a())}},[n,p]);let i=R(()=>Array.from(n.values()).filter(r=>r.enabled).sort((r,a)=>(r.priority??100)-(a.priority??100)).map(r=>r.adapter),[n,m]),h=b(r=>n.get(r)?.adapter,[n]),w=b(r=>{s(a=>{let d=new Map(a);return d.set(r.adapter.id,{...r,enabled:r.enabled??true}),d})},[]),l=b(r=>{s(a=>{let d=new Map(a);return d.delete(r),d})},[]),o=b(r=>{let a=[];return(u&&r?.sources===void 0?i.filter(d=>d.id===u):i).forEach(d=>{r?.sources&&!r.sources.includes(d.id)||(a=a.concat(d.getEntries()))}),r&&(a=D(a,r)),a.sort((d,X)=>X.timestamp-d.timestamp),a},[i,u,m]),x=b(()=>{let r={};return i.forEach(a=>{r[a.id]=a.getEntryCount()}),r},[i,m]),Q=R(()=>({adapters:i,getAdapter:h,registerAdapter:w,unregisterAdapter:l,getAllEntries:o,getEntryCounts:x,selectedAdapterId:u,setSelectedAdapterId:y,refresh:p}),[i,h,w,l,o,x,u,p]);return te($.Provider,{value:Q,children:e})}c(z,"HistoryProvider");function E(){let e=Y($);if(!e)throw new Error("useHistoryContext must be used within a HistoryProvider");return e}c(E,"useHistoryContext");function F(){return E().adapters}c(F,"useHistoryAdapters");function j(e){return E().getAdapter(e)}c(j,"useHistoryAdapter");function P(e){let{getAllEntries:t}=E();return t(e)}c(P,"useAllHistoryEntries");function N(){return E().getEntryCounts()}c(N,"useHistoryEntryCounts");function D(e,t){return e.filter(n=>{if(t.searchText){let s=t.searchText.toLowerCase();if(!n.label.toLowerCase().includes(s))return false}if(t.onlyWithChanges&&!n.hasStateChange||t.onlyErrors&&n.status!=="error"||t.afterTimestamp&&n.timestamp<t.afterTimestamp||t.beforeTimestamp&&n.timestamp>t.beforeTimestamp)return false;if(t.ignoredPatterns?.length){for(let s of t.ignoredPatterns)if(new RegExp(s).test(n.label))return false}if(t.includedPatterns?.length){let s=false;for(let u of t.includedPatterns)if(new RegExp(u).test(n.label)){s=true;break}if(!s)return false}return true})}c(D,"applyFilter");import{jsx as I}from"react/jsx-runtime";function V(e){let t=Date.now()-e;return t<1e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:`${Math.floor(t/36e5)}h ago`}c(V,"formatRelativeTime");function W(e,t){if(t?.color)return t.color;if(e.status==="error")return f.error;if(e.status==="pending")return f.warning;if(e.status==="success")return f.success;if(e.hasStateChange)return f.success;if(e.isSkipped)return f.textMuted;if(e.isInFuture)return f.textMuted+"80";switch(e.source){case"redux":return"#764ABC";case"zustand":return"#443E38";case"mmkv":return"#4CAF50";case"async-storage":return"#2196F3";case"react-query":return"#FF4154";case"jotai":return"#000000";case"legend-state":return"#7C3AED";default:return f.textSecondary}}c(W,"getStatusColor");function q(e){return e.isSkipped?"Skipped":e.isInFuture?"Future":e.status?e.status.charAt(0).toUpperCase()+e.status.slice(1):e.hasStateChange?"Changed":"Action"}c(q,"getStatusLabel");function G(e,t){return t?.name?t.name:e.category?e.category:e.source}c(G,"getSublabel");function v({entry:e,adapter:t,isSelected:n,onPress:s,showSource:u=true,showDuration:y=true}){let m=W(e,t),S=q(e),p=u?G(e,t):void 0,i=V(e.timestamp);y&&e.duration!==void 0&&(i=`${e.duration.toFixed(1)}ms \xB7 ${i}`);let h=e.hasStateChange?I(L,{style:U.changeBadge,children:I(A,{style:U.changeBadgeText,children:"\u26A1"})}):void 0;return I(Z,{statusDotColor:m,statusLabel:S,statusSublabel:p,primaryText:e.label,bottomRightText:i,customBadge:h,isSelected:n,onPress:s?()=>s(e):void 0,showChevron:!!s})}c(v,"HistoryEntryRow");var U=k.create({changeBadge:{paddingHorizontal:4},changeBadgeText:{fontSize:12}});import{useCallback as T,useMemo as H}from"react";import{jsx as g,jsxs as J}from"react/jsx-runtime";function K({filter:e,selectedEntryId:t,onSelectEntry:n,showSource:s=true,emptyMessage:u="No history entries yet",ListHeaderComponent:y,ListFooterComponent:m}){let S=P(e),p=F(),i=H(()=>{let o=new Map;return p.forEach(x=>o.set(x.id,x)),o},[p]),h=T(o=>`${o.source}-${o.id}`,[]),w=T(({item:o})=>{let x=i.get(o.source);return g(v,{entry:o,adapter:x,isSelected:t===o.id,onPress:n,showSource:s})},[i,t,n,s]),l=H(()=>J(L,{style:C.emptyContainer,children:[g(A,{style:C.emptyText,children:u}),g(A,{style:C.emptySubtext,children:"Actions will appear here as they happen"})]}),[u]);return g(B,{data:S,keyExtractor:h,renderItem:w,ListEmptyComponent:l,ListHeaderComponent:y,ListFooterComponent:m,contentContainerStyle:C.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15,getItemLayout:void 0})}c(K,"HistoryList");function O({entries:e,adapters:t=[],selectedEntryId:n,onSelectEntry:s,showSource:u=true,emptyMessage:y="No history entries yet",ListHeaderComponent:m,ListFooterComponent:S}){let p=H(()=>{let l=new Map;return t.forEach(o=>l.set(o.id,o)),l},[t]),i=T(l=>`${l.source}-${l.id}`,[]),h=T(({item:l})=>{let o=p.get(l.source);return g(v,{entry:l,adapter:o,isSelected:n===l.id,onPress:s,showSource:u})},[p,n,s,u]),w=H(()=>J(L,{style:C.emptyContainer,children:[g(A,{style:C.emptyText,children:y}),g(A,{style:C.emptySubtext,children:"Actions will appear here as they happen"})]}),[y]);return g(B,{data:e,keyExtractor:i,renderItem:h,ListEmptyComponent:w,ListHeaderComponent:m,ListFooterComponent:S,contentContainerStyle:C.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15})}c(O,"StandaloneHistoryList");var C=k.create({listContent:{flexGrow:1,paddingVertical:4},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60,paddingHorizontal:20},emptyText:{fontSize:16,fontWeight:"600",color:f.text,marginBottom:8},emptySubtext:{fontSize:13,color:f.textMuted,textAlign:"center"}});export{z as a,E as b,F as c,j as d,P as e,N as f,v as g,K as h,O as i};
|