@braevi/theme-sdk
v0.1.2
Published
Typed helpers for authoring Braevi declarative storefront themes
Readme
@braevi/theme-sdk
Typed helpers for building declarative Braevi theme JSON from a local theme.ts file.
import { defineTheme, defineTemplate, section } from "@braevi/theme-sdk";
export default defineTheme({
key: "studio-one",
name: "Studio One",
version: "0.1.0",
tokens: {
colors: {
brand: "#264653",
accent: "#E76F51",
},
layout: {
container: "78rem",
},
},
templates: {
home: defineTemplate("home", [
section("hero-banner", { heading: "Made for everyday life", ctaLabel: "Shop products" }),
section("product-grid", { heading: "Latest products", limit: 8 }),
]),
catalogue: defineTemplate("catalogue", [
section("product-grid", { heading: "Products", limit: 24 }),
]),
product: defineTemplate("product", [
section("product-information", {}),
]),
collection: defineTemplate("collection", [
section("main-collection", {}),
]),
cart: defineTemplate("cart", [
section("cart-summary", {}),
]),
},
});The SDK creates data only. It does not expose React, Puck, Liquid, arbitrary HTML, JavaScript, Prisma, API clients, or merchant records.
Use tokens for typed colors, typography, spacing, radii, buttons, and layout defaults. Use the CLI-managed styles/theme.css file for optional scoped presentation CSS; the uploaded import path never evaluates developer TypeScript or raw CSS.
