import type { ChartDatapoint } from '../../../core/types/chart-data.js'; type OrderingAccessors = { spanIdAccessor: string; parentIdAccessor: string; x0Accessor: string; x1Accessor: string; /** * Subtracted from each span's `x0`/`x1` when emitting `START_FIELD` / * `END_FIELD`, so the visible axis starts at zero. Defaults to `0`. */ offset?: number; selfValueAccessor?: string; }; /** * Traverses the span forest in DFS pre-order (parent before children, siblings * sorted by `x0` with original index as tie-breaker) and returns a flat list * where each span carries its `depth`, `childrenCount`, and axis-friendly * `START_FIELD` / `END_FIELD` / `VALUE_FIELD`. Zero-width spans are widened * by 1 in `END_FIELD` only so they remain paintable on the canvas; the raw * `x1` accessor field is left untouched so consumer reads stay truthful. * * Numeric x0/x1 are parsed once per span and cached on the internal `Entry`, * so the sort comparator does not re-run `Number()` at every comparison. * Traversal is iterative to avoid stack overflows on deep flame graphs. */ export declare function orderSpansHierarchically(spans: ChartDatapoint[], { spanIdAccessor, parentIdAccessor, x0Accessor, x1Accessor, offset, selfValueAccessor, }: OrderingAccessors): ChartDatapoint[]; export {}; //# sourceMappingURL=order-spans-hierarchically.d.ts.map