Repository navigation
Add components, templates, and slide libraries - #35
ryanrhughes wants to merge 16 commits into
Conversation
Slides can now be composed from MDX-style components written in the slide's Markdown: rows, grids, cards, stats, charts, Gantt roadmaps, timelines, steps, cycles, funnels, Venn diagrams, org trees, logo walls, split panels, QR codes and more, with Lucide icons. Everything stays editable text, follows the theme, fits itself to the slide, and exports sharp to PDF and PowerPoint. `hype check` names unknown components, props, colors, icons and images with suggestions, and `hype help components` prints the reference agents work from. Any presentation can be a template. `template:` names a template in templates/ beside the deck, in the library at ~/.local/share/hype/templates/, or one Hype ships (omarchy), or a folder or .md file. A template brings its front matter, its <Define> components, its fonts and images, and may build on a template of its own. <Define> works on any slide of any deck. `theme: current` follows the desktop's Omarchy theme live. A template's slides are a library: grouped into sections with <!-- hype: section="…" -->, they can be searched and added one at a time or a section at once from the editor (Ctrl+Shift+Enter), or printed with `hype template slides`. `hype templates` and `hype template save|remove` manage the library; the editor's palette button picks a template or theme, and File › Save as template… links or copies the open deck into the library. Google Fonts named by a deck download on first use. Every component takes font, bold and bold-tone. Gradient text keeps its colors in PDF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in 0.5.0 and 0.6.0: presenter mode, placed images, inline SVG, Markdown tables, theme colour parsing, and faster slide navigation. Placed images and the media layouts (title, split, caption, gallery) now exclude each other, and a layout on a placed image is an error. Caption tables keep equal, unruled columns under the new table style. Template and font changes notify selection listeners like every other change. The branch's changed lines are formatted with .clang-format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Bug: On a composed slide, a live Cause: Markdown media slides repaint text via the Patch: Paint a real overlay for composed slides (skip
Happy to open a PR against this branch if useful. |
|
Suggestion: Composed Right now Patch: Add a
Happy to open a PR against this branch or #40 if useful. |
A slide that names a component, prop or slot the template in use lacks, but that another template within reach defines, no longer fails. The component's content is drawn without it, the prop is left out, and the slot's content joins the rest. `hype check` reports each as a warning in place of an error, and no error band is drawn over the slide. A name no template has is still an error, so slips stay loud. Color words work the same way: `coral`, `teal`, or any web color name the palette has no color for draws as the palette's nearest color by hue, so a slide keeps its colors when its presentation moves to another template. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`hype render` takes `--format png|webp|jpg` and `--quality`, and a directory of slides can be written in any of them. A photograph-heavy slide is a fraction of its PNG's size as WebP. `hype batch` reads render and check requests from standard input, one JSON object a line, and answers each on a line of its own. A server keeps one engine running, with its fonts and pictures loaded, instead of starting a process for every slide. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`groups="lanes"` gives each group a band named in a column on the left, and puts bars that do not overlap on one row, so a lane is as tall as its busiest stretch. Names sit inside their bars, on two lines where one is too long, and the lanes share whatever room the chart is given. An End of `→` runs a bar to the end of the chart and points it onward; `Sep →` ends in September and points onward too. `periods` names spans of the axis in place of months or numbers, each closed by a dotted line, and `axis="bottom"` puts the axis under the plot. `radius` squares the bars, `lane-width` and `lane-fill` set the column of names, and `label-tone` gives the names in every bar one color. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings in 0.7.0 and 0.7.1: the CMake build, the translated window, a video player loaded with the first video slide, new presentations in the desktop's theme, safer render output, and Ctrl+Q. The build's additions move to CMakeLists.txt: Qt Network, and qrcodegen.c with the C compiler. The window's new text (the Look picker, template slides, Save as template, Google Fonts, the media layouts) is wrapped for translation and listed in en.json, and "Theme: %1" leaves with the theme picker the Look button replaced. What the component engine, templates and fonts report from C++ is still English only. Theme colors are read by master's readThemeColors, and choosing the desktop theme still keeps its colors out of the file. Thumbnails are keyed by the window's language, as master's are. Pictures in every format are written beside their target and renamed over, as master's PNG is, and `hype batch` refuses to render over the presentation itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
[High impact] The latest changes appear safe to merge. SummaryThis PR adds designed slide components, reusable templates, slide libraries, and Google Fonts support.
Reviews (7) · Last reviewed commit: "Keep a found video by all its slide is l..." · Reviewed by Greptile |
fc-match answers with its nearest font when a family is missing. On a machine with Noto fonts and no Liberation, as CI is, the stand-in for Google Fonts handed out a Noto file under Liberation's name, so the family the test asked for never loaded and `hype fonts` failed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Saving a template over another builds the new one first and swaps it in only when it is whole, so a replacement that fails (one that would build on itself, say) leaves the template it would have replaced. A picture or font that cannot be copied fails the save. A slot closed on its opening line no longer swallows the line after it. Definitions and vocabularies asked for again stay among the recent ones kept, and a presentation checks that its own are still held before it reuses a cached palette, so looking at many templates cannot leave an open presentation without its components. Save As takes the presentation's fonts/ and templates/ along with its pictures and videos. A gallery redraws when any of its pictures changes. Placing an image drops its layout, which a placed image cannot have. The Google Fonts list is fetched without holding the lock the window reads the cached list under, so a slow connection no longer stops the editor. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Template saves of one name take turns, across processes, and each makes its new entry under a name of its own. A save that stopped half-way is put right by the next: the template it had set aside takes its name back, and what it had half made is cleared away. An export worker is handed the vocabulary its palette names, as it is handed the template's text, so it keeps the snapshot the editor gave it instead of reading the look again from disk. A font download that needs the Google Fonts list while it is being fetched waits for it, rather than going on without the family's weights. The window searches the list it has and never asks for one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A <Video> that a <Define> brings is the slide's video: the slide is laid out to find it, so the editor plays it and PowerPoint embeds it, where before only a video written on the slide itself was found. Whatever a component layout sets over its video stays over it while it plays. The slide is drawn again with the video cut out of it, keeping only the video's own box, and that picture is laid over the player in the window and over the movie in PowerPoint. This follows a report and a patch from Joshua Goossen on the pull request. PowerPoint is told where a video sits in the title, split and caption layouts, as it is for a component layout, so the movie no longer plays across the text beside it. A plain  slide finds its picture in the template's images when the presentation has none of that name, as components do, so a slide copied from a template keeps its picture. Videos still play only from the presentation's own folder. The definitions a presentation draws with, and those of the template previews it has handed to the window, are held past the limit on how many are kept, until the presentation closes or the preview is remade. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A definition may write the page or the title into its video's props, so the cache of videos found by laying slides out is keyed by them too: two slides that read alike no longer share the first one's clip. The window watches the pictures a presentation takes from its template, those in the template's images and any deeper one a plain slide names, so a picture changed there redraws the slide that shows it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The editor kept one slide's media for as long as the slide's text and template stayed the same, so moving between two slides that read alike, whose definition names its video by the page, kept playing the first one's clip. The page is part of what it keeps the media by. A picture kept deep in the template's folders is watched once a slide names it. The watches now catch up half a second after an edit, so one named after the presentation was opened is watched too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The video a slide's components bring was kept by the slide's text, its template's definitions, and its page and title. A slide is laid out with more than that: the frame the presentation names wraps it and may bring the video, and what other templates define decides what is drawn through. The cache is keyed by the whole palette, as the cache of a slide's pictures is, and the editor keeps a slide's media by its definitions and the count of pages too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Hype can now build designed slides, not just text and pictures. Slides are composed from components written in the slide's Markdown. Brands live in templates, and any presentation can be a template. A template's slides become a library you can pull from.
Components
Row,Column,Grid,Split/Panel,Background,PlaceCard,Stat,List,Tags,Pill,Callout,Quote,Table,Image,Person,Logos,Video,Collage,QRChart,Gantt,Timeline,Steps,Cycle,Funnel,Venn,Tree,Progresshype icons <word>).hype checkwarns below 16px.hype checknames unknown components, props, colors, icons and images, with suggestions.hype help componentsprints the reference agents work from.font,boldandbold-tone(the color of bold words). Gradient text (tone="gradient"or two colors) keeps its colors in PDF.layout=title,split,captionandcaption-right, galleries and word clouds. All are in the editor's Layout menu.Fonts
~/.local/share/hype/fonts/.hype fonts <deck>shows where each font comes from.hype fonts add <family> --into <deck>bundles a font with a deck, andhype fonts searchsearches the catalog.HYPE_FONT_DOWNLOADS=0turns downloads off.Templates
template:names a template beside the deck (templates/acme/), in the library (~/.local/share/hype/templates/), a built-in one, or a folder or.mdfile.framedrawn on every slide. Its<Define>blocks become components, and itsfonts/andimages/come along.<Define>works on any slide of any deck, so a deck can grow its own components.theme: currentfollows the desktop's Omarchy theme as it changes.omarchy: the desktop's colors, JetBrains Mono, and Hyprland-style tiles.hype templates,hype template save <deck> [--copy]andhype template remove <name>manage the library. A saved template is a link that follows the deck, or a frozen copy.Slide libraries
<!-- hype: section="…" -->groups them, for example one section per case study.hype template slides <template> [n]lists the slides or prints one, for agents.Editor
Agents
hype skillgains a "Designed decks" workflow: read the template, plan the arc, build in passes,hype check, render and look.Merge with master
.clang-format.Validation
bold-tone, and PDF gradient textexamples/showcase/is a 16-slide deck built on a sample template, using most components.Notes for review
src/icons-LICENSE.txt) and Nayuki's QR Code generator (MIT,src/qrcodegen.*, left unformatted).fonts.google.comandfonts.googleapis.comonly when a deck names a font that isn't installed.icons.tsvis 2,100.src/blocks.cpp,layout.cppanddiagrams.cppare the engine;templates.cppis the library.🤖 Generated with Claude Code