@tageery/theme-sdk
v1.0.2
Published
TypeScript types and helpers for building standalone Tageery themes
Maintainers
Readme
@tageery/theme-sdk
TypeScript types and helpers for building standalone Tageery themes outside the main platform repo.
This package provides:
- Ambient type declarations for platform imports used in themes:
next/link,next/image,next/navigationlucide-react@/components/ui/*@/lib/theme-config@/lib/platform-components
- Shared theme types you can import directly:
AppearanceSettingsStoreData
Installation
pnpm add -D @tageery/theme-sdk
# or
npm install -D @tageery/theme-sdk
# or
yarn add -D @tageery/theme-sdkUsage
1. Enable types via tsconfig
In your theme project tsconfig.json:
{
"compilerOptions": {
"types": ["react", "react-dom", "@tageery/theme-sdk"]
}
}This will make all the platform imports and types available across your theme.
2. Import shared theme types
import type { AppearanceSettings, StoreData } from "@tageery/theme-sdk";
type LayoutProps = {
store: StoreData;
appearance: AppearanceSettings;
};3. Using with Tageery CLI
When you scaffold a theme using @tageery/cli, the CLI can:
- Set up
tsconfig.jsonwith@tageery/theme-sdkincompilerOptions.types. - Add
@tageery/theme-sdkas a devDependency in your themepackage.json.
This gives you zero-config TypeScript support when developing themes locally.
