oberconcejo/VS-CODE / .agents/skills/app-store-screenshots
app-store-screenshots
FlaggedUse when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS, macOS, and/or Android apps, or scaffolding a screenshot editor with Next.js. Triggers on app store, mac app store, play store, screenshots, marketing assets, html-to-image, phone mockup, mac mockup, android screenshots, feature graphic.
template/src/lib/typography.ts
View on GitHubimport type { Slide, SlideTypography } from "./types";
/** Relative scale on layout default font sizes (1 = default). */
export const FONT_SCALE_MIN = 0.5;
export const FONT_SCALE_MAX = 2;
export const FONT_SCALE_DEFAULT = 1;
export function clampFontScale(value: number | undefined): number {
if (typeof value !== "number" || !Number.isFinite(value)) return FONT_SCALE_DEFAULT;
return Math.min(FONT_SCALE_MAX, Math.max(FONT_SCALE_MIN, value));
}
export function slideFontScales(slide: Slide) {
return {
labelScale: clampFontScale(slide.typography?.labelScale),
headlineScale: clampFontScale(slide.typography?.headlineScale),
appNameScale: clampFontScale(slide.typography?.appNameScale),
};
}
/** Persist only non-default scales so JSON stays tidy. Values are clamped
* first, so invalid or out-of-range input from a loaded project never ends up
* stored as a no-op `1` or outside the slider range. */
export function cleanTypography(raw: SlideTypography | undefined): SlideTypography | undefined {
if (!raw || typeof raw !== "object") return undefined;
const out: SlideTypography = {};
for (const key of ["labelScale", "headlineScale", "appNameScale"] as const) {
const value = clampFontScale(raw[key]);
if (value !== FONT_SCALE_DEFAULT) out[key] = value;
}
return Object.keys(out).length > 0 ? out : undefined;
}
/** Font size a free text element renders at when it has no explicit
* `fontSize`. Shared by the canvas and the inspector so the Size control
* always shows what is actually drawn. */
export function defaultTextElementFontSize(cW: number, cH: number): number {
return Math.round(Math.min(cW, cH) * 0.06);
}
/** Sensible Size control range for free text elements, relative to the canvas
* (a 422px watch face and a 3840px TV frame need very different ranges). */
export function textElementFontSizeRange(cW: number, cH: number) {
const unit = Math.min(cW, cH);
return {
min: Math.max(8, Math.round(unit * 0.015)),
max: Math.round(unit * 0.3),
};
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |