@fabiocv/component-code-mcp 0.6.2 → 0.6.3

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.
Files changed (3) hide show
  1. package/README.md +10 -9
  2. package/dist/stdio.js +12 -12
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -53,18 +53,19 @@ If the app can't find `npx`, as when Node comes from nvm, add the URL instead.
53
53
 
54
54
  `component_code_show`, titled Show in Component Code, takes:
55
55
 
56
- | Input | What it is |
57
- | ---------- | ---------------------------------------------------------------------------------------- |
58
- | `source` | The component's module in TSX. It may import only from `react`. |
59
- | `code` | How it is used, in JSX: elements, props and text, with no hooks, calls or conditions. |
60
- | `file` | The file named in the code's tab. |
61
- | `controls` | How a prop is changed: a list of options, `{ min, max, step }` for a number, or `false`. |
56
+ | Input | What it is |
57
+ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `source` | The component's module in TSX. It may import only from `react`. |
59
+ | `code` | How it is used, in JSX: elements, props and text, with no hooks, calls or conditions. |
60
+ | `file` | The file named in the code's tab. |
61
+ | `controls` | How a prop is changed: a list of options, `{ min, max, step }` for a number, or `false`. `{ change: true }` lets the component change it too. |
62
62
 
63
63
  The exports of `source` are what `code` can name, and a default export goes in
64
64
  under its function's name. `code` stays plain JSX. For each value `code` sets,
65
- such as `checked={true}`, the component gets a handler such as
66
- `onCheckedChange`, and the tool asks the agent to call it, so switching the
67
- component in the preview shows in the code the agent gets. State of its own is
65
+ such as `checked={true}`, with `{ change: true }` in `controls`, the
66
+ component gets a handler such as `onCheckedChange`, and the tool asks the agent
67
+ to call it, so switching the component in the preview shows in the code the
68
+ agent gets. State of its own is
68
69
  only for when that handler is missing.
69
70
 
70
71
  `component_code_show_html`, titled Show HTML in Component Code, takes: