@ikas/code-components-mcp 1.4.0-beta.208 → 1.4.0-beta.209
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/data/framework.json +1 -1
- package/data/storefront-api.json +4 -227
- package/data/storefront-types.json +44 -183
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4733,7 +4733,8 @@ function textStyleFontArgs(input) {
|
|
|
4733
4733
|
"--word-break": input.word_break,
|
|
4734
4734
|
"--text-wrap-style": input.text_wrap_style,
|
|
4735
4735
|
};
|
|
4736
|
-
|
|
4736
|
+
// An empty string is passed through: with breakpoint_id it removes that override.
|
|
4737
|
+
return Object.entries(map).flatMap(([flag, value]) => value != null ? [flag, value] : []);
|
|
4737
4738
|
}
|
|
4738
4739
|
// Tool: create_theme_global
|
|
4739
4740
|
server.tool("create_theme_global", "Create a theme global setting in the connected editor. `kind` selects what to create:\n" +
|
|
@@ -4989,7 +4990,14 @@ server.tool("update_text_style", "Update an existing theme typography token (tex
|
|
|
4989
4990
|
"is normal|break-all|keep-all; text_wrap_style is auto|balance|pretty|stable. Set `is_default: true` to make " +
|
|
4990
4991
|
'this text style the theme\'s default/global style (the editor\'s right-click "Make Default Style" / "Global ' +
|
|
4991
4992
|
"Stil Yap\") — any other default in the group is cleared; `is_default: false` removes the flag. A text style's " +
|
|
4992
|
-
"current default state is readable from `list_theme_globals` (each typography entry's `isDefault`).
|
|
4993
|
+
"current default state is readable from `list_theme_globals` (each typography entry's `isDefault`). " +
|
|
4994
|
+
"RESPONSIVE: pass `breakpoint_id` (an existing breakpoint id from `list_theme_globals`) to set that breakpoint's " +
|
|
4995
|
+
"overrides instead of the desktop values. Then ONLY font_size, font_weight, line_height and letter_spacing are " +
|
|
4996
|
+
"allowed, each needs a desktop value on the style first, font_weight is a plain number (italic is shared by all " +
|
|
4997
|
+
'breakpoints) and an empty string ("") removes that override so the value is inherited again. Overrides cascade ' +
|
|
4998
|
+
"desktop-first (a narrower breakpoint inherits from wider ones); `list_theme_globals` returns them per typography " +
|
|
4999
|
+
"entry under `breakpoints` (`overrides` = own values, `resolved` = effective values). Breakpoints are NOT created " +
|
|
5000
|
+
"by this tool, and `breakpoint_id` cannot be combined with `name` or `is_default`. Requires " +
|
|
4993
5001
|
"`ikas theme dev` running with the editor connected.", {
|
|
4994
5002
|
project_root: z
|
|
4995
5003
|
.string()
|
|
@@ -5007,16 +5015,22 @@ server.tool("update_text_style", "Update an existing theme typography token (tex
|
|
|
5007
5015
|
.optional()
|
|
5008
5016
|
.describe("true → make this the theme's default/global text style (clears any other default); false → remove the " +
|
|
5009
5017
|
"default flag. Omit to leave the default state unchanged."),
|
|
5018
|
+
breakpoint_id: z
|
|
5019
|
+
.string()
|
|
5020
|
+
.optional()
|
|
5021
|
+
.describe("Existing theme breakpoint id from `list_theme_globals`. When set, the font params are written as that " +
|
|
5022
|
+
"breakpoint's overrides (font_size/font_weight/line_height/letter_spacing only; \"\" removes one)."),
|
|
5010
5023
|
port: z
|
|
5011
5024
|
.number()
|
|
5012
5025
|
.optional()
|
|
5013
5026
|
.describe("Dev server WebSocket port (default 5201)."),
|
|
5014
5027
|
}, async (input) => {
|
|
5015
|
-
const { project_root, id, name, is_default, port } = input;
|
|
5028
|
+
const { project_root, id, name, is_default, breakpoint_id, port } = input;
|
|
5016
5029
|
const args = [
|
|
5017
5030
|
"update-text-style",
|
|
5018
5031
|
"--id",
|
|
5019
5032
|
id,
|
|
5033
|
+
...(breakpoint_id !== undefined ? ["--breakpoint", breakpoint_id] : []),
|
|
5020
5034
|
...(name !== undefined ? ["--name", name] : []),
|
|
5021
5035
|
...textStyleFontArgs(input),
|
|
5022
5036
|
...(is_default === true
|