Module Map

JavaScript Module Map

This document maps the first-party JavaScript surfaces in the generator. It is organized by responsibility, not by load order.

Runtime And Lifecycle

  • cdn/custom/layoutMetrics.js: shared window.QL.layout readiness, scheduling, measurement, and component lifecycle helpers.
  • cdn/custom/widgetRuntime.js: shared widget bootstrapping and compatibility helpers for components mounted into Hugo-rendered pages.
  • cdn/prefetch/prefetch.js: SPA navigation, fetched-page swaps, and build revision invalidation.

Site Chrome And Page Utilities

  • cdn/custom/brochure-nav.js: shared header, mobile menu, CTA relocation, and SPA header rebind behavior.
  • cdn/custom/modal.js: generic modal helpers.
  • cdn/custom/pageLockPrompt.js: public locked-page prompts and page-lock runtime UI.
  • cdn/custom/codeCopyBtn.js: code block copy controls.
  • cdn/custom/figureGallery.js: figure gallery and PhotoSwipe integration.
  • cdn/custom/embedFallback.js: external embed fallback handling.
  • cdn/custom/modelViewer.js: lazy Three.js model viewer behavior.

Widgets

  • cdn/custom/bookingWidget.js: booking surface.
  • cdn/custom/coursePurchaseWidget.js: course purchase surface.
  • cdn/custom/purchaseMembershipWidget.js: membership purchase surface.
  • cdn/custom/fundaluminWidget.js: FundALumin campaign and donation surface.
  • cdn/custom/domainOrderWidget.js: domain order surface.
  • cdn/custom/helpdeskWidget.js: shared website support widget.
  • cdn/custom/chatwoot.js: optional Chatwoot integration.
  • cdn/custom/quiz.js: Hugo-authored quiz widget runtime.
  • cdn/custom/worldMap.js and cdn/custom/worldCards.js: place/world discovery widgets.
  • cdn/custom/platformFeedWidget.js: platform feed widget.
  • cdn/custom/skillMeter.js: skill meter widget runtime.

Editor Bridge

  • cdn/custom/toggleMarkdown.js: edit-mode shell, provider routing, replace-main editor integration, config/bibliography modals, and PDF-mode controls.
  • cdn/custom/nowtypePdfCore.js: shared PDF sizing, route scope, page-role, and helper logic loaded before toggleMarkdown.js.
  • cdn/custom/structured-block-editor-contract.js: structured block editor inventory consumed by the browser editor.

Nowtype Source Modules

Nowtype source lives under cdn/editor/src/ and is bundled into cdn/editor/nowtype.min.js.

  • nt.md2dom.js and nt.dom2md.js: Markdown to editable DOM and editable DOM back to Markdown.
  • nt.dom2tex.js: editable DOM to TeX-oriented output.
  • nt.init*.js: editor initialization and math setup.
  • nt.math_switch.js, nt.katex_auto_num.js: math preview/editing and numbering helpers.
  • nt.key*.js: editor keyboard behavior.
  • nt.composition*.js: composition-event handling across browsers.
  • nt.dom_operation.js, nt.dom_finder.js, nt.finder.js: DOM editing and lookup helpers.
  • nt.copy_paste.js, nt.select_table.js: interaction-specific editing helpers.

Patch cdn/editor/src/*.js first and rebuild cdn/editor/nowtype.min.js with cd cdn/editor && npm run minify-dev.

PDF And Book Export Helpers

  • scripts/export-nowtype-pdf.js: browser-driven export through the Nowtype PDF surface.
  • scripts/export-site-book-pdf.js: full-book browser exporter.
  • scripts/book-pdf/browser-page-builder.js: browser page-planning and book export composition helpers.
  • scripts/book-pdf/browser-book.css: print/book export CSS.
  • scripts/nowtype-pdf-smoke.js and scripts/capture-nowtype-pdf-pages.js: PDF smoke and screenshot capture harnesses.

Documentation Rules

  • Keep Hugo render hooks and shortcodes as the render authority.
  • Keep JavaScript modules as hydration, editing, preview, and export helpers.
  • Keep browser PDF composition documented separately from Hugo page rendering.