igniteui-theming
Version:
A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.
102 lines (101 loc) • 2.59 kB
JavaScript
//#region src/utils/types.ts
/**
* Shared TypeScript types for the MCP server.
*
* This module is the SINGLE SOURCE OF TRUTH for shared types and constants.
* Other modules should import from here rather than redefining types.
*
* IMPORTANT: This module should have NO imports from knowledge/ to avoid
* circular dependencies. Knowledge modules may import from this module.
*/
/**
* Supported target platforms for code generation.
*
* - angular: Ignite UI for Angular (uses igniteui-angular/theming)
* - webcomponents: Ignite UI for Web Components (uses igniteui-theming directly)
* - react: Ignite UI for React (uses igniteui-theming directly)
* - blazor: Ignite UI for Blazor (uses igniteui-theming for Sass compilation)
* - generic: Platform-agnostic output using igniteui-theming directly (no Ignite UI product)
*/
var PLATFORMS = [
"angular",
"webcomponents",
"react",
"blazor",
"generic"
];
/**
* Supported design systems.
*/
var DESIGN_SYSTEMS = [
"material",
"bootstrap",
"fluent",
"indigo"
];
/**
* Supported theme variants.
*/
var VARIANTS = ["light", "dark"];
/**
* Supported elevation presets.
*/
var ELEVATION_PRESETS = ["material", "indigo"];
/**
* Supported output formats for code generation.
*
* - sass: Generates Sass code using the igniteui-theming library functions
* - css: Generates CSS custom properties (variables) directly
*/
var OUTPUT_FORMATS = ["sass", "css"];
/**
* Standard shade levels used in the theming system.
*/
var SHADE_LEVELS = [
"50",
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900"
];
/**
* Accent shade levels (Material Design style).
*/
var ACCENT_SHADE_LEVELS = [
"A100",
"A200",
"A400",
"A700"
];
/**
* All chromatic shade levels (standard + accent).
* Derived from SHADE_LEVELS and ACCENT_SHADE_LEVELS to maintain single source of truth.
*/
var ALL_COLOR_SHADES = [...SHADE_LEVELS, ...ACCENT_SHADE_LEVELS];
/**
* All palette color groups.
* These are the color families that make up a complete palette.
*/
var PALETTE_COLOR_GROUPS = [
"primary",
"secondary",
"gray",
"surface",
"info",
"success",
"warn",
"error"
];
/**
* Chromatic color groups (excludes gray which has different shade handling).
* These groups use 14 shades (50-900, A100-A700).
* Derived from PALETTE_COLOR_GROUPS to maintain single source of truth.
*/
var CHROMATIC_COLOR_GROUPS = PALETTE_COLOR_GROUPS.filter((g) => g !== "gray");
//#endregion
export { ACCENT_SHADE_LEVELS, ALL_COLOR_SHADES, CHROMATIC_COLOR_GROUPS, DESIGN_SYSTEMS, ELEVATION_PRESETS, OUTPUT_FORMATS, PALETTE_COLOR_GROUPS, PLATFORMS, SHADE_LEVELS, VARIANTS };