export interface PartnerPresetComponent { type: string; id?: string; props?: Record; children?: PartnerPresetComponent[]; } export interface PartnerPresetDefinition { components: PartnerPresetComponent[]; structureVersion?: number; colorSpace?: string; devicePreview?: string; } /** * Top-level groupings the dotcom catalogues shaders under. Pass to * `listPresets({ categories })` to narrow the response. Omit to receive every * category. */ export type CollectionCategory = 'background' | 'logo' | 'image-effects'; export interface PartnerCollection { id: string; name: string; slug: string; /** Top-level grouping. Useful when partners want to render section * headings or filter the list further client-side. */ category: CollectionCategory; } export type PartnerPresetLabel = 'gradient' | 'geometric' | 'organic' | 'glowing' | 'textured' | 'retro' | '3d' | 'minimal' | 'vibrant' | 'dark' | 'calm' | 'dramatic'; export interface PartnerKeyPropTarget { component_id: string; prop: string; } export interface PartnerKeyProp { label: string; type: 'color' | 'range' | 'logo'; category?: string; targets: PartnerKeyPropTarget[]; } export interface PartnerPreset { id: string; collection: PartnerCollection | null; definition: PartnerPresetDefinition; thumbnail_url: string | null; visual_description: string | null; primary_colors: string[] | null; color_hex_codes: string[] | null; labels: PartnerPresetLabel[] | null; key_props: PartnerKeyProp[] | null; created_at: string; updated_at: string; } export interface PartnerPagination { page: number; limit: number; total: number; has_more: boolean; } export interface PartnerListPresetsResponse { presets: PartnerPreset[]; pagination: PartnerPagination; } export interface PartnerClientOptions { apiKey: string; baseUrl?: string; } export interface ListPresetsOptions { page?: number; limit?: number; /** * Restrict the response to one or more categories. Omit to receive every * category (the default — what you want for a general-purpose integration). * Supply a subset (e.g. `['logo']`) when the integration only renders one * kind of shader, so you don't pull rows you'll never show. */ categories?: CollectionCategory[]; } export declare class PartnerClient { private readonly apiKey; private readonly baseUrl; private readonly cache; constructor(options: PartnerClientOptions); private getCached; private setCached; listPresets(options?: ListPresetsOptions): Promise; /** * Generate an SDF (signed distance field) `.bin` file from raw SVG content. * Resolves to the file's bytes as a `Uint8Array` — the caller can write it * to disk, upload it to their own CDN, or feed it straight into a shader * component that consumes SDF buffers. * * Backed by the public `/api/plugin/sdf/generate` endpoint, which is shared * with the Framer plugin. The endpoint is anonymous (no API key required); * Vercel-side rate limits apply. Maximum input size: 5 MB of SVG text. * * Not cached — the same SVG fed in twice will round-trip twice. Memoize * upstream if you need to. * * @example * ```ts * const fs = await import('node:fs/promises') * const svg = await fs.readFile('./logo.svg', 'utf8') * const sdf = await client.generateSdf(svg) * await fs.writeFile('./logo.sdf.bin', sdf) * ``` */ generateSdf(svg: string, options?: { timeoutMs?: number; }): Promise; } //# sourceMappingURL=index.d.ts.map