@@ -2,7 +2,69 @@ import type {Union} from '@solid-devtools/shared/utils'
22import type { EncodedValue , InspectorUpdate , PropGetterState , ToggleInspectedValueData } from '../inspector/types.ts'
33import type { HighlightElementPayload , SourceLocation } from '../locator/types.ts'
44import type { StructureUpdates , DGraphUpdate } from '../types.ts'
5- import { DebuggerModule , DevtoolsMainView , NodeType , OWNER_LOCATION_PROP , TreeWalkerMode , ValueItemType } from './constants.ts'
5+
6+ /**
7+ * Main modules and views of the devtools. Used for "routing".
8+ */
9+ export enum DevtoolsMainView {
10+ Structure = 'structure' ,
11+ }
12+ export const DEFAULT_MAIN_VIEW = DevtoolsMainView . Structure
13+
14+ export enum DebuggerModule {
15+ Locator = 'locator' ,
16+ Structure = 'structure' ,
17+ Dgraph = 'dgraph' ,
18+ }
19+
20+ export enum TreeWalkerMode {
21+ Owners = 'owners' ,
22+ Components = 'components' ,
23+ DOM = 'dom' ,
24+ }
25+ export const DEFAULT_WALKER_MODE = TreeWalkerMode . Components
26+
27+ export enum NodeType {
28+ Root = 'ROOT' ,
29+ Component = 'COMPONENT' ,
30+ Element = 'ELEMENT' ,
31+ Effect = 'EFFECT' ,
32+ Render = 'RENDER' ,
33+ Memo = 'MEMO' ,
34+ Computation = 'COMPUTATION' ,
35+ Refresh = 'REFRESH' ,
36+ Context = 'CONTEXT' ,
37+ CatchError = 'CATCH_ERROR' ,
38+ Signal = 'SIGNAL' ,
39+ Store = 'STORE' ,
40+ CustomValue = 'CUSTOM_VALUE' ,
41+ }
42+
43+ export const NODE_TYPE_NAMES : Readonly < Record < NodeType , string > > = {
44+ [ NodeType . Root ] : 'Root' ,
45+ [ NodeType . Component ] : 'Component' ,
46+ [ NodeType . Element ] : 'Element' ,
47+ [ NodeType . Effect ] : 'Effect' ,
48+ [ NodeType . Render ] : 'Render Effect' ,
49+ [ NodeType . Memo ] : 'Memo' ,
50+ [ NodeType . Computation ] : 'Computation' ,
51+ [ NodeType . Refresh ] : 'Refresh' ,
52+ [ NodeType . Context ] : 'Context' ,
53+ [ NodeType . CatchError ] : 'CatchError' ,
54+ [ NodeType . Signal ] : 'Signal' ,
55+ [ NodeType . Store ] : 'Store' ,
56+ [ NodeType . CustomValue ] : 'Custom Value' ,
57+ }
58+
59+ export enum ValueItemType {
60+ Signal = 'signal' ,
61+ Prop = 'prop' ,
62+ Value = 'value' ,
63+ }
64+
65+ export const UNKNOWN = 'unknown'
66+
67+ export const OWNER_LOCATION_PROP = 'sdtLocation'
668
769export type InspectedState = {
870 readonly ownerId : NodeID | null
0 commit comments