scmJS docs

Repository layout

The repository is laid out like this:

src/
  atoms/        Jotai state: the document and its undo history, UI state, the dialog stack, preferences
  editor/       The edits: invertible change lists per layer, placement checks, settings transactions,
                save planning, validation, find, statistics
  data/         Reference tables (tilesets, players, units, upgrades, techs, trigger definitions) and
                the names read out of the loaded game data
  gamedata/     Where the game files come from: the resolver, the browser's stored copies, extraction,
                the desktop bridge's types, data sets
  formats/
    chk/        The scenario: container reader, section registry, typed section codecs, new maps
    mpq/        .scm/.scx open and save on top of mopaq
    tileset/    Tileset decoding, the megatile atlas, the terrain catalogue, palette cycling
    dat/        units/flingy/sprites/images.dat, .tbl, GRP, PCX, .lo and iscript decoders
    units/      Unit tables, lazy sprite loading, the frame cache, team colours, the animator
    triggers/   The text trigger format (TrigEdit syntax)
  plugins/      The plugin API (the contract), host, loader, defaults, registry
  services/     File pickers and saving, image export, the startup preload, Test Map, data-set switching
  hooks/        The React side of the tools, file actions, hotkeys, plugins, updates
  components/
    chrome/     Menu bar, toolbar, status bar, toasts
    panels/     Left dock (layers and palettes), right dock (minimap, layers, properties), plugin panels
    viewport/   The map canvas: its draw passes, the drags, the context menu, the corner chips
    dialogs/    Every dialog, and the registry that lazy-loads them
    splash/     The splash screen
    ui/         Primitives: buttons, inputs, lists, tabs, the dialog frame
  styles/       Plain CSS, imported in order: tokens → base → ui → chrome → panels → viewport → dialogs → splash
desktop/        The Electron shell: main process, preload bridge, updater
scripts/        Extraction, vendoring, the desktop and docs builds, plugin typings, screenshots
tests/          vitest suites; tests/maps holds the maps they open, made by tests/support
e2e/            Browser tests: Playwright specs that drive the built editor
docs/           These documents, the release notes, the guide's pictures
docker/         The container image
plugins/        Generated: the default plugins' source at their pinned versions (gitignored)
public/         Generated: the extracted game data (gitignored except its README and the icons)
fixtures/       Blizzard maps and archives used by tests (gitignored)
plugin-api/     Generated: the bundled plugin typings (gitignored)