mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 14:30:24 +00:00
Adds a unified export pipeline under src/export/ with exporters for single notes,
structured hexes, maps (with reference table), random tables, and workflows
(with rolled samples). PDF rendering reuses Obsidian's MarkdownRenderer + theme
CSS; map PNG/PDF goes through a dedicated canvas renderer.
UI surface:
- "Export" tab in MapModal (PNG/PDF with overlay + size options)
- "Export" link in HexEditorModal + HexExportModal
- "Export PDF/Markdown" links in RandomTableView header
- "Export…" button in WorkflowEditorModal + WorkflowExportModal
- Commands: export current note (PDF/MD), current hex, current workflow
- File-menu items on any .md file: Export to PDF / Markdown
Other:
- New `exportFolder` setting (defaults to {worldFolder}/exports)
- hexGeometry: add hexSize / hexCenter / hexPolygonPoints / gridBoundingBox
- HexTableView + HexEditorModal: first-wins on duplicate palette names
(matches HexMapView's .find() behaviour)
- Tests: unit + integration suites for all exporters; sim-vault fixture
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| dungeons | ||
| factions | ||
| features | ||
| hexes/the-coast | ||
| quests | ||
| regions | ||
| tables | ||
| towns | ||
| workflows | ||
| README.md | ||
sim-vault
Synthetic vault used by the e2e integration tests. Mirrors a realistic Duckmage setup but with deterministic, small content so test assertions are stable.
Layout
sim-vault/
hexes/
the-coast/
0_0.md, 1_0.md, 2_0.md, 0_1.md, 1_1.md, 2_1.md ← 3×2 grid
tables/
forest-encounters.md (d6, weighted)
npc-names.md (d20, plain list)
treasure.md (linkedFolder)
treasure/
gold pile.md
silver ring.md
cursed amulet.md
workflows/
npc-generator.md (table + dice + template)
templates/
npc-template.md
towns/
Saltwatch.md
dungeons/
The Old Spire.md
features/
Standing Stone.md
quests/
Find the Wanderer.md
factions/
The Reach.md (faction-color: #cd5c5c)
regions/
Coastlands.md (region-color: #6e8eb1)
Settings driven from this layout
The MockHexmakerPlugin (tests/helpers/simVault.ts) wires:
hexFolder: "hexes"tablesFolder: "tables"workflowsFolder: "workflows"townsFolder: "towns",dungeonsFolder: "dungeons", etc.regionsFolder: "regions",factionsFolder: "factions"- One map
"the-coast"withgridSize: 3×2, gridOffset: 0,0and the default terrain palette (including a duplicate-"ocean"entry so the palette-collision regression is exercised).
Why fixed file contents
Real vaults change. Committed fixture files keep assertions deterministic and let new contributors inspect exactly what each section/frontmatter looks like.