v0.2.0
Minor Changes
-
#7
b945ee3Thanks @RostiMelk! - Add per-template import-allowlist extension so brand templates can expose chrome helpers to agent-authored Tier-2 components.Template.additionalImportAllowlist?: ReadonlyArray<string>lets a template opt additional package specifiers into the agent's allowlist on top of the base brand-lock (@sanity-labs/slides,react,zod). The MCP server reads it from the active effective template and threads it into everyslides_add_component/slides_edit_componentcall.slides_list({ detail: "detailed" })surfaces it underadditionalImportsso the agent discovers what extras it can reach for.The primary use case is letting custom slides inherit a template's chrome (e.g. a
<BrandSlide>wrapper that ships the logo + footer + canonical padding) instead of re-rolling layout from primitives every time. Without this, custom slides visually drift from the template's curated slides.SKILL.md v3.3.0 adds the rule with explicit guidance: when a template lists extras, prefer the chrome helpers. The typecheck
AGENT_HINTmentions the mechanism so the agent re-orients after a build failure.API compatibility: additive. Templates that omit the field continue to ship the base brand-lock unchanged.
-
#4
7bcd41eThanks @RostiMelk! - Add flex layout and a brand-locked Tailwind class dialect; migrate both CLI surfaces to oclif.Layout: flex via Yoga.
<Slide>/<Box>/<Text>now acceptclassName(brand-locked Tailwind subset) andstyle(raw Yoga). Layouts compose withflex flex-row gap-6 p-12etc. instead of hand-computed rects.<Box rect={{x,y,w,h}}>stays as an escape hatch for hand-tuned positioning. Box-inside-Box is now legal — nested flex containers are the primary layout pattern.Brand-locked Tailwind dialect. Allowlist-driven resolver: layout primitives (
flex,gap-N,p-N,items-*,justify-*), typography on a fixed scale (text-xs…text-9xl, role tokenstext-display/text-body/text-mono), brand-token colors (bg-<token>,text-<token>for tokens intemplate.colors), brand-token spacing (p-<token>for tokens intemplate.spacing). Unknown classes throwUnknownClassErrorwith suggestion-aware messages.Slide-level fill.
<Slide className="bg-<token>">now emits a full-canvas backing shape behind children; pre-Yoga, brand authors did this by hand with a sentinel<Box rect={{0,0,w,h}}>sibling.Image accepts
className/style. Lets agents size images viaaspect-square/flex-1instead of pinning every Image with rect.border-<token>is rejected. The reconciler doesn't emit border ops yet; rejecting via the standard allowlist error surfaces the limitation instead of silently no-op-ing.CLI: oclif. Both
slidesctl(publishable bin) andpnpm harness(dev-only) migrated from hand-rollednode:utilparseArgs to@oclif/core. Family-standard, declarative flag definitions, per-command--help. Adds@oclif/core ^4.0.0andyoga-layout ^3.2.1as runtime dependencies.SKILL.md v3.2.0. Rewritten to teach the className API end-to-end. New sections: Brand-locked Tailwind dialect, Readability for presentations, AI tells to avoid, Before declaring done. Cross-referenced against Anthropic's PPTX skill, skill-creator meta-skill, and engineering blog on Agent Skills.
Test fixture + scaffold token alignment. Both fixture and
template-basescaffold now ship matching brand tokens (fg-base,fg-muted,bg-surface,surface-elevated,accent) so the SKILL's canonical Traction example renders cleanly out of the box.API compatibility: additive. Existing rect-based components keep rendering; the rect path is exercised end-to-end by
verify-bins.sh. The<Box>and<Image>rectfield is now optional (was required for<Box>, still required-or-className for<Image>).