Releases: farcasterxyz/snap
Release list
@farcaster/snap@2.6.1
Patch Changes
-
#192
b06b0abThanks @bob-obringer! - Stop clamping v2 text to one line by default.Text now renders unclamped when
maxLinesis omitted in both React and React Native renderers.text.props.maxLinesremains the explicit opt-in API for bounding visible lines.
@farcaster/snap@2.6.0
Minor Changes
-
#189
3cce263Thanks @bob-obringer! - Add v2 Snap component improvements for height-conscious layouts and richer media.This release adds a v2-only
paginatorcomponent for client-local page navigation. Paginators render one child page at a time, support optional built-in previous/next controls and indicators, supportcontrolsPosition: "top" | "bottom"for placing the built-in pagination bar, support author-controlledtransition: "slide" | "fade" | "scale" | "none"page-change animations, and keep the active page entirely in json-render local UI state so paginator movement is never included in POST inputs. Custom controls can bind normalon.pressfrontend actions withpaginator_next,paginator_prev, orpaginator_go_to. For this release, a rendered snap supports one paginator, and paginator controls may live anywhere in the same snap.Images now support
aspect: "4:1"for compact banners, plus optionaltitleandsubtitleoverlay props. These image overlay props are the intended abstraction for hero-like visuals in this pass; no separateherocomponent was added.The v2 renderers now support more compact vertical layouts: buttons are shorter, default stack spacing and text line height are tighter, and text defaults to one visible line unless
maxLinesis provided.text.props.maxLinesallows longer copy to opt into a bounded number of rendered lines.cell_gridnow supportscellAspectRatio: "square"plus tokenizedmaxWidth: "sm" | "md" | "lg"sizing.smandmdrender centered constrained square grids for small board-like layouts, whilelgand omittedmaxWidthpreserve the default full-width behavior.React Native
SnapCardnow supports host-controlled expansion withforceExpanded,expandButtonLabel, andonExpandPress. Hosts can keep inline feed embeds clipped at 500px, intercept the collapsed expand button, portal the same snap into an expanded surface, and render it without clipping or Show more / Show less controls. Existing internal Show more / Show less behavior remains the default.The docs, llms guidance, catalog descriptions, validation tests, and example snaps were updated to cover paginator behavior, image overlays, compact text/layout rules, and centered square grid sizing.
@farcaster/snap-turso@2.0.14
Patch Changes
- Updated dependencies [
b06b0ab]:- @farcaster/snap@2.6.1
@farcaster/snap-turso@2.0.13
Patch Changes
- Updated dependencies [
3cce263]:- @farcaster/snap@2.6.0
@farcaster/snap-hono@2.1.7
Patch Changes
- Updated dependencies [
b06b0ab]:- @farcaster/snap@2.6.1
@farcaster/snap-hono@2.1.6
Patch Changes
- Updated dependencies [
3cce263]:- @farcaster/snap@2.6.0
@farcaster/snap@2.5.1
Patch Changes
-
#184
5db6204Thanks @bob-obringer! - Add cell_grid textColor overridecell_grid cells now accept an optional textColor field alongside color. textColor accepts the same palette color names and #rrggbb hex values as cell fill colors, and it is intentionally an override only: when textColor is omitted, web and native renderers keep using the existing auto-contrast text color derived from each cell background.
The React web and React Native cell_grid renderers both resolve textColor through their existing palette/hex color resolvers before falling back to readableTextOnHex for colored cells and the normal theme text color for uncolored cells. This preserves existing snaps while giving games, pixel art, and board UIs a precise per-cell label color control.
Docs, llms.txt, catalog text, schema validation tests, and a cell-grid-text-color example were added to cover the new catalog surface.
@farcaster/snap-turso@2.0.12
Patch Changes
- Updated dependencies [
5db6204]:- @farcaster/snap@2.5.1
@farcaster/snap-hono@2.1.5
Patch Changes
- Updated dependencies [
5db6204]:- @farcaster/snap@2.5.1
@farcaster/snap@2.5.0
Minor Changes
-
#181
efaf84cThanks @bob-obringer! - Add shadcn-style media support to Snapitemrows.Items now accept an optional
props.mediaobject that renders in a dedicated left-side media slot while existingchildrencontinue to render in the right-side actions slot. Icon media uses{ variant: "icon", name, color? }; image media uses{ variant: "image", url, alt?, round? }, whereround: truerenders avatar-style circular image media.The snap UI catalog now exposes the expanded
itemschema throughitemPropsanditemMediaProps, including the new discriminatedmediacontract. The catalog keepsvariantlimited to"default"and does not add item sizes or media sizes, so clients continue to own the exact rendered dimensions. Catalog validation accepts icon media bynameplus optional palettecolor, accepts image media byurlplus optionalaltandround, and rejects unsupported media fields.The React and React Native renderers now support this item media slot, keep media and trailing actions vertically centered in compact rows, use smaller subtitle text for item descriptions, and remove horizontal row padding for plain lists while preserving modest inset for bordered item groups. Image media URLs are validated with the same HTTPS and loopback development rules as regular image elements.
This also adds a runnable
examples/item-mediaapp with real image media examples and updates the 2.0 item documentation and machine-readable guidance. -
#183
511528eThanks @bob-obringer! - AddcellAspectRatiosupport tocell_grid.cell_gridnow acceptscellAspectRatio: "square"to keep each cell square as snap width changes, while preserving the existingrowHeightbehavior by default. This makes board-style snaps such as Minesweeper render with stable cell geometry across client widths.The React, React Native, static HTML, and OG image renderers now honor square grid cells. The 2.0 docs, agent-facing skill text, and
llms.txtreference material document the new option, and a focusedcell-grid-squareexample app exercises the behavior in the emulator. -
#178
96ad223Thanks @bob-obringer! - Infer button-only stack and toggle group orientation from visible label content in the React and React Native components. The components render horizontally only when total visible label text fits these limits: 2 controls <= 20 chars, 3 controls <= 15 chars, 4 controls <= 11 chars, and 5 controls <= 8 chars. Six controls, or any button/toggle set over its limit, renders vertically.Button-only stacks now default to the
smgap whengapis omitted, regardless of whether the content resolves horizontal or vertical. Horizontal button-only stacks use content-proportional widths by default, andequalWidth: truecan be set on a horizontal stack to force equal-width children.