@ikas/code-components-mcp 1.4.0-beta.61 → 1.4.0-beta.62

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-06-16T07:27:28.550Z",
2
+ "generatedAt": "2026-06-16T09:24:46.528Z",
3
3
  "functions": [
4
4
  {
5
5
  "name": "apiListProductBrand",
@@ -15141,7 +15141,7 @@
15141
15141
  {
15142
15142
  "name": "getThemeSetting",
15143
15143
  "signature": "function getThemeSetting(name: string): ThemeSetting | undefined",
15144
- "description": "A single global variable by its stable key (`variableName`, e.g. `_6Q0KV7VGGM`).\nDiscover keys via (each item carries a human `displayName`).\nThe returned `value` is the live blueprint value when available, else the default.",
15144
+ "description": "A single global variable by its stable key (`variableName`, e.g. `_6Q0KV7VGGM`).\nDiscover keys via (each item carries a human `displayName`).\nThe returned `value` is the live blueprint value when available, else the default.\nIts shape is discriminated by `type` (see ); note an\nIMAGE setting's value is an image REFERENCE (no `.url`) — resolve with\n`getDefaultSrc`/`getSrc`.",
15145
15145
  "params": [],
15146
15146
  "returnType": "ThemeSetting | undefined",
15147
15147
  "categories": [],
@@ -15207,7 +15207,7 @@
15207
15207
  {
15208
15208
  "name": "getThemeColorSchemes",
15209
15209
  "signature": "function getThemeColorSchemes(): { schemes: { id: string; name: string }[]; values: ColorSchemeToken[] }",
15210
- "description": "Theme color schemes — the available schemes plus per-scheme color values.",
15210
+ "description": "Theme color schemes (palettes). Returns two PARALLEL lists with different jobs:\n- `schemes`: the color SLOTS as `{ id, name }` LABELS only — no colors live here.\n Use it to resolve a slot's display name from its id.\n- `values`: the actual palettes. A palette's colors live in its `colorsByScheme`\n map, keyed by slot id → `{ resolved, cssVar }`.\n\nTo render swatches, iterate `values[].colorsByScheme` (the source of truth for\ncolors), NOT the top-level `schemes` array — `schemes` carries labels only, so\niterating it renders empty. Look up each swatch's label from `schemes` by its\nslot-id key:\n\n const { schemes, values } = getThemeColorSchemes();\n const slotName = (id: string) => schemes.find(s => s.id === id)?.name ?? id;\n values.forEach(palette =>\n Object.entries(palette.colorsByScheme).forEach(([slotId, { resolved, cssVar }]) => {\n // slotName(slotId) → label, cssVar → live var() ref (prefer this), resolved → hex snapshot\n })\n );",
15211
15211
  "params": [],
15212
15212
  "returnType": "{ schemes: { id: string; name: string }[]; values: ColorSchemeToken[] }",
15213
15213
  "categories": [],
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-06-16T07:27:28.572Z",
2
+ "generatedAt": "2026-06-16T09:24:46.549Z",
3
3
  "types": [
4
4
  {
5
5
  "name": "IkasProductAttributeDetail",
@@ -11771,6 +11771,511 @@
11771
11771
  }
11772
11772
  ],
11773
11773
  "filePath": "video/index.ts"
11774
+ },
11775
+ {
11776
+ "name": "ThemeSetting",
11777
+ "kind": "type",
11778
+ "domain": "theme",
11779
+ "properties": [
11780
+ {
11781
+ "name": "name",
11782
+ "type": "string",
11783
+ "optional": false
11784
+ },
11785
+ {
11786
+ "name": "displayName",
11787
+ "type": "string",
11788
+ "optional": false
11789
+ },
11790
+ {
11791
+ "name": "type",
11792
+ "type": "GlobalVariableType",
11793
+ "optional": false
11794
+ },
11795
+ {
11796
+ "name": "value",
11797
+ "type": "any",
11798
+ "optional": false
11799
+ }
11800
+ ],
11801
+ "filePath": "theme-globals.ts"
11802
+ },
11803
+ {
11804
+ "name": "DesignToken",
11805
+ "kind": "type",
11806
+ "domain": "theme",
11807
+ "properties": [
11808
+ {
11809
+ "name": "id",
11810
+ "type": "string",
11811
+ "optional": false
11812
+ },
11813
+ {
11814
+ "name": "name",
11815
+ "type": "string",
11816
+ "optional": false
11817
+ },
11818
+ {
11819
+ "name": "resolved",
11820
+ "type": "string | null",
11821
+ "optional": false
11822
+ },
11823
+ {
11824
+ "name": "cssVar",
11825
+ "type": "string",
11826
+ "optional": false
11827
+ }
11828
+ ],
11829
+ "filePath": "theme-globals.ts"
11830
+ },
11831
+ {
11832
+ "name": "TypographyToken",
11833
+ "kind": "type",
11834
+ "domain": "theme",
11835
+ "properties": [
11836
+ {
11837
+ "name": "id",
11838
+ "type": "string",
11839
+ "optional": false
11840
+ },
11841
+ {
11842
+ "name": "name",
11843
+ "type": "string",
11844
+ "optional": false
11845
+ },
11846
+ {
11847
+ "name": "resolved",
11848
+ "type": "Record<string, string>",
11849
+ "optional": false
11850
+ },
11851
+ {
11852
+ "name": "className",
11853
+ "type": "string",
11854
+ "optional": false
11855
+ }
11856
+ ],
11857
+ "filePath": "theme-globals.ts"
11858
+ },
11859
+ {
11860
+ "name": "BreakpointToken",
11861
+ "kind": "type",
11862
+ "domain": "theme",
11863
+ "properties": [
11864
+ {
11865
+ "name": "id",
11866
+ "type": "string",
11867
+ "optional": false
11868
+ },
11869
+ {
11870
+ "name": "name",
11871
+ "type": "string",
11872
+ "optional": false
11873
+ },
11874
+ {
11875
+ "name": "width",
11876
+ "type": "number",
11877
+ "optional": false
11878
+ }
11879
+ ],
11880
+ "filePath": "theme-globals.ts"
11881
+ },
11882
+ {
11883
+ "name": "KeyframeToken",
11884
+ "kind": "type",
11885
+ "domain": "theme",
11886
+ "properties": [
11887
+ {
11888
+ "name": "id",
11889
+ "type": "string",
11890
+ "optional": false
11891
+ },
11892
+ {
11893
+ "name": "name",
11894
+ "type": "string",
11895
+ "optional": false
11896
+ },
11897
+ {
11898
+ "name": "type",
11899
+ "type": "string",
11900
+ "optional": false
11901
+ },
11902
+ {
11903
+ "name": "ref",
11904
+ "type": "string",
11905
+ "optional": false
11906
+ },
11907
+ {
11908
+ "name": "points",
11909
+ "type": "{ point: string }[]",
11910
+ "optional": true
11911
+ }
11912
+ ],
11913
+ "filePath": "theme-globals.ts"
11914
+ },
11915
+ {
11916
+ "name": "ColorSchemeToken",
11917
+ "kind": "type",
11918
+ "domain": "theme",
11919
+ "properties": [
11920
+ {
11921
+ "name": "id",
11922
+ "type": "string",
11923
+ "optional": false
11924
+ },
11925
+ {
11926
+ "name": "name",
11927
+ "type": "string",
11928
+ "optional": false
11929
+ },
11930
+ {
11931
+ "name": "isDefault",
11932
+ "type": "boolean",
11933
+ "optional": false
11934
+ },
11935
+ {
11936
+ "name": "className",
11937
+ "type": "string",
11938
+ "optional": false
11939
+ },
11940
+ {
11941
+ "name": "colorsByScheme",
11942
+ "type": "Record<string, { resolved: string | null; cssVar: string }>",
11943
+ "optional": false
11944
+ }
11945
+ ],
11946
+ "filePath": "theme-globals.ts"
11947
+ },
11948
+ {
11949
+ "name": "ThemeGlobals",
11950
+ "kind": "type",
11951
+ "domain": "theme",
11952
+ "properties": [
11953
+ {
11954
+ "name": "settings",
11955
+ "type": "Record<string, ThemeSetting>",
11956
+ "optional": false
11957
+ },
11958
+ {
11959
+ "name": "colors",
11960
+ "type": "DesignToken[]",
11961
+ "optional": false
11962
+ },
11963
+ {
11964
+ "name": "typography",
11965
+ "type": "TypographyToken[]",
11966
+ "optional": false
11967
+ },
11968
+ {
11969
+ "name": "breakpoints",
11970
+ "type": "BreakpointToken[]",
11971
+ "optional": false
11972
+ },
11973
+ {
11974
+ "name": "keyframes",
11975
+ "type": "KeyframeToken[]",
11976
+ "optional": false
11977
+ },
11978
+ {
11979
+ "name": "colorSchemes",
11980
+ "type": "{ schemes: { id: string; name: string }[]; values: ColorSchemeToken[] }",
11981
+ "optional": false
11982
+ }
11983
+ ],
11984
+ "filePath": "theme-globals.ts"
11985
+ },
11986
+ {
11987
+ "name": "StyleValueLike",
11988
+ "kind": "type",
11989
+ "domain": "theme",
11990
+ "properties": [
11991
+ {
11992
+ "name": "value",
11993
+ "type": "any",
11994
+ "optional": true
11995
+ },
11996
+ {
11997
+ "name": "patternValueId",
11998
+ "type": "string",
11999
+ "optional": true
12000
+ },
12001
+ {
12002
+ "name": "keyframeValueId",
12003
+ "type": "string",
12004
+ "optional": true
12005
+ },
12006
+ {
12007
+ "name": "colorSchemeId",
12008
+ "type": "string",
12009
+ "optional": true
12010
+ }
12011
+ ],
12012
+ "filePath": "theme-globals.ts"
12013
+ },
12014
+ {
12015
+ "name": "StyleConditionLike",
12016
+ "kind": "type",
12017
+ "domain": "theme",
12018
+ "properties": [
12019
+ {
12020
+ "name": "value",
12021
+ "type": "StyleValueLike",
12022
+ "optional": true
12023
+ }
12024
+ ],
12025
+ "filePath": "theme-globals.ts"
12026
+ },
12027
+ {
12028
+ "name": "ElementStyleLike",
12029
+ "kind": "type",
12030
+ "domain": "theme",
12031
+ "properties": [
12032
+ {
12033
+ "name": "property",
12034
+ "type": "string",
12035
+ "optional": false
12036
+ },
12037
+ {
12038
+ "name": "value",
12039
+ "type": "StyleValueLike | StyleConditionLike[]",
12040
+ "optional": true
12041
+ }
12042
+ ],
12043
+ "filePath": "theme-globals.ts"
12044
+ },
12045
+ {
12046
+ "name": "PatternValueLike",
12047
+ "kind": "type",
12048
+ "domain": "theme",
12049
+ "properties": [
12050
+ {
12051
+ "name": "id",
12052
+ "type": "string",
12053
+ "optional": false
12054
+ },
12055
+ {
12056
+ "name": "name",
12057
+ "type": "string",
12058
+ "optional": true
12059
+ },
12060
+ {
12061
+ "name": "style",
12062
+ "type": "ElementStyleLike",
12063
+ "optional": true
12064
+ }
12065
+ ],
12066
+ "filePath": "theme-globals.ts"
12067
+ },
12068
+ {
12069
+ "name": "PatternElementLike",
12070
+ "kind": "type",
12071
+ "domain": "theme",
12072
+ "properties": [
12073
+ {
12074
+ "name": "id",
12075
+ "type": "string",
12076
+ "optional": false
12077
+ },
12078
+ {
12079
+ "name": "name",
12080
+ "type": "string",
12081
+ "optional": true
12082
+ },
12083
+ {
12084
+ "name": "styles",
12085
+ "type": "ElementStyleLike[]",
12086
+ "optional": true
12087
+ }
12088
+ ],
12089
+ "filePath": "theme-globals.ts"
12090
+ },
12091
+ {
12092
+ "name": "ColorSchemeLike",
12093
+ "kind": "type",
12094
+ "domain": "theme",
12095
+ "properties": [
12096
+ {
12097
+ "name": "id",
12098
+ "type": "string",
12099
+ "optional": false
12100
+ },
12101
+ {
12102
+ "name": "name",
12103
+ "type": "string",
12104
+ "optional": true
12105
+ }
12106
+ ],
12107
+ "filePath": "theme-globals.ts"
12108
+ },
12109
+ {
12110
+ "name": "ColorSchemeValueColorLike",
12111
+ "kind": "type",
12112
+ "domain": "theme",
12113
+ "properties": [
12114
+ {
12115
+ "name": "colorSchemeId",
12116
+ "type": "string",
12117
+ "optional": false
12118
+ },
12119
+ {
12120
+ "name": "style",
12121
+ "type": "StyleValueLike",
12122
+ "optional": true
12123
+ }
12124
+ ],
12125
+ "filePath": "theme-globals.ts"
12126
+ },
12127
+ {
12128
+ "name": "ColorSchemeValueLike",
12129
+ "kind": "type",
12130
+ "domain": "theme",
12131
+ "properties": [
12132
+ {
12133
+ "name": "id",
12134
+ "type": "string",
12135
+ "optional": false
12136
+ },
12137
+ {
12138
+ "name": "name",
12139
+ "type": "string",
12140
+ "optional": true
12141
+ },
12142
+ {
12143
+ "name": "isDefault",
12144
+ "type": "boolean",
12145
+ "optional": true
12146
+ },
12147
+ {
12148
+ "name": "designAssetId",
12149
+ "type": "string",
12150
+ "optional": true
12151
+ },
12152
+ {
12153
+ "name": "colors",
12154
+ "type": "ColorSchemeValueColorLike[]",
12155
+ "optional": true
12156
+ }
12157
+ ],
12158
+ "filePath": "theme-globals.ts"
12159
+ },
12160
+ {
12161
+ "name": "BreakpointLike",
12162
+ "kind": "type",
12163
+ "domain": "theme",
12164
+ "properties": [
12165
+ {
12166
+ "name": "id",
12167
+ "type": "string",
12168
+ "optional": false
12169
+ },
12170
+ {
12171
+ "name": "name",
12172
+ "type": "string",
12173
+ "optional": true
12174
+ },
12175
+ {
12176
+ "name": "width",
12177
+ "type": "number",
12178
+ "optional": true
12179
+ }
12180
+ ],
12181
+ "filePath": "theme-globals.ts"
12182
+ },
12183
+ {
12184
+ "name": "KeyframePointLike",
12185
+ "kind": "type",
12186
+ "domain": "theme",
12187
+ "properties": [
12188
+ {
12189
+ "name": "point",
12190
+ "type": "string",
12191
+ "optional": false
12192
+ }
12193
+ ],
12194
+ "filePath": "theme-globals.ts"
12195
+ },
12196
+ {
12197
+ "name": "KeyframeLike",
12198
+ "kind": "type",
12199
+ "domain": "theme",
12200
+ "properties": [
12201
+ {
12202
+ "name": "id",
12203
+ "type": "string",
12204
+ "optional": false
12205
+ },
12206
+ {
12207
+ "name": "name",
12208
+ "type": "string",
12209
+ "optional": true
12210
+ },
12211
+ {
12212
+ "name": "type",
12213
+ "type": "string",
12214
+ "optional": true
12215
+ },
12216
+ {
12217
+ "name": "points",
12218
+ "type": "KeyframePointLike[]",
12219
+ "optional": true
12220
+ }
12221
+ ],
12222
+ "filePath": "theme-globals.ts"
12223
+ },
12224
+ {
12225
+ "name": "VariableLike",
12226
+ "kind": "type",
12227
+ "domain": "theme",
12228
+ "properties": [
12229
+ {
12230
+ "name": "id",
12231
+ "type": "string",
12232
+ "optional": true
12233
+ },
12234
+ {
12235
+ "name": "variableName",
12236
+ "type": "string",
12237
+ "optional": true
12238
+ },
12239
+ {
12240
+ "name": "displayName",
12241
+ "type": "string",
12242
+ "optional": true
12243
+ },
12244
+ {
12245
+ "name": "variableType",
12246
+ "type": "string",
12247
+ "optional": true
12248
+ },
12249
+ {
12250
+ "name": "defaultValue",
12251
+ "type": "any",
12252
+ "optional": true
12253
+ },
12254
+ {
12255
+ "name": "isGlobal",
12256
+ "type": "boolean",
12257
+ "optional": true
12258
+ }
12259
+ ],
12260
+ "filePath": "theme-globals.ts"
12261
+ },
12262
+ {
12263
+ "name": "SerializableProject",
12264
+ "kind": "type",
12265
+ "domain": "theme",
12266
+ "properties": [
12267
+ {
12268
+ "name": "globalsBlueprint",
12269
+ "type": "{ module?: { variables?: VariableLike[] } }",
12270
+ "optional": true
12271
+ },
12272
+ {
12273
+ "name": "theme",
12274
+ "type": "{\n breakpoints?: BreakpointLike[];\n keyframes?: KeyframeLike[];\n pattern?: {\n values?: PatternValueLike[];\n elements?: PatternElementLike[];\n colorSchemes?: ColorSchemeLike[];\n colorSchemeValues?: ColorSchemeValueLike[];\n };\n }",
12275
+ "optional": true
12276
+ }
12277
+ ],
12278
+ "filePath": "theme-globals.ts"
11774
12279
  }
11775
12280
  ]
11776
12281
  }
package/dist/index.js CHANGED
@@ -2227,7 +2227,7 @@ server.tool("get_framework_guide", "Get a framework guide on a specific topic (e
2227
2227
  };
2228
2228
  });
