Skip to content

Publish slide decks, designs and docs

An artifact document can carry a type. The type tells SupaCloud how the page is built, so the viewer can present a deck slide by slide, show a design as a canvas of artboards, or give a written doc a table of contents. A page without a type stays an ordinary page. An agent sets the type when it publishes the first version with artifact.publish; every later version keeps it.

SupaCloud reads the structure of every new version. When a page breaks its type’s rules, the publication is refused with a list of every problem, so the agent can fix the page and publish again.

A deck is one HTML page. Every slide is a <section data-sc-slide> directly in the page, never inside another slide. A slide may have:

  • an id that starts with a letter and holds only letters, digits, _ or - (at most 128 characters, unique in the deck);
  • a title in data-sc-title; without one, the slide’s first heading is its title;
  • speaker notes in <aside data-sc-notes>;
  • step-in parts marked data-sc-step, at most 100 per slide.

<meta name="supacloud-deck" content="4:3"> sets the aspect ratio: 16:9 (the default), 4:3 or 1:1. A deck has 1 to 300 slides. Comments can point at one slide.

The artifact viewer presenting a slide deck: the slide navigation with the current slide number beside the version picker, and the title slide of a three-slide review deck.The artifact viewer presenting a slide deck: the slide navigation with the current slide number beside the version picker, and the title slide of a three-slide review deck.

The artifact package for local agents writes a deck from a short JSON outline, and checks a page against the same rules before anything is published:

Terminal window
supacloud-render-deck --outline deck.json --output index.html
supacloud-render-deck --check index.html

A design is one canvas of named artboards. Each artboard is a <div data-sc-artboard id="home" data-sc-width="1440" data-sc-height="900">, with an optional title in data-sc-title and an optional position in data-sc-x and data-sc-y. Every artboard needs a unique id, a width and height from 1 to 10000 pixels, and a design holds at most 100 artboards. A comment can point at one artboard; an artboard the version does not have is refused.

A doc is Markdown, or HTML with exactly one <article> whose headings each carry an id. The viewer builds the table of contents from the headings (at most 200).

Workspace members with access to the document, and people holding a share link with the editor role, can edit a Markdown doc in place. Each edit is a new version. If someone else saved a version while you were editing, your edit is refused instead of overwriting theirs; reload the current version and edit again. Commenter, viewer and public links cannot edit.

A page can make its images commentable. Every image people should comment on sits inside ONE element that carries a unique id and data-sc-region:

<span id="capture-a" data-sc-region data-sc-title="Dashboard">
<img src="a.png" alt="Dashboard" />
</span>

The region element wraps the image. A void element never can: <img data-sc-region> is refused, because the comment mark would be appended inside the image and could never be rendered. Neither can an element whose children never render the mark: canvas, video, audio, iframe, textarea, select, svg, and the raw-text elements (script, style, title, noscript, noembed, noframes, plaintext, xmp). picture and an object with fallback content do render the mark. The title is data-sc-title; without one, the alt of the first image inside the region names it. A second copy of the same image (an enlarged view) carries data-sc-region-ref="capture-a" and no id, so one image has one region. A page holds at most 200 regions. The extractor refuses the publication and names every problem: a missing, malformed or duplicate id, a region on a void or unmarkable element, or more than 200 regions.

The screenshot gallery package uses the same contract: each capture is one region region-<key> in the manifest, so a gallery comment stays bound across versions. The optional manifest key (letters, digits, _, -) names that id; without one the id is region-<sha256>. Mark an image "detail": true to put it behind a disclosure, and keep every key unique.

A version can be exported. A deck exports to PDF, to PNG (one slide), to a ZIP of every slide as PNG and to PPTX; a design to PDF, to PNG (one artboard) and to a ZIP of every artboard; a doc or page to PDF, PNG and DOCX, and a Markdown version also to its Markdown source. An agent requests an export with artifact.export.create and reads the result with artifact.export.get, at most 10 exports per task, and downloads the finished file with artifact.version.read.