# Extension points — d3/d3

> Canonical page: https://codevetter.com/unpack/d3/extension-points

# Extension points — d3/d3

Scanned commit ca958d45217b4c15332d971b935451a6d4c978f4 (2026-05-28). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

New behavior is not plugged in through a runtime plugin host. The extension surfaces are the barrel export list, package.json dependencies (which the parity test treats as the registry), the Rollup output array, the VitePress sidebar, docs/api.md, the prebuild copy table, and Vue components dropped into docs/components and imported from markdown. PlotRender's method prop and the theme enhanceApp hook are the two small dispatch points.
- src/index.js is the module registry. A new public symbol becomes part of the default build only by adding export * from "<package>" there. Order in that file is the order of the thirty current modules and matches package.json dependencies. — [src/index.js#L1-30](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/src/index.js#L1-L30) [package.json#L37-68](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L37-L68)
- test/d3-test.js treats package.json dependencies as the oracle: every new dependency is imported and its exports (except version) must appear on the umbrella. Removing an export from a dependency upgrade fails this test; adding a dependency without re-exporting it also fails. — [test/d3-test.js#L10-18](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/d3-test.js#L10-L18) [package.json#L37-68](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L37-L68)
- rollup.config.js default export is an array of three configs sharing one input and plugin list. A new bundle format is added by spreading config and overriding output, the same way the ESM and minified UMD entries are added. The terser reserved array is the mangling allowlist. — [rollup.config.js#L34-64](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/rollup.config.js#L34-L64)
- themeConfig.sidebar in docs/.vitepress/config.ts is the navigation registry, grouped into Introduction, Visualization, Animation, Interaction, and Data. Nested items use text, link, collapsed, and items. what-is-d3.md walks that same structure to draw the module tree, so a sidebar edit changes both the nav and that diagram. — [docs/.vitepress/config.ts#L46-270](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L46-L270) [docs/what-is-d3.md#L10-22](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/what-is-d3.md#L10-L22)
- docs/api.md is the hand-written symbol index. New documented functions are added as markdown links of the form [name](./d3-<module>/<page>.md#anchor). The docs link test will fail if the target file or anchor does not exist. Explicit anchors are written as {#name} in the markdown and picked up by getAnchors. — [docs/api.md#L10-22](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/api.md#L10-L22) [test/docs-test.js#L31-47](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/docs-test.js#L31-L47)
- Doc examples are Vue single-file components in docs/components/, imported from markdown via <script setup>. ExampleBlankChart, WorldMap, UsMap, LogoDiagram, PlotRender, and the quadtree helpers are the current set. A new example is a new .vue or .js file plus a markdown import; there is no component manifest. — [docs/getting-started.md#L1-5](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/getting-started.md#L1-L5) [docs/what-is-d3.md#L1-8](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/what-is-d3.md#L1-L8) [docs/components/ExampleBlankChart.vue#L1-5](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/components/ExampleBlankChart.vue#L1-L5)
- PlotRender is a tiny factory: props are options, mark, defer, and method (default "plot"). render() calls Plot[method](options). Markdown can pass :method and :options to select a different Plot entry point without editing the component. — [docs/components/PlotRender.js#L132-148](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/components/PlotRender.js#L132-L148)
- Theme enhanceApp is the app-wide hook. It currently sets globalThis.d3 and a $dark getter. CustomLayout.vue is where new homepage or navbar slots are attached (home-features-before, home-features-after, nav-bar-content-after). The footer is replaced through the Vite alias from VPFooter.vue to CustomFooter.vue. — [docs/.vitepress/theme/index.ts#L7-13](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/index.ts#L7-L13) [docs/.vitepress/theme/CustomLayout.vue#L12-26](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/CustomLayout.vue#L12-L26) [docs/.vitepress/config.ts#L26-29](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L26-L29)
- prebuild.sh is the CDN filename registry. Current packages are copied in a fixed pattern from node_modules/<name>/dist/<name>.js to docs/public/<name>.v<major>.js. Adding a module requires a new pair of cp lines plus matching .gitignore entries. Historical names (d3-collection, d3-hexbin, d3-hsv, queue, topojson, colorbrewer) are a frozen list, not generated. — [prebuild.sh#L631-690](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/prebuild.sh#L631-L690) [.gitignore#L8-20](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.gitignore#L8-L20)
- Vite custom-element predicate tag.startsWith("observable-") is how the external observable-made-by widget is allowed in templates. config.ts head is the registry for global scripts, icons, and the apple-touch icon. — [docs/.vitepress/config.ts#L14-18](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L14-L18) [docs/.vitepress/config.ts#L35-40](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L35-L40) [docs/.vitepress/theme/CustomLayout.vue#L20-24](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/CustomLayout.vue#L20-L24)
- Markdown pages opt into VitePress features per front matter. docs/index.md sets layout: home, hero, features, and head canonical https://d3js.org. docs/api.md sets next: false and outline: 2. Those front-matter keys are the per-page extension points without editing config.ts. — [docs/index.md#L1-16](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/index.md#L1-L16) [docs/api.md#L1-4](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/api.md#L1-L4)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
