import { NodeDefinition } from '../types/NodeDefinition'; import { NodeDefinitionCategory, NestedNodeDefinitionCategory, FlattenedNodeDefinition, FlattenedNestedNodeDefinition } from './types'; export declare const DEFAULT_NODE_CATEGORY = "Other"; export declare const CATEGORY_SEPARATOR = "/"; /** * Normalize category to an array of category strings. * Handles both single string and array inputs. */ export declare const normalizeCategories: (category: string | string[] | undefined) => string[]; /** * Filter out categories that are prefixes of other categories in the list. * This prevents a node from appearing in both a parent and child category. * e.g., ["custom", "custom/ui"] -> ["custom/ui"] (custom is filtered out) * e.g., ["custom/ui", "custom/hoge"] -> ["custom/ui", "custom/hoge"] (neither is a prefix of the other) */ export declare const filterPrefixCategories: (categories: string[]) => string[]; /** * Group node definitions by category. Categories honor the lowest provided priority * before falling back to alphabetical ordering for the remaining groups. * Supports multi-category nodes - a node with multiple categories appears in each. * When categories share a parent (e.g., ["custom/ui", "custom/hoge"]), the node * appears only in the specific categories, not in the shared parent. */ export declare const groupNodeDefinitions: (nodeDefinitions: NodeDefinition[]) => NodeDefinitionCategory[]; /** * Filter grouped node definitions by search query. Matches on display name, description, type, or category. */ export declare const filterGroupedNodeDefinitions: (categories: NodeDefinitionCategory[], query: string) => NodeDefinitionCategory[]; /** * Create a flat list with category metadata to aid keyboard/focus navigation. */ export declare const flattenGroupedNodeDefinitions: (categories: NodeDefinitionCategory[]) => FlattenedNodeDefinition[]; /** * Parse a category string into path segments. * e.g., "Data/Transform/Filter" -> ["Data", "Transform", "Filter"] */ export declare const parseCategoryPath: (category: string) => string[]; /** * Group node definitions into a nested hierarchy based on category paths. * Categories using "/" separator will be nested (e.g., "Data/Transform" creates Data -> Transform). * Supports multi-category nodes - a node with multiple categories appears in each. * When categories share a parent (e.g., ["custom/ui", "custom/hoge"]), the node * appears only in the specific categories, not in the shared parent. */ export declare const groupNodeDefinitionsNested: (nodeDefinitions: NodeDefinition[]) => NestedNodeDefinitionCategory[]; /** * Filter nested categories by search query. * Returns categories that have matching nodes or matching category names. */ export declare const filterNestedNodeDefinitions: (categories: NestedNodeDefinitionCategory[], query: string) => NestedNodeDefinitionCategory[]; /** * Flatten nested categories into a single list for keyboard navigation. */ export declare const flattenNestedNodeDefinitions: (categories: NestedNodeDefinitionCategory[]) => FlattenedNestedNodeDefinition[];