igniteui-theming 25.2.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/components/bootstrap.json +1 -1
- package/dist/json/components/fluent.json +1 -1
- package/dist/json/components/indigo.json +1 -1
- package/dist/json/components/material.json +1 -1
- package/dist/json/components/themes.json +42 -32
- package/dist/mcp/generators/css.js +6 -5
- package/dist/mcp/generators/sass.js +7 -6
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/knowledge/component-metadata.d.ts +20 -19
- package/dist/mcp/knowledge/component-metadata.js +102 -67
- package/dist/mcp/knowledge/component-search.d.ts +18 -0
- package/dist/mcp/knowledge/component-search.js +144 -0
- package/dist/mcp/knowledge/component-themes.js +8 -4
- package/dist/mcp/knowledge/index.d.ts +2 -1
- package/dist/mcp/knowledge/index.js +3 -2
- package/dist/mcp/theming/dist/json/components/themes.js +37 -15
- package/dist/mcp/tools/descriptions.d.ts +12 -10
- package/dist/mcp/tools/descriptions.js +91 -26
- package/dist/mcp/tools/handlers/component-theme.js +25 -6
- package/dist/mcp/tools/handlers/component-tokens.js +60 -84
- package/dist/mcp/tools/handlers/custom-palette.js +2 -1
- package/dist/mcp/tools/handlers/elevations.js +2 -0
- package/dist/mcp/tools/handlers/layout.js +1 -0
- package/dist/mcp/tools/handlers/palette.js +2 -0
- package/dist/mcp/tools/handlers/theme.js +2 -0
- package/dist/mcp/tools/handlers/typography.js +2 -0
- package/dist/mcp/tools/schemas.d.ts +6 -6
- package/dist/mcp/utils/sass.d.ts +5 -1
- package/dist/mcp/utils/sass.js +8 -4
- package/package.json +1 -1
- package/sass/themes/components/chat/_chat-theme.scss +31 -13
- package/sass/themes/components/grid/_grid-theme.scss +11 -15
- package/sass/themes/components/progress/_circular-theme.scss +3 -3
- package/sass/themes/schemas/components/dark/_progress.scss +4 -4
- package/sass/themes/schemas/components/light/_chat.scss +50 -4
- package/sass/themes/schemas/components/light/_progress.scss +4 -4
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
import { getComponentSelector, getCompoundComponentInfo, getTokenDerivationsForChild, getVariants, hasVariants, isCompoundComponent } from "../../knowledge/component-metadata.js";
|
|
1
|
+
import { COMPONENT_METADATA, getComponentSelector, getCompoundComponentInfo, getTokenDerivationsForChild, getVariants, hasVariants, isCompoundComponent } from "../../knowledge/component-metadata.js";
|
|
2
2
|
import { COMPONENT_NAMES, resolveComponentTheme, searchComponents } from "../../knowledge/component-themes.js";
|
|
3
3
|
import "../../knowledge/index.js";
|
|
4
4
|
//#region src/tools/handlers/component-tokens.ts
|
|
5
5
|
async function handleGetComponentDesignTokens(params) {
|
|
6
6
|
const { component } = params;
|
|
7
7
|
const normalizedName = component.toLowerCase().trim();
|
|
8
|
-
const formatSelectorList = (selectors) => {
|
|
9
|
-
if (!selectors || selectors.length === 0) return "N/A";
|
|
10
|
-
return `\`${Array.isArray(selectors) ? selectors.join(" | ") : selectors}\``;
|
|
11
|
-
};
|
|
12
|
-
const getScopeSelectorForPlatform = (compoundInfo, componentName, scopeName, platform) => {
|
|
13
|
-
const selectorPlatform = platform === "angular" ? "angular" : "webcomponents";
|
|
14
|
-
if (scopeName === "inline") {
|
|
15
|
-
const selectors = getComponentSelector(componentName, platform);
|
|
16
|
-
return formatSelectorList(selectors.length > 0 ? selectors.length === 1 ? selectors[0] : selectors : null);
|
|
17
|
-
}
|
|
18
|
-
const scope = compoundInfo.additionalScopes?.[scopeName];
|
|
19
|
-
if (!scope) return "N/A";
|
|
20
|
-
return formatSelectorList(scope[selectorPlatform]);
|
|
21
|
-
};
|
|
22
|
-
const resolveChildScopeName = (compoundInfo, childThemeName, platform) => {
|
|
23
|
-
const scopePlatform = platform === "angular" ? "angular" : "webcomponents";
|
|
24
|
-
return (compoundInfo?.childScopes?.[childThemeName])?.[scopePlatform] ?? "inline";
|
|
25
|
-
};
|
|
26
8
|
const resolution = resolveComponentTheme(normalizedName);
|
|
27
9
|
const theme = resolution?.theme;
|
|
28
10
|
if (!theme) {
|
|
@@ -49,27 +31,15 @@ ${suggestions.length === 0 ? `\nTotal available: ${COMPONENT_NAMES.length} compo
|
|
|
49
31
|
**Tip:** For button variants, use specific names like "flat-button", "contained-button", "outlined-button", or "fab-button".`
|
|
50
32
|
}] };
|
|
51
33
|
}
|
|
52
|
-
const PLATFORM_GROUPS = [
|
|
53
|
-
{
|
|
54
|
-
label: "Angular",
|
|
55
|
-
platform: "angular"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: "Web Components",
|
|
59
|
-
platform: "webcomponents"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "Blazor",
|
|
63
|
-
platform: "blazor"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: "React",
|
|
67
|
-
platform: "react"
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
34
|
const responseParts = [];
|
|
71
35
|
responseParts.push(`Implement a theme for the \`${normalizedName}\` component using the following guidance.`);
|
|
72
36
|
responseParts.push("");
|
|
37
|
+
const metadata = COMPONENT_METADATA[normalizedName];
|
|
38
|
+
if (metadata?.childOf) {
|
|
39
|
+
const parentName = metadata.childOf;
|
|
40
|
+
responseParts.push(`**Note:** \`${normalizedName}\` is a child of the \`${parentName}\` component. Its styling is controlled through the \`${parentName}\` theme — all tokens below apply at the ${parentName} level.`);
|
|
41
|
+
responseParts.push("");
|
|
42
|
+
}
|
|
73
43
|
responseParts.push(`**Theme Function:** \`${theme.themeFunctionName}()\``);
|
|
74
44
|
responseParts.push("");
|
|
75
45
|
if (hasVariants(normalizedName)) {
|
|
@@ -80,41 +50,60 @@ ${suggestions.length === 0 ? `\nTotal available: ${COMPONENT_NAMES.length} compo
|
|
|
80
50
|
responseParts.push("Consider using the specific variant theme for more targeted styling.");
|
|
81
51
|
responseParts.push("");
|
|
82
52
|
}
|
|
53
|
+
const primaryNames = new Set((theme.primaryTokens ?? []).map((pt) => pt.name));
|
|
54
|
+
if (theme.primaryTokens && theme.primaryTokens.length > 0) {
|
|
55
|
+
responseParts.push("**✅ Primary Tokens — USE THESE:**");
|
|
56
|
+
responseParts.push("");
|
|
57
|
+
responseParts.push("Use ONLY these tokens when creating the initial theme. The framework auto-derives all other tokens from these.");
|
|
58
|
+
responseParts.push("");
|
|
59
|
+
responseParts.push("| Token Name | Type | Description |");
|
|
60
|
+
responseParts.push("|------------|------|-------------|");
|
|
61
|
+
for (const token of theme.tokens) if (primaryNames.has(token.name)) {
|
|
62
|
+
const cleanDesc = token.description.replace(/\s+/g, " ").trim();
|
|
63
|
+
responseParts.push(`| \`${token.name}\` | ${token.type} | ${cleanDesc} |`);
|
|
64
|
+
}
|
|
65
|
+
if (theme.primaryTokensSummary) {
|
|
66
|
+
responseParts.push("");
|
|
67
|
+
responseParts.push(theme.primaryTokensSummary);
|
|
68
|
+
}
|
|
69
|
+
responseParts.push("");
|
|
70
|
+
}
|
|
83
71
|
if (isCompoundComponent(normalizedName)) {
|
|
84
72
|
const compoundInfo = getCompoundComponentInfo(normalizedName);
|
|
85
|
-
if (compoundInfo) {
|
|
86
|
-
responseParts.push("**Compound Component:**");
|
|
73
|
+
if (compoundInfo) if (compoundInfo.composed) {
|
|
74
|
+
responseParts.push("**Composed Compound Component:**");
|
|
87
75
|
responseParts.push(compoundInfo.description);
|
|
88
76
|
responseParts.push("");
|
|
89
|
-
responseParts.push("**
|
|
90
|
-
responseParts.push("1. Choose your platform and use the matching scopes below.");
|
|
91
|
-
responseParts.push("2. For each related theme: call `get_component_design_tokens`, then `create_component_theme` using the selector for that platform scope.");
|
|
92
|
-
responseParts.push("3. Apply `@include tokens(child-theme(...))` inside the scope selector.");
|
|
77
|
+
responseParts.push("⚡ **This is a composed component.** The framework automatically generates internal derived themes for all child components from the PRIMARY tokens. **Do NOT create separate themes** for the related components listed below — unless instructed otherwise by the user.");
|
|
93
78
|
responseParts.push("");
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
scopeName,
|
|
100
|
-
selectorText: getScopeSelectorForPlatform(compoundInfo, normalizedName, scopeName, group.platform)
|
|
101
|
-
};
|
|
102
|
-
}).filter((row) => row.selectorText !== "N/A");
|
|
103
|
-
if (scopeRows.length > 0) {
|
|
104
|
-
responseParts.push("| Scope | Selector |");
|
|
105
|
-
responseParts.push("| --- | --- |");
|
|
106
|
-
responseParts.push(scopeRows.map((row) => `| ${row.scopeName} | ${row.selectorText} |`).join("\n"));
|
|
107
|
-
responseParts.push("");
|
|
108
|
-
}
|
|
109
|
-
responseParts.push(`**Related themes (${group.label})**`);
|
|
110
|
-
responseParts.push("| Theme | Scope | Selector |");
|
|
111
|
-
responseParts.push("| --- | --- | --- |");
|
|
112
|
-
responseParts.push(compoundInfo.relatedThemes.map((relatedTheme) => {
|
|
113
|
-
const scopeName = resolveChildScopeName(compoundInfo, relatedTheme, group.platform);
|
|
114
|
-
return `| \`${relatedTheme}\` | ${scopeName} | ${getScopeSelectorForPlatform(compoundInfo, normalizedName, scopeName, group.platform)} |`;
|
|
115
|
-
}).join("\n"));
|
|
79
|
+
responseParts.push(`**Internally themed children (auto-derived):** ${compoundInfo.relatedThemes.map((t) => `\`${t}\``).join(", ")}`);
|
|
80
|
+
responseParts.push("");
|
|
81
|
+
if (compoundInfo.guidance) {
|
|
82
|
+
responseParts.push("**Guidance:**");
|
|
83
|
+
responseParts.push(compoundInfo.guidance);
|
|
116
84
|
responseParts.push("");
|
|
117
85
|
}
|
|
86
|
+
} else {
|
|
87
|
+
responseParts.push("**Compound Component:**");
|
|
88
|
+
responseParts.push(compoundInfo.description);
|
|
89
|
+
responseParts.push("");
|
|
90
|
+
responseParts.push(`**Related themes:** ${compoundInfo.relatedThemes.map((t) => `\`${t}\``).join(", ")}`);
|
|
91
|
+
const angularSelectors = getComponentSelector(normalizedName, "angular");
|
|
92
|
+
const wcSelectors = getComponentSelector(normalizedName, "webcomponents");
|
|
93
|
+
const platformLines = [];
|
|
94
|
+
if (angularSelectors.length > 0) {
|
|
95
|
+
const selectorText = angularSelectors.length === 1 ? angularSelectors[0] : angularSelectors.join(" | ");
|
|
96
|
+
platformLines.push(`- **Angular:** \`${selectorText}\``);
|
|
97
|
+
}
|
|
98
|
+
if (wcSelectors.length > 0) {
|
|
99
|
+
const selectorText = wcSelectors.length === 1 ? wcSelectors[0] : wcSelectors.join(" | ");
|
|
100
|
+
platformLines.push(`- **Web Components / React / Blazor:** \`${selectorText}\``);
|
|
101
|
+
}
|
|
102
|
+
if (platformLines.length > 0) {
|
|
103
|
+
responseParts.push("Scope all related themes under the parent component selector:");
|
|
104
|
+
responseParts.push(platformLines.join("\n"));
|
|
105
|
+
}
|
|
106
|
+
responseParts.push("");
|
|
118
107
|
const derivationRows = compoundInfo.relatedThemes.flatMap((relatedTheme) => {
|
|
119
108
|
const derivations = getTokenDerivationsForChild(normalizedName, relatedTheme);
|
|
120
109
|
return Object.entries(derivations).map(([token, derivation]) => {
|
|
@@ -135,31 +124,18 @@ ${suggestions.length === 0 ? `\nTotal available: ${COMPONENT_NAMES.length} compo
|
|
|
135
124
|
}
|
|
136
125
|
}
|
|
137
126
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (theme.primaryTokensSummary) {
|
|
142
|
-
responseParts.push("");
|
|
143
|
-
responseParts.push(theme.primaryTokensSummary);
|
|
144
|
-
}
|
|
145
|
-
responseParts.push("");
|
|
146
|
-
}
|
|
147
|
-
if (theme.tokens.length > 0) {
|
|
148
|
-
responseParts.push(`**Available Tokens (${theme.tokens.length}):**`);
|
|
127
|
+
const availableTokens = theme.tokens.filter((t) => !primaryNames.has(t.name));
|
|
128
|
+
if (availableTokens.length > 0) {
|
|
129
|
+
responseParts.push(`**\ud83d\udcd6 Available Tokens (${availableTokens.length}) \u2014 DO NOT USE unless the user explicitly requests a specific customization:**`);
|
|
149
130
|
responseParts.push("");
|
|
150
|
-
responseParts.push(
|
|
151
|
-
responseParts.push("|------------|------|-------------|");
|
|
152
|
-
for (const token of theme.tokens) {
|
|
153
|
-
const cleanDesc = token.description.replace(/\s+/g, " ").trim();
|
|
154
|
-
responseParts.push(`| \`${token.name}\` | ${token.type} | ${cleanDesc} |`);
|
|
155
|
-
}
|
|
131
|
+
responseParts.push(availableTokens.map((t) => `\`${t.name}\``).join(", "));
|
|
156
132
|
responseParts.push("");
|
|
157
|
-
} else {
|
|
133
|
+
} else if (theme.tokens.length === 0) {
|
|
158
134
|
responseParts.push("**No customizable tokens available for this component.**");
|
|
159
135
|
responseParts.push("");
|
|
160
136
|
}
|
|
161
137
|
responseParts.push("---");
|
|
162
|
-
responseParts.push("**Next step:** Use `create_component_theme` with the tokens above
|
|
138
|
+
responseParts.push("**Next step:** Use `create_component_theme` with ONLY the **primary tokens** above. Do NOT add available tokens unless the user explicitly asks for a specific one.");
|
|
163
139
|
return { content: [{
|
|
164
140
|
type: "text",
|
|
165
141
|
text: responseParts.join("\n")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PALETTE_PRESETS } from "../../knowledge/palettes.js";
|
|
2
2
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
3
|
-
import { generateCustomPaletteCode, generateHeader, generateUseStatement, toVariableName } from "../../utils/sass.js";
|
|
3
|
+
import { SASS_USE_ASSEMBLY_NOTE, generateCustomPaletteCode, generateHeader, generateUseStatement, toVariableName } from "../../utils/sass.js";
|
|
4
4
|
import { formatCssOutput, generateCustomPaletteCss } from "../../generators/css.js";
|
|
5
5
|
import { formatCustomPaletteValidation, validateCustomPalette } from "../../validators/custom-palette.js";
|
|
6
6
|
import "../../validators/index.js";
|
|
@@ -144,6 +144,7 @@ ${paletteLines.join("\n")}
|
|
|
144
144
|
responseParts.push("```scss");
|
|
145
145
|
responseParts.push(code.trimEnd());
|
|
146
146
|
responseParts.push("```");
|
|
147
|
+
responseParts.push(SASS_USE_ASSEMBLY_NOTE);
|
|
147
148
|
return { content: [{
|
|
148
149
|
type: "text",
|
|
149
150
|
text: responseParts.join("\n")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
2
|
+
import { SASS_USE_ASSEMBLY_NOTE } from "../../utils/sass.js";
|
|
2
3
|
import { generateElevations } from "../../generators/sass.js";
|
|
3
4
|
//#region src/tools/handlers/elevations.ts
|
|
4
5
|
/**
|
|
@@ -21,6 +22,7 @@ function handleCreateElevations(params) {
|
|
|
21
22
|
responseParts.push("```scss");
|
|
22
23
|
responseParts.push(result.code.trimEnd());
|
|
23
24
|
responseParts.push("```");
|
|
25
|
+
responseParts.push(SASS_USE_ASSEMBLY_NOTE);
|
|
24
26
|
return { content: [{
|
|
25
27
|
type: "text",
|
|
26
28
|
text: responseParts.join("\n")
|
|
@@ -31,6 +31,7 @@ ${list.map((name) => `- ${name}`).join("\n")}` };
|
|
|
31
31
|
if (scope) notes.push("Scope ignored because component was provided.");
|
|
32
32
|
const selectorsEntry = COMPONENT_METADATA[normalized].selectors;
|
|
33
33
|
let selectors = [];
|
|
34
|
+
if (!selectorsEntry) return { error: `**Error:** Component "${component}" does not have platform selectors. It may be a child sub-component — use its parent component for layout overrides.` };
|
|
34
35
|
if (platform && platform !== "generic") {
|
|
35
36
|
selectors = getComponentSelector(normalized, platform);
|
|
36
37
|
if (selectors.length === 0) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
2
|
+
import { SASS_USE_ASSEMBLY_NOTE } from "../../utils/sass.js";
|
|
2
3
|
import { generatePalette } from "../../generators/sass.js";
|
|
3
4
|
import { formatCssOutput, generatePaletteCss } from "../../generators/css.js";
|
|
4
5
|
import { formatValidationResult, generateWarningComments, validatePaletteColors } from "../../validators/palette.js";
|
|
@@ -103,6 +104,7 @@ function handleSassOutput(params, validation) {
|
|
|
103
104
|
responseParts.push("```scss");
|
|
104
105
|
responseParts.push(finalCode.trimEnd());
|
|
105
106
|
responseParts.push("```");
|
|
107
|
+
responseParts.push(SASS_USE_ASSEMBLY_NOTE);
|
|
106
108
|
return { content: [{
|
|
107
109
|
type: "text",
|
|
108
110
|
text: responseParts.join("\n")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SASS_USE_ASSEMBLY_NOTE } from "../../utils/sass.js";
|
|
1
2
|
import { generateTheme } from "../../generators/sass.js";
|
|
2
3
|
import { analyzeThemeColorsForPalette, formatPaletteSuitabilityWarnings, formatValidationResult, generatePaletteSuitabilityComments, generateWarningComments, validatePaletteColors } from "../../validators/palette.js";
|
|
3
4
|
import "../../validators/index.js";
|
|
@@ -80,6 +81,7 @@ async function handleCreateTheme(params) {
|
|
|
80
81
|
responseParts.push("```scss");
|
|
81
82
|
responseParts.push(finalCode.trimEnd());
|
|
82
83
|
responseParts.push("```");
|
|
84
|
+
responseParts.push(SASS_USE_ASSEMBLY_NOTE);
|
|
83
85
|
return { content: [{
|
|
84
86
|
type: "text",
|
|
85
87
|
text: responseParts.join("\n")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
2
|
+
import { SASS_USE_ASSEMBLY_NOTE } from "../../utils/sass.js";
|
|
2
3
|
import { generateTypography } from "../../generators/sass.js";
|
|
3
4
|
//#region src/tools/handlers/typography.ts
|
|
4
5
|
/**
|
|
@@ -23,6 +24,7 @@ function handleCreateTypography(params) {
|
|
|
23
24
|
responseParts.push("```scss");
|
|
24
25
|
responseParts.push(result.code.trimEnd());
|
|
25
26
|
responseParts.push("```");
|
|
27
|
+
responseParts.push(SASS_USE_ASSEMBLY_NOTE);
|
|
26
28
|
return { content: [{
|
|
27
29
|
type: "text",
|
|
28
30
|
text: responseParts.join("\n")
|
|
@@ -711,8 +711,8 @@ export declare const createComponentThemeSchema: z.ZodObject<{
|
|
|
711
711
|
output: z.ZodOptional<z.ZodEnum<["sass", "css"]>>;
|
|
712
712
|
}, "strip", z.ZodTypeAny, {
|
|
713
713
|
platform: "angular" | "webcomponents" | "react" | "blazor" | "generic";
|
|
714
|
-
component: string;
|
|
715
714
|
tokens: Record<string, string | number>;
|
|
715
|
+
component: string;
|
|
716
716
|
designSystem?: "material" | "bootstrap" | "fluent" | "indigo" | undefined;
|
|
717
717
|
variant?: "light" | "dark" | undefined;
|
|
718
718
|
name?: string | undefined;
|
|
@@ -721,8 +721,8 @@ export declare const createComponentThemeSchema: z.ZodObject<{
|
|
|
721
721
|
selector?: string | undefined;
|
|
722
722
|
}, {
|
|
723
723
|
platform: "angular" | "webcomponents" | "react" | "blazor" | "generic";
|
|
724
|
-
component: string;
|
|
725
724
|
tokens: Record<string, string | number>;
|
|
725
|
+
component: string;
|
|
726
726
|
designSystem?: "material" | "bootstrap" | "fluent" | "indigo" | undefined;
|
|
727
727
|
variant?: "light" | "dark" | undefined;
|
|
728
728
|
name?: string | undefined;
|
|
@@ -793,18 +793,18 @@ export declare const setSpacingInputSchema: z.ZodObject<{
|
|
|
793
793
|
}, "strip", z.ZodTypeAny, {
|
|
794
794
|
spacing: number;
|
|
795
795
|
platform?: "angular" | "webcomponents" | "react" | "blazor" | "generic" | undefined;
|
|
796
|
-
inline?: number | undefined;
|
|
797
796
|
output?: "sass" | "css" | undefined;
|
|
798
797
|
component?: string | undefined;
|
|
799
798
|
scope?: string | undefined;
|
|
799
|
+
inline?: number | undefined;
|
|
800
800
|
block?: number | undefined;
|
|
801
801
|
}, {
|
|
802
802
|
spacing: number;
|
|
803
803
|
platform?: "angular" | "webcomponents" | "react" | "blazor" | "generic" | undefined;
|
|
804
|
-
inline?: number | undefined;
|
|
805
804
|
output?: "sass" | "css" | undefined;
|
|
806
805
|
component?: string | undefined;
|
|
807
806
|
scope?: string | undefined;
|
|
807
|
+
inline?: number | undefined;
|
|
808
808
|
block?: number | undefined;
|
|
809
809
|
}>;
|
|
810
810
|
export declare const setSpacingSchema: z.ZodObject<{
|
|
@@ -818,18 +818,18 @@ export declare const setSpacingSchema: z.ZodObject<{
|
|
|
818
818
|
}, "strip", z.ZodTypeAny, {
|
|
819
819
|
spacing: number;
|
|
820
820
|
platform?: "angular" | "webcomponents" | "react" | "blazor" | "generic" | undefined;
|
|
821
|
-
inline?: number | undefined;
|
|
822
821
|
output?: "sass" | "css" | undefined;
|
|
823
822
|
component?: string | undefined;
|
|
824
823
|
scope?: string | undefined;
|
|
824
|
+
inline?: number | undefined;
|
|
825
825
|
block?: number | undefined;
|
|
826
826
|
}, {
|
|
827
827
|
spacing: number;
|
|
828
828
|
platform?: "angular" | "webcomponents" | "react" | "blazor" | "generic" | undefined;
|
|
829
|
-
inline?: number | undefined;
|
|
830
829
|
output?: "sass" | "css" | undefined;
|
|
831
830
|
component?: string | undefined;
|
|
832
831
|
scope?: string | undefined;
|
|
832
|
+
inline?: number | undefined;
|
|
833
833
|
block?: number | undefined;
|
|
834
834
|
}>;
|
|
835
835
|
export declare const setRoundnessSchema: z.ZodObject<{
|
package/dist/mcp/utils/sass.d.ts
CHANGED
|
@@ -33,13 +33,17 @@ export declare function toVariableName(name: string): string;
|
|
|
33
33
|
* @returns Formatted Sass comment header
|
|
34
34
|
*/
|
|
35
35
|
export declare function generateHeader(description: string): string;
|
|
36
|
+
/** Inline comment prepended above @use lines in generated Sass. */
|
|
37
|
+
export declare const SASS_USE_INLINE_COMMENT = "// NOTE: @use rules must be at the top of the file. Deduplicate when combining multiple outputs.";
|
|
38
|
+
/** Markdown assembly note appended after Sass code blocks in handler responses. */
|
|
39
|
+
export declare const SASS_USE_ASSEMBLY_NOTE = "\n> **File placement:** `@use` rules must appear at the very top of the `.scss` file, before any other statements. When combining outputs from multiple tools, keep only one `@use` per module path.";
|
|
36
40
|
/**
|
|
37
41
|
* Generate the Sass @use statement for the theming library.
|
|
38
42
|
* Uses platform-specific import paths when platform is specified.
|
|
39
43
|
*
|
|
40
44
|
* @param platform - Target platform (angular or webcomponents)
|
|
41
45
|
* @param licensed - Whether to use the licensed @infragistics package (Angular only, defaults to false)
|
|
42
|
-
* @returns The
|
|
46
|
+
* @returns The inline placement comment + @use statement for the platform
|
|
43
47
|
*/
|
|
44
48
|
export declare function generateUseStatement(platform?: Platform, licensed?: boolean): string;
|
|
45
49
|
/**
|
package/dist/mcp/utils/sass.js
CHANGED
|
@@ -58,17 +58,21 @@ function toVariableName(name) {
|
|
|
58
58
|
function generateHeader(description) {
|
|
59
59
|
return `// Generated by Ignite UI Theming MCP Server\n// ${description}`;
|
|
60
60
|
}
|
|
61
|
+
/** Inline comment prepended above @use lines in generated Sass. */
|
|
62
|
+
var SASS_USE_INLINE_COMMENT = "// NOTE: @use rules must be at the top of the file. Deduplicate when combining multiple outputs.";
|
|
63
|
+
/** Markdown assembly note appended after Sass code blocks in handler responses. */
|
|
64
|
+
var SASS_USE_ASSEMBLY_NOTE = "\n> **File placement:** `@use` rules must appear at the very top of the `.scss` file, before any other statements. When combining outputs from multiple tools, keep only one `@use` per module path.";
|
|
61
65
|
/**
|
|
62
66
|
* Generate the Sass @use statement for the theming library.
|
|
63
67
|
* Uses platform-specific import paths when platform is specified.
|
|
64
68
|
*
|
|
65
69
|
* @param platform - Target platform (angular or webcomponents)
|
|
66
70
|
* @param licensed - Whether to use the licensed @infragistics package (Angular only, defaults to false)
|
|
67
|
-
* @returns The
|
|
71
|
+
* @returns The inline placement comment + @use statement for the platform
|
|
68
72
|
*/
|
|
69
73
|
function generateUseStatement(platform, licensed) {
|
|
70
|
-
if (platform === "angular") return
|
|
71
|
-
return
|
|
74
|
+
if (platform === "angular") return `${SASS_USE_INLINE_COMMENT}\n@use "${licensed ? "@infragistics/igniteui-angular" : "igniteui-angular"}/theming" as *;`;
|
|
75
|
+
return `${SASS_USE_INLINE_COMMENT}\n@use 'igniteui-theming' as *;`;
|
|
72
76
|
}
|
|
73
77
|
/**
|
|
74
78
|
* Typography presets index path.
|
|
@@ -287,4 +291,4 @@ function generateCustomPaletteCode(options) {
|
|
|
287
291
|
return lines;
|
|
288
292
|
}
|
|
289
293
|
//#endregion
|
|
290
|
-
export { generateCustomPaletteCode, generateElevationsCode, generateHeader, generatePaletteCode, generatePresetImports, generateTypographyCode, generateUseStatement, quoteFontFamily, toVariableName };
|
|
294
|
+
export { SASS_USE_ASSEMBLY_NOTE, generateCustomPaletteCode, generateElevationsCode, generateHeader, generatePaletteCode, generatePresetImports, generateTypographyCode, generateUseStatement, quoteFontFamily, toVariableName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-theming",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"description": "A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,18 +16,22 @@
|
|
|
16
16
|
///
|
|
17
17
|
/// PRIMARY TOKENS:
|
|
18
18
|
/// - `$header-background` — The background color of the chat header.
|
|
19
|
-
/// - `$message-background` — The background color
|
|
19
|
+
/// - `$sent-message-background` — The background color for sent messages.
|
|
20
|
+
/// - `$received-message-background` — The background color for received messages.
|
|
20
21
|
///
|
|
21
22
|
/// Derived colors are auto-calculated for contrast.
|
|
22
23
|
///
|
|
23
24
|
/// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
|
|
24
25
|
/// @param {Color} $background [null] - The background color of the chat component.
|
|
25
|
-
/// @param {Color} $header-background [null] - The background color of the chat header.
|
|
26
|
+
/// @param {Color} $header-background [null] - The background color of the chat header.
|
|
26
27
|
/// @param {Color} $header-color [null] - The text color of the chat header. Auto-derived from header-background.
|
|
27
28
|
/// @param {Color} $header-border [null] - The color used for the chat header border.
|
|
28
|
-
/// @param {Color} $message-background [null] - The background color
|
|
29
|
-
/// @param {Color} $message-color [null] - The text color of the chat messages. Auto-derived from message-background.
|
|
30
|
-
/// @param {Color} $message-
|
|
29
|
+
/// @param {Color} $sent-message-background [null] - The background color for sent messages.
|
|
30
|
+
/// @param {Color} $sent-message-color [null] - The text color of the chat messages. Auto-derived from sent-message-background.
|
|
31
|
+
/// @param {Color} $received-message-background [null] - The background color for received messages.
|
|
32
|
+
/// @param {Color} $received-message-color [null] - The text color for received messages. Auto-derived from received-message-background.
|
|
33
|
+
/// @param {Color} $message-actions-color [null] - The icon color of the chat received message actions. Auto-derived from received-message-color.
|
|
34
|
+
/// @param {Number} $message-border-radius [null] - The border radius of the chat messages.
|
|
31
35
|
/// @param {Color} $file-background [null] - The background color of the image message container.
|
|
32
36
|
/// @param {Color} $file-icon-color [null] - The color of the attached file icon.
|
|
33
37
|
/// @param {Color} $file-icon-accent-color [null] - The accent color of the attached file icon.
|
|
@@ -53,9 +57,14 @@
|
|
|
53
57
|
$header-color: null,
|
|
54
58
|
$header-border: null,
|
|
55
59
|
|
|
56
|
-
$message-background: null,
|
|
57
|
-
$message-color: null,
|
|
60
|
+
$sent-message-background: null,
|
|
61
|
+
$sent-message-color: null,
|
|
62
|
+
|
|
63
|
+
$received-message-background: null,
|
|
64
|
+
$received-message-color: null,
|
|
65
|
+
|
|
58
66
|
$message-actions-color: null,
|
|
67
|
+
$message-border-radius: null,
|
|
59
68
|
|
|
60
69
|
$file-background: null,
|
|
61
70
|
$file-icon-color: null,
|
|
@@ -87,12 +96,16 @@
|
|
|
87
96
|
$header-color: adaptive-contrast(var(--header-background));
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
@if not($message-color) and $message-background {
|
|
91
|
-
$message-color: adaptive-contrast(var(--message-background));
|
|
99
|
+
@if not($sent-message-color) and $sent-message-background {
|
|
100
|
+
$sent-message-color: adaptive-contrast(var(--sent-message-background));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@if not($received-message-color) and $received-message-background {
|
|
104
|
+
$received-message-color: adaptive-contrast(var(--received-message-background));
|
|
92
105
|
}
|
|
93
106
|
|
|
94
|
-
@if not($message-actions-color) and $message-background {
|
|
95
|
-
$message-actions-color: adaptive-contrast(var(--message-color));
|
|
107
|
+
@if not($message-actions-color) and $received-message-background {
|
|
108
|
+
$message-actions-color: adaptive-contrast(var(--received-message-color));
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
@return extend(
|
|
@@ -105,9 +118,14 @@
|
|
|
105
118
|
header-color: $header-color,
|
|
106
119
|
header-border: $header-border,
|
|
107
120
|
|
|
108
|
-
message-background: $message-background,
|
|
109
|
-
message-color: $message-color,
|
|
121
|
+
sent-message-background: $sent-message-background,
|
|
122
|
+
sent-message-color: $sent-message-color,
|
|
123
|
+
|
|
124
|
+
received-message-background: $received-message-background,
|
|
125
|
+
received-message-color: $received-message-color,
|
|
126
|
+
|
|
110
127
|
message-actions-color: $message-actions-color,
|
|
128
|
+
message-border-radius: $message-border-radius,
|
|
111
129
|
|
|
112
130
|
file-background: $file-background,
|
|
113
131
|
file-icon-color: $file-icon-color,
|
|
@@ -17,19 +17,15 @@
|
|
|
17
17
|
/// Grid Theme
|
|
18
18
|
///
|
|
19
19
|
/// PRIMARY TOKENS:
|
|
20
|
-
/// - `$
|
|
21
|
-
/// - `$
|
|
22
|
-
/// - `$
|
|
23
|
-
/// - `$group-row-background` — The grid group row background color.
|
|
24
|
-
/// - `$grouparea-background` — The grid group area background color.
|
|
25
|
-
///
|
|
26
|
-
/// Derived colors are auto-calculated for contrast.
|
|
20
|
+
/// - `$background` — Controls the overall background color of the grid, including header and content.
|
|
21
|
+
/// - `$foreground` — Controls the overall foreground color of the grid, including text and icons.
|
|
22
|
+
/// - `$accent-color` — Controls the accent color used for interactive elements in the grid.
|
|
27
23
|
///
|
|
28
24
|
/// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
|
|
29
|
-
/// @param {Color} $background [null] - The background color of the grid.
|
|
30
|
-
/// @param {Color} $foreground [null] - The foreground color of the grid.
|
|
31
|
-
/// @param {Color} $accent-color [null] - The accent color used for interactive elements in the grid.
|
|
32
|
-
/// @param {Color} $header-background [null] - The table header background color
|
|
25
|
+
/// @param {Color} $background [null] - The background color of the grid.
|
|
26
|
+
/// @param {Color} $foreground [null] - The foreground color of the grid.
|
|
27
|
+
/// @param {Color} $accent-color [null] - The accent color used for interactive elements in the grid.
|
|
28
|
+
/// @param {Color} $header-background [null] - The table header background color - derives header-text-color, header-border-color, and many more.
|
|
33
29
|
/// @param {Color} $header-text-color [null] - The table header text color. Auto-derived from header-background.
|
|
34
30
|
/// @param {String} $header-border-width [null] - The border width used for header borders.
|
|
35
31
|
/// @param {String} $header-border-style [null] - The border style used for header borders.
|
|
@@ -38,11 +34,11 @@
|
|
|
38
34
|
/// @param {Color} $header-selected-text-color [null] - The table header text color when selected. Auto-derived from header-selected-background.
|
|
39
35
|
/// @param {Color} $sorted-header-icon-color [null] - The sort icon color when sorted. Auto-derived from header-background.
|
|
40
36
|
/// @param {color} $sortable-header-icon-hover-color [null] - The icon color on hover when sortable. Auto-derived from sorted-header-icon-color.
|
|
41
|
-
/// @param {Color} $content-background [null] - The table body background color
|
|
37
|
+
/// @param {Color} $content-background [null] - The table body background color - derives content-text-color, row backgrounds, cell backgrounds, borders.
|
|
42
38
|
/// @param {Color} $content-text-color [null] - The table body text color. Auto-derived from content-background.
|
|
43
39
|
/// @param {Color} $ghost-header-text-color [null] - The dragged header text color. Auto-derived from ghost-header-background.
|
|
44
40
|
/// @param {Color} $ghost-header-icon-color [null] - The dragged header icon color. Auto-derived from ghost-header-background.
|
|
45
|
-
/// @param {Color} $ghost-header-background [null] - The dragged header background color
|
|
41
|
+
/// @param {Color} $ghost-header-background [null] - The dragged header background color - derives ghost-header-text-color, ghost-header-icon-color.
|
|
46
42
|
/// @param {Color} $row-odd-background [null] - The background color of odd rows. Auto-derived from content-background.
|
|
47
43
|
/// @param {Color} $row-even-background [null] - The background color of even rows. Auto-derived from content-background.
|
|
48
44
|
/// @param {Color} $row-odd-text-color [null] - The text color of odd rows. Auto-derived from row-odd-background.
|
|
@@ -72,9 +68,9 @@
|
|
|
72
68
|
/// @param {Color} $edited-row-indicator [null] - The edited row indicator line color.
|
|
73
69
|
/// @param {Color} $resize-line-color [null] - The table header resize line color.
|
|
74
70
|
/// @param {Color} $drop-indicator-color [null] - The color of the column drag indicator line.
|
|
75
|
-
/// @param {Color} $grouparea-background [null] - The grid group area background color
|
|
71
|
+
/// @param {Color} $grouparea-background [null] - The grid group area background color - derives grouparea-color, drop-area-background. Auto-derived from header-background.
|
|
76
72
|
/// @param {Color} $grouparea-color [null] - The grid group area color. Auto-derived from grouparea-background.
|
|
77
|
-
/// @param {Color} $group-row-background [null] - The grid group row background color
|
|
73
|
+
/// @param {Color} $group-row-background [null] - The grid group row background color - derives expand-icon-color, group-row-selected-background, group-label-text, group-count-background. Auto-derived from header-background.
|
|
78
74
|
/// @param {Color} $group-row-selected-background [null] - The group row selected background. Auto-derived from group-row-background.
|
|
79
75
|
/// @param {Color} $group-label-column-name-text [null] - The grid group row column name text color.
|
|
80
76
|
/// @param {Color} $group-label-icon [null] - The grid group row icon color.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
/// The fill-color-default can accept a single color or a list of two colors for gradient effect.
|
|
21
21
|
///
|
|
22
22
|
/// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
|
|
23
|
-
/// @param {Color} $
|
|
23
|
+
/// @param {Color} $track-color [null] - The base circle fill color.
|
|
24
24
|
/// @param {Color | List<Color>} $fill-color-default [null] - The progress circle fill color. Can be a single color or list of two colors for gradient.
|
|
25
25
|
/// @param {Color} $fill-color-danger [null] - The track danger fill color.
|
|
26
26
|
/// @param {Color} $fill-color-warning [null] - The track warning fill color.
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/// @include igx-progress-circular($my-progress-circle-theme);
|
|
40
40
|
@function progress-circular-theme(
|
|
41
41
|
$schema: $light-material-schema,
|
|
42
|
-
$
|
|
42
|
+
$track-color: null,
|
|
43
43
|
$fill-color-default: null,
|
|
44
44
|
$fill-color-danger: null,
|
|
45
45
|
$fill-color-warning: null,
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
$theme,
|
|
79
79
|
(
|
|
80
80
|
selector: $selector,
|
|
81
|
-
|
|
81
|
+
track-color: $track-color,
|
|
82
82
|
fill-color-default: $fill-color-default,
|
|
83
83
|
fill-color-default-start: $fill-color-default-start,
|
|
84
84
|
fill-color-default-end: $fill-color-default-end,
|
|
@@ -91,9 +91,9 @@ $dark-indigo-progress-linear: extend(
|
|
|
91
91
|
|
|
92
92
|
/// Generates a base dark progress-circular schema.
|
|
93
93
|
/// @type Map
|
|
94
|
-
/// @prop {Map}
|
|
94
|
+
/// @prop {Map} track-color [color: ('gray', 300)] - The base circle fill color.
|
|
95
95
|
$dark-base-progress-circular: (
|
|
96
|
-
|
|
96
|
+
track-color: (
|
|
97
97
|
color: (
|
|
98
98
|
'gray',
|
|
99
99
|
300,
|
|
@@ -125,14 +125,14 @@ $dark-bootstrap-progress-circular: extend($bootstrap-progress-circular, $dark-ba
|
|
|
125
125
|
|
|
126
126
|
/// Generates a dark indigo progress-circular schema.
|
|
127
127
|
/// @type Map
|
|
128
|
-
/// @prop {Map}
|
|
128
|
+
/// @prop {Map} track-color [contrast-color: ('gray', 50, .2)] - The base circle fill color.
|
|
129
129
|
/// @prop {Map} text-color [contrast-color: ('gray', 50, .8)] - The value text color.
|
|
130
130
|
/// @requires $indigo-progress-circular
|
|
131
131
|
$dark-indigo-progress-circular: extend(
|
|
132
132
|
$indigo-progress-circular,
|
|
133
133
|
$dark-base-progress-circular,
|
|
134
134
|
(
|
|
135
|
-
|
|
135
|
+
track-color: (
|
|
136
136
|
contrast-color: (
|
|
137
137
|
'gray',
|
|
138
138
|
50,
|