Skip to content

@farcaster/snap@2.5.0

Choose a tag to compare

@github-actions github-actions released this 07 May 14:41
Immutable release. Only release title and notes can be modified.
e56b2f9

Minor Changes

  • #181 efaf84c Thanks @bob-obringer! - Add shadcn-style media support to Snap item rows.

    Items now accept an optional props.media object that renders in a dedicated left-side media slot while existing children continue to render in the right-side actions slot. Icon media uses { variant: "icon", name, color? }; image media uses { variant: "image", url, alt?, round? }, where round: true renders avatar-style circular image media.

    The snap UI catalog now exposes the expanded item schema through itemProps and itemMediaProps, including the new discriminated media contract. The catalog keeps variant limited 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 by name plus optional palette color, accepts image media by url plus optional alt and round, 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-media app with real image media examples and updates the 2.0 item documentation and machine-readable guidance.

  • #183 511528e Thanks @bob-obringer! - Add cellAspectRatio support to cell_grid.

    cell_grid now accepts cellAspectRatio: "square" to keep each cell square as snap width changes, while preserving the existing rowHeight behavior 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.txt reference material document the new option, and a focused cell-grid-square example app exercises the behavior in the emulator.

  • #178 96ad223 Thanks @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 sm gap when gap is omitted, regardless of whether the content resolves horizontal or vertical. Horizontal button-only stacks use content-proportional widths by default, and equalWidth: true can be set on a horizontal stack to force equal-width children.