- "## extract_styleguide\n\n`client.style.extractStyleguide(directUrl?: string, domain?: string, prioritize?: 'speed' | 'quality', timeoutMS?: number): { code?: number; domain?: string; status?: string; styleguide?: object; }`\n\n**get** `/brand/styleguide`\n\nAutomatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components. Either 'domain' or 'directUrl' must be provided as a query parameter, but not both.\n\n### Parameters\n\n- `directUrl?: string`\n A specific URL to fetch the styleguide from directly, bypassing domain resolution (e.g., 'https://example.com/design-system').\n\n- `domain?: string`\n Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated.\n\n- `prioritize?: 'speed' | 'quality'`\n Optional parameter to prioritize screenshot capture for styleguide extraction. If 'speed', optimizes for faster capture with basic quality. If 'quality', optimizes for higher quality with longer wait times. Defaults to 'quality' if not provided.\n\n- `timeoutMS?: number`\n Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).\n\n### Returns\n\n- `{ code?: number; domain?: string; status?: string; styleguide?: { colors?: { accent?: string; background?: string; text?: string; }; components?: { button?: object; card?: object; }; elementSpacing?: { lg?: string; md?: string; sm?: string; xl?: string; xs?: string; }; mode?: 'light' | 'dark'; shadows?: { inner?: string; lg?: string; md?: string; sm?: string; xl?: string; }; typography?: { headings?: object; p?: object; }; }; }`\n\n - `code?: number`\n - `domain?: string`\n - `status?: string`\n - `styleguide?: { colors?: { accent?: string; background?: string; text?: string; }; components?: { button?: { link?: { backgroundColor?: string; borderColor?: string; borderRadius?: string; borderStyle?: string; borderWidth?: string; boxShadow?: string; color?: string; fontSize?: string; fontWeight?: number; padding?: string; textDecoration?: string; }; primary?: { backgroundColor?: string; borderColor?: string; borderRadius?: string; borderStyle?: string; borderWidth?: string; boxShadow?: string; color?: string; fontSize?: string; fontWeight?: number; padding?: string; textDecoration?: string; }; secondary?: { backgroundColor?: string; borderColor?: string; borderRadius?: string; borderStyle?: string; borderWidth?: string; boxShadow?: string; color?: string; fontSize?: string; fontWeight?: number; padding?: string; textDecoration?: string; }; }; card?: { backgroundColor?: string; borderColor?: string; borderRadius?: string; borderStyle?: string; borderWidth?: string; boxShadow?: string; padding?: string; textColor?: string; }; }; elementSpacing?: { lg?: string; md?: string; sm?: string; xl?: string; xs?: string; }; mode?: 'light' | 'dark'; shadows?: { inner?: string; lg?: string; md?: string; sm?: string; xl?: string; }; typography?: { headings?: { h1?: { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; }; h2?: { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; }; h3?: { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; }; h4?: { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; }; }; p?: { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; }; }; }`\n\n### Example\n\n```typescript\nimport ContextDev from 'context.dev';\n\nconst client = new ContextDev();\n\nconst response = await client.style.extractStyleguide();\n\nconsole.log(response);\n```",
0 commit comments