1. Route and component dispatch
The Vue Router entry point for every symbol/article page is
src/views/DocumentationTopic.vue
(exported as DocumentationTopicView). Its template wraps a CodeTheme
provider around a DocumentationLayout, and slots a Topic component
(an alias for theme/components/DocumentationTopic.vue) into
DocumentationLayout's #content slot:
<CodeTheme>
<DocumentationLayout v-if="topicData" v-bind="documentationLayoutProps">
<template #nav-title="{ className }">...</template>
<template #content>
<Topic
v-bind="topicProps"
:key="topicKey"
...
:hierarchyItems="hierarchyItems"
/>
</template>
</DocumentationLayout>
</CodeTheme>
(lines 11-43.)
beforeRouteEnter/beforeRouteUpdate
(lines 287-322)
fetch the page's raw RenderNode JSON and assign it to topicData; the view's own
topicProps computed then calls extractProps(this.topicData)
(line 66,
destructured from theme/components/DocumentationTopic.vue's own methods)
to turn the wire JSON into the flat prop set the layout/content chain expects. Unlike the
top-level tutorial/overview kinds, there is no per-kind lookup table here: both
kind: "symbol" and kind: "article" RenderNodes flow through this exact
same view/component chain (see kinds/node-symbol.html and
kinds/node-article.html for how the two are
distinguished downstream via metadata.role/symbolKind instead of
kind).
DocumentationLayout
(src/components/DocumentationLayout.vue)
is the actual owner of the page's chrome: it renders Nav
(DocumentationNav.vue) unconditionally (when not an IDE target), then wraps
AdjustableSidebarWidth around the routed content, feeding the sidebar's
#aside slot with a QuickNavigationModal plus either a caller-provided
#navigator slot or, by default, the Navigator component:
<div class="documentation-layout">
<Nav v-if="!isTargetIDE" ... :displaySidenav="enableNavigator" @toggle-sidenav="...">
<template #title="{ className }"><slot name="nav-title" :className="className" /></template>
</Nav>
<AdjustableSidebarWidth v-bind="sidebarProps" v-on="sidebarListeners" class="full-width-container topic-wrapper">
<PortalTarget name="modal-destination" multiple />
<template #aside="{ scrollLockID, breakpoint }">
<div class="documentation-layout-aside">
<QuickNavigationModal v-if="enableQuickNavigation" ... />
<transition name="delay-hiding">
<slot name="navigator" ...>
<Navigator key="base-navigator" v-bind="{ ...navigatorProps, technologyProps }" ... />
</slot>
</transition>
</div>
</template>
<slot name="content" />
</AdjustableSidebarWidth>
</div>
(lines 11-81.)
The #content slot passed in from the view chain above is exactly the Topic
component, so the routed <main> content sits as a sibling to the sidebar inside
AdjustableSidebarWidth's own .content wrapper — the schema-driven
page is a child of the chrome, not the chrome's parent.
Topic (theme/components/DocumentationTopic.vue) is the actual root of the
schema-rendering tree, with template root
<div class="doc-topic">
(lines 12-15).
Its direct children are a <main id="app-main"> wrapping a
DocumentationHero (title/hierarchy/abstract/declarations chrome-and-content mix), a
.doc-content-wrapper holding the primary content column plus an optional
OnThisPageStickyContainer, and a trailing BetaLegalText
(lines 11-178).
Section 3 below walks this full tree top to bottom.
DocCArchive transform status: neither MyHTMLTransformer nor
MyMarkdownTransformer in Sources/DocCArchive/DocCArchive.swift has any
kind-specific handling for DocumentationRenderNode today — both are stub
placeholders (a hardcoded <!-- what? --> comment and an empty string,
respectively), so a symbol/article RenderNode parsed via
Archive.parseRenderNode(dataPath:) decodes correctly but produces no real output
through DocCArchive's own transform layer yet.
2. Page chrome (non-schema)
Everything in this section is UI shell built by swift-docc-render's own Vue components —
none of it is driven by a field in the RenderNode JSON schema (it is driven by which page
type is being rendered, and by the site-wide navigation index, not by this page's own wire
data). The Documentation Topic page is the only one of the six top-level page kinds
(Documentation Topic, Tutorial/Project, Tutorial Article, Tutorials Overview, Not Found, Server
Error) that has a sidebar navigator and search — DocumentationLayout.vue
is used exclusively by views/DocumentationTopic.vue, and no other top-level view
renders Navigator.vue, NavigatorCard.vue,
QuickNavigationButton.vue, or QuickNavigationModal.vue. This is a
citable structural fact, not an inference: a grep for these four component names under
src/views/ and src/components/ turns up their construction site only
inside DocumentationLayout.vue.
DocumentationNav.vue
Role: the sticky top nav bar shown on every non-IDE page; on this page type it is
additionally handed a "open sidenav" toggle button.
Root DOM: renders through NavBase.vue's <nav class="nav" ...>,
itself wrapped with an outer class of documentation-nav
(lines 11-22).
CSS behavior: position: sticky; top: 0; on .nav
(NavBase.vue, $nav-height tall), with a background/border that fades in
via nav--is-sticking/nav--is-open state classes toggled by an
IntersectionObserver (onIntersect mixin) and by manual open/close.
Actions/links: when displaySidenav is true (this page type sets it
to enableNavigator), a .sidenav-toggle button in the
#pre-title slot emits toggle-sidenav
(lines 23-39),
which DocumentationLayout.vue's handleToggleSidenav uses to flip either
the mobile-visible or large-viewport-hidden sidebar state; a collapsible hamburger menu tray
(NavMenuItems) optionally holds a Swift/Objective-C LanguageToggle.
AdjustableSidebarWidth.vue
Role: generic two-pane shell (an <aside> plus a
.content region) that DocumentationLayout.vue uses to host the
navigator next to the routed page content.
Root DOM: <div class="adjustable-sidebar-width">, with
.sidebar > .aside (the resizable pane, slotted as #aside) and
.content (the default slot, i.e. the Topic tree)
(lines 11-56.)
CSS/JS behavior: resizable — a .resize-handle element starts a
drag (startDrag/handleDrag) that live-sets width in
component data(), clamped between a responsive min/max percent of the viewport
width and persisted to localStorage under the key sidebar
(lines 70-102,
324-332).
Collapsible on large viewports via the hiddenOnLarge prop/hide-on-large
class (persisted under navigator-hidden-large in DocumentationLayout.vue),
and slides in as a full-width mobile overlay below the medium breakpoint
(show-on-mobile class, transform: translateX(...) transition).
Actions: drag the resize handle to resize; the nav's sidenav-toggle
button (above) or dragging past a threshold toggles hiddenOnLarge/mobile visibility.
Navigator.vue / NavigatorCard.vue
Role: the sidebar's tree-view of the current technology's symbol/article index,
letting a reader jump directly to any other page in the same module without reloading the nav
chrome.
Root DOM: Navigator.vue renders
<nav class="navigator">
(lines 11-47),
delegating its body to NavigatorCard.vue's BaseNavigatorCard-wrapped
.card-body, which contains a Reference-based
.technology-title link (jumps to the technology root page) followed by a virtualized
DynamicScroller list of NavigatorCardItem rows
(lines 26-96).
Behavior: each row is expand/collapse-able (toggle/toggleFullTree
methods track an openNodes map, persisted to sessionStorage under
navigator.state), the currently-active page's row is auto-scrolled into view and
highlighted (activeUID/activePathMap), and the whole list can be
filtered live (see FilterInput below) or by "Hide Deprecated"/API-diff tags.
Actions/links: click any row to navigate (emits navigate with the
row's path); Alt/Option-click a parent row's technology title or a row's own disclosure toggle to
expand/collapse its entire subtree at once (toggleAllNodes/toggleFullTree);
arrow keys and Alt+Up/Down move focus between rows.
QuickNavigationButton.vue + QuickNavigationModal.vue + FilterInput.vue (search UI)
Role: a fuzzy "jump to any symbol" command-palette, opened either by clicking the
small / button docked at the end of the sidebar's filter row, or by the
/ or Cmd+Shift+O keyboard shortcuts registered globally on
DocumentationLayout.vue while it is mounted
(lines 222-231).
Root DOM: QuickNavigationButton.vue is a single
<button class="quick-navigation-open">/</button>
(lines 11-19),
slotted into NavigatorCard.vue's filter row. QuickNavigationModal.vue is
a GenericModal(isFullscreen) hosting a .quick-navigation
container: a FilterInput search box up top and a live
.quick-navigation__match-list of Reference rows below, each rendering a
TopicTypeIcon, fuzzy-highlighted title, and breadcrumb path, plus a side-by-side
preview pane (QuickNavigationPreview) of the selected result's rendered content
(lines 11-133).
FilterInput.vue itself is the shared search-input widget also used by the sidebar's
own filter (below): <div class="filter" role="search"> wrapping an
<input>, an optional list of removable/suggested filter tags, and a clear
button
(lines 11-124).
Behavior: input is debounced 250ms before fuzzy-matching every symbol title in the
technology's flattened index (constructFuzzyRegex/fuzzyMatch,
capped at 20 results, LRU-cached preview fetches per match).
Actions/links: "open search modal" (click the / button, or press
//Cmd+Shift+O outside of a text input); type to filter; Up/Down arrow to
move the highlighted match; Enter to navigate to the highlighted match and close the modal.
Hierarchy.vue (breadcrumb)
Role: the technology › parent › parent › current-page
breadcrumb trail rendered just above the page title, inside the hero.
Root DOM: a NavMenuItems-based
<ul class="hierarchy"> of HierarchyItem entries
(lines 11-58),
imported into DocumentationTopic.vue as plain Hierarchy
(line 215).
It reads its parent-topic titles/URLs from the RenderNode's hierarchy field
(resolved through references up in the view layer), so its content is
schema-derived even though the crumb-trail widget itself is chrome.
CSS behavior: responsively collapsing — beyond a content-width threshold up
to MaxVisibleLinks (3) intermediate crumbs show inline; narrower viewports collapse
the middle crumbs into a HierarchyCollapsedItems dropdown, and below the
small breakpoint the current-page title itself folds into that same collapsible list
(lines 136-162).
Actions/links: each non-current crumb is a link to that ancestor page; deprecated
or beta symbols show a trailing Badge next to the current-page crumb.
OnThisPageNav.vue
Role: the right-hand-rail "On this page" table of contents, listing the page's own
top-level (and second-level) headings.
Root DOM: <div class="OnThisPageNav"><ul class="items"> of
router-link items
(lines 10-30),
wrapped by OnThisPageStickyContainer.vue's <div class="OnThisPageStickyContainer">.
CSS behavior: the container is position: sticky (offset below the
top nav) and only shown above the small breakpoint and above a
1050px content-width threshold (enableOnThisPageNav/isOnThisPageNavVisible
in DocumentationTopic.vue); OnThisPageNav.vue itself is only mounted at
all once the store has more than two registered sections
(lines 167-171).
A scroll listener highlights the currently-in-view heading by adding an active class
to its list item (onScroll/checkIsActive).
Actions/links: "jump to on-page anchor" — clicking an entry is a plain
in-page router-link to #anchor, which also triggers
handleFocusAndScroll to move keyboard focus to the target heading.
3. DOM hierarchy: root → chrome → content → leaves
The tree below follows the actual component nesting from DocumentationLayout.vue
down through DocumentationTopic.vue into representative primary-content sections and
their block/inline leaves. CHROME entries are non-schema UI;
NODE/SECTION/BLOCK/INLINE/REFERENCE
entries are schema-backed kinds and link to their kinds/*.html page where one exists.
Depth is illustrative, not exhaustive — see section 5 for the complete kind list.
- CHROME
div.documentation-layout— root ofDocumentationLayout.vue- CHROME
nav.nav.documentation-nav— top sticky nav bar (DocumentationNav.vueviaNavBase.vue)- CHROME
button.sidenav-toggle— opens/closes the sidebar navigator only rendered when the navigator is enabled
- CHROME
- CHROME
div.adjustable-sidebar-width.topic-wrapper— resizable two-pane shell (AdjustableSidebarWidth.vue)- CHROME
div.sidebar > div.aside— the resizable/collapsible sidebar pane- CHROME
div.documentation-layout-aside- CHROME
GenericModal.quick-navigation— Quick Navigation search modal (QuickNavigationModal.vue), hidden until opened- CHROME
div.filter[role=search]— search input (FilterInput.vue)
- CHROME
- CHROME
nav.navigator— sidebar symbol tree (Navigator.vue→NavigatorCard.vue)- CHROME
a.technology-title— link to the technology root page - CHROME
div.scroller— virtualized list ofNavigatorCardItemrows (one per symbol/article in the index) - CHROME
div.filter[role=search]+button.quick-navigation-open— in-sidebar filter plus the/Quick Navigation trigger
- CHROME
- CHROME
- CHROME
- CHROME
div.content— the routed page content region- NODE
div.doc-topic— root ofDocumentationTopic.vue; backs asymbolorarticleDocumentationRenderNode- CHROME
main#app-main- CHROME
div.documentation-hero— hero/title chrome (DocumentationHero.vue)- CHROME
ul.hierarchy— breadcrumb trail (Hierarchy.vue) content sourced from the node'shierarchyfield - CHROME
Titlecomponent — page title text (frommetadata.title) plusroleHeadingeyebrow - CHROME
Abstractcomponent — wraps the node'sabstractarray- INLINE
text— e.g. "A short summary of this symbol."
- INLINE
- SECTION
div.declarations-container > Declaration—declarationsprimary-content section, pulled up into the hero symbol pages only- INLINE
DeclarationTokenstream (keyword/identifier/typeIdentifier text runs)
- INLINE
- CHROME
- CHROME
- CHROME
div.doc-content-wrapper- CHROME
div.doc-content— primary content column- CHROME
div.container > PrimaryContent— dispatches eachprimaryContentSectionsentry bykind- SECTION
parameters—Parameters.vuedefinition list symbol pages - SECTION
content— Discussion/Overview prose, dispatched toContentNode.vue- BLOCK
heading— e.g. "Overview" - BLOCK
paragraph - BLOCK
codeListing— fenced example code - BLOCK
aside— Note/Tip/Warning callout wraps further nested block content
- BLOCK
- SECTION
relationships— conforms-to/inherits-from lists symbol pages, viarelationshipsSections
- SECTION
- CHROME
Topics— "Topics" curated-links section, delegates toTopicsTable.vue - CHROME
DefaultImplementations— reuses thetaskGroupshape viadefaultImplementationsSectionsprotocol requirement symbol pages - CHROME
SeeAlso— reuses thetaskGroupshape viaseeAlsoSections
- CHROME
- CHROME
OnThisPageStickyContainer > OnThisPageNav— right-rail page TOC only when > 2 registered headings and viewport is wide enough
- CHROME
- CHROME
BetaLegalText— footer legal notice, shown only when any platform is marked beta
- CHROME
- NODE
- CHROME
- CHROME
4. RenderNode content dispatch (schema-driven)
Which section kinds are reachable depends heavily on whether the page's underlying
DocumentationRenderNode is a symbol
(metadata.role === "symbol"-family) or an
article
(metadata.role === "article") — the template is shared, but symbol pages
populate many more of the optional, conditionally-rendered fields. An article's
primaryContentSections is typically just a single
content section holding the article's
Markdown body; a symbol's primaryContentSections commonly starts with
declarations (pulled into the hero)
and can additionally include parameters,
relationships (as
relationshipsSections, a sibling top-level field, not inside
primaryContentSections), REST-specific sections, dictionary/property-list sections,
and mentions.
| Kind | Tier | Symbol pages | Article pages |
|---|---|---|---|
| declarations | section | yes (hero) | no |
| content | section | yes (Discussion/Overview) | yes (article body) |
| parameters | section | yes | no |
| attributes | section | yes (constrained-value symbols) | no |
| possibleValues | section | yes (plist-key symbols) | no |
| plistDetails | section | yes (plist-key symbols) | no |
| properties | section | yes (dictionary symbols) | no |
| restEndpoint | section | yes (REST symbols) | no |
| restParameters | section | yes (REST symbols) | no |
| restBody | section | yes (REST symbols) | no |
| restResponses | section | yes (REST symbols) | no |
| mentions | section | yes (non-module symbols) | no |
| relationships | section | yes (relationshipsSections) | no |
| taskGroup | section | yes (topicSections/seeAlsoSections/defaultImplementationsSections) | yes (topicSections/seeAlsoSections) |
| heading | block | yes | yes |
| paragraph | block | yes | yes |
| aside | block | yes | yes |
| codeListing | block | yes | yes |
| orderedList | block | yes | yes |
| unorderedList | block | yes | yes |
| table | block | yes | yes |
| termList | block | yes | yes |
| row | block | yes | yes |
| small | block | yes | yes |
| tabNavigator | block | yes | yes |
| links | block | yes | yes |
| video | block | yes | yes |
| dictionaryExample | block | yes | yes |
| endpointExample | block | yes (REST content) | yes (REST content) |
| thematicBreak | block | yes | yes |
| all 11 inline kinds | inline | yes (inside any block/abstract/heading) | yes (inside any block/abstract/heading) |
most reference kinds (topic, section, image, video, file, link, download, externalLocation, unresolvable) | reference | yes | yes |
| xcodeRequirement, fileType | reference | not observed on this page type (tutorial-only / unconstructed) | not observed on this page type |
5. Kind cross-reference table
Every kind that can appear anywhere on a Documentation Topic page (symbol or article), for
generating backlinks from each kinds/*.html page to this one.