# configuration/constants/ontology.constants.ts

> 19 lines of code and 7 definitions.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-configuration-constants-ontology-constants-ts
Source text: https://banes-lab.com/assets/sources/source.1236d404d49c8ab75db668bcc64d1e83acee0c06473237117926dca31fe67044.generated.txt

## Definitions

- `sectionsOf` (lexical_declaration, line 13)
- `sections` (method_definition, line 22, exported)
- `SEARCH_ATTRIBUTE` (lexical_declaration, line 5, exported)
- `WIDE_FIELD_LENGTH` (lexical_declaration, line 7, exported)
- `NARRATIVE` (lexical_declaration, line 9)
- `held` (lexical_declaration, line 11)
- `ONTOLOGY_GRAPH` (lexical_declaration, line 20, exported)

## Source

```typescript
import type { ContentGraph, GraphSection } from "#types/methodology.types";
import { ONTOLOGY_PAGE } from "#core/ids/page.ids";
import { ONTOLOGY_TABS } from "#configuration/strings/ontology.fragment.strings";

export const SEARCH_ATTRIBUTE = "data-search";

export const WIDE_FIELD_LENGTH = 160;

const NARRATIVE: GraphSection = { narrative: true, requires: [], teaches: [], traces: [] };

let held: Readonly<Record<string, GraphSection>> | null = null;

const sectionsOf = function sectionsOf(): Readonly<Record<string, GraphSection>> {
    held ??= Object.fromEntries(
        ONTOLOGY_TABS.flatMap((tab) => tab.sections.map((section) => [section.id, NARRATIVE] as const)),
    );
    return held;
};

export const ONTOLOGY_GRAPH: ContentGraph = {
    page: ONTOLOGY_PAGE,
    get sections(): Readonly<Record<string, GraphSection>> {
        return sectionsOf();
    },
};
```
