57 std::string_view path);
73 const std::vector<GalleryCard>& cards,
74 const std::function<std::string(
const GalleryCard&)>& png_rel);
82 const std::vector<GalleryCard>& cards,
83 const std::function<std::string(
const GalleryCard&)>& png_rel);
Definition design_adherence.hpp:32
std::optional< GalleryCard > parse_gallery_card(std::string_view file_head, std::string_view path)
Parse the leading magic comments of one source file.
constexpr std::string_view kGalleryFormatVersion
Format id stamped into the manifest JSON; bump on a non-additive shape change.
Definition design_gallery.hpp:35
std::string gallery_content_hash(std::string_view bytes)
Deterministic 64-bit FNV-1a hash (lowercase hex) of a card's source bytes.
void sort_cards(std::vector< GalleryCard > &cards)
Stable order: by group, then by file. The gallery diffs cleanly across passes.
std::string gallery_html(const std::vector< GalleryCard > &cards, const std::function< std::string(const GalleryCard &)> &png_rel)
Self-contained HTML review page: one section per group, each card shown at its declared viewport with...
std::string gallery_manifest_json(const std::vector< GalleryCard > &cards, const std::function< std::string(const GalleryCard &)> &png_rel)
Deterministic JSON manifest: format_version, a total, and one entry per group (sorted,...
constexpr std::string_view kGalleryUngrouped
The group a card falls into when its tag omits group=.
Definition design_gallery.hpp:38
One tagged card discovered by its leading @dsCard magic comment.
Definition design_gallery.hpp:41
int width
viewport width in points (from viewport=WxH)
Definition design_gallery.hpp:44
std::string group
group=<name>; empty tag value -> kGalleryUngrouped
Definition design_gallery.hpp:43
std::string file
path as discovered (relative to the scan root)
Definition design_gallery.hpp:42
bool starting_point
@startingPoint present -> a pulp create --from seed
Definition design_gallery.hpp:46
std::string content_hash
gallery_content_hash() of the source bytes; caller-filled
Definition design_gallery.hpp:47
int height
viewport height in points
Definition design_gallery.hpp:45