igniteui-theming 25.1.0 → 25.2.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/index.d.ts +75 -0
- package/dist/index.js +12 -0
- package/dist/json/components/bootstrap.json +1 -0
- package/dist/json/components/fluent.json +1 -0
- package/dist/json/components/indigo.json +1 -0
- package/dist/json/components/material.json +1 -0
- package/{json → dist/json}/components/themes.json +31 -1
- package/dist/mcp/generators/css.d.ts +7 -4
- package/dist/mcp/generators/css.js +129 -104
- package/dist/mcp/generators/sass.js +227 -254
- package/dist/mcp/index.js +259 -323
- package/dist/mcp/knowledge/color-usage.js +524 -502
- package/dist/mcp/knowledge/colors.js +61 -50
- package/dist/mcp/knowledge/component-metadata.js +697 -598
- package/dist/mcp/knowledge/component-themes.js +70 -57
- package/dist/mcp/knowledge/custom-palettes.js +4 -9
- package/dist/mcp/knowledge/docs/colors/guidance.js +4 -0
- package/dist/mcp/knowledge/docs/colors/usage.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/border-radius.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/pad.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/sizable.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/sizable.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/sizing.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/spacing.js +4 -0
- package/dist/mcp/knowledge/docs/layout/overview.js +4 -0
- package/dist/mcp/knowledge/docs/setup/platform.js +4 -0
- package/dist/mcp/knowledge/elevations.d.ts +1 -1
- package/dist/mcp/knowledge/elevations.js +26 -12
- package/dist/mcp/knowledge/index.js +23 -87
- package/dist/mcp/knowledge/layout-docs.d.ts +1 -1
- package/dist/mcp/knowledge/multipliers.js +5 -0
- package/dist/mcp/knowledge/palettes.js +29 -17
- package/dist/mcp/knowledge/platforms/angular.js +98 -120
- package/dist/mcp/knowledge/platforms/blazor.js +39 -34
- package/dist/mcp/knowledge/platforms/common.js +83 -68
- package/dist/mcp/knowledge/platforms/index.js +265 -242
- package/dist/mcp/knowledge/platforms/react.js +43 -35
- package/dist/mcp/knowledge/platforms/webcomponents.js +266 -292
- package/dist/mcp/knowledge/sass-api.js +1 -0
- package/dist/mcp/knowledge/typography.js +13 -5
- package/dist/mcp/resources/index.js +1 -0
- package/dist/mcp/resources/presets.js +409 -508
- package/dist/mcp/theming/dist/json/colors/meta/multipliers.js +50 -0
- package/dist/mcp/theming/dist/json/colors/presets/palettes.js +85 -0
- package/dist/mcp/theming/dist/json/components/themes.js +5792 -0
- package/dist/mcp/theming/dist/json/elevations/indigo.js +29 -0
- package/dist/mcp/theming/dist/json/elevations/material.js +3 -0
- package/dist/mcp/theming/dist/json/typography/presets/typescales.js +621 -0
- package/dist/mcp/tools/descriptions.js +98 -154
- package/dist/mcp/tools/handlers/color.js +58 -56
- package/dist/mcp/tools/handlers/component-theme.js +163 -225
- package/dist/mcp/tools/handlers/component-tokens.js +159 -219
- package/dist/mcp/tools/handlers/custom-palette.js +138 -179
- package/dist/mcp/tools/handlers/elevations.js +27 -28
- package/dist/mcp/tools/handlers/index.js +11 -0
- package/dist/mcp/tools/handlers/layout.js +125 -176
- package/dist/mcp/tools/handlers/palette.js +105 -120
- package/dist/mcp/tools/handlers/platform.js +289 -311
- package/dist/mcp/tools/handlers/resource.js +22 -31
- package/dist/mcp/tools/handlers/theme.js +86 -103
- package/dist/mcp/tools/handlers/typography.js +29 -30
- package/dist/mcp/tools/index.js +13 -0
- package/dist/mcp/tools/schemas.js +239 -218
- package/dist/mcp/utils/color.js +277 -239
- package/dist/mcp/utils/preprocessing.js +57 -30
- package/dist/mcp/utils/result.js +43 -45
- package/dist/mcp/utils/sass.js +271 -191
- package/dist/mcp/utils/theming-resolve.d.ts +19 -0
- package/dist/mcp/utils/theming-resolve.js +57 -0
- package/dist/mcp/utils/types.js +96 -53
- package/dist/mcp/validators/custom-palette.js +218 -243
- package/dist/mcp/validators/index.js +3 -0
- package/dist/mcp/validators/palette.js +231 -229
- package/dist/tailwind/utilities/bootstrap.css +1 -0
- package/dist/tailwind/utilities/fluent.css +1 -0
- package/dist/tailwind/utilities/indigo.css +1 -0
- package/dist/tailwind/utilities/material.css +1 -0
- package/package.json +45 -64
- package/sass/json/README.md +12 -7
- package/sass/themes/_mixins.scss +1 -0
- package/sass/themes/components/button-group/_button-group-theme.scss +42 -0
- package/sass/themes/components/grid/_grid-theme.scss +1 -1
- package/sass/themes/schemas/components/dark/_button-group.scss +173 -50
- package/sass/themes/schemas/components/dark/_grid.scss +0 -16
- package/sass/themes/schemas/components/light/_button-group.scss +221 -99
- package/sass/themes/schemas/components/light/_grid.scss +14 -20
- package/LICENSE +0 -21
- package/README.md +0 -391
- package/dist/mcp/json/colors/presets/palettes.json.js +0 -13
- package/dist/mcp/json/components/themes.json.js +0 -143
- package/dist/mcp/json/elevations/indigo.json.js +0 -8
- package/dist/mcp/json/elevations/material.json.js +0 -8
- package/dist/mcp/json/typography/presets/typescales.json.js +0 -17
- package/dist/mcp/knowledge/docs/colors/guidance.md.js +0 -4
- package/dist/mcp/knowledge/docs/colors/usage.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/border-radius.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/pad.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/sizable.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/sizable.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/sizing.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/spacing.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/overview.md.js +0 -4
- package/dist/mcp/knowledge/docs/setup/platform.md.js +0 -4
- package/dist/mcp/vite-env.d.ts +0 -18
- package/index.js +0 -5
- package/json/components/bootstrap.json +0 -1
- package/json/components/fluent.json +0 -1
- package/json/components/indigo.json +0 -1
- package/json/components/material.json +0 -1
- package/tailwind/utilities/bootstrap.css +0 -1
- package/tailwind/utilities/fluent.css +0 -1
- package/tailwind/utilities/indigo.css +0 -1
- package/tailwind/utilities/material.css +0 -1
- /package/{json → dist/json}/colors/meta/multipliers.json +0 -0
- /package/{json → dist/json}/colors/meta/palette.json +0 -0
- /package/{json → dist/json}/colors/presets/palettes.json +0 -0
- /package/{json → dist/json}/elevations/indigo.json +0 -0
- /package/{json → dist/json}/elevations/material.json +0 -0
- /package/{json → dist/json}/typography/presets/typescales.json +0 -0
- /package/{tailwind → dist/tailwind}/themes/base.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/bootstrap.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/fluent.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/indigo.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/material.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/bootstrap.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/fluent.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/indigo.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/material.css +0 -0
|
@@ -1,151 +1,121 @@
|
|
|
1
|
-
import { generateCustomPaletteCss, formatCssOutput } from "../../generators/css.js";
|
|
2
1
|
import { PALETTE_PRESETS } from "../../knowledge/palettes.js";
|
|
3
2
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "../../
|
|
3
|
+
import { generateCustomPaletteCode, generateHeader, generateUseStatement, toVariableName } from "../../utils/sass.js";
|
|
4
|
+
import { formatCssOutput, generateCustomPaletteCss } from "../../generators/css.js";
|
|
5
|
+
import { formatCustomPaletteValidation, validateCustomPalette } from "../../validators/custom-palette.js";
|
|
6
|
+
import "../../validators/index.js";
|
|
7
|
+
//#region src/tools/handlers/custom-palette.ts
|
|
8
|
+
/**
|
|
9
|
+
* Handler for create_custom_palette tool.
|
|
10
|
+
*/
|
|
7
11
|
async function handleCreateCustomPalette(params) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
if (output === "css") {
|
|
62
|
-
return handleCssOutput(
|
|
63
|
-
params,
|
|
64
|
-
variant,
|
|
65
|
-
designSystem,
|
|
66
|
-
surfaceColorForGray,
|
|
67
|
-
colors,
|
|
68
|
-
validation
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
return handleSassOutput(
|
|
72
|
-
params,
|
|
73
|
-
variant,
|
|
74
|
-
designSystem,
|
|
75
|
-
surfaceColorForGray,
|
|
76
|
-
colors,
|
|
77
|
-
validation
|
|
78
|
-
);
|
|
12
|
+
const variant = params.variant ?? "light";
|
|
13
|
+
const designSystem = params.designSystem ?? "material";
|
|
14
|
+
const output = params.output ?? "sass";
|
|
15
|
+
const preset = PALETTE_PRESETS[`${variant}-${designSystem}-palette`];
|
|
16
|
+
let surfaceColorForGray;
|
|
17
|
+
if (params.surface.mode === "shades") surfaceColorForGray = params.surface.baseColor;
|
|
18
|
+
else surfaceColorForGray = params.surface.shades["500"];
|
|
19
|
+
const colors = {
|
|
20
|
+
primary: params.primary,
|
|
21
|
+
secondary: params.secondary,
|
|
22
|
+
surface: params.surface,
|
|
23
|
+
gray: params.gray ?? {
|
|
24
|
+
mode: "shades",
|
|
25
|
+
baseColor: preset.gray
|
|
26
|
+
},
|
|
27
|
+
info: params.info ?? {
|
|
28
|
+
mode: "shades",
|
|
29
|
+
baseColor: preset.info
|
|
30
|
+
},
|
|
31
|
+
success: params.success ?? {
|
|
32
|
+
mode: "shades",
|
|
33
|
+
baseColor: preset.success
|
|
34
|
+
},
|
|
35
|
+
warn: params.warn ?? {
|
|
36
|
+
mode: "shades",
|
|
37
|
+
baseColor: preset.warn
|
|
38
|
+
},
|
|
39
|
+
error: params.error ?? {
|
|
40
|
+
mode: "shades",
|
|
41
|
+
baseColor: preset.error
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const validation = await validateCustomPalette({
|
|
45
|
+
platform: params.platform,
|
|
46
|
+
variant,
|
|
47
|
+
designSystem,
|
|
48
|
+
name: params.name,
|
|
49
|
+
primary: colors.primary,
|
|
50
|
+
secondary: colors.secondary,
|
|
51
|
+
surface: colors.surface,
|
|
52
|
+
gray: colors.gray,
|
|
53
|
+
info: colors.info,
|
|
54
|
+
success: colors.success,
|
|
55
|
+
warn: colors.warn,
|
|
56
|
+
error: colors.error
|
|
57
|
+
}, variant);
|
|
58
|
+
if (!validation.isValid) return { content: [{
|
|
59
|
+
type: "text",
|
|
60
|
+
text: `**Validation Failed**\n\n${formatCustomPaletteValidation(validation)}\n\nPlease fix the errors and try again.`
|
|
61
|
+
}] };
|
|
62
|
+
if (output === "css") return handleCssOutput(params, variant, designSystem, surfaceColorForGray, colors, validation);
|
|
63
|
+
return handleSassOutput(params, variant, designSystem, surfaceColorForGray, colors, validation);
|
|
79
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Handle CSS output format - generates CSS custom properties directly.
|
|
67
|
+
*/
|
|
80
68
|
async function handleCssOutput(params, variant, designSystem, surfaceColorForGray, colors, validation) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return {
|
|
117
|
-
content: [
|
|
118
|
-
{
|
|
119
|
-
type: "text",
|
|
120
|
-
text: responseParts.join("\n")
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
};
|
|
124
|
-
} catch (error) {
|
|
125
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
126
|
-
return {
|
|
127
|
-
content: [
|
|
128
|
-
{
|
|
129
|
-
type: "text",
|
|
130
|
-
text: `**Error generating CSS palette**
|
|
131
|
-
|
|
132
|
-
${message}`
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
};
|
|
136
|
-
}
|
|
69
|
+
try {
|
|
70
|
+
const result = await generateCustomPaletteCss({
|
|
71
|
+
variant: params.variant,
|
|
72
|
+
surfaceColor: surfaceColorForGray,
|
|
73
|
+
colors
|
|
74
|
+
});
|
|
75
|
+
const formattedCss = formatCssOutput(result.css, result.description);
|
|
76
|
+
const responseParts = ["**Custom Palette Generated (CSS)**"];
|
|
77
|
+
responseParts.push("");
|
|
78
|
+
responseParts.push(`Created CSS custom properties for a custom ${variant} color palette based on ${designSystem} defaults.`);
|
|
79
|
+
responseParts.push("");
|
|
80
|
+
responseParts.push("Output format: CSS custom properties");
|
|
81
|
+
const shadesMode = Object.entries(colors).filter(([_, def]) => def.mode === "shades").map(([name]) => name);
|
|
82
|
+
const explicitMode = Object.entries(colors).filter(([_, def]) => def.mode === "explicit").map(([name]) => name);
|
|
83
|
+
responseParts.push("");
|
|
84
|
+
if (shadesMode.length > 0) responseParts.push(`**Using shades() function:** ${shadesMode.join(", ")}`);
|
|
85
|
+
if (explicitMode.length > 0) responseParts.push(`**Using explicit shades:** ${explicitMode.join(", ")}`);
|
|
86
|
+
if (validation.warnings.length > 0) {
|
|
87
|
+
responseParts.push("");
|
|
88
|
+
responseParts.push(formatCustomPaletteValidation(validation));
|
|
89
|
+
}
|
|
90
|
+
responseParts.push("");
|
|
91
|
+
responseParts.push("```css");
|
|
92
|
+
responseParts.push(formattedCss.trimEnd());
|
|
93
|
+
responseParts.push("```");
|
|
94
|
+
return { content: [{
|
|
95
|
+
type: "text",
|
|
96
|
+
text: responseParts.join("\n")
|
|
97
|
+
}] };
|
|
98
|
+
} catch (error) {
|
|
99
|
+
return { content: [{
|
|
100
|
+
type: "text",
|
|
101
|
+
text: `**Error generating CSS palette**\n\n${error instanceof Error ? error.message : String(error)}`
|
|
102
|
+
}] };
|
|
103
|
+
}
|
|
137
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Handle Sass output format - generates Sass code with palette map structure.
|
|
107
|
+
*/
|
|
138
108
|
function handleSassOutput(params, variant, designSystem, surfaceColorForGray, colors, validation) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
109
|
+
const paletteName = params.name ? toVariableName(params.name) : `custom-${variant}`;
|
|
110
|
+
const paletteLines = generateCustomPaletteCode({
|
|
111
|
+
platform: params.platform,
|
|
112
|
+
variant: params.variant,
|
|
113
|
+
variableName: paletteName,
|
|
114
|
+
surfaceColor: surfaceColorForGray,
|
|
115
|
+
colors
|
|
116
|
+
});
|
|
117
|
+
const varName = `$${paletteName}-palette`;
|
|
118
|
+
const code = `${generateHeader(`Custom ${variant} palette with explicit shade control`)}
|
|
149
119
|
${generateUseStatement(params.platform, params.licensed)}
|
|
150
120
|
|
|
151
121
|
${paletteLines.join("\n")}
|
|
@@ -153,42 +123,31 @@ ${paletteLines.join("\n")}
|
|
|
153
123
|
// Apply the palette (generates CSS custom properties)
|
|
154
124
|
@include palette(${varName});
|
|
155
125
|
`;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
responseParts.push(code.trimEnd());
|
|
182
|
-
responseParts.push("```");
|
|
183
|
-
return {
|
|
184
|
-
content: [
|
|
185
|
-
{
|
|
186
|
-
type: "text",
|
|
187
|
-
text: responseParts.join("\n")
|
|
188
|
-
}
|
|
189
|
-
]
|
|
190
|
-
};
|
|
126
|
+
const responseParts = ["**Custom Palette Generated**"];
|
|
127
|
+
responseParts.push("");
|
|
128
|
+
responseParts.push(`Created a custom ${variant} color palette based on ${designSystem} defaults.`);
|
|
129
|
+
const platformNote = params.platform ? `Platform: ${PLATFORM_METADATA[params.platform]?.name ?? params.platform}` : "Platform: Not specified (generic output). Specify `platform` for optimized code.";
|
|
130
|
+
responseParts.push("");
|
|
131
|
+
responseParts.push(platformNote);
|
|
132
|
+
const shadesMode = Object.entries(colors).filter(([_, def]) => def.mode === "shades").map(([name]) => name);
|
|
133
|
+
const explicitMode = Object.entries(colors).filter(([_, def]) => def.mode === "explicit").map(([name]) => name);
|
|
134
|
+
responseParts.push("");
|
|
135
|
+
if (shadesMode.length > 0) responseParts.push(`**Using shades() function:** ${shadesMode.join(", ")}`);
|
|
136
|
+
if (explicitMode.length > 0) responseParts.push(`**Using explicit shades:** ${explicitMode.join(", ")}`);
|
|
137
|
+
responseParts.push("");
|
|
138
|
+
responseParts.push(`**Variable:** \`${varName}\``);
|
|
139
|
+
if (validation.warnings.length > 0) {
|
|
140
|
+
responseParts.push("");
|
|
141
|
+
responseParts.push(formatCustomPaletteValidation(validation));
|
|
142
|
+
}
|
|
143
|
+
responseParts.push("");
|
|
144
|
+
responseParts.push("```scss");
|
|
145
|
+
responseParts.push(code.trimEnd());
|
|
146
|
+
responseParts.push("```");
|
|
147
|
+
return { content: [{
|
|
148
|
+
type: "text",
|
|
149
|
+
text: responseParts.join("\n")
|
|
150
|
+
}] };
|
|
191
151
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
};
|
|
152
|
+
//#endregion
|
|
153
|
+
export { handleCreateCustomPalette };
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { generateElevations } from "../../generators/sass.js";
|
|
2
1
|
import { PLATFORM_METADATA } from "../../knowledge/platforms/index.js";
|
|
2
|
+
import { generateElevations } from "../../generators/sass.js";
|
|
3
|
+
//#region src/tools/handlers/elevations.ts
|
|
4
|
+
/**
|
|
5
|
+
* Handler for create_elevations tool.
|
|
6
|
+
*/
|
|
3
7
|
function handleCreateElevations(params) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
text: responseParts.join("\n")
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
};
|
|
8
|
+
const result = generateElevations({
|
|
9
|
+
platform: params.platform,
|
|
10
|
+
licensed: params.licensed,
|
|
11
|
+
designSystem: params.designSystem,
|
|
12
|
+
name: params.name
|
|
13
|
+
});
|
|
14
|
+
const responseParts = [result.description];
|
|
15
|
+
const platformNote = params.platform ? `Platform: ${PLATFORM_METADATA[params.platform]?.name ?? params.platform}` : "Platform: Not specified (generic output). Specify `platform` for optimized code.";
|
|
16
|
+
responseParts.push("");
|
|
17
|
+
responseParts.push(platformNote);
|
|
18
|
+
responseParts.push("");
|
|
19
|
+
responseParts.push(`Variables used: ${result.variables.join(", ")}`);
|
|
20
|
+
responseParts.push("");
|
|
21
|
+
responseParts.push("```scss");
|
|
22
|
+
responseParts.push(result.code.trimEnd());
|
|
23
|
+
responseParts.push("```");
|
|
24
|
+
return { content: [{
|
|
25
|
+
type: "text",
|
|
26
|
+
text: responseParts.join("\n")
|
|
27
|
+
}] };
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { handleCreateElevations };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./color.js";
|
|
2
|
+
import "./component-theme.js";
|
|
3
|
+
import "./component-tokens.js";
|
|
4
|
+
import "./custom-palette.js";
|
|
5
|
+
import "./elevations.js";
|
|
6
|
+
import "./layout.js";
|
|
7
|
+
import "./palette.js";
|
|
8
|
+
import "./platform.js";
|
|
9
|
+
import "./resource.js";
|
|
10
|
+
import "./theme.js";
|
|
11
|
+
import "./typography.js";
|