2229
2229
  // Tool: get_type_definition
2230
- server.tool("get_type_definition", "Get the full definition of a storefront type or enum by name (e.g. 'IkasProduct', 'IkasOrderStatus'). Shows all properties with types, extends, or enum values.", {
2230
+ server.tool("get_type_definition", "Get the full definition of a storefront type or enum by name. Shows all properties with types, extends, or enum values. Covers both runtime models (e.g. 'IkasProduct', 'IkasOrderStatus') and theme-globals tokens returned by the getters (e.g. 'ThemeSetting', 'DesignToken', 'TypographyToken', 'ColorSchemeToken', 'BreakpointToken', 'KeyframeToken'). If a type reports as not found, it may not be indexed yet — fall back to reading the package's `.d.ts` (e.g. `@ikas/bp-storefront-config`) rather than typing the value as `any`.", {
2231
2231
  name: z
2232
2232
  .string()
2233
2233
  .describe("Type or enum name (e.g. 'IkasProduct', 'IkasOrderStatus')"),
@@ -4050,7 +4050,7 @@ server.tool("get_editor_workflow", "Read this FIRST when the user wants to place
4050
4050
  return { content: [{ type: "text", text: EDITOR_WORKFLOW_GUIDE }] };
4051
4051
  });
4052
4052
  // Tool: list_theme_globals
4053
- server.tool("list_theme_globals", "List the theme's global settings from the connected editor: global variables (Theme Settings) and design tokens (colors, typography, breakpoints, keyframes, color schemes). Call this BEFORE generating sections/components so you reuse the theme's existing variables and tokens (read them in component code via `getThemeSetting`/`getThemeColors`/... from `@ikas/bp-storefront`). Includes items created manually in the editor UI. Requires `ikas-component dev` running with the editor connected.", {
4053
+ server.tool("list_theme_globals", "List the theme's global settings from the connected editor: global variables (Theme Settings) and design tokens (colors, typography, breakpoints, keyframes, color schemes). Call this BEFORE generating sections/components so you reuse the theme's existing variables and tokens (read them in component code via `getThemeSetting`/`getThemeColors`/... from `@ikas/bp-storefront`). Includes items created manually in the editor UI. Requires `ikas-component dev` running with the editor connected. Two shape gotchas when consuming the result at runtime: (1) color schemes — `colorSchemes.schemes` holds only `{id,name}` slot LABELS; the actual colors live in `colorSchemes.values[].colorsByScheme` keyed by slot id, so iterate `values[].colorsByScheme` (iterating `schemes` renders empty). (2) An IMAGE setting's `value` is an image REFERENCE like `{id:'theme-images/<uuid>'}` with no `.url` — resolve it via `getDefaultSrc`/`getSrc`.", {
4054
4054
  project_root: z.string().describe("Absolute path to the code-component project (where `node_modules/.bin/ikas-component` lives)."),
4055
4055
  port: z.number().optional().describe("Dev server WebSocket port (default 5201)."),
4056
4056
  }, async ({ project_root, port }) => {