52
copyWithRename,
53
copyWithSet,
54
getEffectDurations,
55
-} from './utils';
55
+} from '../utils';
56
import {
57
__DEBUG__,
58
PROFILING_FLAG_BASIC_SUPPORT,
66
TREE_OPERATION_SET_SUBTREE_MODE,
67
TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,
68
TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
69
-} from '../constants';
69
+} from '../../constants';
70
import {inspectHooksOfFiber} from 'react-debug-tools';
71
import {
72
patchConsoleUsingWindowValues,
73
registerRenderer as registerRendererWithConsole,
74
patchForStrictMode as patchConsoleForStrictMode,
75
unpatchForStrictMode as unpatchConsoleForStrictMode,
76
-} from './console';
76
+} from '../console';
77
import {
78
CONCURRENT_MODE_NUMBER,
79
CONCURRENT_MODE_SYMBOL_STRING,
95
MEMO_NUMBER,
96
MEMO_SYMBOL_STRING,
97
SERVER_CONTEXT_SYMBOL_STRING,
98
-} from './ReactSymbols';
98
+} from '../shared/ReactSymbols';
99
import {enableStyleXFeatures} from 'react-devtools-feature-flags';
100
import is from 'shared/objectIs';
101
import hasOwnProperty from 'shared/hasOwnProperty';
102
-import {getStyleXData} from './StyleX/utils';
103
-import {createProfilingHooks} from './profilingHooks';
102
+import {getStyleXData} from '../StyleX/utils';
103
+import {createProfilingHooks} from '../profilingHooks';
104
105
-import type {GetTimelineData, ToggleProfilingStatus} from './profilingHooks';
105
+import type {GetTimelineData, ToggleProfilingStatus} from '../profilingHooks';
106
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
107
import type {
108
ChangeDescription,
122
WorkTagMap,
123
CurrentDispatcherRef,
124
LegacyDispatcherRef,
125
-} from './types';
125
+} from '../types';
126
import type {
127
ComponentFilter,
128
ElementType,
811
}
812
}
813
814
- function clearErrorsForFiberID(fiberID: number) {
814
+ function clearErrorsForElementID(fiberID: number) {
815
clearMessageCountHelper(
816
fiberID,
817
pendingFiberToErrorsMap,
819
);
820
}
821
822
- function clearWarningsForFiberID(fiberID: number) {
822
+ function clearWarningsForElementID(fiberID: number) {
823
clearMessageCountHelper(
824
fiberID,
825
pendingFiberToWarningsMap,
1311
idToArbitraryFiberMap.delete(fiberID);
1312
1313
// Also clear any errors/warnings associated with this fiber.
1314
- clearErrorsForFiberID(fiberID);
1315
- clearWarningsForFiberID(fiberID);
1314
+ clearErrorsForElementID(fiberID);
1315
+ clearWarningsForElementID(fiberID);
1316
}
1317
1318
fiberToIDMap.delete(fiber);
2862
return fibers;
2863
}
2864
2865
- function findNativeNodesForFiberID(id: number) {
2865
+ function findNativeNodesForElementID(id: number) {
2866
try {
2867
const fiber = findCurrentFiberUsingSlowPathById(id);
2868
if (fiber === null) {
2877
}
2878
}
2879
2880
- function getDisplayNameForFiberID(id: number): null | string {
2880
+ function getDisplayNameForElementID(id: number): null | string {
2881
const fiber = idToArbitraryFiberMap.get(id);
2882
return fiber != null ? getDisplayNameForFiber(fiber) : null;
2883
}
2886
return renderer.findFiberByHostInstance(hostInstance);
2887
}
2888
2889
- function getFiberIDForNative(
2889
+ function getElementIDForNative(
2890
hostInstance: NativeType,
2891
findNearestUnfilteredAncestor: boolean = false,
2892
) {
3870
if (result.hooks !== null) {
3871
console.log('Hooks:', result.hooks);
3872
}
3873
- const nativeNodes = findNativeNodesForFiberID(id);
3873
+ const nativeNodes = findNativeNodesForElementID(id);
3874
if (nativeNodes !== null) {
3875
console.log('Nodes:', nativeNodes);
3876
}
4616
traceUpdatesEnabled = isEnabled;
4617
}
4618
4619
- function hasFiberWithId(id: number): boolean {
4619
+ function hasElementWithId(id: number): boolean {
4620
return idToArbitraryFiberMap.has(id);
4621
}
4622
4651
return {
4652
cleanup,
4653
clearErrorsAndWarnings,
4654
- clearErrorsForFiberID,
4655
- clearWarningsForFiberID,
4654
+ clearErrorsForElementID,
4655
+ clearWarningsForElementID,
4656
getSerializedElementValueByPath,
4657
deletePath,
4658
- findNativeNodesForFiberID,
4658
+ findNativeNodesForElementID,
4659
flushInitialOperations,
4660
getBestMatchForTrackedPath,
4661
- getComponentStackForFiber,
4662
- getSourceForFiber,
4663
- getDisplayNameForFiberID,
4661
+ getDisplayNameForElementID,
4662
getFiberForNative,
4665
- getFiberIDForNative,
4663
+ getElementIDForNative,
4664
getInstanceAndStyle,
4665
getOwnersList,
4666
getPathForElement,
4668
handleCommitFiberRoot,
4669
handleCommitFiberUnmount,
4670
handlePostCommitFiberRoot,
4673
- hasFiberWithId,
4671
+ hasElementWithId,
4672
inspectElement,
4673
logElementToConsole,
4674
patchConsoleForStrictMode,