MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / kindFamily

Function kindFamily

dashboard/graph/src/types.ts:104–122  ·  view source on GitHub ↗
(kind: string)

Source from the content-addressed store, hash-verified

102
103/** Buckets the many backend node kinds into a small set of visual families. */
104export function kindFamily(kind: string): string {
105 if (/^(function|method|arrow_function|procedure|constructor|struct_method|abstract_method|macro)$/.test(kind)) {
106 return "fn";
107 }
108 if (/^(struct|class|enum|enum_variant|union|record|data_class|case_class|sealed_class|inner_class|typedef|type_alias|pascal_record)$/.test(kind)) {
109 return "type";
110 }
111 if (/^(trait|interface|interface_type|annotation|delegate)$/.test(kind)) {
112 return "trait";
113 }
114 if (/^(module|namespace|package|file|library|go_package|scala_package|kotlin_package|pascal_unit|pascal_program)$/.test(kind)) {
115 return "module";
116 }
117 if (/^(const|static|field|property|val|var|csharp_property|event)$/.test(kind)) {
118 return "value";
119 }
120 if (kind === "impl") return "impl";
121 return "other";
122}
123
124/**
125 * Family → [design token, dark-theme fallback]. The canvas samples the token

Callers 5

applyGraphFiltersFunction · 0.90
deriveChipOptionsFunction · 0.90
renderFunction · 0.90
OverviewPanelFunction · 0.90
colorForKindFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected