first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import React from 'react';
import { findNodeHandle } from 'react-native';
// A hook that logs information when component is rendered, mounted and unmounted.
// It returns a ref that can be passed to a component instance in order to
// enrich the logging information with the component's node handle.
export function useRenderDebugInfo(componentName) {
const componentRef = React.useRef(null);
const componentNodeHandle = React.useRef(-1);
const logMessageEvent = React.useEffectEvent(message => {
logMessage(componentName, componentNodeHandle.current, message);
});
React.useEffect(() => {
if (componentRef.current != null) {
componentNodeHandle.current = findNodeHandle(componentRef.current) ?? -1;
if (componentNodeHandle.current === -1) {
logMessageEvent('failed to find node handle');
}
}
logMessageEvent('mounted');
return () => {
logMessageEvent('unmounted');
};
}, []);
logMessage(componentName, componentNodeHandle.current, 'rendered');
return componentRef;
}
function logMessage(componentName, nodeHandle, message) {
console.log(`${componentName} [${nodeHandle}] ${message}`);
}
//# sourceMappingURL=useRenderDebugInfo.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","findNodeHandle","useRenderDebugInfo","componentName","componentRef","useRef","componentNodeHandle","logMessageEvent","useEffectEvent","message","logMessage","current","useEffect","nodeHandle","console","log"],"sourceRoot":"../../../../src","sources":["private/hooks/useRenderDebugInfo.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAA4B,cAAc;AAIjE;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,aAAqB,EACrB;EACA,MAAMC,YAAY,GAAGJ,KAAK,CAACK,MAAM,CAAU,IAAI,CAAC;EAChD,MAAMC,mBAAmB,GAAGN,KAAK,CAACK,MAAM,CAAS,CAAC,CAAC,CAAC;EAEpD,MAAME,eAAe,GAAGP,KAAK,CAACQ,cAAc,CAAEC,OAAe,IAAK;IAChEC,UAAU,CAACP,aAAa,EAAEG,mBAAmB,CAACK,OAAO,EAAEF,OAAO,CAAC;EACjE,CAAC,CAAC;EAEFT,KAAK,CAACY,SAAS,CAAC,MAAM;IACpB,IAAIR,YAAY,CAACO,OAAO,IAAI,IAAI,EAAE;MAChCL,mBAAmB,CAACK,OAAO,GAAGV,cAAc,CAACG,YAAY,CAACO,OAAO,CAAC,IAAI,CAAC,CAAC;MAExE,IAAIL,mBAAmB,CAACK,OAAO,KAAK,CAAC,CAAC,EAAE;QACtCJ,eAAe,CAAC,4BAA4B,CAAC;MAC/C;IACF;IAEAA,eAAe,CAAC,SAAS,CAAC;IAE1B,OAAO,MAAM;MACXA,eAAe,CAAC,WAAW,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAENG,UAAU,CAACP,aAAa,EAAEG,mBAAmB,CAACK,OAAO,EAAE,UAAU,CAAC;EAElE,OAAOP,YAAY;AACrB;AAEA,SAASM,UAAUA,CACjBP,aAAqB,EACrBU,UAAkB,EAClBJ,OAAe,EACf;EACAK,OAAO,CAACC,GAAG,CAAC,GAAGZ,aAAa,KAAKU,UAAU,KAAKJ,OAAO,EAAE,CAAC;AAC5D","ignoreList":[]}

View File

@@ -0,0 +1,11 @@
// Types
// Logging
export { internalEnableDetailedBottomTabsLogging, bottomTabsDebugLog } from './logging';
// Hooks
export { useRenderDebugInfo } from './hooks/useRenderDebugInfo';
// Components
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["internalEnableDetailedBottomTabsLogging","bottomTabsDebugLog","useRenderDebugInfo"],"sourceRoot":"../../../src","sources":["private/index.ts"],"mappings":"AAAA;;AAGA;AACA,SACEA,uCAAuC,EACvCC,kBAAkB,QACb,WAAW;;AAElB;;AAEA,SAASC,kBAAkB,QAAQ,4BAA4B;;AAE/D","ignoreList":[]}

View File

@@ -0,0 +1,10 @@
let isDetailedLoggingEnabled = false;
export function bottomTabsDebugLog(...args) {
if (isDetailedLoggingEnabled) {
console.log(...args);
}
}
export function internalEnableDetailedBottomTabsLogging() {
isDetailedLoggingEnabled = true;
}
//# sourceMappingURL=logging.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["isDetailedLoggingEnabled","bottomTabsDebugLog","args","console","log","internalEnableDetailedBottomTabsLogging"],"sourceRoot":"../../../src","sources":["private/logging.ts"],"mappings":"AAAA,IAAIA,wBAAwB,GAAG,KAAK;AAEpC,OAAO,SAASC,kBAAkBA,CAChC,GAAGC,IAAyC,EAC5C;EACA,IAAIF,wBAAwB,EAAE;IAC5BG,OAAO,CAACC,GAAG,CAAC,GAAGF,IAAI,CAAC;EACtB;AACF;AAEA,OAAO,SAASG,uCAAuCA,CAAA,EAAG;EACxDL,wBAAwB,GAAG,IAAI;AACjC","ignoreList":[]}

View File

@@ -0,0 +1,2 @@
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["private/types.ts"],"mappings":"","ignoreList":[]}