@ikas/code-components-mcp 0.99.0 → 0.101.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.
@@ -507,6 +507,24 @@
507
507
  "advanced",
508
508
  "CLI"
509
509
  ]
510
+ },
511
+ "custom-enums": {
512
+ "title": "Custom Enum Types",
513
+ "description": "Create and manage custom enum types for ENUM props without needing an editor connection",
514
+ "content": "## Custom Enum Types\n\nCustom enums let you define project-specific dropdown options for ENUM props. Unlike built-in enums (FlexDirectionStyleType, etc.), custom enums are stored in `ikas.config.json` and work offline — no editor connection required.\n\n### Creating a Custom Enum\n\n```bash\nnpx ikas-component config add-enum --name \"Size\" --options '{\"Small\":\"sm\",\"Medium\":\"md\",\"Large\":\"lg\"}'\n```\n\nOutput:\n```json\n{\"success\":true,\"enumId\":\"aBcDeFgHiJ\",\"enumName\":\"Size\",\"enumOptions\":{\"Small\":\"sm\",\"Medium\":\"md\",\"Large\":\"lg\"}}\n```\n\nThe `enumId` is a generated 10-character ID. Use it when adding ENUM props.\n\n### Using a Custom Enum with a Prop\n\n```bash\nnpx ikas-component config add-prop --component MyComp --name size --displayName \"Size\" --type ENUM --enumTypeId aBcDeFgHiJ\n```\n\nThis generates in `types.ts`:\n```typescript\nexport type Size = \"sm\" | \"md\" | \"lg\";\nexport interface MyCompProps { size?: Size; }\n```\n\n### Listing Custom Enums\n\n```bash\nnpx ikas-component config list-enums\n```\n\n### Updating a Custom Enum\n\n```bash\nnpx ikas-component config update-enum --id aBcDeFgHiJ --name \"ProductSize\" --options '{\"XS\":\"xs\",\"S\":\"s\",\"M\":\"m\",\"L\":\"l\",\"XL\":\"xl\"}'\n```\n\nBoth `--name` and `--options` are optional — provide only what you want to change.\n\n### Removing a Custom Enum\n\n```bash\nnpx ikas-component config remove-enum --id aBcDeFgHiJ\n```\n\nThis fails if any component prop references the enum. Remove or update the prop first.\n\n### Workflow: Complete Example\n\n```bash\n# 1. Create the enum\nnpx ikas-component config add-enum --name \"AspectRatio\" --options '{\"Square\":\"1/1\",\"Landscape\":\"16/9\",\"Portrait\":\"3/4\"}'\n# Returns: {\"enumId\":\"xYz123AbCd\"}\n\n# 2. Use it in a prop\nnpx ikas-component config add-prop --component ImageGrid --name aspectRatio --displayName \"Aspect Ratio\" --type ENUM --enumTypeId xYz123AbCd\n\n# 3. The generated types.ts will have:\n# export type AspectRatio = \"1/1\" | \"16/9\" | \"3/4\";\n# export interface ImageGridProps { aspectRatio?: AspectRatio; }\n```\n\n### Storage\n\nCustom enums are stored in `ikas.config.json` under `customTypes`:\n```json\n{\n \"customTypes\": [\n {\n \"id\": \"aBcDeFgHiJ\",\n \"name\": \"Size\",\n \"type\": \"enum\",\n \"enumOptions\": {\"Small\":\"sm\",\"Medium\":\"md\",\"Large\":\"lg\"},\n \"isDynamic\": false\n }\n ]\n}\n```\n\n### Built-in vs Custom Enums\n\n- **Built-in enums** (e.g. `@ikas/bp-storefront-models-FlexDirectionStyleType`) come from the editor and require `list-types` with a connected editor.\n- **Custom enums** are defined in `ikas.config.json` and work offline. Use `config add-enum` to create them.\n\nFor automated/AI-driven component generation, custom enums are the recommended approach since they don't require an editor connection.",
515
+ "tags": [
516
+ "enum",
517
+ "custom-enum",
518
+ "add-enum",
519
+ "remove-enum",
520
+ "update-enum",
521
+ "list-enums",
522
+ "ENUM",
523
+ "enumTypeId",
524
+ "customTypes",
525
+ "offline",
526
+ "CLI"
527
+ ]
510
528
  }
511
529
  }
512
530
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-07T11:43:38.373Z",
2
+ "generatedAt": "2026-04-09T10:51:03.160Z",
3
3
  "functions": [
4
4
  {
5
5
  "name": "apiListBlog",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-07T11:43:38.402Z",
2
+ "generatedAt": "2026-04-09T10:51:03.195Z",
3
3
  "types": [
4
4
  {
5
5
  "name": "IkasProductAttributeDetail",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/code-components-mcp",
3
- "version": "0.99.0",
3
+ "version": "0.101.0",
4
4
  "description": "MCP server for ikas code components documentation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",